install
source · Clone the upstream repo
git clone https://github.com/WeiJun0507/my_harness
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/WeiJun0507/my_harness "$T" && mkdir -p ~/.claude/skills && cp -r "$T/.cursor/skills/tool_creator" ~/.claude/skills/weijun0507-my-harness-tool-creator && rm -rf "$T"
manifest:
.cursor/skills/tool_creator/SKILL.mdsource content
Tool Creator Skill
Metadata
- Name:
tool_creator - Description: Convert reusable task logic into durable callable tools and register them for future chats
Purpose
Turn user-requested workflows into reusable function/tool calls that can be discovered and executed later (same chat or new chat).
This skill creates long-lived assets under the agent skill/tool config area (for example
~/codex/skills/*) so the agent can reuse them across sessions.
When To Trigger
- A task includes repeatable logic (data fetch, transform, orchestration, validation, business rules, workflow steps).
- A user asks for a feature that can be represented as a callable operation.
- Tool discovery did not find a suitable existing tool.
- A partial tool exists but needs extension/versioning.
Required Workflow
-
Understand intent and normalize it into an operation name.
Example:
- User asks: "When user enters Contacts page, query contact list."
- Operation:
query_user_contacts
-
Decompose into implementation layers and check for existing components first:
- Data model
- Repository / data source
- Service / use case function
- Tool interface (call schema)
-
Create only missing pieces:
- If model exists, reuse it.
- If repository exists, reuse it.
- If business function exists, wrap it.
- If nothing exists, generate all layers.
-
Ensure the callable function returns typed, stable output and handles common failures.
-
Package as a tool artifact:
- Tool name, description, input schema, output schema
- Example invocation
- Dependency notes
- Version (
,v1
, etc.) when extending behaviorv2
-
Persist for cross-chat reuse:
- Save tool spec and implementation notes under the configured skills/tools directory.
- Update tool registry/index so tool discovery can find it by intent.
Flutter Example Flow (Reference)
Given: "Fetch user contacts when Contact page opens."
- Model (if missing):
UserContact - Repository method (if missing):
Future<List<UserContact>> getContacts() - Use-case function (if missing):
queryUserContacts(repo) - Tool wrapper:
query_user_contacts - Register in tool index for future retrieval.
Output Contract
This skill output MUST include all of the following:
- Reuse decision (what already existed vs what was created)
- Callable operation signature
- Tool definition (name, input, output)
- Registry update target/path
- Persistence location for future chats
Persistence and Location Rules
- Default location pattern: agent config skills/tools directory (example:
).~/codex/skills/* - Tool artifacts should be durable and discoverable by
.tool_discovery - Avoid chat-local only outputs when the logic is reusable.
Guardrails
- Do not duplicate an existing tool with identical intent.
- Prefer extending/versioning an existing tool for near-match requests.
- Keep tool names action-oriented and domain-specific (
,query_user_contacts
).create_invoice_draft
Key Rule
If a workflow is reusable, convert it into a persistent callable tool before finishing the task.