Building agent tools
Skill Byunk/claude-code-essentials/essentials/skills/building-agent-tools
An essential layer of Claude Code that makes it efficient and effective.
npx -y skills add Byunk/claude-code-essentials --skill building-agent-toolsAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Guide for creating effective tools for AI agents. Use when building MCP tools, agent APIs, or any tool interface that agents will consume. Focuses on token efficiency, meaningful context, and proper namespacing.
SKILL.md
2.8 KB, 525 tokens by cl100k_base, as published. Nobody here has run it
Building Tools for AI Agents
Workflow
-
Define Purpose
- Identify what agents need to accomplish with this tool
- Determine if existing tools can be consolidated
- Plan the tool's interface for agent consumption
-
Design Interface
- Choose descriptive, namespaced tool names
- Define parameters with clear types and descriptions
- Design output format for maximum signal, minimum tokens
-
Implement
- Build with token efficiency in mind
- Add pagination, filtering, sensible defaults
- Return semantic identifiers, not raw IDs
-
Validate
- Test with real agent workflows
- Check token consumption patterns
- Verify error messages guide agents toward solutions
Design Principles
Tool Consolidation
- More tools don't lead to better outcomes
- Combine related operations into single tools
- Example:
schedule_eventthat checks availability AND creates event - Avoid simple CRUD-style tools that require multiple calls
Namespacing
- Prefix related tools with service name:
asana_projects_search,asana_users_search - Group by domain to help agents distinguish functionality
- Use consistent naming patterns across tool families
Meaningful Context
- Return high-signal information, not raw data dumps
- Resolve cryptic UUIDs to human-readable identifiers
- Include
response_formatparameter (concise/detailed) for flexibility - Surface relevant metadata agents need for next steps
Token Efficiency
- Implement pagination with sensible defaults
- Add filtering parameters to reduce unnecessary data
- Truncate large responses intelligently
- Prefer structured output over verbose prose
Tool Descriptions
- Invest heavily in clear, explicit descriptions
- Describe what the tool does, when to use it, and what it returns
- Include parameter constraints and valid values
- Small description improvements yield large performance gains
Anti-Patterns
- Creating many granular tools instead of consolidated operations
- Returning raw IDs that agents can't interpret
- Omitting pagination on potentially large result sets
- Vague tool descriptions that leave agents guessing
- Error messages that don't help agents recover
- Requiring agents to make multiple calls for common workflows
MCP-Specific Patterns
Tool Registration
- Use descriptive
nameanddescriptionin tool schema - Define
inputSchemawith JSON Schema for parameters - Mark required vs optional parameters explicitly
Response Format
- Return structured JSON for predictable parsing
- Include success/error indicators
- Provide actionable error messages
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.
Gives 0 of the 12 instructions most context ai engineering skills give in 525 tokens
Counted across 1,193 of the 1,976 authors here whose files we hold, read 2026-08-07
- Dispatch a fresh implementer subagent per taskin 48 of 1193, across 19 files
- Dispatch a final code reviewer after all tasksin 33 of 1193, across 8 files
- Provide full task text to the subagentin 30 of 1193, across 9 files
- Review spec compliance before code qualityin 27 of 1193, across 10 files
- Make the hook script executablein 26 of 1193, across 8 files
- Re-snapshot after navigation or DOM changesin 25 of 1193, across 19 files
- Read files before editing themin 22 of 1193, across 11 files
- Answer subagent questions before proceedingin 22 of 1193, across 7 files
- Mark task complete in TodoWrite after approvalin 22 of 1193, across 6 files
- Merge hook into existing settingsin 21 of 1193, across 3 files
- Ask if installation is global or projectin 20 of 1193, across 2 files
- Copy the hook script to target locationin 20 of 1193, across 2 files
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.