refactor(prompts): apply Claude 5 context-engineering rules to the commands - #18
Merged
Merged
Conversation
Anthropic's "new rules of context engineering" post reports removing 80% of Claude Code's system prompt with no performance loss: current-generation models follow intent better than procedure. Rework the command sources accordingly. - Move trigger conditions into each `description`. It is the only text a model sees before deciding to load a skill, so it now says when to reach for the command, and disambiguates the three overlapping reviewers (code-review vs. code-refinement vs. review-pr). - Drop body lines that restate the description in review-pr, commitmsg, and efficient-orchestration, and the "When to Use This Skill" section in dependency-review, now redundant with its description. - Replace code-review's step-by-step diff recipe with the two gotchas it actually encodes (cite the + side; an empty diff with staged files means re-run without --unified=0). Hunk-header parsing is not something a current model needs spelled out. - Trim date arithmetic and a semver primer from dependency-review, keeping the non-obvious signal: breaking changes in a minor/patch release. - Document the house style in README so new commands follow it. Hard constraints the review loops depend on are deliberately untouched, as are the rubrics and output templates the blog classes as references rather than rules.
Greptile SummaryThe PR streamlines six command prompts around intent-focused context engineering.
|
| Filename | Overview |
|---|---|
| .claude/commands/code-review.md | Condenses staged-diff collection guidance while preserving staged-only scope, output constraints, and review policy. |
| .claude/commands/dependency-review.md | Moves activation criteria into the description and removes redundant procedural explanations without changing the five review checks. |
| .claude/commands/efficient-orchestration.md | Adds explicit activation and exclusion criteria while retaining orchestration tiers, delegation rules, and guardrails. |
| .claude/commands/review-pr.md | Moves the workflow trigger into front matter while preserving the review loop and its hard operational constraints. |
| prompts/code-review.md | Keeps the generated shared review prompt synchronized with the authoritative code-review command. |
| README.md | Adds house guidance for concise, intent-oriented command prompts. |
Reviews (1): Last reviewed commit: "refactor(prompts): apply Claude 5 contex..." | Re-trigger Greptile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Anthropic's new rules of context engineering reports removing ~80% of Claude Code's own system prompt with no performance loss: current-generation models follow intent better than procedure. This reworks the command sources on that basis — net -69 lines across the six commands, with the trigger conditions each one was missing added to its
description.Changes
description. It's the only text a model sees before deciding to load a skill, so each one now says when to reach for it — and explicitly disambiguates the three overlapping reviewers:code-review(staged, read-only) vs.code-refinement(staged, edits code) vs.review-pr(an open GitHub PR).review-pr,commitmsg, andefficient-orchestration, plus theWhen to Use This Skillsection independency-review— all redundant with the descriptions.code-review: replaced the 5-step diff recipe (hunk-header parsing,@@ -old,+new @@arithmetic) with the two gotchas it actually encoded — cite line numbers from the+side, and an empty diff with staged files means re-run without--unified=0.dependency-review: dropped "calculate the days between publish date and today" and the semver primer, keeping the non-obvious signal (breaking changes in a minor/patch release are a red flag on their own).Deliberately untouched
NO_FURTHER_FEEDBACKsentinel, the reviewer never writing source files, thegh api--slurp/--jqconflict.Verification
tools/generate --check— in sync (all 5 harness copies regenerated from the sources)test/run— 47/47 passingmarkdownlint-cli2on the README and command sources — clean🤖 Generated with Claude Code
https://claude.ai/code/session_019H18Vt8ToMYzD9gX64nKnk
Generated by Claude Code