Getting it into your agent
There is no command for this one: it runs only inside a plugin, and the catalogue could not identify which plugin ships it. The source is linked below.
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.
[](https://agentmods.dev/skills/simbajigege/book2skills/langchain-tool-builder)<a href="https://agentmods.dev/skills/simbajigege/book2skills/langchain-tool-builder"><img src="https://agentmods.dev/badge/skills/simbajigege/book2skills/langchain-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.
<a href="https://agentmods.dev/skills/simbajigege/book2skills/langchain-tool-builder"><img src="https://agentmods.dev/badge/skills/simbajigege/book2skills/langchain-tool-builder.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00140 | $0.02339 |
| Opus 5 | $0.00070 | $0.01170 |
| Sonnet 5 | $0.00028 | $0.00468 |
| Haiku 4.5 | $0.00014 | $0.00234 |
Grade A, and why
langchain-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 11d ago.
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.
How it starts
The opening of the file, as written. The whole thing — 228 lines — stays where its author put it; the contents beside it link to each section on GitHub.
LangChain Tool Builder
Helps define LangChain (Python) tools using Claude Code's buildTool() 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
Claude Code enforces three things that vanilla LangChain tools lack:
- Fail-closed defaults —
is_read_only,is_destructive,is_concurrency_safeall default to False. A tool that forgets to declare its properties is conservatively treated as write-capable. - Layered execution —
validate_semantics → check_permissions → _callare separate methods, so validation logic doesn't bleed into permission logic or business logic. - Self-contained definition — schema, description, security metadata, and execution all live in one class. No separate permission middleware to wire up.
Workflow
Step 1 — Install the base class
Check if claude_style_tool.py exists in the project's utils directory.
The expected location for the ai-base project is:
/Users/jigege/ai-base/backend/base/utils/claude_style_tool.py
If it doesn't exist, copy it from references/claude_style_tool.py in this skill directory.
Tell the user where it was placed and what it provides.
If working in a different project, ask the user where their utils/tools directory is.
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, github_create_issue). 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,如 e.g. '2024-01-01') |
— 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 |
What ships with it
6 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.
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.
- 11d ago First seen · 228 lines · 140 tokens per session scan A ffcec65eddfa
langchain-tool-builder is a skill published in the GitHub repository simbajigege/book2skills (162 stars, last pushed 16d ago), licensed MIT. It adds 140 tokens to every session and 2,339 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-08-30.
Other skills, from other repositories
frappe-impl-controllers
Use when building Document Controllers in a custom Frappe app: file creation, lifecycle hooks, validation, autoname, submittable workflows, controller override, child table controllers, flags system, migration from hooks.py and Server Scripts. Keywords: how to implement controller, which hook to use, validate vs…
frappe-syntax-controllers
Use when writing Python Document Controllers for ERPNext/Frappe DocTypes. Covers lifecycle hooks (validate, onupdate, onsubmit), controller override, submittable documents, autoname patterns, UUID naming (v16), and the flags system. Keywords: document controller, lifecycle hook, validate, onupdate, onsubmit, autoname…
frappe-syntax-serverscripts
Use when writing Python code for ERPNext/Frappe Server Scripts including Document Events, API endpoints, Scheduler Events, and Permission Queries. Prevents the #1 AI mistake: using import statements in Server Scripts (sandbox blocks ALL imports). Covers frappe. methods, event name mapping, and correct v14/v15/v16…
pandas-helper
Master pandas operations — DataFrames, Series, groupby, merge, time-series resampling, and memory optimization.
django-patterns
Django architecture patterns, REST API design with DRF, ORM best practices, caching, signals, middleware, and production-grade Django apps.
accelerate
Run PyTorch training across GPUs with minimal changes.