Skip to content

docs(strategic-compact): fix hook command path in zh-CN/zh-TW/ja-JP SKILL.md - #1701

Merged
affaan-m merged 1 commit into
affaan-m:mainfrom
gaurav0107:fix/1675-translated-strategic-compact-hook-path
May 11, 2026
Merged

affaan-m merged 1 commit into
affaan-m:mainfrom
gaurav0107:fix/1675-translated-strategic-compact-hook-path

Conversation

@gaurav0107

@gaurav0107 gaurav0107 commented May 8, 2026 •

Copy link
Copy Markdown
Contributor

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.js in both Edit and Write matcher blocks.
  • docs/zh-TW/skills/strategic-compact/SKILL.md — the translated file still references the .sh variant (~/.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 to node ~/.claude/scripts/hooks/suggest-compact.js and aligned the matcher-block structure with the English canonical post-docs(strategic-compact): fix hook command path in SKILL.md #1682 (per-matcher entries for Edit and Write, replacing the deprecated single-matcher expression form).
  • docs/ja-JP/skills/strategic-compact/SKILL.md — same .sh → node .js migration and matcher-block alignment as zh-TW.

The ko-KR mirror 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 → passed
  • node scripts/ci/validate-skills.js → Validated 182 skill directories (curated skills/ only; translations are out of scope by design)
  • node scripts/ci/validate-no-personal-paths.js → passed
  • node scripts/ci/validate-hooks.js → Validated 26 hook matchers
  • npx markdownlint-cli on the three changed files → exit 0
  • npm test (full repo test suite) → Total Tests: 2200, Passed: 2200, Failed: 0
  • python3 -c "import json; json.load(...)" on each of the three JSON examples → parses

Type of change

  • docs: Documentation
  • fix: Bug fix
  • feat: New feature

Security & quality checklist

  • No secrets or API keys committed
  • JSON code-block examples validate cleanly
  • Pre-commit hooks pass locally (ECC GateGuard)
  • No sensitive data exposed
  • Follows conventional commits format (docs(strategic-compact): …)

Documentation

  • Updated three translated SKILL.md files
  • No comments needed (pure doc copy fix)
  • No README update needed

Authorship

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-compact translated docs so the PreToolUse examples work as-is. zh-CN, zh-TW, and ja-JP now call node ~/.claude/scripts/hooks/suggest-compact.js with separate matchers for Edit and Write (refs #1675).

  • Bug Fixes
    • zh-CN: update both command strings to ~/.claude/scripts/hooks/.
    • zh-TW: replace .sh with node ... .js; split the combined matcher into Edit and Write.
    • ja-JP: same .sh → node ... .js update and matcher split.

Written for commit d78f71f. Summary will update on new commits.

Summary by CodeRabbit

  • Documentation
    • Updated Strategic Compact skill documentation across multiple languages to reflect changes in hook configuration and script execution methods.
    • Documentation now shows the current hook setup structure and execution parameters for the skill.

…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-apps

greptile-apps Bot commented May 8, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Review completed successfully. The three translated SKILL.md files (zh-CN, zh-TW, ja-JP) correctly update the hook command path to node ~/.claude/scripts/hooks/suggest-compact.js, matching the actual script location in the repository. One P2 note: the English canonical on main still carries the old path pending PR #1682, creating a temporary cross-locale inconsistency.

Confidence Score: 4/5

Safe 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

@coderabbitai

coderabbitai Bot commented May 8, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack
No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 86aff1fe-98fc-4c88-8ba3-6f2dcdb95929

📥 Commits

Reviewing files that changed from the base of the PR and between 841beea and d78f71f.

📒 Files selected for processing (3)
  • docs/ja-JP/skills/strategic-compact/SKILL.md
  • docs/zh-CN/skills/strategic-compact/SKILL.md
  • docs/zh-TW/skills/strategic-compact/SKILL.md

📝 Walkthrough

Walkthrough

This 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.

Changes

Strategic Compact Hook Migration

Layer / File(s) Summary
Hook Configuration Format & Path Migration
docs/ja-JP/skills/strategic-compact/SKILL.md, docs/zh-CN/skills/strategic-compact/SKILL.md, docs/zh-TW/skills/strategic-compact/SKILL.md
Hook examples in ~/.claude/settings.json updated to invoke node ~/.claude/scripts/hooks/suggest-compact.js with separate Edit and Write matchers, replacing the prior suggest-compact.sh path and single-condition format.
Script Reference Documentation
docs/ja-JP/skills/strategic-compact/SKILL.md, docs/zh-TW/skills/strategic-compact/SKILL.md
Descriptive text updated to reference suggest-compact.js instead of suggest-compact.sh.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related issues

  • #1675: Addresses the outdated hook command path and PreToolUse matcher structure migration reported in this issue by updating all language versions of the Strategic Compact skill documentation.

Poem

A script reborn, from shell to node so bright,
Three tongues now speak in JSON's structured light—
Edit and Write, no more as one they stand,
But dance as separate matchers, hand in hand. 🐰✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely identifies the main change: fixing hook command paths in three translated documentation files for the strategic-compact skill.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.

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.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 3 files

@affaan-m
affaan-m merged commit 2bb88cf into affaan-m:main May 11, 2026
40 checks passed
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.

2 participants