Skip to main content
skill CX Codex

claude-docs-validate — Claude Code skill: check local docs health

A skill that checks the local Claude documentation clone: freshness, broken links, cache status. Useful when you need to know if the docs in ~/.claude-code-docs/ are current.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add costiash/claude-code-docs --skill claude-docs-validate -a claude-code
Open on GitHub

What claude-docs-validate does

The skill targets the local docs clone at ~/.claude-code-docs/. It first looks for paths_manifest.json. No manifest means the plugin was never installed or the docs were never cloned, and the skill prints the install commands.

Freshness comes from two signals: the manifest build time and the last git update of the clone. A manifest older than roughly a day is normally refreshed by the SessionStart hook on your next session. Doing it by hand means running git fetch origin main and git reset --hard origin/main inside the docs directory. After that the skill reads cache state through fetch-docs.sh status, which reports manifest pages, cached pages and pending ones.

URL checking is a separate step, handled by validate-paths.sh. There is a fast pass with --quick and a full scan that runs 1-2 minutes. The script pulls addresses straight from the manifest and summarizes reachable, broken and timed-out entries. If broken URLs survive a git pull, the upstream page probably moved, and the repo issues page is the place to report it. For counts, jq against the manifest gives the total and a per-category breakdown.

What it helps with

  • tell whether the local Claude docs clone has gone stale
  • spot broken or unreachable URLs in the docs manifest
  • see how many pages are cached and how many are pending
  • refresh the docs clone by hand when the hook did not run
  • count documentation pages by category

Example prompts for the agent

  • Check whether my local Claude docs are current
  • Validate the documentation and find broken links
  • Show me the doc statistics by category

How to install claude-docs-validate

1Skills CLI (Vercel)

npx skills add costiash/claude-code-docs --skill claude-docs-validate -a claude-code

2Manually: put the files in place

~/.claude/skills/claude-docs-validate/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/claude-docs-validate/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about claude-docs-validate

How do I install claude-docs-validate in Claude Code?

Through the plugin marketplace: run /plugin marketplace add costiash/claude-code-docs, then /plugin install claude-docs@claude-code-docs. The skill ends up at ~/.claude/skills/claude-docs-validate/SKILL.md.

What does claude-docs-validate do?

It inspects the local docs clone in ~/.claude-code-docs/: how fresh the manifest and clone are, what the cache holds, and which URLs answer. It can also break the page count down by category.

What if a lot of URLs come back broken?

A sitemap change is the usual cause. Run git pull in the docs directory first, then validate again. Pages that still fail have likely moved, so report them on the repo issues page.

Source text

SKILL.md · MIT
---
name: claude-docs-validate
description: >
  Check the health and freshness of locally-stored Claude documentation.
  Use this skill when the user asks about documentation health, broken links,
  stale docs, freshness checks, or wants to validate that their local install
  is up-to-date and all URLs are reachable. Triggers on: "are my docs current",
  "check doc health", "validate documentation", "broken links", "stale docs".
---

# Claude Documentation Validation Skill

Check whether the local documentation clone at `~/.claude-code-docs/` is healthy and up-to-date.

## When to Use This Skill

Activate when the user asks about:
- Documentation freshness or staleness
- Broken links or unreachable docs
- Health checks on their local install
- Whether docs need updating

## Validation Workflow

### Step 1: Check if the metadata is installed

Verify `~/.claude-code-docs/paths_manifest.json` exists. If not:
> Documentation not found. Run this in Claude Code to install:
> ```
> /plugin marketplace add costiash/claude-code-docs
> /plugin install claude-docs@claude-code-docs
> ```

### Step 2: Check freshness

Two signals — when the manifest was last generated (server-side), and when the clone last pulled:
```bash
jq -r '.generated_at' ~/.claude-code-docs/paths_manifest.json          # manifest build time
cd ~/.claude-code-docs && git log -1 --format="%ci %s"                  # clone last updated
```
If the manifest is older than ~24h, the SessionStart hook normally refreshes it on the next
session; a manual refresh is `cd ~/.claude-code-docs && git fetch origin main && git reset --hard origin/main`.

### Step 3: Check the cache status

```bash
~/.claude-code-docs/plugin/scripts/fetch-docs.sh status
```
Reports manifest pages / cached / pending / stale. If pending > 0, suggest `/docs sync`.

### Step 4: Run URL validation (if user asks for it)

Quick spot-check (recommended first), or full scan (1-2 min):
```bash
bash ~/.claude-code-docs/plugin/skills/claude-docs-validate/scripts/validate-paths.sh --quick
bash ~/.claude-code-docs/plugin/skills/claude-docs-validate/scripts/validate-paths.sh
```
These read URLs directly from the manifest. Report the summary (reachable / broken / timed out).
For persistent broken URLs, the upstream page may have moved — report at
https://github.com/costiash/claude-code-docs/issues.

### Step 5: Doc statistics (if user asks for stats/count)

```bash
jq '.pages | length' ~/.claude-code-docs/paths_manifest.json                       # total
jq -r '.pages[].category' ~/.claude-code-docs/paths_manifest.json | sort | uniq -c | sort -rn  # by category
```

## Troubleshooting

| Issue | Solution |
|---|---|
| "Documentation not found" | Plugin not installed or docs not cloned. Re-run `/plugin install claude-docs@claude-code-docs` |
| Many broken URLs | Likely a sitemap change. Run `git pull` first, then re-validate |
| Timeout errors | Network issue or Anthropic site is slow. Try again later |
| "Permission denied" | Check that `~/.claude-code-docs/` is readable |

## Reference Files

- `examples/validate-docs.md` — Example validation workflow

© costiash · MIT · costiash/claude-code-docs

Similar skills

All skills for Writing and docs →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor