Repository navigation
Add handbook-pr Claude skill for handbook changes - #54218
Conversation
Handbook PRs opened by Claude from Slack have inconsistent descriptions (some paste the full code checklist marked N/A), duplicate content, and no consistent reviewer. The new skill links to Fleet's writing guidelines instead of copying them, covers the website build and link rules, adds a public-content check, and defines a handbook-only PR description and reviewer rule. A checker script flags build errors, broken heading anchors, relative links, and whitespace churn. Also exempts handbook-only PRs from the PR template rule in CLAUDE.md, and removes references to handbook/marketing/fleet-ai-writing-instructions.md, which was deleted in #53209.
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Unresolved validation gaps and contradictory PR-format instructions remain.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
Adds a dedicated Claude workflow and validation script for focused handbook PRs, while updating related documentation and removing obsolete writing-guide references.
Changes:
- Adds the
handbook-prskill and diff checker. - Updates Claude instructions and skill documentation.
- Removes stale AI-writing-guide references.
| File | Description |
|---|---|
.claude/skills/spec-story/SKILL.md |
Removes obsolete writing-guide reference |
.claude/skills/handbook-pr/SKILL.md |
Adds handbook PR workflow |
.claude/skills/handbook-pr/scripts/check-handbook-diff.sh |
Adds handbook validation checks |
.claude/skills/content-style/SKILL.md |
Updates canonical writing guidance |
.claude/skills/content-style/references/style-rules.md |
Updates style reference |
.claude/README.md |
Documents the new skill |
.claude/CLAUDE.md |
Adds handbook PR guidance and exception |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| # Mirrors how website/api/helpers/strings/to-html.js builds heading IDs: | ||
| # _.kebabCase (lodash 3) of the lowercased heading HTML, with apostrophes removed. | ||
| slugify() { | ||
| printf '%s' "$1" | | ||
| sed -E 's/^(>[[:space:]]*)?#+[[:space:]]+//; s/[[:space:]]+#*[[:space:]]*$//' | | ||
| sed -E 's/`([^`]*)`/ code \1 code /g; s/\*\*([^*]*)\*\*/ strong \1 strong /g; s/\*([^*]+)\*/ em \1 em /g' | | ||
| sed -E 's/(^|[^[:alnum:]])_([^_]+)_([^[:alnum:]]|$)/\1 em \2 em \3/g' | | ||
| sed -e "s/’//g" -e "s/'//g" | | ||
| tr '[:upper:]' '[:lower:]' | | ||
| LC_ALL=C grep -oE '[a-z]+|[0-9]+' | | ||
| paste -sd- - |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: fleetdm/fleet/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (6)
📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review. WalkthroughAdds a shell script that compares handbook changes against a merge base. The script checks Markdown edits, page metadata, heading anchors, ritual YAML, and newly added GitHub handles. It reports errors and warnings. It exits with status 2 if it cannot find the repository root or merge base, and exits with status 1 when it finds errors. Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to The identified path-parsing concern does not prevent handbook checks from running, and no remaining issue warrants delaying merge. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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. Comment |

Summary
Adds a
handbook-prskill so handbook changes requested from Slack (or anywhere else) turn into small, correct PRs the page maintainer can merge without edits.Why: Since late August, Claude has opened 13 handbook-only PRs from Slack (9 merged, 4 closed). Their descriptions vary a lot. #52865 and #52979 paste the whole code checklist with every item marked N/A, #52471 and #51968 are freeform, and #52426 has an escaped HTML comment and two "Generated with" footers. The cause is the
.claude/CLAUDE.mdrule that every PR must use.github/pull_request_template.md, even thoughcheck-pr-templatedoesn't run onhandbook/changes. #52471 also wrote the same ritual twice, once inmarketing.rituals.ymland again as prose on the page.What the skill does:
content-styleskill at the start of each change. It links to them instead of copying their rules, so it stays current when those pages change.maintainedByandtitlemeta tags,@fleetdm.comemails,{{ }}, "click here" links, required ritual fields andautoIssuefrequencies) and the link rules from writing.md (heading renames, full URLs).**AI:**line) and requests exactly one reviewer: the page'smaintainedBy, falling back togithubRepoDRIByPathinwebsite/config/custom.js.Checker script:
.claude/skills/handbook-pr/scripts/check-handbook-diff.shcompares the branch withorigin/mainand reports:handbook/Anchors are computed the same way as
website/api/helpers/strings/to-html.js.Related cleanups:
.claude/CLAUDE.md: handbook-only PRs use the skill's description format instead of the PR template.content-styleandspec-storyno longer point tohandbook/marketing/fleet-ai-writing-instructions.md, which was deleted in No more AI writing like this. #53209..claude/README.md: adds the skill to the skills reference and updates the counts.Not in this PR:
handbook/marketing/README.mdstill links to the deletedfleet-ai-writing-instructionspage in two places. That's a handbook change with a different maintainer, so it should be a separate PR.Checklist for submitter
SELECT *is avoided, SQL injection is prevented (using placeholders for values in statements), JS inline code is prevented especially for url redirects, and untrusted data interpolated into shell scripts/commands is validated against shell metacharacters.[A-Za-z0-9-]+togh api. Everything else it reads from the diff is quoted and only matched against.Testing
@fleetdm.comemail, "click here" link,{{ }}outside backticks, em dash, relative anchor and path, "FleetDM"#scheduling-a-meeting. A heading that only changed level wasn't flagged.maintainedBy, and a title over 40 characters (counting emoji as 2)driordescription,autoIssuewith an unsupported frequency, a fake DRI username, and invalid YAMLlegal/📜 Fleet Privacy Policy.md), and a whitespace-only change/bin/bash3.2 and bash 5.3.AI
AI: Claude Code (claude-opus-5-5)
Summary by CodeRabbit