agent-design
Skill4 starsChanged 4 months agoMITView on GitHub
Designs an agent's architecture — the tool surface, context strategy, control flow, and model choice — from a scoped set of jobs. Use this whenever the user is deciding how an agent should be built rather than what it should do — choosing tools, wiring up an agent loop, deciding single-agent vs multi-agent, picking a model, or planning what goes in the context window. Also use when an existing agent is unreliable and the cause looks structural rather than a prompt problem. For deciding what the agent is for, use agent-scoping first.
7 other projects use a version of this.
Adopted by
Most recently taken up by
- BULDEE/ai-craftsman-superpowerstheir own version, first seen Sep 21, 2026
- nahid-sparktales/agent-dispatchertheir own version, first seen Sep 21, 2026
- wibus-wee/cradle-apptheir own version, first seen Sep 8, 2026
- freezingfunky/ashwin-skillstheir own version, first seen Aug 4, 2026
- nimadorostkar/Claude-Skills-collectiontheir own version, first seen Jul 14, 2026
- tienenwu/fablestheir own version, first seen Jul 7, 2026
Other versions7 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 7
- wibus-wee/cradle-app★ 78same name
- nahid-sparktales/agent-dispatcher★ 59same name
- BULDEE/ai-craftsman-superpowers★ 35same name
- nimadorostkar/Claude-Skills-collection★ 28same name
- Minions-Land/Soup_Drinking★ 4same name
- tienenwu/fables★ 4same name
- freezingfunky/ashwin-skills★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository61 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- agent-deploymentSkill
- agent-evaluationSkill
- agent-hardeningSkill
- agent-implementationSkill
- agent-observabilitySkill
- agent-scopingSkill
- api-designSkill
- code-templatingSkill
- dependency-upgradeSkill
- error-handlingSkill
- feature-implementationSkill
- project-scaffoldingSkill
- refactoringSkill
- data-analysisSkill
- data-migrationSkill
- data-modelingSkill
- sql-queriesSkill
- ci-pipelinesSkill
- containerizationSkill
- deployment-strategiesSkill
- infrastructure-as-codeSkill
- debuggingSkill
- issue-investigationSkill
- issue-triageSkill
- log-analysisSkill
- network-troubleshootingSkill
- performance-profilingSkill
- api-documentationSkill
- commit-messagesSkill
- diagrammingSkill
- markdown-docsSkill
- plain-languageSkill
- pr-descriptionsSkill
- release-notesSkill
- browser-testingSkill
- integration-testingSkill
- load-testingSkill
- test-dataSkill
- test-driven-developmentSkill
- unit-testingSkill
- deep-researchSkill
- feed-digestSkill
- summarizationSkill
- accessibility-reviewSkill
- code-analysisSkill
- code-lintingSkill
- code-reviewSkill
- auth-designSkill
- dependency-auditSkill
- secrets-managementSkill
- security-analysisSkill
- threat-modelingSkill
- capacity-planningSkill
- disaster-recoverySkill
- incident-responseSkill
- monitoring-setupSkill
- root-cause-analysisSkill
- runbooksSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 6 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 5 edited versions we read keep these.
6
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 31
Collapse sequences: If completing a job always requires three calls in a fixed order, that is one tool, not three.
- Distinctive: line 35
Return what the agent needs to decide the next step: not the raw payload. A 40KB JSON blob spends context and buries the useful field.
- Distinctive: line 40
Done when: every tool traces to a job, and every job is completable with the tools listed.
- Distinctive: line 54
Write down the plan for accumulation now: summarize older turns, drop stale tool output, or keep a running scratchpad.
- Distinctive: line 77
If you choose a loop, decide now: what is the iteration limit, and what does the agent do when it hits it?
- Distinctive: line 104
Done when: every failure has a designed response, not a default.
“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Phase 2: Design
Input: an agent spec (docs/agent-spec.md from agent-scoping). Output:
docs/agent-design.md.
Almost every unreliable agent is unreliable for one of three structural reasons: it has too many tools, its context is full of things it does not need, or it was given autonomy it was never evaluated for. This phase is where those get decided.
The governing principle: design the smallest system that could do the jobs in the spec. You can add capability after evals show a gap. You cannot easily remove it after users depend on it.
1. Derive tools from jobs, never the reverse
Take each job from the spec and ask what the agent must be able to do to finish it. That list is your tool surface. Anything not on it does not get exposed, however easy it would be to add.
This is the most commonly skipped step and the most damaging. Wrapping an entire API — every endpoint, because the spec was available — produces hundreds of tools, most irrelevant to every request, and measurably worse selection accuracy on the ones that matter.
Design each tool for a model, not for an engineer:
- Name it after the intent, not the endpoint.
find_customer_ordersbeatsget_v2_orders. - Collapse sequences. If completing a job always requires three calls in a fixed order, that is one tool, not three. Every extra hop is a chance to stop halfway.
- Make the arguments hard to get wrong. Enums over free strings, IDs the agent has actually seen, no argument whose valid values the agent must guess.
- Return what the agent needs to decide the next step: not the raw payload. A 40KB JSON blob spends context and buries the useful field.
- Make errors instructive. "No customer with that ID; use find_customer by email first" recovers. "400 Bad Request" loops.
Done when: every tool traces to a job, and every job is completable with the tools listed.
2. Decide what is in context, and what it costs
Context is a budget, not a container. For each thing you plan to put in it, state why the agent cannot do the job without it.
Sort into:
- Always: system prompt, tool definitions, the current request. Keep this tight; it is paid on every turn.
- Retrieved: fetched per request based on the task. Most domain knowledge belongs here.
- Accumulated: conversation history and tool results. This is what grows unboundedly, and what you must have a plan for.
Write down the plan for accumulation now: summarize older turns, drop stale tool output, or keep a running scratchpad. An agent with no strategy here works in testing and degrades in the third hour of a real session.
Done when: you can state the approximate token cost of a typical turn and what happens on a long one.
3. Choose the control flow honestly
In increasing order of power and failure surface:
- A single call — no loop. If the job is "classify this" or "rewrite that", this is the answer and calling it an agent adds only latency.
- A fixed pipeline — deterministic steps, model calls at specific points. Debuggable, testable, and the right answer far more often than it is chosen.
- A tool loop, the model decides what to call and when it is done. Use when the path genuinely varies by request.
- Multiple agents — separate contexts with a handoff. Justify this specifically; it costs you a whole class of coordination bugs and makes tracing much harder.
Pick the lowest level that does the job. Multi-agent architectures are frequently adopted for jobs a tool loop handles, and the cost is paid in every debugging session afterwards.
If you choose a loop, decide now: what is the iteration limit, and what does the agent do when it hits it? Silent truncation is the worst answer.
Done when: the control flow is named, and the loop's exit conditions are written.
4. Choose the model per call site, not per project
Different steps have different requirements. Routing, extraction, and classification often run well on a small fast model; the step that plans and calls tools usually needs the strongest one.
Decide per site, and record what would make you revisit. Note the model version explicitly — a preview or dated model ID is a dependency with an expiry.
Done when: each call site has a model and a stated reason.
5. Design the failure behaviour
This is what separates a demo from something usable. For each of these, decide before building:
- A tool fails: retry with backoff, try a different approach, or surface it? Which tools are safe to retry, and which are not idempotent?
- The agent cannot finish: what does it return? An honest "I could not do X because Y" beats a confident wrong answer, and must be designed for, because the default is confidence.
- The agent loops: turn limit, and what happens at it.
- Output is malformed: validate against a schema and retry once, or fail loudly.
- Latency exceeds budget: stream partial progress, or fail.
Done when: every failure has a designed response, not a default.
6. Write the design
# <Agent> — design
## Tool surface
| Tool | Job it serves | Arguments | Returns | Failure behaviour |
## Context strategy
Always / retrieved / accumulated, with the growth plan.
## Control flow
The chosen level and why the simpler one was rejected. Loop limits.
## Models
Per call site, with the reason and the revisit trigger.
## Failure design
Each failure mode and its designed response.
## Rejected alternatives
What was considered and why it lost. This is what stops the same debate in a month.
## Open questions for eval
What this design assumes that only evals can confirm.That last section matters — it is the handoff to agent-evaluation. A design assumption nobody
wrote down is an assumption nobody tests.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

