بنقرة واحدة
update-tool
Update an existing @tool source file in workspace/capabilities/, bumping its semver per major/minor/patch.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Update an existing @tool source file in workspace/capabilities/, bumping its semver per major/minor/patch.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
Author a new @tool-decorated Python file in the agent workspace, validate it, and register it via reload().
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.
استنادا إلى تصنيف SOC المهني
| name | update-tool |
| version | 1.0.0 |
| description | Update an existing @tool source file in workspace/capabilities/, bumping its semver per major/minor/patch. |
| triggers | ["fix the tool","the tool has a bug","change behavior of","bump the version of","update the tool"] |
| tools | ["read","update_tool","reload"] |
(auto-filled by the loader)
Inputs you must have:
name (matches the file basename in workspace/capabilities/).new_source body — update_tool overwrites, it does not patch.Outputs the agent must produce:
@tool(version=...) argument.reload() call after the update succeeds.update_tool is a wholesale replacement. There is no partial edit — read the file with read, modify the source string in place, then call update_tool(name, new_source, version_bump). The new source MUST contain the bumped version string (e.g. version="1.2.4" for a patch bump from 1.2.3); the validator rejects mismatched versions.
Semver judgment (D-357 — LLM owns this call):
When in doubt, bump higher. A surprised caller is worse than a redundant version bump.
read(file_path="<workspace>/capabilities/<name>.py").version="..." in the @tool(...) decorator to the bumped value.update_tool(name=..., new_source=..., version_bump="<patch|minor|major>"). If it returns Error: must declare version="...", the version literal in your source doesn't match the bump — fix and retry.reload(). The diff should mention ~1 replaced (<name> <old>→<new>).update_tool without first reading the existing file. You'll lose context on what already worked.version="..." literal inside the source. The validator rejects mismatches.create_tool to "fix" something. Use update_tool so the version trail is preserved.# Bug fix: missing-file path returns a confusing message
old_source = await read(file_path="capabilities/word_count.py")
new_source = old_source.replace(
"Error: not a file:",
"Error: file not found in workspace:",
).replace(
'version="1.0.0"',
'version="1.0.1"',
)
await update_tool(name="word_count", new_source=new_source, version_bump="patch")
await reload()
update_tool returned Updated tool ... <old>→<new>.reload() returned a diff containing ~1 replaced (<name> <old>→<new>).