From codereview-skills
Niche variant of [[diffity-resolve-traced]] for users who want a clean repo state between diffity review cycles. Snapshots the current dirty tree as its own commit, then runs the traced diffity resolve pass on open browser threads, leaving the AI's edits + `@SEEN @AI:` / `@AI-reply:` trail uncommitted so they land as their own follow-up commit. Use when the user types `/diffity-commit-resolve-traced`, "diffity commit then resolve", "snapshot and diffity resolve", or similar. Refuses to run when the repo declares a no-auto-commit policy unless the user reconfirms.
How this skill is triggered — by the user, by Claude, or both
Slash command
/codereview-skills:diffity-commit-resolve-tracedThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Same idea as [[commit-reply-review]] — snapshot dirty tree first, then run the reply pass on top — but the reply pass is [[diffity-resolve-traced]] instead of [[codereview-inline]]. The point: separate "what I wrote" from "what the AI added while resolving diffity threads," at git-history granularity, across many review cycles, without manual `git add -p` gymnastics.
Same idea as [[commit-reply-review]] — snapshot dirty tree first, then run the reply pass on top — but the reply pass is [[diffity-resolve-traced]] instead of [[codereview-inline]]. The point: separate "what I wrote" from "what the AI added while resolving diffity threads," at git-history granularity, across many review cycles, without manual git add -p gymnastics.
This is a deliberate, niche workflow. Most users should keep using plain [[diffity-resolve-traced]] and commit whenever they like. The commit-variant exists for users who want every diffity resolution cycle to produce exactly two commits: the snapshot they wrote, and the AI's resolution edits + inline trail.
The user says one of: /diffity-commit-resolve-traced, diffity commit then resolve, snapshot and diffity resolve, clean-state diffity resolve. Optional thread-id argument forwarded to the underlying [[diffity-resolve-traced]] (e.g. /diffity-commit-resolve-traced abc123).
diffity agent list --status open --json (the same gate [[diffity-resolve-traced]] uses). If the command errors with "No active review session," abort with No diffity session — start one with \diffity` first.If there are zero open threads, printNo open diffity threads — nothing to snapshot.` and exit. Never commit "just in case."CLAUDE.md, AGENTS.md, CONTRIBUTING.md, .cursorrules, .github/copilot-instructions.md for phrases like "do not commit", "never auto-commit", "no automatic commits", "commits require approval", "manual commit only"; check .claude/settings.json / .claude/settings.local.json for PreToolUse hooks gating Bash(git commit*) or a permissions.deny entry. .pre-commit-config.yaml is not a block. If any directive is found, quote it and ask the user explicitly: "This repo declares . /diffity-commit-resolve-traced will create a commit. Continue anyway? (yes / no)" Default to no.git status --porcelain. If empty, skip the snapshot step and go straight to the resolve pass, printing Working tree clean — proceeding directly to diffity resolve pass..git/MERGE_HEAD, .git/CHERRY_PICK_HEAD, .git/rebase-merge/, .git/rebase-apply/, .git/BISECT_LOG. If any exists, abort with Refusing to commit during in-progress <op>. Finish or abort it first.git symbolic-ref -q HEAD must succeed. If detached, abort with Refusing to commit on detached HEAD.diffity-resolve-traced skill is resolvable (this plugin ships it; should always succeed). If not, abort with diffity-resolve-traced not found — reinstall the codereview-skills plugin.Stage everything in the working tree: git add -A. Includes untracked files — the snapshot's purpose is "everything that existed before the AI touched it." If the user has secrets or junk they don't want committed, they .gitignore them first or use plain [[diffity-resolve-traced]].
Commit with this message (verbatim, substituting N):
wip: snapshot pre-diffity-resolve pass
Auto-committed by /diffity-commit-resolve-traced before processing N open diffity threads.
Resolve edits and inline @SEEN @AI: / @AI-reply: trail will land as a separate, uncommitted change for review.
Use --no-verify only if the user has already opted into it this session; otherwise let pre-commit hooks run normally. If they fail, abort the whole skill and surface the hook output. Do not retry, do not amend, do not skip.
Re-check git status --porcelain is empty after commit. If hooks auto-fixed files back into the tree, stage them and amend the snapshot once. If hooks keep changing files on repeated runs (unstable formatter), abort after the single amend.
Run the full [[diffity-resolve-traced]] flow (which itself delegates to upstream diffity-resolve and then inserts the @SEEN @AI: / @AI-reply: trail at each edit site). Forward the optional thread-id argument unchanged.
Do not commit the resolve edits or the trail. The user's whole point in invoking this skill is to inspect the AI's diff in isolation before committing it themselves.
Print, in order:
Snapshot: <short-sha> "<commit subject>" (or Snapshot: skipped — working tree was clean).Resolve edits + trail are uncommitted. Review with \git diff`, then commit when ready.`@SEEN @AI: / @AI-reply: edits AND files diffity already touched (diff-only-touches-resolve-output check), abort with Previous diffity resolve pass is still uncommitted. Commit or discard it before running again.git diff to see how far it got. Do not roll back the snapshot.Not a git repository — \/diffity-commit-resolve-traced` needs git.` Suggest plain [[diffity-resolve-traced]] instead..gitignore excludes everything the user touched: git status --porcelain will be empty, preflight 3 treats as "clean tree, skip snapshot." Resolve pass still runs. Correct behavior.Snapshot: <sha> "..." / Resolve pass produced no edits — clean tree after snapshot. so the user knows what happened.git commit --amend outside the single hook-fixup case in Snapshot step 3. The snapshot commit is the user's history now; treat it as immutable.git reset, git restore, git checkout --, or any other destructive op. This skill writes exactly one commit and edits files — nothing else.diffity-resolve logic. The resolve pass is delegated to [[diffity-resolve-traced]], which delegates further to upstream. Future upstream changes flow through automatically.Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub korayucar/ai_review --plugin codereview-skills