content-source-router — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited content-source-router (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
What it is: The project-specific dispatch contract that decides which content source reads a requested page or post. Mental model: Treat each source as an adapter behind one explicit router; the router owns selection, not rendering. Why it exists: A static site with local markdown, MDX, and CMS-synced content needs one place where source precedence is visible and testable. What it is NOT: It is not the source-specific parser, the CMS sync job, or contributor-facing documentation. Adjacent concepts: Content source adapters, route matching, fallback policy, routing audit logs. One-line analogy: It is the switchboard that connects a content request to the right reader. Common misconception: A router can safely fall back to "markdown" when uncertain; unknown source selection should surface as a coverage gap.
.md routes to the markdown source, .mdx routes to the MDX source, no extension or .cms.json routes to the CMS sourcecontent/posts/** routes to local sources; content/cms-synced/** routes to the CMS source even if the file extension is .mdsource parameter that bypasses inspectionA content router is a dispatch surface that has to be exactly right or the rest of the site reads the wrong content. Every misroute is either a 404 (the user sees nothing) or a wrong-content render (the user sees a different post than the URL implies). The discipline is the same anti-default doctrine the skill-router applies to skills: prefer an explicit signal over an inferred one, prefer an unambiguous match over a "best guess," and prefer surfacing a coverage gap loudly over silently routing to a default.
The router evaluates four signals in priority order. The first signal that produces an unambiguous winner stops the chain.
| Priority | Signal | Source | Match rule |
|---|---|---|---|
| 1 | Explicit source parameter | Internal callers (preview, manual reconciliation) | Exact match against the Source enum. Bypasses all subsequent inspection. |
| 2 | Content-path prefix | Inbound request path | First matching prefix wins: content/posts/ → markdown; content/mdx/ → mdx; content/cms-synced/ → cms. |
| 3 | File extension | Resolved file path | .md → markdown; .mdx → mdx; .cms.json → cms. |
| 4 | Explicit source_hint in query string | Trusted internal callers | Last-resort hint; surfaced as a warning in the router's audit log. |
If no signal produces a match, the router returns { ok: false, reason: 'unknown_source', evidence: {...} }. It does NOT fall back to a default source. The caller must handle the unknown-source case explicitly — typically by responding HTTP 404 and logging the full request shape for human triage.
lib/content/sources/<source>.ts that mirrors the markdown source's interfaceSource enum used at priority 1| Use instead | When |
|---|---|
markdown-post-frontmatter-validation | The task is the actual frontmatter parsing for the markdown source — the router decides which source to read from, the source-specific skill validates and parses |
debugging | A specific routing decision is wrong in production logs and you need to reproduce |
documentation | The task is writing a contributor doc about the routing architecture |
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.