Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions .claude-plugin/plugin.json

This file was deleted.

6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,20 +54,22 @@ csp is optional: without it on `PATH`, `ask search` prints the resolved checkout

## Claude Code plugin: fetch docs as markdown

This repo is also a Claude Code plugin. A `PreToolUse` hook rewrites `code.claude.com/docs` page URLs to their `.md` source before WebFetch runs, so Claude reads the clean markdown twin instead of the HTML app shell:
The `claude-code-docs` Claude Code plugin now lives in [`pleaseai/claude-code-plugins`](https://github.com/pleaseai/claude-code-plugins/tree/main/plugins/claude-code-docs) (`plugins/claude-code-docs`). This repo is the docs mirror only. Moving the plugin out means installing it no longer clones this repo, which is large because of `docs/` and `llms-full.txt`. The install command is unchanged:

```bash
/plugin install claude-code-docs@pleaseai
```

A `PreToolUse` hook rewrites `code.claude.com/docs` page URLs to their `.md` source before WebFetch runs, so Claude reads the clean markdown twin instead of the HTML app shell:

| WebFetch input | Rewritten to |
|---|---|
| `https://code.claude.com/docs/en/agents` | `https://code.claude.com/docs/en/agents.md` |
| `https://code.claude.com/docs/en/hooks#pretooluse-decision-control` | `https://code.claude.com/docs/en/hooks.md` |

Left untouched: URLs already ending in a file extension (`.md`, `llms.txt`, images), the docs root, and everything outside `code.claude.com/docs`. The hook returns [`updatedInput` with `permissionDecision: "allow"`](https://code.claude.com/docs/en/hooks#pretooluse-decision-control), so the rewritten fetch runs without an extra prompt.

Hook tests: `bash hooks/rewrite-docs-url.test.sh`
Source and hook tests: [`plugins/claude-code-docs`](https://github.com/pleaseai/claude-code-plugins/tree/main/plugins/claude-code-docs) in `pleaseai/claude-code-plugins`.

### Skill: `/claude-code-docs:claude-code-docs [question]`

Expand Down
17 changes: 0 additions & 17 deletions hooks/hooks.json

This file was deleted.

42 changes: 0 additions & 42 deletions hooks/rewrite-docs-url.sh

This file was deleted.

42 changes: 0 additions & 42 deletions hooks/rewrite-docs-url.test.sh

This file was deleted.

69 changes: 0 additions & 69 deletions skills/claude-code-docs/SKILL.md

This file was deleted.