Logo: Agent Design

Agent Design

Communautéit
nimadorostkar
agent-design

Use when building an LLM agent that uses tools over multiple steps. Covers tool design, the agent loop, error recovery, termination, human checkpoints, and knowing when an agent is the wrong architecture. Trigger on "my agent keeps looping", "agent calls the wrong tool", "build an agent that can use our api". Do not use for delegating work to a subagent — see the subagents skill; for building the MCP server that exposes tools, see the mcp-server skill.

Iwwersiicht

Editeurnimadorostkar
RepositoryClaude-Skills-collection
Skill-Nummagent-design
Stären
34
Forks
4
Matgeliwwert Dateien
Nëmmen Instruktiounen
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • Alles an den Instruktiounen

    Alles, wat de Modell brauch, steet an den Instruktiounen — keng zousätzlech Dateien ze synchroniséieren.

  • Open Source

    nimadorostkar huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Agent Design an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/nimadorostkar/Claude-Skills-collection/tree/main/skills/ai/agent-design
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/nimadorostkar/Claude-Skills-collection.git /tmp/Claude-Skills-collection
mkdir -p .claude/skills
cp -r /tmp/Claude-Skills-collection/skills/ai/agent-design .claude/skills/agent-design
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Agent Design an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Agent Design automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Agent Design net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Agent Design

Purpose

Build LLM agents that complete tasks reliably and fail safely. The two failure modes that define bad agents are looping forever without progress, and taking a destructive action confidently and wrongly.

When to Use

  • Building an agent that uses tools to accomplish multi-step tasks.
  • An agent that loops, stalls, or takes wrong actions.
  • Designing the tool surface an agent will use.
  • Deciding whether an agent is warranted at all.

Capabilities

  • Tool design: granularity, naming, descriptions, and error returns.
  • The agent loop: planning, acting, observing, and terminating.
  • Error recovery and retry.
  • Human-in-the-loop checkpoints for irreversible actions.
  • Guardrails: budgets, timeouts, and permission boundaries.

Inputs

  • The task, and how it decomposes.
  • The tools available, and which of them are destructive.
  • The acceptable cost and latency per task.

Outputs

  • A tool surface designed for a model, not lifted from an API.
  • An agent with a termination condition and a budget.
  • Checkpoints before anything irreversible.

Workflow

  1. Ask whether you need an agent — If the steps are known in advance, write the workflow. A deterministic pipeline with one LLM call per step is cheaper, faster, more debuggable, and more reliable than an agent. Agents earn their cost only when the path genuinely cannot be known in advance.
  2. Design tools for the model — Each tool does one thing, has a name that says what it does, and a description that says exactly when to use it and when not to. This description is the most important text in the system.
  3. Return useful errors — A tool that fails should say what went wrong and what to try instead. Error: 400 teaches the model nothing; Error: 'status' must be one of [open, closed]. You passed 'active'. lets it recover on the next step.
  4. Bound the loop — A maximum step count, a token budget, and a wall-clock timeout. Every agent will eventually loop; the question is whether it stops.
  5. Checkpoint the irreversible — Deleting data, sending a message, moving money, deploying. The agent proposes; a human confirms.
  6. Make it observable — Log every step: the reasoning, the tool call, the result. An agent you cannot trace is an agent you cannot debug.

Best Practices

  • The tool description is the prompt. Most agent misbehavior is a tool whose description does not clearly say when it applies.
  • Fewer, well-chosen tools beat many overlapping ones. An agent with thirty tools spends its reasoning deciding between them.
  • An agent with no termination condition will loop. Detect "no progress" explicitly: the same tool call with the same arguments twice means it is stuck, not persevering.
  • Do not give an agent a destructive tool without a confirmation step. Confidence is not competence, and the model has plenty of the former.
  • Return structured, pruned tool results. A tool that dumps 50 KB of JSON burns the context budget the agent needs to think.
  • Prefer a small, verifiable step to a large, plausible one. An agent that writes one function and runs the test is more reliable than one that writes the whole module and declares success.

Examples

A tool designed for a model rather than lifted from an API:

python
@tool
def search_orders(
    customer_email: str | None = None,
    status: Literal["open", "paid", "shipped", "cancelled"] | None = None,
    placed_after: date | None = None,
    limit: int = 20,
) -> str:
    """Search for orders. Use this to find an order when you do not know its ID.

    You must provide at least one filter. If you already have an order ID,
    use `get_order` instead — it is faster and returns full detail.

    Returns a compact list: order ID, status, total, and customer email.
    To see line items or the refund history, call `get_order` with an ID
    from these results.
    """
    if not any([customer_email, status, placed_after]):
        # An error the model can actually act on.
        return "Error: provide at least one of customer_email, status, or placed_after."

    orders = db.search(...)[:limit]
    if not orders:
        return "No orders matched. Try widening the date range or removing the status filter."

    # Compact: four fields, not the full object. The agent can fetch detail if it needs it.
    return "\n".join(
        f"{o.id} | {o.status} | {o.total_cents / 100:.2f} {o.currency} | {o.customer_email}"
        for o in orders
    )

A loop that terminates, with a checkpoint before anything irreversible:

python
async def run(task: str, max_steps: int = 25, token_budget: int = 200_000) -> Result:
    history, tokens_used, recent_calls = [], 0, deque(maxlen=3)

    for step in range(max_steps):
        response = await model.complete(task, history, tools=TOOLS)
        tokens_used += response.usage.total

        if tokens_used > token_budget:
            return Result.halted("token budget exhausted", history)

        if response.is_final:
            return Result.done(response.text, history)

        call = response.tool_call

        # No-progress detection: the same call twice in a row means it is stuck.
        signature = (call.name, json.dumps(call.args, sort_keys=True))
        if recent_calls.count(signature) >= 2:
            return Result.halted(f"looping on {call.name} with identical arguments", history)
        recent_calls.append(signature)

        # Irreversible actions require a human. The agent proposes; it does not decide.
        if call.name in DESTRUCTIVE_TOOLS:
            approval = await request_approval(call, reason=response.reasoning)
            if not approval.granted:
                history.append(tool_result(call, f"Denied by operator: {approval.reason}"))
                continue

        result = await execute(call)
        history.append(tool_result(call, result))

    return Result.halted(f"step limit ({max_steps}) reached without completing", history)

Notes

  • The single most common agent failure is repeating an identical tool call because the result did not contain what it expected. Detecting a repeated call with identical arguments catches this in one extra line of code.
  • An agent that can read but not write is dramatically safer and covers more use cases than most people assume. Start read-only and add write tools one at a time, each with a checkpoint.
  • Cost per task is the metric that determines whether an agent is viable. Measure it early — a task that takes 40 tool calls at $0.30 each is not a product feature, it is a demo.

Heefeg gestallte Froen

Wat mécht de KI-Skill Agent Design?

Use when building an LLM agent that uses tools over multiple steps. Covers tool design, the agent loop, error recovery, termination, human checkpoints, and knowing when an agent is the wrong architecture. Trigger on "my agent keeps looping", "agent calls the wrong tool", "build an agent that can use our api". Do not use for delegating work to a subagent — see the subagents skill; for building the MCP server that exposes tools, see the mcp-server skill.

Firwat Agent Design op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Agent Design besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Agent Design an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/nimadorostkar/Claude-Skills-collection/tree/main/skills/ai/agent-design an. TypingMind liest d'Datei SKILL.md an installéiert de Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Agent Design benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Agent Design benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Agent Design domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Agent Design gratis?

Jo. nimadorostkar huet de Skill ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