docs(strategic-compact): fix hook command path in zh-CN/zh-TW/ja-JP SKILL.md - #1701
Conversation
…KILL.md Extends the hook command path correction from PR affaan-m#1682 (English source) to the zh-CN, zh-TW, and ja-JP translated mirrors so the PreToolUse hook example matches the actual script location at ~/.claude/scripts/hooks/suggest-compact.js. Changes per locale: - docs/zh-CN/skills/strategic-compact/SKILL.md: update both command strings from ~/.claude/skills/strategic-compact/suggest-compact.js to ~/.claude/scripts/hooks/suggest-compact.js. - docs/zh-TW/skills/strategic-compact/SKILL.md: replace the outdated suggest-compact.sh reference (the .sh variant was removed in merged PR affaan-m#41) with the current node-invoked suggest-compact.js, and align the matcher block structure with the English canonical SKILL.md post-affaan-m#1682. - docs/ja-JP/skills/strategic-compact/SKILL.md: same .sh -> .js migration and matcher alignment as zh-TW. The ko-KR mirror already uses the correct CLAUDE_PLUGIN_ROOT-based hook path and needs no change. Refs affaan-m#1675
Greptile SummaryReview completed successfully. The three translated SKILL.md files (zh-CN, zh-TW, ja-JP) correctly update the hook command path to Confidence Score: 4/5Safe to merge; all three translated files now correctly reference the script that exists on disk Path corrections are accurate and the target script exists in the repo. The only gap is a transient divergence from the English canonical until PR #1682 merges. No files require special attention Reviews (1): Last reviewed commit: "docs(strategic-compact): fix hook comman..." | Re-trigger Greptile |
|
ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThis PR updates Strategic Compact skill documentation across Japanese, Simplified Chinese, and Traditional Chinese versions. Hook configuration examples migrate from shell scripts to Node.js execution, replacing script paths and restructuring PreToolUse matchers from single conditions to separate Edit/Write entries. ChangesStrategic Compact Hook Migration
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related issues
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsGit: Failed to clone repository. Please run the Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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
Follow-up to PR #1682, which corrected the hook command path in the English canonical
skills/strategic-compact/SKILL.md. The same stale path is still shipped in three translated mirrors. This PR extends the fix so users reading the non-English docs get a copy-pasteable hook config that actually works.Fixes
Refs #1675.
Changes per locale
docs/zh-CN/skills/strategic-compact/SKILL.md— same 2-line path correction as PR docs(strategic-compact): fix hook command path in SKILL.md #1682:~/.claude/skills/strategic-compact/suggest-compact.js→~/.claude/scripts/hooks/suggest-compact.jsin bothEditandWritematcher blocks.docs/zh-TW/skills/strategic-compact/SKILL.md— the translated file still references the.shvariant (~/.claude/skills/strategic-compact/suggest-compact.sh), which was removed in merged PR fix: remove unnecessary .sh hooks #41 ("fix: remove unnecessary .sh hooks"). Migrated the example tonode ~/.claude/scripts/hooks/suggest-compact.jsand aligned the matcher-block structure with the English canonical post-docs(strategic-compact): fix hook command path in SKILL.md #1682 (per-matcher entries forEditandWrite, replacing the deprecated single-matcher expression form).docs/ja-JP/skills/strategic-compact/SKILL.md— same.sh→node .jsmigration and matcher-block alignment as zh-TW.The
ko-KRmirror already uses the correct${CLAUDE_PLUGIN_ROOT}/scripts/hooks/pattern and needs no change.Why separate from #1682
PR #1682 (scoped to the English source only) is still awaiting merge. Keeping the translated fix in a separate PR lets reviewers batch the English change and the translated-mirror sync independently. There is no line overlap between the two PRs.
Testing done
Run from the repo root:
node scripts/ci/check-unicode-safety.js→ passednode scripts/ci/validate-skills.js→Validated 182 skill directories(curatedskills/only; translations are out of scope by design)node scripts/ci/validate-no-personal-paths.js→ passednode scripts/ci/validate-hooks.js→Validated 26 hook matchersnpx markdownlint-clion the three changed files → exit 0npm test(full repo test suite) →Total Tests: 2200, Passed: 2200, Failed: 0python3 -c "import json; json.load(...)"on each of the three JSON examples → parsesType of change
docs:Documentationfix:Bug fixfeat:New featureSecurity & quality checklist
docs(strategic-compact): …)Documentation
SKILL.mdfilesAuthorship
Authored with Claude Code (Claude Opus 4.7, 1M context). All changes were manually reviewed and locally CI-verified before push.
Summary by cubic
Fix the hook command path in the
strategic-compacttranslated docs so the PreToolUse examples work as-is. zh-CN, zh-TW, and ja-JP now callnode ~/.claude/scripts/hooks/suggest-compact.jswith separate matchers forEditandWrite(refs #1675).~/.claude/scripts/hooks/..shwithnode ... .js; split the combined matcher intoEditandWrite..sh→node ... .jsupdate and matcher split.Written for commit d78f71f. Summary will update on new commits.
Summary by CodeRabbit