Skip to content

Instantly share code, notes, and snippets.

View marttp's full-sized avatar
🙇‍♂️
Let's improve equality of developer and make the world better together

Thanaphoom Babparn marttp

🙇‍♂️
Let's improve equality of developer and make the world better together
View GitHub Profile
Two pointers: one input, opposite ends
```python3
def fn(arr):
left = ans = 0
right = len(arr) - 1
while left < right:
# do some logic here with left and right
if CONDITION:
@marttp
marttp / claude.md
Created February 7, 2026 01:20 — forked from OmerFarukOruc/claude.md
AI Agent Workflow Orchestration Guidelines

AI Coding Agent Guidelines (claude.md)

These rules define how an AI coding agent should plan, execute, verify, communicate, and recover when working in a real codebase. Optimize for correctness, minimalism, and developer experience.


Operating Principles (Non-Negotiable)

  • Correctness over cleverness: Prefer boring, readable solutions that are easy to maintain.
  • Smallest change that works: Minimize blast radius; don't refactor adjacent code unless it meaningfully reduces risk or complexity.
import praw
import logging
import os
from datetime import datetime, timedelta
from google.adk.tools.tool_context import ToolContext
from google.cloud import firestore
def search_yesterday_reddit_posts(
subreddit_names: list[str] = [
from google.adk.agents import Agent
from google.adk.tools import google_search
from trend_spotter.config import MODEL
google_search_sub_agent_prompt = """
**Role:**
- You are a specialist Research Assistant.
- Your only purpose is to execute a Google Search based on instructions.
**Tools:**
from google.adk.agents import Agent, SequentialAgent
from trend_spotter.config import MODEL
from trend_spotter.sub_agents.reddit_agent import reddit_agent
from trend_spotter.sub_agents.workshop_group import (
product_manager_agent,
solution_architect_agent,
reporter_agent,
)
solution_design_group = SequentialAgent(
{
"document_id": "76d892c9-2d7e-458f-ab57-a64ecc28d4b2",
"created_at": "timestamp_placeholder",
"user_profile": {
"salary_per_month": "90000 THB",
"age": 30,
"current_savings": "5000 THB",
"risk_tolerance": "Moderate"
},
"financial_goals": [
import logging
import uuid
from google.adk.agents import Agent, SequentialAgent, LoopAgent, ParallelAgent
from google.adk.tools.tool_context import ToolContext
from google.genai import types
from google.adk.tools import exit_loop
model_name = "gemini-2.5-flash-preview-04-17"
# Tools
from google.adk.agents import Agent
from google.adk.tools import google_search
root_agent = Agent(
model="gemini-2.0-flash-exp",
name="question_answer_agent",
description="A helpful assistant agent that can answer questions.",
instruction="""Respond to the query using google search""",
tools=[google_search],
)
import datetime
from zoneinfo import ZoneInfo
from google.adk.agents import Agent
def get_weather(city: str) -> dict:
"""Retrieves the current weather report for a specified city.
Args:
city (str): The name of the city for which to retrieve the weather report.
from google.adk.agents import Agent
root_agent = Agent(
name="noob_agent",
model="gemini-2.0-flash",
description=("Simple agent without any tools"),
instruction=("You are a helpful agent who can answer user questions."),
)