Skip to content

Rewrite hunk-review skill following agent skill best practices#103

Merged
benvinegar merged 2 commits intomainfrom
refactor/hunk-review-skill
Mar 24, 2026
Merged

Rewrite hunk-review skill following agent skill best practices#103
benvinegar merged 2 commits intomainfrom
refactor/hunk-review-skill

Conversation

@benvinegar
Copy link
Copy Markdown
Member

Complete rewrite of the hunk-review skill to follow best practices from platform.claude.com skill authoring guide.

Changes

  • 39% smaller: 177 → 108 lines
  • Removed redundancy: Content stated 3 separate times now appears once
  • Removed agent-irrelevant content: UI layout details, comment style guidance
  • Added missing coverage: comment clear, hunk session get, --json flags, session auto-resolution
  • Added workflow guidance: New "Guiding a review" section explaining the agent's role as narrator
  • Better description: Third-person frontmatter describing the capability
  • Better structure: Commands grouped by purpose (Inspect/Navigate/Reload/Comments)

Key principles applied

  • Concise: Removed explanations of things Claude already knows
  • Low freedom where fragile: Exact command syntax with concrete examples
  • No time-sensitive content: No version numbers or dates
  • One level deep: All content in SKILL.md, no nested references
  • Workflow guidance: Explains why and how to guide reviews, not just mechanics

The skill now explains that the agent's role is to narrate: steer the user's view to what matters and leave comments that explain what they're looking at.

- Add explicit warning that agents should NOT invoke hunk diff/show directly
- Clarify hunk session * commands are for agent use
- Separate user-facing interactive commands from agent-friendly session commands
- Update 'when no session exists' to instruct suggesting user launch it
- Reduce from 177 to 108 lines (39% smaller)
- Remove redundant explanations stated multiple times
- Remove UI layout details agents cannot interact with
- Remove comment style guidance agents already know
- Add missing commands: comment clear, hunk session get, --json flags
- Add workflow guidance for guiding reviews
- Use third-person description in frontmatter
- Remove non-standard frontmatter compatibility field
- Group commands by purpose: Inspect/Navigate/Reload/Comments
@benvinegar benvinegar merged commit aff43e0 into main Mar 24, 2026
2 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.

1 participant