docs-ops
Manage Claude Code documentation lifecycle. Actions: scrape, validate, refresh, rebuild-index, clear-cache.
What this skill does
# Claude Code Documentation Operations Manage the Claude Code documentation lifecycle through a single consolidated skill. ## Argument Routing | Action | Description | |--------|-------------| | `scrape` | Scrape documentation from official sources, then refresh and validate | | `validate` | Validate index integrity and detect drift (read-only) | | `refresh` | Refresh index from filesystem without scraping | | `rebuild-index` | Clear and immediately rebuild the search index | | `clear-cache` | Clear the search cache (lazy rebuild on next search) | Parse `$ARGUMENTS` to determine the action. The first token is the action keyword. Remaining tokens are passed as options to the action handler. --- ## Action: scrape Scrape Claude documentation from official sources and run the full post-scrape workflow (index refresh and validation). ### Semantics - This action **always performs actual scraping** of at least one documentation source. - Default behavior: - Scrape **all configured official sources** (Claude docs, Claude Code docs, Anthropic docs), skipping unchanged documents. - Refresh the local index and metadata. - Validate that everything looks healthy. ### Default Workflow When invoked without qualifiers: 1. Invoke the `claude-ecosystem:docs-management` skill. 2. Request scraping with natural language: ```text Please scrape all configured Claude documentation sources. Skip unchanged documents, then refresh the local index and metadata and validate. After validation, clean up aged-out Anthropic articles (older than the configured max_age_days threshold). Run in foreground so we can see progress. IMPORTANT: Use Python 3.13 for validation (py -3.13) due to spaCy compatibility. Python 3.14 works for scraping. ``` 3. Let the skill decide which scripts to run based on its SKILL.md guidance. ### Scope Flags (Natural Language) Use natural language to narrow scope: - **By domain**: "Scrape only docs.claude.com, then refresh the index." - **By category**: "Scrape only /en/api/ from docs.claude.com." - **Post-scrape behavior**: - `scrape-only`: Skip index refresh and validation. - `scrape+refresh`: Scrape and refresh index (default). - `scrape+detect-drift`: Scrape and detect drift (404s, missing files). - `scrape+auto-cleanup`: Scrape and automatically cleanup drift. - `scrape+age-cleanup`: Scrape, refresh, and remove aged-out Anthropic articles. ### What This Action Should NOT Do - Never run validation-only or index-only workflow. - Never run scrapes in background with polling loops. - Never make ad-hoc script edits during scrape. ### Accurate Reporting **Distinguish by domain:** - `docs.claude.com` and `code.claude.com`: Serve .md URLs successfully - `anthropic.com`: Does NOT serve .md URLs (expected 404s, falls back to HTML) Report per-domain statistics accurately. --- ## Action: validate Validate the Claude documentation index integrity and detect drift. This is read-only - no changes made. ### Checks Performed - Index integrity (file existence) - Drift detection (404s, hash mismatches) - Metadata coverage - Missing files ### Instructions Invoke the `claude-ecosystem:docs-management` skill to validate the documentation index. Request validation report including any detected issues or drift. --- ## Action: refresh Refresh the local Claude documentation index without network scraping. ### Purpose Use this action when you want to: - Rebuild index from filesystem - Extract keywords and metadata - Validate metadata coverage - Generate summary report For full scraping + refresh, use the `scrape` action instead. ### Instructions Invoke the `claude-ecosystem:docs-management` skill to refresh the local documentation index. Request index rebuild and metadata validation from the skill. **Note:** Use Python 3.13 for this action due to spaCy compatibility: ```text Please refresh the local documentation index and validate metadata. Use Python 3.13 (py -3.13) for spaCy compatibility. ``` --- ## Action: rebuild-index Clear and immediately rebuild the docs-management search index. This is faster than `clear-cache` + waiting for next search because it triggers the rebuild immediately. ### When to Use - After manually editing `index.yaml` or documentation files - When search results seem stale or incorrect - After a `git pull` with documentation changes - When you need search working immediately (not on next query) ### Difference from clear-cache | Action | Behavior | Search Availability | |--------|----------|---------------------| | `clear-cache` | Clears cache only | Rebuild on next search (lazy) | | `rebuild-index` | Clears + rebuilds | Immediate (eager) | ### Options - **No options**: Show plan and ask for confirmation - **--force**: Skip confirmation and rebuild immediately ### Instructions This action clears the documentation search cache and immediately rebuilds the index. #### Check Current Status First, check the current cache state by running the cache manager info command. Report whether the cache exists, is valid, and when it was last built. #### Request Confirmation Unless the user passed `--force`, show a rebuild plan with the current cache state and ask for confirmation before proceeding. Explain that rebuilding takes a few seconds and search will be unavailable during the rebuild. #### Clear and Rebuild Once confirmed (or if `--force` was passed): 1. Clear the cache using the cache manager script 2. Trigger an immediate rebuild by running a search query through find_docs.py 3. Verify the rebuild succeeded by checking the new cache info #### Report Results Report the new index statistics including document count, terms indexed, and build time. Confirm that search is now available. ```markdown ## Index Rebuilt Successfully rebuilt Claude Code documentation search index. **New index stats:** - Size: 1.8 MB - Terms indexed: 6,020 - Documents: 451 - Tags: 33 - Categories: 16 - Build time: 45ms **Search is now available.** ``` ### Rebuild Triggers The index automatically rebuilds when: - `--clear-cache` flag is passed to find_docs.py - cache_version.json is missing or invalid - index.yaml content hash changes - Plugin scripts change (plugin fingerprint hash) ### Cache Validation The cache_manager.py uses content hashes (not just mtime) to detect changes. This correctly handles git operations where mtime changes but content doesn't. --- ## Action: clear-cache Clear the docs-management search cache (inverted index). This forces the index to rebuild on the next documentation search. ### When to Use - After manually editing `index.yaml` - When search results seem stale or incorrect - After a `git pull` with documentation changes - To free up disk space (~1.8 MB) ### Options - **No options**: Show what will be cleared and ask for confirmation - **--force**: Skip confirmation and clear immediately ### Step 1: Parse Options Check if `--force` flag is present. ```text force_mode = "--force" in arguments (case-insensitive) ``` ### Step 2: Locate Cache Directory The docs-management cache is located at: ```text ~/.claude/plugins/cache/<marketplace>/claude-ecosystem/<version>/skills/docs-management/.cache/ ``` **Detection approach:** 1. Find the installed claude-ecosystem plugin path from `~/.claude/plugins/installed_plugins.json` 2. Navigate to `skills/docs-management/.cache/` ### Step 3: Check Cache Status List the cache files and their sizes: | File | Purpose | |------|---------| | `inverted_index.json` | Search index (~1.8 MB) | | `cache_version.json` | Hash-based validity tracking | If cache directory doesn't exist or is empty, report: "Cache already clear. Nothing to do." ### Step 4: Confirmation (unless --force) If NOT force_mode, present the cache clear plan: ```markdown ## Cache Clear Plan **Target:** Claude Code documentation search index | File | Size | |------|------| | inverted_index.json | X.X MB | | cache_version.json | 512 bytes | **To
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.