SportIQ-MCP: Command for Claude Code

.claude/commands/add-tool.md

add-tool is a command for Claude Code from Ninjabeam20/SportIQ-MCP. It costs 22 tokens per session (415 once invoked), scanned A, original, MIT.

A command that creates a new MCP tool, connects it to the project’s data-processing chain, and adds its tests and documentation. MCP is a way for an application to expose tools that an AI assistant can call.

In plain words
What is it for?
Use it to add a sport-specific tool, connect it to an existing or new processing chain, create automated tests, and document it in the project wiki.
Why use it?
Adding a tool normally requires coordinated changes in several files. This command gives those changes a defined workflow and checks both successful and failed responses.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter.

This is Ninjabeam20/SportIQ-MCP's own configuration. It tells Claude Code how to work on SportIQ-MCP 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 SportIQ-MCP configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Ninjabeam20/SportIQ-MCP. 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/Ninjabeam20/SportIQ-MCP/main/.claude/commands/add-tool.md
Clone the repo
git clone --depth 1 https://github.com/Ninjabeam20/SportIQ-MCP

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 add-tool

README.md
[![agentmods](https://agentmods.dev/badge/commands/ninjabeam20/sportiq-mcp/add-tool/github.svg)](https://agentmods.dev/commands/ninjabeam20/sportiq-mcp/add-tool)
Your own site
<a href="https://agentmods.dev/commands/ninjabeam20/sportiq-mcp/add-tool"><img src="https://agentmods.dev/badge/commands/ninjabeam20/sportiq-mcp/add-tool/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 add-tool

Your own site · 80×15
<a href="https://agentmods.dev/commands/ninjabeam20/sportiq-mcp/add-tool"><img src="https://agentmods.dev/badge/commands/ninjabeam20/sportiq-mcp/add-tool.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 22 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 415 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.00022 $0.00415
Opus 5 $0.00011 $0.00208
Sonnet 5 $0.00004 $0.00083
Haiku 4.5 $0.00002 $0.00042

Measured 12d ago against content hash 12d1e763238e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

add-tool 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 12d 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/commands/add-tool.md · 32 lines

What it actually says

/project:add-tool $ARGUMENTS

Scaffold a complete tool. The arguments are <sport> <tool_name> — for example cricket cricket_get_top_scorers.

Steps

  1. Confirm intent. Read the user's intent in one paragraph back to them. Stop and ask if ambiguous.
  2. Add the tool function in src/sportiq/{sport}/tools.py:
    • @mcp.tool() decorator.
    • Full type hints; docstring with Args: block.
    • Body: validate → call chain → wrap with tool_response() / error_envelope().
  3. Wire the chain. If a chain for this data category exists, reuse. Otherwise add to src/sportiq/{sport}/chains.py and update .claude/rules/caching-policy.md with the new TTL row.
  4. Add test file tests/tools/test_{tool_name}.py:
    • Stub the chain to return both success and failure cases.
    • Assert envelope shape, meta fields, and error codes.
  5. Add wiki page docs/wiki/tools/{tool-name-kebab}.md with frontmatter (type: tool).
  6. Update docs/index.md with a one-liner under the Tools section.
  7. Append to docs/log.md: ## [YYYY-MM-DD] tool-added | {tool_name}.
  8. Run uv run pytest tests/tools/test_{tool_name}.py and report results.
  9. End with Rule #8 format.

What you do NOT do

  • Touch unrelated tools or chains.
  • Hit live APIs to "see what the data looks like" — ask the user for a sample.
  • Skip the wiki page or log entry.
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. 12d ago First seen · 32 lines · 22 tokens per session scan A 12d1e763238e

Subscribe to this mod's changes

add-tool is a command published in the GitHub repository Ninjabeam20/SportIQ-MCP (10 stars, last pushed yesterday), licensed MIT. It adds 22 tokens to every session and 415 once invoked, about $0.0001 per session on Opus 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-31.