Skip to content

Commit 9507f58

Browse files
committed
fix: add explicit .md stripping to URL rules, improve cd failure handling
- SKILL.md: URL mapping rules now explicitly mention stripping .md extension - sync-docs.sh: cd failure now outputs context message instead of silent exit
1 parent 469bf25 commit 9507f58

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

plugin/hooks/sync-docs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ if [ ! -d "$DOCS_DIR" ]; then
4343
fi
4444

4545
# Pull updates (non-blocking, timeout after 10s)
46-
cd "$DOCS_DIR" || exit 0
46+
cd "$DOCS_DIR" || { output_context "Claude docs directory missing. Re-run /docs -t to reinstall."; exit 0; }
4747
BEFORE=$(git rev-parse HEAD 2>/dev/null)
4848
run_with_timeout 10 git pull --ff-only origin main >/dev/null 2>&1 || true
4949
AFTER=$(git rev-parse HEAD 2>/dev/null)

plugin/skills/claude-docs/SKILL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ Grep: "<keyword>" in ~/.claude-code-docs/docs/
7979

8080
### Determining Source URLs
8181

82-
- Files starting with `claude-code__``https://code.claude.com/docs/en/<page>` (replace `claude-code__` prefix and `__` with `/`)
83-
- Files starting with `docs__en__``https://platform.claude.com/en/docs/<path>` (replace `docs__en__` prefix with `en/docs/` and remaining `__` with `/`)
82+
- Files starting with `claude-code__``https://code.claude.com/docs/en/<page>` (strip `.md` extension, replace `claude-code__` prefix and `__` with `/`)
83+
- Files starting with `docs__en__``https://platform.claude.com/en/docs/<path>` (strip `.md` extension, replace `docs__en__` prefix with `en/docs/` and remaining `__` with `/`)
8484

8585
## Reference Files
8686

0 commit comments

Comments
 (0)