agent-tool-builder

agent-tool-builder is a skill for Claude Code, Codex from simbajigege/book2skills. It costs 104 tokens per session (1,998 once invoked), scanned A, original, MIT.

A pattern for defining agent tools with their name, input rules, safety properties and execution code in one class. It uses three separate stages: validate the request, check permission and run the tool.

In plain words
What is it for?
Use it when building a new agent tool or adding validation and permission checks to an existing one. It applies to frameworks such as LangChain, hermes-agent or plain Python.
Why use it?
It reduces the chance that a tool will run with unclear inputs or unsafe permissions. Its fail-closed defaults treat undeclared tools as capable of writing or causing changes.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for hermes-agent. Also seen: built for hermes-agent.

Good fit Use it when building a new agent tool or adding validation and permission checks to an existing one. It applies to frameworks such as LangChain, hermes-agent or plain Python.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/simbajigege/book2skills/agent-tool-builder
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.

Any agent
npx skills add simbajigege/book2skills --skill agent-tool-builder
Clone the repo
git clone --depth 1 https://github.com/simbajigege/book2skills

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 agent-tool-builder

README.md
[![agentmods](https://agentmods.dev/badge/skills/simbajigege/book2skills/agent-tool-builder/github.svg)](https://agentmods.dev/skills/simbajigege/book2skills/agent-tool-builder)
Your own site
<a href="https://agentmods.dev/skills/simbajigege/book2skills/agent-tool-builder"><img src="https://agentmods.dev/badge/skills/simbajigege/book2skills/agent-tool-builder/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for agent-tool-builder

Your own site · 80×15
<a href="https://agentmods.dev/skills/simbajigege/book2skills/agent-tool-builder"><img src="https://agentmods.dev/badge/skills/simbajigege/book2skills/agent-tool-builder.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 104 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,998 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00104 $0.01998
Opus 5 $0.00052 $0.00999
Sonnet 5 $0.00021 $0.00400
Haiku 4.5 $0.00010 $0.00200

Measured 10d ago against content hash 65e39fc47093, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

agent-tool-builder 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 10d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (references/agent_tool_base.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

skills/agent-tool-builder/SKILL.md · 204 lines

How it starts

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

Agent Tool Builder

Helps define agent tools using the fail-closed design pattern: a unified class that co-locates identity, schema, security properties, and execution logic, with fail-closed defaults so new tools are safe by default.

Why this pattern matters

Three things that ad-hoc tool definitions lack:

  1. Fail-closed defaultsis_read_only, is_destructive, is_concurrency_safe all default to False. A tool that forgets to declare its properties is conservatively treated as write-capable.
  2. Layered executionvalidate_semantics → check_permissions → _call are separate methods, so validation logic doesn't bleed into permission logic or business logic.
  3. Self-contained definition — schema, description, security metadata, and execution all live in one place. No separate middleware to wire up.

Workflow

Step 1 — Identify the target framework

Ask which agent framework the tool will be registered in (e.g. hermes-agent, LangChain, plain Python). This determines the import path and registration method, but the design principles are identical.

Check if agent_tool_base.py exists in the project's utils/tools directory. If not, copy it from references/agent_tool_base.py in this skill directory. Tell the user where it was placed.

Step 2 — Interview the user

Collect answers to these questions. Defaults are shown — skip questions where the default is clearly fine.

Naming convention: use {service}_{action}_{resource} format with a service prefix so the tool stays unambiguous when multiple tool sets are loaded simultaneously (e.g. stock_get_price, stock_list_symbols, stock_search_news). Start with a verb: get, list, search, create, delete.

Field Question Default
name 工具名(格式:{service}_{action}_{resource},例如 stock_get_price — required
description 给 LLM 看的一句话描述:精确匹配实际功能,不要模糊扩大,否则 agent 会在不该用的场景误调用 — required
Schema fields 工具接受哪些参数?(字段名、类型、说明;在 Field description 里加 example) — required
is_read_only 这个工具只读数据,不写入/不产生副作用吗? False
is_destructive 这个工具会做不可逆操作(删除、覆盖)吗? False
is_concurrency_safe 这个工具可以和其他工具同时运行吗? False
response_format 返回数据是给 agent 程序化处理(JSON)还是给用户展示(Markdown)? 视场景,默认 Markdown
是否列表工具 如果返回多条记录,要支持分页吗? 超过 50 条建议加
_validate_input_semantics 有没有需要在执行前拦截的语义问题?(如:参数太短、格式不对) 不需要
_check_permissions 有没有需要检查的权限?(如:需要某个 env var、调用方身份限制) 不需要
_call 工具的核心执行逻辑是什么? — required

Read the full file on GitHub · 204 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. 10d ago First seen · 204 lines · 104 tokens per session scan A 65e39fc47093

Subscribe to this mod's changes

agent-tool-builder is a skill published in the GitHub repository simbajigege/book2skills (162 stars, last pushed 15d ago), licensed MIT. It adds 104 tokens to every session and 1,998 once invoked, about $0.0005 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-08-30.

Related

Other skills, from other repositories

marketing-strategy-pmm

Product marketing, positioning, GTM strategy, and competitive intelligence. Includes ICP definition, April Dunford positioning methodology, launch playbooks, competitive battlecards, and international market entry guides. Use when developing positioning, planning product launches, creating messaging, analyzing…

davila7/claude-code-templates · 92 tokens

loki-mode

Multi-agent autonomous startup system for Claude Code. Triggers on "Loki Mode". Orchestrates 100+ specialized agents across engineering, QA, DevOps, security, data/ML, business operations, marketing, HR, and customer success. Takes PRD to fully deployed, revenue-generating product with zero human intervention.…

davila7/claude-code-templates · 152 tokens

email-sequence

When the user wants to create or optimize an email sequence, drip campaign, automated email flow, or lifecycle email program. Also use when the user mentions "email sequence," "drip campaign," "nurture sequence," "onboarding emails," "welcome sequence," "re-engagement emails," "email automation," or "lifecycle…

davila7/claude-code-templates · 84 tokens

qa-test-planner

Generate comprehensive test plans, manual test cases, regression test suites, and bug reports for QA engineers. Includes Figma MCP integration for design validation.

davila7/claude-code-templates · 34 tokens

guidance

Control LLM output with regex and grammars, guarantee valid JSON/XML/code generation, enforce structured formats, and build multi-step workflows with Guidance - Microsoft Research's constrained generation framework.

davila7/claude-code-templates · 38 tokens

content-research-writer

Assists in writing high-quality content by conducting research, adding citations, improving hooks, iterating on outlines, and providing real-time feedback on each section. Transforms your writing process from solo effort to collaborative partnership.

davila7/claude-code-templates · 49 tokens