Skip to content

Commit 1d5a9a4

Browse files
authored
Merge pull request mendix#11031 from mendix/MvM-PRSkillsAndTools
Skill to review whole PR
2 parents 8191a59 + e887758 commit 1d5a9a4

6 files changed

Lines changed: 76 additions & 1 deletion

File tree

.claude/scripts/README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Claude Helper Scripts
2+
3+
Utility scripts to support Claude Code when working with this documentation repository.
4+
5+
## resolve-doc-url.sh
6+
7+
Resolves a documentation URL to its source markdown file.
8+
9+
### Usage
10+
11+
```bash
12+
.claude/scripts/resolve-doc-url.sh "/path/to/page/"
13+
```
14+
15+
### Examples
16+
17+
```bash
18+
# Find the file for a specific URL
19+
.claude/scripts/resolve-doc-url.sh "/community-tools/contribute-to-mendix-docs/"
20+
# Output: content/en/docs/community-tools/contribute-to-mendix-docs/_index.md
21+
22+
# Check if a URL exists
23+
.claude/scripts/resolve-doc-url.sh "/some/page/"
24+
# Exit code 0 if found, 1 if not found
25+
```
26+
27+
### Benefits
28+
29+
- **Fast**: Uses grep optimized for file-only output
30+
- **Token-efficient**: Returns only the file path, no surrounding context
31+
- **Reliable**: Matches exact URL in front matter using fixed-string search
32+
33+
### When to Use
34+
35+
- Following cross-references between documentation pages
36+
- Validating internal links
37+
- Finding files by their published URL
38+
- Checking if a URL is already in use

.claude/scripts/resolve-doc-url.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
# Resolve a documentation URL to its source markdown file
3+
# Usage: resolve-doc-url.sh "/path/to/page/"
4+
5+
if [ -z "$1" ]; then
6+
echo "Usage: resolve-doc-url.sh <url>"
7+
echo "Example: resolve-doc-url.sh '/community-tools/contribute-to-mendix-docs/'"
8+
exit 1
9+
fi
10+
11+
# Search for the URL in front matter
12+
# Using grep with -l (files only) and -F (fixed string) for speed
13+
grep -rl --include="*.md" "^url: $1$" content/en/docs/
14+
15+
# Exit code 0 if found, 1 if not found
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
name: docs-pr-review
3+
description: Analyzes all changes in a pull request and generates suggestions for improvements, clarifications, inconsistencies, and structural changes without making any edits. Use when the user asks to review, analyze, audit, or provide feedback on a pull request, or when they want suggestions before making changes.
4+
user-invocable: true
5+
disable-model-invocation: false
6+
---
7+
8+
Compare changes between the current branch and the base branch (typically `development`). Read the complete final state of each modified file, not just the diff, to ensure changes don't introduce inconsistencies with unchanged content.
9+
10+
Analyze all the changes in the current pull request or branch and return a list of suggestions or questions about any points to clarify, potential inconsistencies, and sections to restructure, add, or remove. Read the whole of each document modified in the pull request to ensure the changes do not make inconsistencies.
11+
12+
Follow links to other documents in the repo to check for inconsistencies if they seem to provide important related information.
13+
14+
Do not worry about possible invalid internal links to anchors in the repo as these will be picked up by a separate testing tool after the site has been built.
15+
16+
Make no edits.

.claude/skills/docs-review/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: docs-review
3-
description: Analyzes a single documentation page and generates suggestions for improvements, clarifications, inconsistencies, and structural changes without making any edits. Use when the user asks to review, analyze, audit, or provide feedback on documentation, or when they want suggestions before making changes.
3+
description: Analyzes a single documentation page and generates suggestions for improvements, clarifications, inconsistencies, and structural changes without making any edits. Use when the user asks to review, analyze, audit, or provide feedback on a documentation page or section, or when they want suggestions before making changes.
44
user-invocable: true
55
disable-model-invocation: false
66
---

CLAUDE.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,14 @@ Call tools in parallel for independent operations (reading multiple files, multi
110110
* **Glob** – Use to find files by pattern (e.g., `*.md`, `**/*config*`)
111111
* **Grep** – Use to search file contents for specific text or patterns
112112
* **Write** – Use only for creating new files (prefer Edit for existing files)
113+
* **Helper Scripts** – Use `.claude/scripts/resolve-doc-url.sh` to resolve documentation URLs (e.g., `/path/to/page/`) to their source markdown files. This is faster and more token-efficient than using Grep to search front matter.
113114

114115
### Cross-Reference Verification
115116

117+
When following or verifying documentation links:
118+
* Use `.claude/scripts/resolve-doc-url.sh "/path/to/page/"` to quickly find the source file for a URL
119+
* This is more efficient than Grep for URL-to-file lookups
120+
116121
When modifying URLs or anchor IDs:
117122
1. Use Grep to search for the old URL/anchor across all documentation files
118123
2. Identify all references that need updating

content/en/docs/community-tools/contribute-to-mendix-docs/using-ai-tools.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ This repository includes custom Claude Code skills optimized for documentation w
5555
* `/docs-enhance` - Performs comprehensive editing including reorganization, restructuring, and stronger phrasing
5656
* `/docs-review` - Analyzes documentation and generates suggestions for improvements
5757
* `/docs-add` - Adds new content to an existing page while preserving original structure
58+
* `/docs-pr-review` - Reviews all changes in the PR rather than just a single document
5859

5960
These skills are available to all contributors using Claude Code with this repository.
6061

0 commit comments

Comments
 (0)