tool-design

tool-design is a skill for Claude Code, Codex from agentailor/fullstack-langgraph-nextjs-agent. It costs 135 tokens per session (2,736 once invoked), scanned A, original, MIT.

A method for designing and checking tools that an AI agent can call, including their names, inputs, outputs, errors, and limits. It applies to agent tools built with common frameworks or as ordinary functions.

In plain words
What is it for?
Use it to create, review, or fix tool definitions for agent systems, such as MCP servers, function-calling tools, and LangChain or LangGraph tools.
Why use it?
AI agents can choose the wrong tool, send bad inputs, misunderstand errors, or request too much data; careful tool design reduces those failures.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

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/agentailor/fullstack-langgraph-nextjs-agent/tool-design
Any agent
npx skills add agentailor/fullstack-langgraph-nextjs-agent --skill tool-design
Clone the repo
git clone --depth 1 https://github.com/agentailor/fullstack-langgraph-nextjs-agent

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 tool-design

README.md
[![agentmods](https://agentmods.dev/badge/skills/agentailor/fullstack-langgraph-nextjs-agent/tool-design.svg)](https://agentmods.dev/skills/agentailor/fullstack-langgraph-nextjs-agent/tool-design)
Your own site
<a href="https://agentmods.dev/skills/agentailor/fullstack-langgraph-nextjs-agent/tool-design"><img src="https://agentmods.dev/badge/skills/agentailor/fullstack-langgraph-nextjs-agent/tool-design.svg" alt="Measured on agentmods" height="20"></a>
Per session 135 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,736 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.1 $0.00135 $0.02736
Opus 5 $0.00068 $0.01368
Sonnet 5 $0.00027 $0.00547
Haiku 4.5 $0.00014 $0.00274

Measured yesterday against content hash 4b2a955e3ca9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

tool-design 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 yesterday.

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.

.agents/skills/tool-design/SKILL.md · 108 lines

How it starts

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

Tool Design

Overview

A tool is a contract between a deterministic system and a non-deterministic caller. A normal API assumes a rational developer who reads the docs, handles error codes, and knows which endpoint to call. An agent breaks all of those assumptions: it may pick the wrong tool because two names look alike, pass malformed parameters despite a clear schema, pull back a dataset that blows its own context window, or misread a cryptic error and retry the same failing call.

So tools for agents are designed defensively: clear enough that the agent can't easily misuse them, informative enough to steer the agent toward a better next move, and lean enough to spend the context window carefully.

The payoff: agent and human ergonomics align. A tool that an agent uses well is almost always a tool a human finds intuitive too. Designing for a non-deterministic caller just produces a better API.

None of this is framework- or language-specific. The same five principles apply whether the tool is an MCP server tool, a LangChain/LangGraph tool, an OpenAI/Anthropic function-calling definition, or a plain function exposed to a model — and whether it's written in TypeScript, Python, or anything else. What varies is the syntax of name / description / parameters / returns; the design thinking does not. See references/examples.md for the same tool proven across languages and surfaces.

The Five Principles

Apply these when writing or reviewing any tool. The deep dive with worked schema shapes is in references/principles.md.

1. Strategic selection

Build tools around user workflows, not database schemas or API endpoints. Don't wrap every endpoint as its own tool — the agent then struggles to choose among near-duplicates and you spend prompt budget documenting all of them. Consolidate related operations into one well-parameterized tool when it maps to how a user thinks about the task.

Read the full file on GitHub · 108 lines

Files

What ships with it

3 files 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. yesterday First seen · 108 lines · 135 tokens per session scan A 4b2a955e3ca9

Subscribe to this mod's changes

tool-design is a skill published in the GitHub repository agentailor/fullstack-langgraph-nextjs-agent (131 stars, last pushed yesterday), licensed MIT. It adds 135 tokens to every session and 2,736 once invoked, about $0.0007 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-09-05.