mithril: Skill for Claude Code

.claude/skills/tool-creator/SKILL.md

tool-creator is a skill for Claude Code from radimsem/mithril. It costs 39 tokens per session (5,760 once invoked), scanned A, original, Apache-2.0.

Instructions for creating execution tools in the Mithril MCP server. Such a tool turns one command into a structured interface with typed arguments, validation, and router registration.

In plain words
What is it for?
Use them when adding tools for commands such as system utilities or Git operations, including argument design, validation, availability checks, and registration.
Why use it?
They provide the required file locations and implementation checks, reducing mistakes when adding a new tool. They also require checking a command’s current help output before relying on its options.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is radimsem/mithril's own configuration. It tells Claude Code how to work on mithril itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything mithril configures →

Reuse

Borrowing it

Nothing to install: this file belongs to radimsem/mithril. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/radimsem/mithril/main/.claude/skills/tool-creator/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/radimsem/mithril

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for tool-creator

README.md
[![agentmods](https://agentmods.dev/badge/skills/radimsem/mithril/tool-creator/github.svg)](https://agentmods.dev/skills/radimsem/mithril/tool-creator)
Your own site
<a href="https://agentmods.dev/skills/radimsem/mithril/tool-creator"><img src="https://agentmods.dev/badge/skills/radimsem/mithril/tool-creator/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for tool-creator

Your own site · 80×15
<a href="https://agentmods.dev/skills/radimsem/mithril/tool-creator"><img src="https://agentmods.dev/badge/skills/radimsem/mithril/tool-creator.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,760 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00039 $0.05760
Opus 5.5 $0.00016 $0.02304
Sonnet 5.5 $0.00008 $0.01152
Haiku 4.5 $0.00004 $0.00576

Measured 2mo ago against content hash 40642bff9214, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

tool-creator scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/tool-creator/SKILL.md · 552 lines

How it starts

The opening of the file, as written. The whole thing — 552 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Tool Creator

Implementation guide for Mithril MCP server execution tools.

Overview

Each tool wraps a single command (POSIX, git, etc.) as a structured MCP tool. Tools are never shell strings - they build typed argument vectors validated before execution.

File Placement

Tool lives in crates/tools/src/<category>/<tool_name>.rs where category groups related commands:

Category Examples
system/ Ls, Cp, Rm, Grep, Find, Sed, Awk
git/ GitStatus, GitCommit, GitLog, GitDiff

PascalCase tool name, snake_case file name: GitStatus -> git/git_status.rs.

Register in crates/tools/src/<category>/mod.rs with pub mod <tool_name>;.

Pre-Implementation Verification

Before writing any code, verify the tool's CLI interface and sandbox compatibility. This section applies only to tools that wrap a CLI command — skip it for general-purpose tools like RunChain that implement execution logic rather than wrapping a binary.

1. CLI interface check

Run <cmd> --help (or <cmd> <subcommand> --help) to get the up-to-date flag reference. Use this output — not memory or documentation — to decide which arguments to expose in the Args struct.

# Examples
grep --help
git diff --help
cargo clippy --help

Cross-check the flag names, short forms, and value types against the help output before writing the parameters() JSON schema. Mismatches between the schema and the real CLI are the most common source of CmdError in tests.

2. Version check

Run <cmd> --version to confirm the developer has a recent version installed:

go version       # → go1.22.0 or newer
cargo --version  # → cargo 1.78.0 or newer

If the installed version is notably old (e.g. Go < 1.21, Cargo < 1.70), inform the developer to upgrade for reliable testing. If the command is not found at all, the tool should declare available() returning false (see ToolDef section below).

Trust --help over documentation or memory. Real CLI interfaces diverge from docs frequently. Common divergences found in this project:

Read the full file on GitHub · 552 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 552 lines · 39 tokens per session scan A 40642bff9214

Subscribe to this mod's changes

tool-creator is a skill published in the GitHub repository radimsem/mithril (15 stars, last pushed 6mo ago), licensed Apache-2.0. It adds 39 tokens to every session and 5,760 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.