Agent Skillsnovuhq/novu › nv-park-and-review

nv-park-and-review

GitHub

将本地更改暂存为基线提交,进入独立工作树对仅该提交进行深度代码审查与重构,随后合并修复并清理环境,确保特性差异与重构分离且主分支保持清洁。

.cursor/skills/nv-park-and-review/SKILL.md novuhq/novu

Trigger Scenarios

用户要求审查未提交的本地更改以消除AI生成代码或冗余逻辑 直接调用 nv-park-and-review

Install

npx skills add novuhq/novu --skill nv-park-and-review -g -y
More Options

Use without installing

npx skills use novuhq/novu@nv-park-and-review

指定 Agent (Claude Code)

npx skills add novuhq/novu --skill nv-park-and-review -a claude-code -g -y

安装 repo 全部 skill

npx skills add novuhq/novu --all -g -y

预览 repo 内 skill

npx skills add novuhq/novu --list

SKILL.md

Frontmatter
{
    "name": "nv-park-and-review",
    "description": "Commit local changes as a baseline, hop into a lightweight review worktree, run a thermo-nuclear code quality review scoped to ONLY that commit, commit the resulting refactor as a separate follow-up commit, then land it back and tear the worktree down. Use when the user asks to review their local\/uncommitted changes for AI slop and redundant code, or invokes nv-park-and-review.",
    "disable-model-invocation": true
}

Park and Review (commit → worktree → nuclear review → refactor commit)

Snapshot the current work as a baseline commit, immediately exit to a throwaway review worktree, audit only that commit with the thermo-nuclear code quality review, then land the cleanup as its own follow-up commit. Keeps the feature diff and the review-driven refactor separately reviewable, and frees the main checkout the moment the baseline is committed.

Invoking this skill authorizes the two commits it creates (steps 1 and 4). Do not amend or squash the baseline commit.

Workflow

- [ ] 1. Baseline commit (the work to review)
- [ ] 2. Exit to a review worktree (one command)
- [ ] 3. Thermo-nuclear review scoped to that commit only
- [ ] 4. Triage + fix, then a separate refactor commit
- [ ] 5. Land back on the original branch + teardown

1. Baseline commit

  • Inspect first (parallel): git status, git diff (staged + unstaged), git log --oneline -15 for message style.
  • Stage the cohesive change only: if the user already staged files, commit those; otherwise stage the related modified files. Exclude unrelated local edits.
  • Commit with the repo's conventional style — type(scope): concise why (scopes: dashboard, api-service, worker, shared, …). Use a HEREDOC for the message.
  • lint-staged + biome check --write run on commit and may auto-format staged files; the commit still succeeds. If a hook fails, fix and make a new commit (never --amend).
  • Capture the baseline SHA immediately after committing — this is the ONLY review target:
git rev-parse HEAD   # BASE_SHA

2. Exit to a review worktree — immediately after the commit

Move the rest of the workflow (review, triage edits, refactor commit) out of the main checkout so it is free for other work. Do not use nv-worktree-create here — a single lightweight command is enough; no env copying, install, or build is needed for a review pass:

git worktree add -b review/<branch>-<BASE_SHA:0:7> ../review-<BASE_SHA:0:7> <BASE_SHA>
  • From here on, run every command and file edit inside the worktree path — never touch the main checkout until step 5.
  • Abort and fall back to reviewing in place if the worktree path already exists.

3. Thermo-nuclear review — scoped to BASE_SHA only

Gather the exact scope, then launch one thermo-nuclear-code-quality-review subagent (Task tool, readonly: true, foreground so you can act on results):

git show <BASE_SHA> --stat     # changed file list
git show <BASE_SHA>            # committed diff to paste into the prompt

Subagent prompt template:

Perform a thermo-nuclear code quality review scoped STRICTLY to a single commit. Load
and apply the rubric from the `thermo-nuclear-code-quality-review` skill.

SCOPE (critical): Review ONLY the lines changed in commit <BASE_SHA>. You may READ full
files for context, but every finding MUST point at a line introduced/modified by this
commit. Do not report on pre-existing code or the wider branch.

Full Repository Path: <worktree path>
Commit under review: <BASE_SHA> "<subject>"
Changed files (read full current contents for context):
- <path 1>
- <path 2> ...

The committed diff:
```diff
<paste `git show <BASE_SHA>` diff>
```

