원클릭으로
create-tool
Author a new @tool-decorated Python file in the agent workspace, validate it, and register it via reload().
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Author a new @tool-decorated Python file in the agent workspace, validate it, and register it via reload().
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Update an existing @tool source file in workspace/capabilities/, bumping its semver per major/minor/patch.
Scaffold a new skill folder under workspace/capabilities/skills/ with frontmatter and the seven required sections.
Update an existing skill's SKILL.md body in workspace/capabilities/skills/, bumping its frontmatter semver.
| name | create-tool |
| version | 1.0.0 |
| description | Author a new @tool-decorated Python file in the agent workspace, validate it, and register it via reload(). |
| triggers | ["add a tool","build a tool","extend yourself","write a tool that","I need a tool to"] |
| tools | ["write","create_tool","reload","read","bash"] |
(auto-filled by the loader)
Inputs you must have:
str, int, bool, list[str]).Outputs the agent must produce:
.py file at workspace/capabilities/<name>.py decorated with @tool(...).reload() call after create_tool succeeds.Don't proceed if the user's request is ambiguous about WHEN the tool should be called. Ask.
The @tool decorator lives in arcagent.tools._decorator. Its full field list is in references/decorator-fields.md. The AST validator that create_tool runs is documented in references/ast-blocked-list.md — read it before writing source that touches files, network, or imports beyond typing/dataclasses. Good and bad tool authoring patterns are in references/examples-good-and-bad.md.
The version field is required and must match the bumped version when calling update_tool later. Start at "1.0.0".
classification is the safety guard: "read_only" if the tool only reads state (and is therefore parallel-safe), "state_modifying" for anything that writes, calls subprocesses, or touches external state. Default to "state_modifying" — when unsure, the safer choice loses concurrency, never correctness.
when_to_use is the LLM-facing hint shown in the system prompt's tool manifest. Keep it under 80 characters and lead with the trigger phrase ("When you need to ...").
templates/tool.py.template as the starting point.create_tool(name=..., source=...). If it returns Error: AST validation rejected ..., read the rejection category, fix the offending pattern (it's almost always a privileged import or getattr on a denied attribute), and try again.reload(). The diff string should mention +1 added (<your-name>).update_tool(name=..., new_source=..., version_bump="patch") — never delete and re-create.reload() from inside create_tool. The split is intentional: write many capabilities, reload once.from arcagent.builtins.capabilities import _runtime; _runtime.workspace()).os, sys, subprocess, socket, ctypes, pickle, marshal, shelve, or any module not in the AST validator's allowlist. The validator will reject the source and your call to create_tool will fail.create_tool rejects collisions. Use update_tool instead.# Good — read-only, single-purpose, classification correct
@tool(
description="Count lines in a workspace file",
classification="read_only",
capability_tags=["file_read"],
when_to_use="When you need a quick line count without reading the whole file",
version="1.0.0",
)
async def line_count(file_path: str) -> str:
from arcagent.builtins.capabilities import _runtime
from arcagent.tools._validation import resolve_workspace_path
p = resolve_workspace_path(file_path, _runtime.workspace())
return str(sum(1 for _ in p.open()))
Before declaring the new tool done:
create_tool returned Created tool ....reload() returned a diff containing +1 added.scripts/validate.py (if you wrote one alongside the tool) exits 0.