chore: improve git worktree workflow and add review-critique skill#2451
Open
chore: improve git worktree workflow and add review-critique skill#2451
Conversation
- Created .githooks/post-checkout hook - Automatically copies apps/mesh/.env to new worktrees - Configured git to use .githooks directory Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Spawn parallel subagents to critique git diffs from 7 perspectives (duplication, correctness, security, performance, testing, architecture, scope) and produce a prioritized remediation plan. Co-authored-by: Cursor <cursoragent@cursor.com>
Prevent post-checkout hook from overwriting worktree-specific .env modifications on every branch switch. Co-authored-by: Cursor <cursoragent@cursor.com>
Move critic-prompts.md from references subdirectory to the root of the plan-critique skill directory for better accessibility. Co-authored-by: Cursor <cursoragent@cursor.com>
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.
What is this contribution about?
This PR enhances the developer workflow with two main improvements:
Git Worktree Automation - Adds a
post-checkouthook that automatically copies.envfrom the main worktree to new worktrees, preventing missing environment variable issues when working with isolated branches.Review Critique Skill - Adds a new Cursor skill that analyzes git diffs using parallel subagents from 7 different perspectives (duplication, correctness, security, performance, testing, architecture, scope), then produces a prioritized remediation plan.
Changes Made
.githooks/post-checkouthook that copies.envto new worktrees (only if missing).cursor/skills/review-critique/SKILL.mdwith comprehensive workflow for multi-perspective code review.cursor/skills/review-critique/references/critic-prompts.mdwith detailed prompts for each critic perspective.cursor/skills/plan-critique/critic-prompts.mdto top-level directory for consistencyScreenshots/Demonstration
N/A - Infrastructure and tooling changes
How to Test
Test the git worktree hook:
.envfile inapps/mesh/.envin your main worktreegit worktree add .worktrees/test-branch -b test-branch.envwas automatically copied to.worktrees/test-branch/apps/mesh/.env.envand verify it's not overwrittenTest the review-critique skill:
Migration Notes
N/A
Review Checklist
Made with Cursor
Summary by cubic
Automates .env setup for new git worktrees and adds a multi-perspective review-critique skill to analyze branch diffs and produce a remediation plan. This reduces local setup friction and improves pre-merge reviews.
New Features
Refactors
Written for commit 60c87a3. Summary will update on new commits.