Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add softspark/ai-toolkit --skill mcp-patternsgit clone --depth 1 https://github.com/softspark/ai-toolkitWrote 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.
[](https://agentmods.dev/skills/softspark/ai-toolkit/mcp-patterns)<a href="https://agentmods.dev/skills/softspark/ai-toolkit/mcp-patterns"><img src="https://agentmods.dev/badge/skills/softspark/ai-toolkit/mcp-patterns/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.
<a href="https://agentmods.dev/skills/softspark/ai-toolkit/mcp-patterns"><img src="https://agentmods.dev/badge/skills/softspark/ai-toolkit/mcp-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00044 | $0.02343 |
| Opus 5.5 | $0.00018 | $0.00937 |
| Sonnet 5.5 | $0.00009 | $0.00469 |
| Haiku 4.5 | $0.00004 | $0.00234 |
Grade A, and why
mcp-patterns 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 1mo 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.
How it starts
The opening of the file, as written. The whole thing — 330 lines — stays where its author put it; the contents beside it link to each section on GitHub.
MCP Patterns Skill
MCP Specification (2025-06-18)
Core Concepts
| Concept | Description |
|---|---|
| Server | Exposes tools, resources, prompts to clients |
| Client | Connects to servers, invokes tools |
| Transport | Communication layer (stdio, HTTP, SSE) |
| Tool | Executable function with JSON Schema |
| Resource | Read-only data (files, URLs) |
| Prompt | Reusable prompt template |
Tool Definition Pattern
// TypeScript with @modelcontextprotocol/sdk
server.setRequestHandler(ListToolsRequestSchema, async () => ({
tools: [{
name: "search_kb",
description: "Search the knowledge base",
inputSchema: {
type: "object",
properties: {
query: {
type: "string",
description: "Search query"
},
limit: {
type: "number",
description: "Max results",
default: 10
}
},
required: ["query"]
},
annotations: {
readOnlyHint: true, // Doesn't modify state
idempotentHint: true, // Same input = same output
openWorldHint: false // Bounded result set
}
}]
}));
Tool Annotations
| Annotation | Meaning | Use When |
|---|---|---|
readOnlyHint |
No side effects | Read operations |
destructiveHint |
Deletes/modifies data | Write operations |
idempotentHint |
Safe to retry | GET-like operations |
openWorldHint |
Results may change | External API calls |
How to Write a Tool Description
The description is the only signal the model uses to route a request. The schema constrains the call; the description decides whether the call happens at all. Treat it as a routing contract, not API prose. A good one has five parts, in this order:
- One-line purpose — what the tool does, in plain terms. Lead with a verb.
Search indexed knowledge-base documents and return ranked passages.Skip the HTTP verb and endpoint;calls GET /v2/searchtells the model nothing about intent. - WHEN TO USE — concrete trigger phrasings the user might say, not abstract categories. List the actual shapes: "find docs about X", "what does the KB say about Y", "look up the runbook for Z". Models match on surface form, so give them surface forms.
- WHEN NOT TO USE — the section that does most of the disambiguation work. Name the near-miss tools and the boundary that separates them. This is where you prevent the model from firing the wrong tool on a request that looks similar. Empty WHEN NOT TO USE = the tool is under-specified.
- CRITICAL — one line for the single non-obvious failure mode. The constraint a reader would not guess from the schema: a required ordering, an ID that must come from another call, a cost/irreversibility warning. One line, not a checklist.
- Self-test — close with a question the model can apply to itself to decide fit.
Ask: is the user looking up existing content, or asking me to create new content? This tool is read-only — if they want to create, stop.
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.
- 1mo ago First seen · 330 lines · 44 tokens per session scan A 5c36b8f7c17c
mcp-patterns is a skill published in the GitHub repository softspark/ai-toolkit (180 stars, last pushed yesterday), licensed Apache-2.0. It adds 44 tokens to every session and 2,343 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-09-03.
Other skills, from other repositories
cline-fix-volatile-msg
Ladder-aware Cline Anthropic caching — verify the rolling read/write ladder on the wire, then add the tools breakpoint and tune TTL. Updated for the 2026-08 AI-SDK monorepo.
continue-gemini-explicit
Continue's Gemini provider doesn't use the cachedContents API at all. Add explicit caching for sessions over the minimum token threshold.
roo-fix-volatile-msg
Ladder-aware Roo Code Anthropic caching — verify the rolling read/write ladder on the wire, then close the real gaps (Vertex 4-block budget, MiniMax path).
aider-1h-ttl
Aider uses 5min TTL by default and works around long pauses with keepalive pings. Wire up the 1h TTL beta instead.
cline-openai-cache-key
Cline OpenAI native provider sends no promptcachekey. Add a stable per-task key so cachedtokens stops being zero.
continue-enable-defaults
Continue's prompt caching is opt-in via config and off by default. Flip the default to systemAndTools.