by thewaltero
The leaked Anthropic reasoning protocol. Running locally. Zero-drift coding with Strict Write Discipline and adaptive Claude Opus 4.8 thinking. Mythos
# Add to your Claude Code skills
git clone https://github.com/thewaltero/mythos-routerGuides for using ai agents skills like mythos-router.
Last scanned: 5/30/2026
{
"issues": [],
"status": "PASSED",
"scannedAt": "2026-05-30T15:46:29.673Z",
"npmAuditRan": true,
"pipAuditRan": true
}mythos-router is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by thewaltero. The leaked Anthropic reasoning protocol. Running locally. Zero-drift coding with Strict Write Discipline and adaptive Claude Opus 4.8 thinking. Mythos. It has 269 GitHub stars.
Yes. mythos-router passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.
Clone the repository with "git clone https://github.com/thewaltero/mythos-router" and add it to your Claude Code skills directory (see the Installation section above).
mythos-router is primarily written in TypeScript. It is open-source under thewaltero on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh mythos-router against similar tools.
No comments yet. Be the first to share your thoughts!
A local CLI power tool for verifiable AI-assisted coding.
What is this? • Features • Installation • Examples • Usage • Architecture • Token Budget • SDK • SWD Protocol
# Try it now
npx mythos-router chat
mythos-router is a local CLI power tool built around Strict Write Discipline (SWD): a verification layer that checks every file operation an AI agent claims to perform against the actual filesystem using SHA-256 snapshots. If a claim doesn't match reality, the batch is rolled back so a bad write never half-lands, and successful runs leave a hash-chained, tamper-evident receipt.
The key idea is that the trust boundary is the filesystem, not the model. That makes SWD model-agnostic: it ships with a built-in Claude Opus 4.8 agent (mythos chat / mythos run), but the same engine verifies file actions from any agent — GPT, DeepSeek, a local model, or your own script — with no Mythos model key, over stdin/JSON, the SDK, or MCP. See examples/verified-writes for a runnable "the agent hallucinated a write, SWD caught it" demo.
Zero slop. Zero hallucinated state. Every write verified.
| Feature | Description |
|---|---|
| mythos init | Single-command project onboarding with environment validation, read-only --check, and scaffolding |
| mythos learn | Generate a repo-local SKILL.md from detected project structure, scripts, docs, CI, and risk surfaces |
| mythos run | One-shot prompt mode with inline, file, stdin input, and optional --provider BYOK selection: same SWD, budget, skills, branch, and optional test-healing pipeline as chat |
| Multi-Provider BYOK | Auto-routes between configured Anthropic, DeepSeek, OpenAI, and Surplus keys with circuit breakers; Anthropic is no longer required when another provider is configured |
| Verified Cost-Router | --escalate runs at a cheap --effort and climbs one model tier per Correction Turn only when SWD verification fails — pay for the expensive model only when the cheap one is provably wrong (capped by --escalate-to) |
| Verified Skill Packs | Load project-local or user-global SKILL.md rules with -s <name>; active skills are recorded in SWD receipts |
| Self-Improving Skills | mythos skills suggest mines past SWD receipts for file actions that keep failing verification and proposes SKILL.md rules to prevent them; read-only by default, --write to persist |
| Deterministic Caching | SQLite-backed caching for reasoning (SDK only) (Node 22+) |
| Adaptive Thinking | Opus 4.8 with configurable effort levels (high/medium/low) |
| Strict Write Discipline | Pre/post filesystem snapshots verify every model or external-agent file claim. Works over text FILE_ACTION blocks by default, or native provider tool-calling with --tools (Anthropic/OpenAI) — same verification either way, auto-falls back to text |
| Isolated Runs | swd apply --check <cmd> / --run-checks test a batch in a throwaway copy and apply it to the real tree only if checks pass — the real tree is never left broken |
| SWD Receipts | Per-run trust receipts record touched files, hashes, provider/external-agent id, budget, git state, and verification result. Receipts are hash-chained (append-only): each links to the previous one, so deletion, reordering, or forgery is detectable — not just in-place edits |
| Receipt Undo | receipts undo <id|latest> replays a verified receipt in reverse — previews by default, --yes to apply, drift-gated so it never overwrites newer edits, and produces its own receipt |
| Project Policy | .mythos/policy.json adds enforced repo-local SWD guardrails for sensitive project surfaces |
| Self-Healing Memory | Authority-based logging with a rebuildable SQLite FTS5 search index (Node 22+) |
| Auto-Healing TDD | Pass --test-cmd for bounded, error-driven autonomous repair loops |
| Correction Turns | Model gets 2 retries to match filesystem reality, then yields |
| Integrity Gate | verify command ensures referenced memory files still exist |
| CI Verification | verify --ci runs read-only PR checks for command-surface, sensitive-file, and receipt risks without an API key |
| Bring Your Own Agent | mythos swd apply --stdin --json lets any external agent route file actions through SWD without a Mythos model key |
| MCP Adapter | mythos mcp exposes SWD, receipt, and skill tools over stdio; mythos mcp config prints client setup snippets |
| Token Limiter | Budget cap with graceful save — progress saved to MEMORY.md, never lose work |
| Session Resume | Pick up exactly where you left off after a crash or exit (--resume) |
| Dry-Run Mode | Preview every file operation before it executes — full transparency |
| Verbose Tracing | See exactly what the AI is parsing, thinking, and verifying |
| Budget Analytics | Persistent tracking of cost across sessions and projects via stats |
| Session Branching | Isolate AI actions in a namespaced git branch (mythos/) |
| Zero Build | Runs directly via tsx — no compile step in dev |
Choose the right model for the job via the --effort flag:
| Effort | Model | Best For |
|---|---|---|
high (default) |
Claude Opus 4.8 | Architecture, deep reasoning, complex refactors |
medium |
Claude Sonnet 4.6 | Balanced code generation, everyday tasks |
low |
Claude Haiku 4.5 | Quick answers, memory compression, verification |
The dream command automatically uses low effort (Haiku 4.5) for cost-efficient memory compression, and verify uses lightweight scanning — so you only burn Opus tokens when you need deep reasoning.
Most agentic systems stored state in opaque databases or messy JSON files. Mythos Router treats MEMORY.md as the Sole Authority.
Every action is logged in Markdown first. On startup, the system verifies the integrity of the log via SHA-256 manifest hashing and reconstructs a high-performance Derivative SQLite Index (FTS5). If the index drifts or the database is deleted, the system self-heals by rebuilding from the authoritative Markdown source.
As memory approaches capacity, the dream command delegates a compression phase to a low-cost model (Haiku 4.5), ensuring your "Sacred Log" is always lean and relevant.
Node.js Version Requirement: The CLI requires Node.js 22+ (enforced via
enginesand tested in CI on Node 22 and 24). The advanced SQLite-backed features (Telemetry Dashboard, Deterministic Caching, and High-Performance Memory Index) require Node.js 22.5.0+ specifically; on Node 22.0–22.4 these features safely degrade with a warning without crashing the router.
# Install globally
npm install -g mythos-router
# Set at least one model key for mythos chat/run
# Anthropic remains the recommended default, but OpenAI/DeepSeek/Surplus can be used standalone.
export ANTHROPIC_API_KEY="sk-ant-..."
# export OPENAI_API_KEY="sk-proj-..."
# export DEEPSEEK_API_KEY="sk-..."
# export SURPLUS_API_KEY="inf_..." # Surplus marketplace (OpenAI-compatible, discounted)
# Initialize and start the built-in Mythos agent
mythos init
mythos chat
# Or use only the model-free SWD layer with your own external agent
your-agent --emit-file-actions | mythos swd apply --stdin --json
# Or expose Mythos to an MCP-compatible local agent client
mythos mcp
npx mythos-router chat
Small, runnable examples are available in examples/:
| Example | Purpose |
|---|---|
verified-writes |
Route any agent's file claims through SWD (stdin/JSON, SDK, or MCP) — includes a runnable agent-hallucination demo |
external-agent-json |
Submit structured file actions through mythos swd apply without a Mythos model key |
mcp-stdio |
Configure an MCP client to launch mythos mcp over local stdio |
project-policy |
Add enforced repo-local SWD block/confirm rules with .mythos/policy.json |
github-action |
Add a read-only verify --ci PR gate — one-line reusable action (uses: thewaltero/mythos-router@v1) or copy-a-workflow |