{"id":46546935,"url":"https://github.com/claylo/navel","last_synced_at":"2026-04-25T21:06:18.617Z","repository":{"id":341320245,"uuid":"1169693238","full_name":"claylo/navel","owner":"claylo","description":"Introspection toolkit for examining Claude Code internals","archived":false,"fork":false,"pushed_at":"2026-04-20T19:27:28.000Z","size":2223,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-20T19:30:29.626Z","etag":null,"topics":["claude","claude-ai","claude-code","claude-code-docs"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/claylo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"lovelesslabs","buy_me_a_coffee":"claylo"}},"created_at":"2026-03-01T04:02:48.000Z","updated_at":"2026-04-20T19:27:31.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/claylo/navel","commit_stats":null,"previous_names":["claylo/navel"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/claylo/navel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/claylo%2Fnavel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/claylo%2Fnavel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/claylo%2Fnavel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/claylo%2Fnavel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/claylo","download_url":"https://codeload.github.com/claylo/navel/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/claylo%2Fnavel/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32276658,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T18:29:39.964Z","status":"ssl_error","status_checked_at":"2026-04-25T18:29:32.149Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["claude","claude-ai","claude-code","claude-code-docs"],"created_at":"2026-03-07T02:35:41.627Z","updated_at":"2026-04-25T21:06:18.605Z","avatar_url":"https://github.com/claylo.png","language":"Shell","funding_links":["https://github.com/sponsors/lovelesslabs","https://buymeacoffee.com/claylo"],"categories":[],"sub_categories":[],"readme":"# navel\n\nAn introspection toolkit for examining Claude Code's internals—system prompts, tool definitions, hook events, documentation—across every published version.\n\nAnd the name? Exactly what you think it is: a whole lot of navel-gazing. The Claude logo even looks like a belly button if you squint even a little bit.\n\n\u003c!-- navel:begin:badges --\u003e\n![Versions](https://img.shields.io/badge/versions-387-blue?style=flat\u0026logo=claude) ![Hooks](https://img.shields.io/badge/hooks-29-green?style=flat\u0026logo=claude) ![Commands](https://img.shields.io/badge/commands-98-orange?style=flat\u0026logo=claude) ![Env vars](https://img.shields.io/badge/env_vars-583-purple?style=flat\u0026logo=claude) ![Last sync](https://img.shields.io/badge/last_sync-2026--04--25-lightgrey?style=flat)\n\u003c!-- navel:end:badges --\u003e\n\n## What it does\n\n- **Caches every published version** of `@anthropic-ai/claude-code` from npm (direct tarball download, no npm required)\n- **Captures the full system prompt** sent to the API on first message—the entire `messages.create()` payload including tool definitions\n- **Tracks hook events** across versions and cross-references them against official documentation (spoiler: some hooks exist in code but have zero docs)\n- **Tracks environment variables**—every `process.env.*` reference across every version, with add/remove history and docs coverage\n- **Syncs official docs** from code.claude.com with change detection and diffing\n- **Diffs everything**—prompts between versions, docs between syncs\n\n## Quick start\n\n```bash\ngit clone https://github.com/claylo/navel.git\ncd navel\nbin/navel update\n```\n\nThat's it. `update` syncs the npm cache, fetches docs, scans for hooks, and captures the latest version's prompt.\n\n## Commands\n\n```\nnavel prompts capture latest          # capture the clean baseline prompt\nnavel prompts capture --full latest   # capture YOUR actual runtime prompt\nnavel prompts diff v2.1.62 v2.1.63   # what changed between versions?\nnavel prompts diff-all                # which versions changed the prompt?\nnavel prompts inspect latest          # metadata: tools, model, token limits\nnavel prompts tools latest            # list every tool in the payload\n\nnavel npm sync                        # download new versions from registry\nnavel docs sync                       # fetch docs (with change detection)\nnavel docs diff                       # show what changed in the last sync\nnavel hooks sync                      # scan for hook events + check docs coverage\nnavel commands sync                   # scan for bundled slash commands\nnavel env-vars sync                   # scan for environment variables\n\nnavel status                          # dashboard\nnavel outdated                        # your installed claude vs latest\nnavel update                          # sync everything, capture new prompt\n\nnavel monitor                         # build all available targets, alert on failure\nnavel monitor dash pdf                # build specific targets\n\nnavel schedule install                # hourly sync via launchd/systemd\nnavel schedule status                 # check scheduler\nnavel schedule uninstall              # remove scheduled sync\n```\n\nRun `navel prompts help` for the full prompt subcommand list.\n\n## Prerequisites\n\n- **jq** — `brew install jq` / `apt install jq`\n- **ripgrep** — `brew install ripgrep` / `apt install ripgrep`\n- **curl** — ships with macOS and most Linux distros\n- **node** — required for prompt capture only (`navel prompts capture`)\n\n## Where data lives\n\n| Directory | Contents |\n|-----------|----------|\n| `npm/versions/` | Cached npm packages (one per version) |\n| `reports/hooks.json` | Hook events, history, and docs coverage |\n| `reports/commands.json` | Bundled slash commands, history, and docs coverage |\n| `reports/env-vars.json` | Environment variables, add/remove history, and docs coverage |\n| `reports/docs-changes.json` | Documentation change log across syncs |\n| `prompts/versions/` | Captured system prompts and raw payloads |\n| `docs/` | Official documentation from code.claude.com |\n| `docs/diffs/` | Unified diffs between doc syncs |\n\nWhen installed via Homebrew, data goes to `~/.navel/` (override with `NAVEL_HOME`). When running from a repo checkout, data stays in the repo.\n\n**Local development note:** Scanners write to `local-reports/` (gitignored) by default. CI writes to `reports/` (committed). This means you can run `navel hooks sync` or `navel env-vars sync` locally without dirtying your working tree. Override with `NAVEL_REPORTS_DIR=reports` if you need to write to the tracked directory.\n\n## How prompt capture works\n\nClaude Code assembles its system prompt **entirely client-side** before sending it to the API. `navel` exploits this: it runs `node cli.js` with `ANTHROPIC_BASE_URL` pointed at a local HTTP server that intercepts the first `messages.create()` request, captures the full payload, responds with minimal SSE, and exits. Takes about 5 seconds per version.\n\nThe captured payload includes everything—system prompt blocks, tool definitions with schemas, model parameters. That's what you're diffing when you run `navel prompts diff`.\n\n### Capture modes\n\nThe default capture strips your environment down to the **bare metal baseline**—no plugins, no MCP servers, no user settings, no thinking tokens. That's the version we track across releases for diffing.\n\nBut maybe you want to see what Claude Code **actually sends** when *you* use it. That's `--full`:\n\n```\nnavel prompts capture --full --real-auth latest\n```\n\nThis runs with your real plugins, MCP servers, settings, and thinking config intact. The only thing we still suppress is prompt caching—because cache markers add noise to the output without changing the content.\n\nIf you want the **complete unfiltered picture** including cache boundary markers:\n\n```\nnavel prompts capture --full-prompt-caching --real-auth latest\n```\n\n| Mode | Plugins/MCP/Settings | Prompt Caching | Thinking | Use case |\n|------|---------------------|---------------|----------|----------|\n| *(default)* | Suppressed | OFF | OFF | Version tracking and diffing |\n| `--full` | Your real config | OFF | Your config | \"What does my setup actually send?\" |\n| `--full-prompt-caching` | Your real config | ON | Your config | Full picture with cache boundaries |\n\n### What's prompt caching?\n\nAnthropic's [prompt caching](https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching) lets the API reuse previously-seen system prompt blocks across requests—cutting input token costs and latency. Claude Code marks system blocks with `cache_control: {\"type\": \"ephemeral\"}` to tell the API which chunks to cache.\n\nIn the captured markdown, cache markers show up as annotations on system block headers:\n\n```\n\u003c!-- system block 2/3 [cache: {\"type\":\"ephemeral\"}] --\u003e\n```\n\nThese markers don't change the prompt content—they're billing/performance hints. That's why `--full` suppresses them (cleaner output) and `--full-prompt-caching` preserves them (if you're investigating caching behavior).\n\n## Interesting findings\n\n- All 23 hook events are now documented—but that wasn't always the case. `Elicitation`, `ElicitationResult`, `PostCompact`, and `StopFailure` all shipped with zero docs and got backfilled later. The env vars report shows the same pattern at a much larger scale.\n- The system prompt is 100% client-side—auth method doesn't change it, there's no server-side injection (theoretically possible, not observed)\n- Tool definitions change more frequently than you'd expect between minor versions\n- **448 environment variables** are referenced in the latest cli.js—only ~33% are documented. The rest are a mix of Claude Code internals (`CLAUDE_CODE_*`, `DISABLE_*`), bundled dependency knobs (gRPC, OTEL, Azure SDK), and platform detection vars\n- Version 2.1.27 dropped 29 env vars in one release—the Sentry-to-OpenTelemetry migration, visible as a bulk removal of `SENTRY_*` vars and cloud region detection strings\n- Suppressing plugins, MCP, and settings during capture reduces the prompt by ~18% (270 lines)—that's all injected by your local environment, not the base prompt\n\n## Offline documentation\n\nnavel can build offline copies of the Claude Code docs in two formats: a typeset **PDF** (with Anthropic brand fonts, glossary, and index) and a **Dash docset** (for instant search in Dash/Zeal/Velocity). You fetch your own copy of the docs and build locally—navel distributes the tooling, not the content.\n\n\u003cp\u003e\n  \u003cimg src=\"assets/claude-code-docs-pdf.png\" alt=\"Claude Code docs as a typeset PDF\" height=\"500\"\u003e\n  \u003cimg src=\"assets/claude-code-docs-in-dash.png\" alt=\"Claude Code docs in Dash\" height=\"500\"\u003e\n\u003c/p\u003e\n\nSee a [sample PDF with glossary and index](colophon-sample.pdf).\n\n```bash\nnavel docs sync   # fetch latest docs\nnavel pdf         # build the PDF\nnavel dash        # build the Dash docset\n```\n\n**Requires:** Node.js, `npm install`, plus Typst (PDF) or sqlite3 (Dash).\n\nFor the full guide—dependencies, build steps, print mode, docset installation—see **[Building offline documentation](offline-docs.md)**.\n\n## Automation\n\nnavel ships with a scheduler (`launchd` on macOS, `systemd` on Linux) and a build monitor that sends [Pushover](https://pushover.net/) alerts on failure. Compose them however you want:\n\n```bash\n# Data sync only (the default schedule)\nnavel update\n\n# Sync + monitor all available builds\nnavel update \u0026\u0026 navel monitor\n\n# Sync + monitor just the Dash docset\nnavel update \u0026\u0026 navel monitor dash\n\n# Sync + build everything\nnavel update \u0026\u0026 navel monitor dash pdf\n\n# Monitor builds without syncing (test against cached data)\nnavel monitor\n```\n\n`navel monitor` auto-detects which builds are available based on installed tools (node for Dash, typst for PDF). Explicit targets always run and fail loudly if prerequisites are missing.\n\nInstall the hourly schedule with whatever chain you want:\n\n```bash\nnavel schedule install       # installs hourly 'navel update'\nnavel schedule status        # check if it's running\nnavel schedule uninstall     # remove it\n```\n\nTo get Pushover alerts, set `PUSHOVER_USER_KEY` and `PUSHOVER_APP_TOKEN` in your environment. Without them, `navel monitor` still runs builds and logs results to `$NAVEL_HOME/logs/monitor.log` — it just doesn't ping you.\n\n## Traction\n\n[![Star History Chart](https://api.star-history.com/image?repos=claylo/navel\u0026type=date\u0026legend=top-left)](https://www.star-history.com/?repos=claylo%2Fnavel\u0026type=date\u0026legend=top-left)\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclaylo%2Fnavel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclaylo%2Fnavel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclaylo%2Fnavel/lists"}