agent-builder

agent-builder is a skill for Claude Code, Codex from chandrudp29/skillhub. It costs 42 tokens per session (1,626 once invoked), scanned A, original, MIT.

A guide for designing and building production LLM agents, which are programs that use a language model to perform tasks. It covers tools, memory, streaming responses, LangGraph, and handling failures.

In plain words
What is it for?
Use it to design single-agent or multi-agent systems, connect tools, add memory, handle errors, and plan evaluations for real applications.
Why use it?
It helps turn an agent idea into a defined workflow with clear tools, limits, failure behavior, and ways to measure success. It also addresses common problems such as repeated loops and made-up tool calls.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/chandrudp29/skillhub/agent-builder
Any agent
npx skills add chandrudp29/skillhub --skill agent-builder
Clone the repo
git clone --depth 1 https://github.com/chandrudp29/skillhub

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for agent-builder

README.md
[![agentmods](https://agentmods.dev/badge/skills/chandrudp29/skillhub/agent-builder.svg)](https://agentmods.dev/skills/chandrudp29/skillhub/agent-builder)
Your own site
<a href="https://agentmods.dev/skills/chandrudp29/skillhub/agent-builder"><img src="https://agentmods.dev/badge/skills/chandrudp29/skillhub/agent-builder.svg" alt="Measured on agentmods" height="20"></a>
Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,626 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00042 $0.01626
Opus 5 $0.00021 $0.00813
Sonnet 5 $0.00008 $0.00325
Haiku 4.5 $0.00004 $0.00163

Measured 3d ago against content hash 80b43dab5ae0, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

agent-builder scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/agent-builder/SKILL.md · 207 lines

How it starts

The opening of the file, as written. The whole thing — 207 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Agent Builder

A structured approach to building LLM agents that work in production — not just demos.

When to Use

  • "Build an agent that can X"
  • "Design a multi-agent system for Y"
  • "My agent keeps failing / looping / hallucinating tools"
  • Before building any agentic workflow

The Production Agent Checklist

Before writing code, answer these:

  1. What does the agent need to DO? (specific tasks, not "be helpful")
  2. What TOOLS does it need? (web search, code execution, DB query, API calls)
  3. What should it STOP doing? (scope boundaries)
  4. How does it FAIL gracefully? (tool errors, context limits, bad outputs)
  5. How is it EVALUATED? (what does success look like, measurably?)

Architecture Patterns

Single Agent with Tools (start here)

from langgraph.prebuilt import create_react_agent
from langchain_anthropic import ChatAnthropic

model = ChatAnthropic(model="claude-sonnet-4-6")
tools = [web_search, code_executor, db_query]

agent = create_react_agent(model, tools)
result = agent.invoke({"messages": [("user", "Research X and summarize")]})

Use when: single task type, clear tool set, < 10 tools.

Stateful Agent with Memory (LangGraph)

from langgraph.graph import StateGraph, MessagesState
from langgraph.checkpoint.memory import MemorySaver

def call_model(state: MessagesState):
    response = model.invoke(state["messages"])
    return {"messages": [response]}

def call_tools(state: MessagesState):
    # execute tool calls from last message
    ...

graph = StateGraph(MessagesState)
graph.add_node("agent", call_model)
graph.add_node("tools", call_tools)
graph.add_edge("tools", "agent")
graph.add_conditional_edges("agent", should_continue)

checkpointer = MemorySaver()
app = graph.compile(checkpointer=checkpointer)

# Run with thread_id for persistent memory across calls
config = {"configurable": {"thread_id": "user-123"}}
app.invoke({"messages": [("user", "Continue from last time...")]}, config)

Use when: multi-turn conversations, stateful workflows, need to pause/resume.

Read the full file on GitHub · 207 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 207 lines · 42 tokens per session scan A 80b43dab5ae0

Subscribe to this mod's changes

agent-builder is a skill published in the GitHub repository chandrudp29/skillhub (13 stars, last pushed 2mo ago), licensed MIT. It adds 42 tokens to every session and 1,626 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

langgraph-fundamentals

INVOKE THIS SKILL when writing ANY LangGraph code. Covers StateGraph, state schemas, nodes, edges, Command, Send, invoke, streaming, and error handling.

HsienW/chat-gun-react-agent · 43 tokens

code-review-and-quality

Conducts multi-axis code review. Use before merging any change. Use when reviewing code written by yourself, another agent, or a human. Use when you need to assess code quality across multiple dimensions before it enters the main branch.

HsienW/chat-gun-react-agent · 51 tokens

langgraph-human-in-the-loop

INVOKE THIS SKILL when implementing human-in-the-loop patterns, pausing for approval, or handling errors in LangGraph. Covers interrupt(), Command(resume=...), approval/validation workflows, and the 4-tier error handling strategy.

HsienW/chat-gun-react-agent · 55 tokens

langgraph-persistence

INVOKE THIS SKILL when your LangGraph needs to persist state, remember conversations, travel through history, or configure subgraph checkpointer scoping. Covers checkpointers, threadid, time travel, Store, and subgraph persistence modes.

HsienW/chat-gun-react-agent · 55 tokens

test-driven-development

Drives development with tests. Use when implementing any logic, fixing any bug, or changing any behavior. Use when you need to prove that code works, when a bug report arrives, or when you're about to modify existing functionality.

HsienW/chat-gun-react-agent · 50 tokens

coding-standards

Baseline cross-project coding conventions for naming, readability, immutability, and code-quality review. Use detailed frontend or backend skills for framework-specific patterns.

HsienW/chat-gun-react-agent · 35 tokens