diff --git a/.claude/commands/ccguide/daily.md b/.claude/commands/ccguide/daily.md new file mode 100644 index 0000000..1c40fc9 --- /dev/null +++ b/.claude/commands/ccguide/daily.md @@ -0,0 +1,44 @@ +--- +description: Daily update check — official Anthropic docs diff + guide/CC releases digest +--- + +Run this sequence in order. Present results as one consolidated report. + +## Step 1 — Refresh official docs + +Call `refresh_official_docs` MCP tool to fetch the latest Anthropic docs and update the current snapshot. + +If it fails (no baseline), tell the user to run /ccguide:init-docs once first, then stop. + +## Step 2 — Diff official docs + +Call `diff_official_docs` MCP tool to compare baseline vs refreshed current. + +## Step 3 — Guide + CC releases digest + +Call `get_digest` MCP tool with period: "day" + +--- + +## Output format + +Present everything as a single daily briefing: + +``` +# Daily Claude Code Update — {today's date} + +## Official Anthropic Docs +{diff results — added/removed/modified sections, or "No changes"} + +## Guide + CC CLI +{digest results — guide CHANGELOG entries + CC releases from last 24h, or "No changes"} + +--- +Docs snapshot: {baseline date} → {current date} +``` + +Rules: +- If no changes anywhere: say so clearly in one line, no padding +- Reproduce ALL URLs verbatim (source URLs, GitHub links) +- If official docs unchanged AND no guide/CC updates: "Nothing changed in the last 24h." +- Keep it dense — this is a daily briefing, not a report diff --git a/.claude/commands/ccguide/diff-docs.md b/.claude/commands/ccguide/diff-docs.md new file mode 100644 index 0000000..e91a19a --- /dev/null +++ b/.claude/commands/ccguide/diff-docs.md @@ -0,0 +1,17 @@ +--- +description: Compare official Anthropic docs baseline vs current snapshot (no network — instant) +--- + +Use the `diff_official_docs` MCP tool. + +No network call — reads local index files only (~50KB each). Instant. + +Present the results clearly: +- Added sections (new pages in the official docs) +- Removed sections +- Modified sections with line delta and first changed line +- Unchanged count + +If no baseline exists, tell the user to run /ccguide:init-docs first. +If no current snapshot exists, tell the user to run /ccguide:refresh-docs first. +If no changes, confirm everything is in sync and suggest running /ccguide:refresh-docs to update. diff --git a/.claude/commands/ccguide/init-docs.md b/.claude/commands/ccguide/init-docs.md new file mode 100644 index 0000000..2deeba4 --- /dev/null +++ b/.claude/commands/ccguide/init-docs.md @@ -0,0 +1,13 @@ +--- +description: Fetch official Anthropic Claude Code docs and store as local baseline snapshot +--- + +Use the `init_official_docs` MCP tool. + +This fetches ~1.2MB from Anthropic (takes ~5s) and stores 4 local cache files in ~/.cache/claude-code-guide/. +Both the baseline and current snapshots are set to this version. + +After success, tell the user: +- How many sections were found +- The snapshot path +- That they can now run /ccguide:diff-docs after /ccguide:refresh-docs to see what changed diff --git a/.claude/commands/ccguide/refresh-docs.md b/.claude/commands/ccguide/refresh-docs.md new file mode 100644 index 0000000..f6e0e42 --- /dev/null +++ b/.claude/commands/ccguide/refresh-docs.md @@ -0,0 +1,11 @@ +--- +description: Re-fetch official Anthropic Claude Code docs and update current snapshot (baseline unchanged) +--- + +Use the `refresh_official_docs` MCP tool. + +This fetches ~1.2MB from Anthropic (takes ~5s) and updates only the "current" snapshot. +The baseline (set by init_official_docs) is never touched. + +After success, show the quick diff preview against the baseline that the tool returns. +Remind the user to run /ccguide:diff-docs for the full detailed diff. diff --git a/.claude/commands/ccguide/search-docs.md b/.claude/commands/ccguide/search-docs.md new file mode 100644 index 0000000..93d9255 --- /dev/null +++ b/.claude/commands/ccguide/search-docs.md @@ -0,0 +1,16 @@ +--- +description: Search official Anthropic Claude Code docs by keyword +--- + +Use the `search_official_docs` MCP tool with query: $ARGUMENTS + +If no query is given, ask the user what they want to search for. + +Default limit: 5 results. + +Present each result with: +- Section title +- Source URL (reproduce verbatim) +- Excerpt showing the relevant content + +If no snapshot exists, tell the user to run /ccguide:init-docs first. diff --git a/guide/ultimate-guide.md b/guide/ultimate-guide.md index 6109e72..db0b6ad 100644 --- a/guide/ultimate-guide.md +++ b/guide/ultimate-guide.md @@ -11586,17 +11586,36 @@ Install the companion slash commands for one-keystroke access (stored in `~/.cla # Copy or symlink to ~/.claude/commands/ccguide/ to install globally ``` +**Guide commands:** + | Command | Example | Description | |---------|---------|-------------| | `/ccguide:search` | `/ccguide:search hooks` | Search by keyword | | `/ccguide:cheatsheet` | `/ccguide:cheatsheet hooks` | Cheatsheet (full or section) | -| `/ccguide:digest` | `/ccguide:digest week` | What changed this week | +| `/ccguide:digest` | `/ccguide:digest week` | What changed this week (guide + CC releases) | | `/ccguide:example` | `/ccguide:example code-reviewer` | Fetch a template | | `/ccguide:examples` | `/ccguide:examples agents` | List templates by category | | `/ccguide:release` | `/ccguide:release 2.1.59` | Release details | | `/ccguide:changelog` | `/ccguide:changelog 10` | Recent guide CHANGELOG | | `/ccguide:topics` | `/ccguide:topics` | Browse all categories | +**Official Anthropic docs tracker** (MCP v1.1.0+): + +| Command | Description | +|---------|-------------| +| `/ccguide:init-docs` | Fetch official docs + store as local baseline (run once) | +| `/ccguide:refresh-docs` | Re-fetch latest docs, update current snapshot (baseline unchanged) | +| `/ccguide:diff-docs` | Compare baseline vs current — added/removed/modified pages, 0 network | +| `/ccguide:search-docs ` | Search official Anthropic docs from local cache | +| `/ccguide:daily` | **Daily briefing**: refresh + diff official docs + guide/CC digest | + +Typical workflow: +```bash +/ccguide:init-docs # once — stores baseline + current in ~/.cache/claude-code-guide/ +# days later... +/ccguide:daily # every day — refresh + diff + digest in one shot +``` + #### Custom agent A `claude-code-guide` agent is included in `.claude/agents/claude-code-guide.md`. It uses Haiku (fast, cheap) and automatically searches the guide before answering any Claude Code question.