cos: Skill for Claude Code

.claude/skills/add-an-addon/SKILL.md

add-an-addon is a skill for Claude Code from philipyaz/cos. It costs 203 tokens per session (5,110 once invoked), scanned B, original, MIT.

A development guide for adding an optional feature area to the Cos application. It describes one integrated slice covering navigation, API routes, stored data, and MCP tools, controlled by one settings switch.

In plain words
What is it for?
Building add-ons such as a health dashboard, finance tracker, or reading list, including their pages, routes, data handling, agent tools, and disabled-by-default setup.
Why use it?
It helps keep optional features separate from the core application and avoids creating duplicate storage, navigation, or integration patterns.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions CLAUDE.md.

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

Reuse

Borrowing it

Nothing to install: this file belongs to philipyaz/cos. 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/philipyaz/cos/main/.claude/skills/add-an-addon/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/philipyaz/cos

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-an-addon

README.md
[![agentmods](https://agentmods.dev/badge/skills/philipyaz/cos/add-an-addon.svg)](https://agentmods.dev/skills/philipyaz/cos/add-an-addon)
Your own site
<a href="https://agentmods.dev/skills/philipyaz/cos/add-an-addon"><img src="https://agentmods.dev/badge/skills/philipyaz/cos/add-an-addon.svg" alt="Measured on agentmods" height="20"></a>
Per session 203 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,110 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.00203 $0.05110
Opus 5 $0.00102 $0.02555
Sonnet 5 $0.00041 $0.01022
Haiku 4.5 $0.00020 $0.00511

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

Security

Grade B, and why

add-an-addon scanned grade B with 1 finding 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 8d 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.

Reads MCP configurationmediumAgent snooping

mcp.json carries server URLs and auth tokens; reading it lets a mod discover and abuse other integrations.

plist or `.mcp.json`. Most add-ons need no secret (copy nutrition, which has none).
.claude/skills/add-an-addon/SKILL.md · 261 lines

How it starts

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

Add an add-on (the framework-native way)

An add-on is an optional, self-contained vertical layered over the core board. The framework already exists — your job is to parametrise it with one manifest, not to invent a parallel one. Copy Nutrition & Chef (board/lib/addons.ts, mcp/nutrition-server/, board/app/api/nutrition/, tests/api-nutrition-gate.mjs) beat for beat. Read docs/architecture/addons.md first; it is the spec, this is the recipe.

WHEN this applies — and the tell that you're doing it wrong

Use this skill when you are adding a whole feature area (its own pages + routes + agent tools) that should ship disabled by default and not bloat the core.

The tell — STOP and make it an add-on if you catch yourself about to:

  • create a new board/lib/<x>-store.ts or a new board/data/<x>.json → the data belongs on cases.json via DBShape, written through the existing mutate().
  • hardcode a nav entry into the sidebar's core list → nav comes from the manifest's navItems, revealed only when the flag is on.
  • add an /api/<x>/* route prefix that nothing in ADDON_REGISTRY claims → register it.
  • mint a second persistence chokepoint, a second SSE channel, a second backup path → there is exactly one of each, and riding cases.json gives you all three for free.

Does NOT apply to: a tweak to a core surface (cases/events/reminders/priorities — those are always-on, never gated), or a pure agent-skill with no new data/nav/routes.

The mental model (memorise this)

One four-layer slice, gated by ONE flag. Writes close; reads stay open. A component is a STATE MACHINE — it never calls an LLM; the agent is the intelligence.

An add-on is a deterministic state machine: it persists state and exposes it via an API + an MCP server, and that is the whole contract. It does NOT call an LLM / the Anthropic API. Any generative step (a training plan, a summary, a drafted reply) is produced by the external agent (your operator skill, Claude Cowork) and written back through an MCP write tool / a POST; the add-on only validates, versions, attributes, stores, and serves it. Deterministic server-side compute (stats, projections, aggregations) is fine — only generative LLM inference is delegated. The sole exception in the whole repo is the vault MCP (mcp/vault-server), which embeds the Claude Agent SDK and is itself an agent. If you catch yourself reaching for @anthropic-ai/sdk (or any LLM client) inside an add-on route or MCP server, stop — that generative step belongs in the agent's context, not the component.

Read the full file on GitHub · 261 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. 8d ago First seen · 261 lines · 203 tokens per session scan B cfdda6e9e7f4

Subscribe to this mod's changes

add-an-addon is a skill published in the GitHub repository philipyaz/cos (4 stars, last pushed today), licensed MIT. It adds 203 tokens to every session and 5,110 once invoked, about $0.0010 per session on Opus 5. A static security scan graded it B with 1 finding (reads mcp configuration). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

opencode-plugin-idioms

Event hook payload shapes, session lifecycle timing, toast/TUI-route render boundaries, and child-session tagging conventions for OpenCode server (@opencode-ai/plugin) and TUI (@opencode-ai/plugin/tui) plugins, grounded in the vendored OpenCode source at references/opencode.

kagan-sh/kagan · 64 tokens

wiki-lint

Health-check a wiki vault. Finds orphan pages (no inbound links), dead wikilinks (point to non-existent pages), missing frontmatter fields, stale claims, empty sections, and pages absent from catalog.md. Produces a structured report with severity tiers and proposes concrete fixes — but does not auto-apply them unless…

tboome33/obsidian-mcp-router · 119 tokens

self-align

Adversarial self-audit of the Kagan repo through four lenses — code quality & YAGNI, security, spec alignment, docs/AGENTS.md freshness — each finding self-assessed and reported by severity and confidence for the developer to action. Use only when explicitly asked to self-align, audit, or health-check the codebase; it…

kagan-sh/kagan · 84 tokens

meta-sync-template

Interactive flow to propagate the reference (.template) vault's plugins, snippets, and root docs to one or more configured vaults. Reads the active router config, lists every vault with online status, flags vaults missing obsidian-local-rest-api upfront, lets the user pick all or a subset, and optionally re-clones…

tboome33/obsidian-mcp-router · 159 tokens

save

File the current Claude conversation (or a specific insight from it) as a structured wiki note. Auto-detects the right type (decision, answer, session-log, technique, ADR), writes appropriate frontmatter, places the file in the correct wiki folder, and updates catalog.md, journal.md, hot.md. Use when the user says…

tboome33/obsidian-mcp-router · 112 tokens

wiki-boundary

Rank the "frontier" pages of a wiki — the crossroads many pages link to that stay thin inside — so you can decide where research would pay off most. Use when the user says "what should I write about next", "where are the gaps", "which pages need work", "find the thin hub pages", "boundary pages", "/wiki-boundary"…

tboome33/obsidian-mcp-router · 141 tokens