/toolsmith:toolsmithfrom toolsmith
Scan the user's Claude Code history for repeated Bash patterns, build or change the small single-purpose toolsmith-* commands that replace them, and measure their use. Use when asked to scan for tool ideas, to build or change a toolsmith command, or to check how the commands are doing. Not for running a command - run `<command> --llm` for its guide.
Ships in toolsmith. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Toolsmith turns Bash patterns that Claude repeats into small commands with one job each. Each command is a Rust crate under crates/, reached through a shim in bin/ that the plugin puts on the Bash tool's PATH. The shim builds the binary on first use and after every change. The plugin's hooks list the commands at session start and remind Claude of one when a Bash command matches the pattern it replaces. Follow this document exactly. Nothing is built, blocked, or removed until the user approves it.
The plugin directory is ${CLAUDE_SKILL_DIR}. When it is inside ~/.claude/plugins/cache, it is an installed copy: ask the user for the path of their checkout (the repository that holds toolsmith/) and work there. Below, $T means the plugin directory in that checkout. Follow the checkout's own CLAUDE.md for commits, tests and history.
ruby $T/scripts/analyse scan --metrics $T/metrics/weekly.json. It prints the families (repeated patterns from families.json) by number of calls, the tool that covers each, and the most frequent commands that match no family. It also saves weekly counts, which keep the trend after Claude Code deletes old transcripts.ruby $T/scripts/analyse examples --family <id> --limit 15, or --match '<regex>'. Find the one job those commands do again and again.families.json: an id, a title that completes "this command looks like ...", and rules (a command matches when every regex of any one rule matches). Run the scan again to get its numbers.metrics/weekly.json and any families.json change. Then wait for the user to choose. Build nothing without approval.One tool at a time, after the user chose it.
references/contract.md. Every rule in it is a requirement.crates/<object>-<verb>/tool.json first, beside the existing tools' manifests: intent, usage, use_when, not_for, input, options, output, exit codes, examples (including a failure), family, "mode": "remind", and today's date as added. Check the name: type -a <name> and brew info --formula <name> must find nothing.Cargo.toml like an existing tool's, and src/main.rs that starts with Tool::new(include_str!("../tool.json")), passes the arguments through handle_guide_flags, and leaves through tool.exit, tool.fail or tool.usage_error. Use the standard library only. Put unit tests for the logic in the crate.bin/<name>: a copy of an existing shim with the name changed, mode 755.bin/test, then TEST_RUBY=/usr/bin/ruby TEST_BASH=/bin/bash bin/test, from the checkout root. Fix every failure.$T/README.md, bump the minor version in $T/.claude-plugin/plugin.json, and commit.To change an existing tool, follow the same steps from 1, starting from its tool.json. Keep its options and output compatible, or update every example and say what changed.
ruby $T/scripts/analyse adoption --metrics $T/metrics/weekly.json. For each tool and week it shows tool calls, tool errors, old-pattern calls and the tool's share, then the usage log: runs, failed runs, guide reads, reminders, and reminders followed by a run within 10 minutes.added date. A useful tool's share rises week by week and its failures stay rare.analyse examples --family <id>) to see why the tool did not fit. Then improve the guide (use_when, not_for, examples) or the tool.analyse examples --match '<tool name>', and fix the tool or the guide that misled."mode": "block". Do this only with the user's explicit approval.Cargo.lock (opens in a new tab)Cargo.toml (opens in a new tab)README.md (opens in a new tab)bin/toolsmith-check-run (opens in a new tab)bin/toolsmith-ci-wait (opens in a new tab)bin/toolsmith-conflict-resolve (opens in a new tab)bin/toolsmith-file-lines (opens in a new tab)bin/toolsmith-files-write (opens in a new tab)bin/toolsmith-history-add (opens in a new tab)bin/toolsmith-json-set (opens in a new tab)bin/toolsmith-pr-land (opens in a new tab)bin/toolsmith-text-replace (opens in a new tab)crates/check-run/Cargo.toml (opens in a new tab)crates/check-run/src/main.rs (opens in a new tab)crates/check-run/tool.json (opens in a new tab)crates/ci-wait/Cargo.toml (opens in a new tab)crates/ci-wait/src/main.rs (opens in a new tab)crates/ci-wait/tool.json (opens in a new tab)crates/common/Cargo.toml (opens in a new tab)crates/common/src/fsutil.rs (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub mooktakim/skills --plugin toolsmith