Getting it into your agent
It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.
git clone --depth 1 https://github.com/kouroshez/coding-osnpx agentmods add skills/kouroshez/coding-os/mcp-tool-authoringWrote 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/kouroshez/coding-os/mcp-tool-authoring)<a href="https://agentmods.dev/skills/kouroshez/coding-os/mcp-tool-authoring"><img src="https://agentmods.dev/badge/skills/kouroshez/coding-os/mcp-tool-authoring/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/kouroshez/coding-os/mcp-tool-authoring"><img src="https://agentmods.dev/badge/skills/kouroshez/coding-os/mcp-tool-authoring.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.00145 | $0.03149 |
| Opus 5.5 | $0.00058 | $0.01260 |
| Sonnet 5.5 | $0.00029 | $0.00630 |
| Haiku 4.5 | $0.00015 | $0.00315 |
Grade A, and why
mcp-tool-authoring 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 today.
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 — 301 lines — stays where its author put it; the contents beside it link to each section on GitHub.
mcp-tool-authoring
Purpose: Make every new cos_* MCP tool match the contract every other tool follows. Drift here breaks the agent (deferred-tool schema lookups), the envelope (Rule 13), or the migration (Rule 9). One canonical authoring path keeps the ~80 tools coherent.
Read when: editing files matching:
src/core/thinking_os/tools/*.py— MCP tools registered with the FastMCP server.src/core/graph_os/tools/*.py— graph-side tools (cos_graph_*).src/core/board_os/mcp_tools.py— Scrumban / task tools.src/core/web/routes/*.py— HTTP routes that wrap an MCP tool for the Hub UI.src/core/thinking_os/server.py— when registering a new tool module.
Skip when: editing tests, helpers, or non-tool internals.
The Five Hard Contracts
Every cos_* tool MUST satisfy ALL of:
1. Name prefix cos_ (Rule 2)
@mcp.tool
@safe_tool
async def cos_doc_search(query: str, limit: int = 5) -> dict:
...
Names without the cos_ prefix are silently rejected from the tool inventory. The inventory is the SSOT for docs/governance/mcp-tool-inventory.md (regenerated, not hand-edited).
2. Envelope shape via @safe_tool (Rule 13)
Every tool returns ok(data) or fail(category, message). The decorator does this for you:
from core.thinking_os.tools._shared import safe_tool, ok, fail
@mcp.tool
@safe_tool # converts raw exceptions to fail() envelopes
async def cos_doc_search(query: str, limit: int = 5) -> dict:
if not query:
return fail("invalid_input", "query is required")
rows = await _db.search(query, limit=limit)
return ok({"results": rows, "count": len(rows), "meta": {"layer": "docs"}})
fail categories are documented in docs/engineering/mcp-error-envelope.md: invalid_input, not_found, unavailable, permission_denied, internal_error, rate_limited. Don't invent new categories without updating the contract doc.
3. ONE-line docstring (Rule 12)
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- today Changed · -1 lines 918e226b219c
- 2mo ago First seen · 302 lines · 145 tokens per session scan A c73d26a7b23f
mcp-tool-authoring is a skill published in the GitHub repository kouroshez/coding-os (7 stars, last pushed today), licensed Apache-2.0. It adds 145 tokens to every session and 3,149 once invoked, about $0.0006 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.
mcp-tool-authoring compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| mcp-tool-authoringkouroshez/coding-os | Skill | 7 | today | Apache-2.0 | A | 145 | Claude Code, Codex |
| graph-mutation-planpotpie-ai/potpie | Skill | 5.8k | 7d ago | Apache-2.0 | A | 22 | Claude Code, Codex |
| tencent-ima-wikizj-unicom-ai/UniEmployee | Skill | 799 | 8d ago | MIT | A | 127 | Claude Code, Codex |
| scienceworld-growth-focuserzjunlp/SkillNet | Skill | 1.4k | 4d ago | MIT | A | 71 | Claude Code, Codex |
| scienceworld-conditional-box-placerzjunlp/SkillNet | Skill | 1.4k | 4d ago | MIT | A | 59 | Claude Code, Codex |
| scienceworld-object-classifierzjunlp/SkillNet | Skill | 1.4k | 4d ago | MIT | A | 66 | Claude Code, Codex |
| scienceworld-tool-userzjunlp/SkillNet | Skill | 1.4k | 4d ago | MIT | A | 87 | Claude Code, Codex |