Add Example Agent
GetBindu/Bindu
Add a new self-contained example agent under examples/. An agent skill from GetBindu/Bindu.
Build LangChain (Python) tools using Claude Code's fail-closed design pattern — unified name/schema/security/execution in one class, with automatic three-layer execution (validate → permission →…
$ npx skills add simbajigege/book2skills --skill langchain-tool-builder -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install simbajigege/book2skills langchain-tool-builder --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/simbajigege/book2skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/langchain-tool-builder .claude/skills/langchain-tool-builder && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "langchain-tool-builder" agent skill from https://github.com/simbajigege/book2skills/tree/main/skills/langchain-tool-builder into .claude/skills/langchain-tool-builder/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "langchain-tool-builder", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/simbajigege/book2skills/tree/main/skills/langchain-tool-builderType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add simbajigege/book2skills --skill langchain-tool-builder -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install simbajigege/book2skills langchain-tool-builder --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/simbajigege/book2skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/langchain-tool-builder .agents/skills/langchain-tool-builder && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "langchain-tool-builder" agent skill from https://github.com/simbajigege/book2skills/tree/main/skills/langchain-tool-builder into .agents/skills/langchain-tool-builder/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "langchain-tool-builder", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add simbajigege/book2skills --skill langchain-tool-builder -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install simbajigege/book2skills langchain-tool-builder --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/simbajigege/book2skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/langchain-tool-builder .cursor/skills/langchain-tool-builder && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "langchain-tool-builder" agent skill from https://github.com/simbajigege/book2skills/tree/main/skills/langchain-tool-builder into .cursor/skills/langchain-tool-builder/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "langchain-tool-builder", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/simbajigege/book2skills.git --path skills/langchain-tool-builder--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add simbajigege/book2skills --skill langchain-tool-builder -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install simbajigege/book2skills langchain-tool-builder --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/simbajigege/book2skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/langchain-tool-builder .gemini/skills/langchain-tool-builder && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "langchain-tool-builder" agent skill from https://github.com/simbajigege/book2skills/tree/main/skills/langchain-tool-builder into .gemini/skills/langchain-tool-builder/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "langchain-tool-builder", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install simbajigege/book2skills langchain-tool-builderInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add simbajigege/book2skills --skill langchain-tool-builder -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/simbajigege/book2skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/langchain-tool-builder .github/skills/langchain-tool-builder && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "langchain-tool-builder" agent skill from https://github.com/simbajigege/book2skills/tree/main/skills/langchain-tool-builder into .github/skills/langchain-tool-builder/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "langchain-tool-builder", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add simbajigege/book2skills --skill langchain-tool-builder -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install simbajigege/book2skills langchain-tool-builder --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/simbajigege/book2skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/langchain-tool-builder .opencode/skills/langchain-tool-builder && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "langchain-tool-builder" agent skill from https://github.com/simbajigege/book2skills/tree/main/skills/langchain-tool-builder into .opencode/skills/langchain-tool-builder/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "langchain-tool-builder", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
langchain-tool-builderBuild LangChain (Python) tools using Claude Code's fail-closed design pattern — unified name/schema/security/execution in one class, with automatic three-layer execution (validate → permission →…
Langchain Tool Builder is an agent skill from simbajigege/book2skills. Build LangChain (Python) tools using Claude Code's fail-closed design pattern — unified name/schema/security/execution in one class, with automatic three-layer execution (validate → permission → call). Use this skill whenever the user wants to define a new LangChain tool, add permission or validation logic to an existing tool, set up the ClaudeStyleTool base class in a project, or asks about "buildtool", "Claude Code style tool", "工具定义", or "langchain tool with permissions". Also trigger when the user says…
Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 9 other files (for example `README.md`, `en/langchain-tool-builder.md` and `examples/en.yaml`).
It sits in AI & LLM Engineering, covering Building AI agents. It works with LangChain and Python. The repository describes itself as: Create best skills based on best books. The licence is MIT.
4 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit e5ba66c. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are python).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Langchain Tool Builder loads about 2.3k tokens when it runs. Until then it costs about 164 tokens; SKILL.md has 628 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from simbajigege/book2skills at commit e5ba66c, republished under its MIT licence (© simbajigege). 628 words, ~2,321 tokens.
.claude/skills/langchain-tool-builder/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.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.
Claude Code enforces three things that vanilla LangChain tools lack:
is_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.validate_semantics → check_permissions → _call are separate methods,
so validation logic doesn't bleed into permission logic or business logic.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.
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 |
You don't have to ask all questions upfront — you can infer reasonable answers from context.
For example, a "search" tool is almost certainly is_read_only=True, is_concurrency_safe=True.
Create a .py file for the tool. Follow this field order (matches Claude Code's BashTool):
1. imports
2. Input schema (Pydantic BaseModel)
3. Tool class:
a. name, description, args_schema — identity
b. is_read_only, is_destructive, is_concurrency_safe, max_result_chars — security metadata
c. _validate_input_semantics() — semantic validation (omit if unneeded)
d. _check_permissions() — permission check (omit if unneeded)
e. _call() — actual logicSuggest a file path consistent with the project's tool/agent directory structure.
For ai-base, suggest: /Users/jigege/ai-base/backend/base/tools/<tool_name>.py
After generating, print a one-line summary of the tool's security posture:
SearchDocsTool: read_only=True destructive=False concurrency_safe=True max_result=10KThis helps the user quickly verify the fail-closed properties are set correctly.
Use this structure when generating the tool file. Adjust based on what the user actually needs.
"""<tool_name>.py — <one-line description>"""
from typing import Optional
from pydantic import BaseModel, Field
from base.utils.claude_style_tool import ClaudeStyleTool
# ---------------------------------------------------------------------------
# Input schema
# ---------------------------------------------------------------------------
class <ToolName>Input(BaseModel):
<field_name>: <type> = Field(description="<description>")
# ... more fields
# ---------------------------------------------------------------------------
# Tool class
# ---------------------------------------------------------------------------
class <ToolName>Tool(ClaudeStyleTool):
# — identity —
name: str = "<tool_name>"
description: str = "<one-sentence description for the LLM>"
args_schema = <ToolName>Input
# — security metadata (fail-closed: only set True when verified) —
is_read_only: bool = <True/False>
is_destructive: bool = <True/False>
is_concurrency_safe: bool = <True/False>
max_result_chars: int = 10_000
# — semantic validation (omit if no input constraints needed) —
def _validate_input_semantics(self, <params>) -> tuple[bool, Optional[str]]:
if not <condition>:
# Error messages must be actionable: tell the agent WHAT to do next
return False, "<why invalid>. Try <concrete fix, e.g. 'use filter=active_only'>"
return True, None
# — permission check (omit if no access control needed) —
def _check_permissions(self, <params>) -> tuple[bool, Optional[str]]:
if not <allowed>:
return False, "<why denied>. <suggested next step>"
return True, None
# — core logic —
def _call(self, <params>, **kwargs) -> str:
# ... implement tool logic here
return resultWhen the tool has no custom validation or permission logic, build_tool() is cleaner:
from base.utils.claude_style_tool import build_tool
from pydantic import BaseModel, Field
class SearchInput(BaseModel):
query: str = Field(description="Search query string")
search_tool = build_tool(
name="search_docs",
description="Search the documentation index for relevant content.",
args_schema=SearchInput,
call_fn=lambda query, **_: search_index(query),
is_read_only=True,
is_concurrency_safe=True,
)| Tool type | is_read_only | is_destructive | is_concurrency_safe |
|---|---|---|---|
| 搜索 / 查询 | True | False | True |
| 文件读取 | True | False | True |
| 文件写入 / 修改 | False | False | False |
| 删除操作 | False | True | False |
| API 调用(GET) | True | False | True |
| API 调用(POST/DELETE) | False | 视情况 | False |
| 数据库查询 | True | False | True |
| 数据库写入 | False | False | False |
Keep each tool focused on a single operation. Let the agent compose multiple tools to complete complex tasks. A tool that does too much is harder for the agent to reuse and reason about.
| Format | When to use |
|---|---|
| JSON | Agent needs to parse/filter the result programmatically |
| Markdown | Result will be shown directly to a user |
Support both when uncertain — accept an optional response_format: str = "markdown" parameter and branch in _call. For JSON output use json.dumps(data, ensure_ascii=False, indent=2).
Any tool that can return more than ~50 records should support pagination. Return a dict with these fields so the agent knows when to continue fetching:
return json.dumps({
"items": [...],
"total": 150,
"count": 20,
"offset": 0,
"has_more": True,
"next_offset": 20,
}, ensure_ascii=False, indent=2)Add offset: int = Field(default=0, description="Pagination offset") and limit: int = Field(default=20, description="Max items to return, default 20") to the input schema.
Error strings returned from _validate_input_semantics and _check_permissions must guide the agent toward a fix — not just describe the failure:
# Bad: agent is stuck
return False, "Query too short."
# Good: agent knows exactly what to try next
return False, "Query too short (got 2 chars, need ≥ 3). Provide a more specific search term."references/claude_style_tool.py — 完整的 ClaudeStyleTool 基类和 build_tool() 工厂函数
安装路径:/Users/jigege/ai-base/backend/base/utils/claude_style_tool.py© simbajigege, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 6 other files in skills/langchain-tool-builder of simbajigege/book2skills.
Open the folder on GitHubat commit e5ba66c
Langchain Tool Builder next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Langchain Tool Builder this skillsimbajigege/book2skills | 183 | — | ~2.3k | Automated safety check: Pass | MIT | |
| Add Example AgentGetBindu/Bindu | 10k | — | ~1.1k | Automated safety check: Notes | Custom licence | |
| Failproof AI SDK IntegrationFailproofAI/failproofai | 5.3k | — | ~6k | Automated safety check: Pass | Custom licence | |
| Omnigent Framework Detectionomnigent-ai/omnigent | 11k | — | ~610 | Automated safety check: Pass | Apache-2.0 | |
| Upgrade Stripekanchengw/cnllm | 173 | 3 repos | ~1.4k | Automated safety check: Pass | Apache-2.0 | |
| Deep Agents to Pydantic AI Migrationpydantic/pydantic-ai | 21k | — | ~1.7k | Automated safety check: Pass | MIT |
GetBindu/Bindu
Add a new self-contained example agent under examples/. An agent skill from GetBindu/Bindu.
FailproofAI/failproofai
Helps instrument a custom Python or TypeScript agent to record events for Failproof AI, verify what gets written, and run an evaluator worker that scores the runs.
omnigent-ai/omnigent
Scans Python agent code for framework imports and recommends the matching Omnigent executor type, or says when the framework is not natively supported yet.
kanchengw/cnllm
Guide for upgrading Stripe API versions and SDKs. An agent skill from kanchengw/cnllm.
pydantic/pydantic-ai
Migrates Python LangChain Deep Agents applications to Pydantic AI and Pydantic AI Harness while preserving the application's observed behavior.
langchain-ai/docs
Add, move, rename, or delete a page on the LangChain docs site.
simbajigege/book2skills
Reorganizes an overgrown MEMORY.md into a short pointer index plus separate topic files, and fixes or deletes outdated memories instead of archiving them.
simbajigege/book2skills
A developer guide to adding compact memory to an agent: when to trigger compaction, how to fork a compactor sub-agent, what the summary holds, and how to restore it.
simbajigege/book2skills
Turns text, screenshots, or existing diagrams into minimal, accessible line-art SVGs for teaching material, with an optional Mermaid relationship spec.
simbajigege/book2skills
Helps define agent tools with a fail-closed pattern: one class holding name, schema, security flags and a validate, permission and call execution chain.
simbajigege/book2skills
Implements a production-style agent loop in your own AI product, with tool calling, tool results fed back, exit conditions and budget guards.
simbajigege/book2skills
Guides designing a layered permission pipeline for agent tools that decides which calls are allowed, need confirmation or are denied, with scopes and hooks.
Categories
Build LangChain (Python) tools using Claude Code's fail-closed design pattern — unified name/schema/security/execution in one class, with automatic three-layer execution (validate → permission →…. Langchain Tool Builder is an agent skill from simbajigege/book2skills. Build LangChain (Python) tools using Claude Code's fail-closed design pattern — unified name/schema/security/execution in one class, with automatic three-layer execution (validate → permission → call).
Langchain Tool Builder fits situations like: the user wants to define a new LangChain tool; validation logic to an existing tool; set up the ClaudeStyleTool base class in a project; asks about buildtool.
Run `npx skills add simbajigege/book2skills --skill langchain-tool-builder -a claude-code`. Or copy the skill folder (skills/langchain-tool-builder in simbajigege/book2skills) into .claude/skills/langchain-tool-builder in your project. Claude Code loads it when a task matches its description.
Run `npx skills add simbajigege/book2skills --skill langchain-tool-builder -a codex`. Or copy the skill folder (skills/langchain-tool-builder in simbajigege/book2skills) into .agents/skills/langchain-tool-builder in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add simbajigege/book2skills --skill langchain-tool-builder -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/langchain-tool-builder, .gemini/skills/langchain-tool-builder, .github/skills/langchain-tool-builder and .opencode/skills/langchain-tool-builder in your project.
SKILL.md names no scripts, command-line tools or credentials: Langchain Tool Builder is instructions for the agent only. Our summary lists: Python 3.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Langchain Tool Builder is published under the MIT licence (from the LICENSE file in the skill folder). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.3k tokens (SKILL.md is roughly 9.3k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Langchain Tool Builder: Add Example Agent (GetBindu/Bindu, 10k stars), Failproof AI SDK Integration (FailproofAI/failproofai, 5.3k stars), Omnigent Framework Detection (omnigent-ai/omnigent, 11k stars) and Upgrade Stripe (kanchengw/cnllm, 173 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
simbajigege (a GitHub user) maintains it in simbajigege/book2skills, which has 183 GitHub stars. The repository holds 37 skills in this directory. The repository was last updated on August 26, 2026.
Source: simbajigege/book2skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.