Skip to content

Comments

fix(skills): fix the regexp in the update_docs.js script#4

Open
boneskull wants to merge 1 commit intoobra:mainfrom
boneskull:main
Open

fix(skills): fix the regexp in the update_docs.js script#4
boneskull wants to merge 1 commit intoobra:mainfrom
boneskull:main

Conversation

@boneskull
Copy link

@boneskull boneskull commented Nov 18, 2025

Fixed the regexp in update_docs.js script.

Motivation and Context

This script was downloading 0 files.

Evidently they changed the URL scheme in llms.txt has changed; claude-code is no longer in the URL.

After this change, the script fetches 95 docs.

How Has This Been Tested?

Manually

Breaking Changes

No

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

Summary by CodeRabbit

  • Chores
    • Updated documentation collection patterns to include additional pages from the documentation site.

Evidently they changed the URL scheme in [llms.txt](https://docs.claude.com/llms.txt) has changed; `claude-code` is no longer in the URL.

After this change, the script fetches 95 docs.
@coderabbitai
Copy link

coderabbitai bot commented Nov 18, 2025

Walkthrough

The regex pattern in the documentation update script was modified to broaden URL matching from specifically claude-code subdirectories to any path under en/docs, expanding which Markdown pages are collected from llms.txt without altering surrounding logic.

Changes

Cohort / File(s) Summary
Regex pattern expansion
skills/working-with-claude-code/scripts/update_docs.js
Modified URL matching regex from /https:\/\/docs\.claude\.com\/en\/docs\/claude-code\/[^\s)]+\.md/g to /https:\/\/docs\.claude\.com\/en\/docs\/[^\s)]+\.md/g, removing the claude-code subpath requirement to match any documentation under en/docs

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Verify the broader regex pattern doesn't unintentionally match documentation files that shouldn't be included in the update
  • Confirm llms.txt collection behavior aligns with the expanded scope

Poem

🐰 A regex once rigid, now flows free and wide,
From claude-code alone to docs far and deep,
Patterns now dance across broader terrain,
Catching more wisdom in llms.txt's keep! 📚✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: fixing a regex pattern in update_docs.js to resolve a bug where the script was downloading zero files due to changed URL schemes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
skills/working-with-claude-code/scripts/update_docs.js (1)

17-17: Consider updating names and comments to reflect the broader scope.

While the regex fix is correct, the constant name CLAUDE_CODE_PATTERN, function name getClaudeCodeUrls(), and various comments (lines 6, 40, 85, 87) still reference "Claude Code" specifically. Since the pattern now matches all documentation under /en/docs/, consider renaming to better reflect this broader scope (e.g., DOCS_PATTERN, getDocsUrls()).

Also applies to: 42-42

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6ec1473 and 4eb9525.

📒 Files selected for processing (1)
  • skills/working-with-claude-code/scripts/update_docs.js (1 hunks)
🔇 Additional comments (1)
skills/working-with-claude-code/scripts/update_docs.js (1)

17-17: LGTM! The regex fix correctly addresses the URL scheme change.

The updated pattern successfully broadens the match criteria from specifically /claude-code/ subdirectories to any path under /en/docs/, which resolves the zero-file download issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant