agentleFS
Sathvikar01Sathvikar01/Agent-engineering-skills/tool-design/SKILL.md

tool-design

Skill3 starsChanged 38 days agoMITView on GitHub

Design model-facing tools with coherent capabilities, strict contracts and predictable side effects. Use when exposing APIs or operations to an LLM agent, redesigning ambiguous agent tools, or specifying tool names, descriptions, arguments, results and execution semantics. Do not use for ordinary REST design with no model consumer, MCP transport implementation alone, or evaluating tool selection without changing contracts.

25 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use long-horizon-prompting, bdi-mental-states and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • DVwebBiz11Skill

    long-horizon-prompting

    This skill should be used when writing, enhancing, or evaluating the launch prompt for a long-running autonomous agent or a parallel multi-agent orchestration attacking a hard problem: pseudo-formal task briefs that define terms and an exact success predicate linguistically, enumerate non-counting outcomes, set persistence rules with explicit stop and return conditions and effort floors, manage a diverse portfolio of parallel approaches with an approach registry and blocked-route bookkeeping, and gate the return on adversarial audit. Route agent topology and coordination protocols to multi-agent-patterns, runtime control surfaces and loop governance to harness-engineering, evaluator and quality-gate construction to evaluation, judge design to advanced-evaluation, and compaction or memory mechanics to context-compression and memory-systems.

    Also in 5 projects that use this

  • Downey6689Skill

    bdi-mental-states

    Transforms external RDF context into BDI mental states. Invoke when modeling beliefs, desires, and intentions.

    Also in 6 projects that use this

  • Downey6689Skill

    hosted-agents

    Guidance for hosted/sandboxed agents. Invoke when running background agents in isolated VMs or multi-client setups.

    Also in 6 projects that use this

  • DVwebBiz11Skill

    self-improvement-loops

    This skill should be used when the harness, scaffold, workflow, or optimizer itself is the optimization target: recursive self-improvement (RSI) loops, meta-harnesses, self-improving harnesses that mine their own failures and propose bounded edits, evolutionary or population-based search over agent scaffolds, acceptance gates for self-modifying systems, and agentic context evolution where the mechanism that produces context is versioned and evolved. Route governance of a single autonomous loop (locked surfaces, durable logs, rollback, novelty gates, approval boundaries) to harness-engineering, measurement and quality-gate design to evaluation, judge design to advanced-evaluation, and remote sandbox infrastructure to hosted-agents.

    Also in 4 projects that use this

  • abdullah1854Skill

    context-degradation

    Also in 11 projects that use this

  • abdullah1854Skill

    context-fundamentals

    Also in 12 projects that use this

  • +1 more from Downey6689

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 20 edited versions we read keep these.

  • 1

    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
  1. Distinctive:

    Use structured-output-design for model-produced proposal validation and tool-evals for model usability.

    line 32

“Common” is measured: kept by at least 6 in 10 of the 20 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Tool Design

Design the smallest coherent capability surface for the agent's tasks. Backend API mechanics and MCP protocol, transport and SDK code are out of scope (API-design or MCP-builder skills may cover them). This skill adds the contract an LLM must select and use correctly.

Derive the surface from tasks

  1. List representative user intents, required observations and permitted mutations. Map each intent to a short call sequence. Remove tools that provide authority the task does not need. Do not expose arbitrary SQL, shell or generic HTTP simply because the backend supports them.
  2. Group operations by a stable goal and permission boundary. Prefer a few coherent tools over an omnibus action/args bag or dozens of tiny field setters. Separate read, preview and commit where risk or authorization differs; do not force a preview for harmless reads.
  3. Name tools with explicit action and resource. Describe what they do, when to choose them, explicit USE WHEN and DO NOT USE WHEN choices, preconditions, postconditions, effects and return semantics. Put one short example call and its result shape in the model-facing description so the model knows what it gets back, not only what it sends. Disambiguate overlapping tools using one concrete choice example. Tool metadata describes capabilities; it does not authorize calls.

Make misuse detectable

  1. Specify strict input and output schemas: types, enums, required fields, bounds, units, identifier formats and version. Reject unexpected fields where supported. Define missing versus null. Trusted identity, tenant, permissions and server-derived fields come from execution context, not model-supplied claims.
  2. Return bounded structured results with stable identifiers, provenance/version, explicit empty/truncated status, and opaque pagination cursors. Bound page size and result bytes; document stable ordering and stale cursor behavior. Put verbose evidence behind a bounded follow-up capability rather than silently clipping an essential fact.
  3. Return machine-readable errors with code, safe message, retryability and relevant field/conflict details. Distinguish validation, authorization, not-found, version-conflict, rate-limit, transient failure and unknown commit outcome. A retryable hint is advisory; the caller still enforces a finite retry budget. Never expose credentials or internal stack traces in normal results.
  4. State side effects and their visibility, cancellation behavior and concurrency semantics. For mutations, bind an idempotency key to principal, operation and canonical request hash; persist result/reconciliation status and reject key reuse with different arguments. Specify deduplication retention and optimistic state version checks. Do not promise exactly-once execution without an actual transactional mechanism.
  5. Apply least privilege, deterministic semantic validation and authorization immediately before execution. Cap deadlines, input size and downstream fan-out. A tool result can be untrusted text even when the transport is authenticated.

Deliver and verify

Deliver a capability map, names/descriptions, input/output/error schemas, side-effect/idempotency rules, and representative request/response plus success/denial/unknown-outcome exchanges for each important capability. Include purpose, permissions, pre/postconditions and which neighboring tool to choose instead. Walk through an ambiguous intent, invalid argument, page boundary, denied mutation and lost mutation response.

Use structured-output-design for model-produced proposal validation and tool-evals for model usability. Do not add a large implementation scaffold before the contract shows the actual need.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.