Focus on: AI slop, redundant/dead code, duplicated logic, unnecessary abstractions or
props, inverted/confusing boolean naming, and state-management smells (redundant state
vs derived values, effect misuse, stale-closure/dep-array issues). For every finding
give: file, specific symbol/line from this commit, severity, WHY it's a problem, and a
concrete minimal fix. Separate must-fix from optional. Skip nitpicks that don't affect
correctness or maintainability. Do NOT modify files — return findings only.

4. Triage, fix, and refactor commit — in the worktree

  • Verify before deleting: confirm each dead-code/redundancy claim with Grep (call sites, setters, other callers) — do not trust the review blindly.
  • Apply must-fix and high-value findings as behavior-preserving edits. Defer intentional or low-value findings and state the reason to the user.
  • Don't expand scope or add features during triage.
  • After edits: ReadLints on every touched file; Grep for stale identifiers after any rename. Only fix pre-existing lints if necessary.
  • Stage only the triage-touched files and make a new commit (never amend BASE_SHA):
git commit -m "$(cat <<'EOF'
refactor(<scope>): <what was removed/renamed and why>
EOF
)"
  • Confirm the history: git log --oneline -3 shows BASE_SHA then the refactor commit.

5. Land back on the original branch + teardown

From the main checkout, fast-forward the original branch onto the review branch, then remove the worktree — plain commands, no cleanup skill needed:

git merge --ff-only review/<branch>-<BASE_SHA:0:7>
git worktree remove ../review-<BASE_SHA:0:7>
git branch -d review/<branch>-<BASE_SHA:0:7>

If --ff-only fails, the original branch moved while you were reviewing — do not force anything; report the divergence and leave the review branch in place for the user to reconcile.

Guardrails

  • Keep the commits separate: baseline (step 1) and, when refactors are applied, the refactor (step 4). Never squash them or --amend the baseline.
  • The review targets the single baseline commit only — never the whole branch.
  • If the review surfaces nothing worth fixing, skip step 4, and in step 5 just remove the worktree and branch (nothing to merge) and report a clean result.
  • Do not push or open a PR unless the user asks.

Related skills

  • thermo-nuclear-code-quality-review — the audit rubric used in step 3
  • deslop — remove AI slop from a diff
  • nv-worktree-commands — worktree command reference if the lightweight setup needs debugging
  • novu-prepare-pr — full post-implementation PR prep

Version History

  • 56a8a16 Current 2026-08-29 05:10

Same Skill Collection

.agents/skills/email-best-practices/SKILL.md
.agents/skills/frontend-design/SKILL.md
.agents/skills/linear-release-setup/SKILL.md
.agents/skills/react-email/SKILL.md
.agents/skills/testerarmy-cli/SKILL.md
.claude/skills/better-auth-best-practices/SKILL.md
.cursor/skills/add-channel-connect-button/SKILL.md
.cursor/skills/add-channel-setup-guide/SKILL.md
.cursor/skills/address-pr-review/SKILL.md
.cursor/skills/better-auth-best-practices/SKILL.md
.cursor/skills/ink-tui/SKILL.md
.cursor/skills/novu-prepare-pr/SKILL.md
.cursor/skills/nv-implement/SKILL.md
.cursor/skills/nv-worktree-cleanup/SKILL.md
.cursor/skills/nv-worktree-commands/SKILL.md
.cursor/skills/nv-worktree-create/SKILL.md
.cursor/skills/run-api-e2e-tests/SKILL.md
.cursor/skills/sanity-changelog/SKILL.md
.cursor/skills/triage-agent-eval-failures/SKILL.md
docs/.mintlify/skills/dashboard-workflows/SKILL.md
docs/.mintlify/skills/manage-preferences/SKILL.md
docs/.mintlify/skills/manage-subscribers/SKILL.md
docs/.mintlify/skills/trigger-notification/SKILL.md
.agents/skills/figma-use/SKILL.md
.cursor/skills/add-channel-whats-next-onboarding/SKILL.md
.cursor/skills/nv-endpoint-routed-tool-provider/SKILL.md
docs/.mintlify/skills/design-workflow/SKILL.md
docs/.mintlify/skills/framework-integration/SKILL.md
docs/.mintlify/skills/inbox-integration/SKILL.md

Metadata

Files
0
Version
56a8a16
Hash
c04df04f
Indexed
2026-08-29 05:10

Accueil - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-31 22:12
浙ICP备14020137号-1 $Carte des visiteurs$