second-brain-lint

second-brain-lint is a skill for Claude Code from philipyaz/cos. It costs 129 tokens per session (2,867 once invoked), scanned A, original, MIT.

A scheduled integrity checker for a knowledge wiki split into work, life, and shared sections. It scans the Markdown pages and reports structural and linking problems without changing them.

In plain words
What is it for?
Use it to check that filenames match headings, wikilinks point to existing pages, pages are connected, domains stay separate, and legacy or task-related files are not misplaced.
Why use it?
It helps find broken links, inconsistent page names, orphan pages, cross-section leaks, and task checkboxes in a knowledge-only wiki before they cause confusion.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to check that filenames match headings, wikilinks point to existing pages, pages are connected, domains stay separate, and legacy or task-related files are not misplaced.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/philipyaz/cos/second-brain-lint
Install

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.

Any agent
npx skills add philipyaz/cos --skill second-brain-lint
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 second-brain-lint

README.md
[![agentmods](https://agentmods.dev/badge/skills/philipyaz/cos/second-brain-lint.svg)](https://agentmods.dev/skills/philipyaz/cos/second-brain-lint)
Your own site
<a href="https://agentmods.dev/skills/philipyaz/cos/second-brain-lint"><img src="https://agentmods.dev/badge/skills/philipyaz/cos/second-brain-lint.svg" alt="Measured on agentmods" height="20"></a>
Per session 129 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,867 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.00129 $0.02867
Opus 5 $0.00064 $0.01434
Sonnet 5 $0.00026 $0.00573
Haiku 4.5 $0.00013 $0.00287

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

Security

Grade A, and why

second-brain-lint 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 yesterday.

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.

vault/example-vault/.claude/skills/second-brain-lint/SKILL.md · 214 lines

How it starts

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

Second Brain — Lint (knowledge integrity pass)

A scheduled integrity pass over the domain-split wiki. This is not an MCP route — it is a periodic health check. It runs over the three wiki trees — work/wiki, life/wiki, and shared/wikiindependently, and reports issues with actionable fixes. The vault is knowledge-only: this lint never writes the board (it has no board access). It auto-fixes the safe, deterministic issues itself and proposes the judgment or destructive ones — see the auto-fix policy below.

Run every check below for each domain tree, applying the safe auto-fixes as you go, then present one consolidated report (grouped by domain and severity) that separates what was auto-fixed from what is proposed.

Auto-fix policy — repair the safe, propose the rest

Lint does not just flag; it fixes what is safe to fix automatically and proposes everything that needs judgment. Two tiers:

AUTO-FIX (apply the edit, then record it in the report) — only when the repair is deterministic and unambiguous:

  • Filename ≠ H1 → rewrite the H1 to match the filename (the filename is what [[wikilinks]] resolve to, so it is canonical).
  • Broken [[wikilink]] with a single unambiguous target → repoint it via an exact aliases.md mapping or a one-to-one rename (e.g. [[Jane]][[Jane Doe]]). If the link is a same-page section reference that — per the reinforce-before-spawn doctrine — should not get its own page, de-link it to plain text instead.
  • A genuinely homeless page → add it to the index under ## Unfiled (additive, never lossy). Choosing its real theme is a proposal, not an auto-fix.

PROPOSE ONLY (never auto-apply — describe the fix, leave the page untouched) — anything destructive, lossy, or a judgment call:

  • Bloat merges / prunes (Check 9), page deletions, folding one page into another.
  • Contradictions / stale claims (Check 8) — re-synthesis is a judgment rewrite.
  • Cross-domain moves, orphan resolution, and strong-index theme placement.
  • Stray task checkboxes — these signal an item that belongs on the board; lint has no board access, so it flags the item for routing rather than silently deleting the action.
  • Legacy priorities.md / reminders/ — flag for removal; never delete unread.

Read the full file on GitHub · 214 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. yesterday Changed · +69 lines · +14 tokens per session fd32a3ec7bd9
  2. 8d ago First seen · 145 lines · 115 tokens per session scan A 93f7f06d3f23

Subscribe to this mod's changes

second-brain-lint is a skill published in the GitHub repository philipyaz/cos (4 stars, last pushed today), licensed MIT. It adds 129 tokens to every session and 2,867 once invoked, about $0.0006 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.

Related

Other skills, from other repositories

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

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-export

Export a vault's wiki either as a single portable file (llms.txt or llms-full.txt per the llmstxt.org standard) or as an OKF knowledge bundle (Google's Open Knowledge Format v0.1 — a shareable directory of markdown files any AI agent can consume). Use when the user says "export my wiki", "make an llms.txt", "share my…

tboome33/obsidian-mcp-router · 129 tokens

wiki-query

Answer a question using ONLY the existing wiki vault as the knowledge base — no web search, no general LLM knowledge. Reads hot.md first (cheap recent context), then catalog.md to navigate, then drills into specific pages, then optionally semantic-searches the wiki, and synthesizes an answer with citations. Use when…

tboome33/obsidian-mcp-router · 129 tokens

wiki-fold

Roll up the wiki's journal.md entries into structured fold pages — like 2^k log compaction. Reads the last 2, 4, 8, 16... entries and writes a fold page that summarizes them by extractive summarization (no invention), with backlinks to children. Idempotent at the structural level — re-running with the same window…

tboome33/obsidian-mcp-router · 125 tokens

wiki

Bootstrap or check a Karpathy-style "LLM wiki" structure inside an Obsidian vault — a self-maintaining knowledge base where pages reference each other and the LLM keeps it tidy. Sets up catalog.md (curated page catalog), journal.md (append-only operation history), hot.md (recent-context cache), and overview.md…

tboome33/obsidian-mcp-router · 134 tokens