원클릭으로
prp-commit
Stage files with natural language targeting, pre-commit quality scan, plan-aware commit message, and conventional commit format.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Stage files with natural language targeting, pre-commit quality scan, plan-aware commit message, and conventional commit format.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Multi-agent PR review — spawns parallel specialized agents for deep code review.
Multi-agent PR review — spawns parallel specialized agents for deep code review.
Execute an implementation plan with rigorous validation loops — typecheck, lint, test, and build after every change. TDD approach with automatic failure recovery.
Create a comprehensive implementation plan by analyzing the codebase, discovering patterns, and producing a step-by-step actionable plan document.
Execute an implementation plan with rigorous validation loops — typecheck, lint, test, and build after every change. TDD approach with automatic failure recovery.
Create a comprehensive implementation plan by analyzing the codebase, discovering patterns, and producing a step-by-step actionable plan document.
| name | prp-commit |
| description | Stage files with natural language targeting, pre-commit quality scan, plan-aware commit message, and conventional commit format. |
| metadata | {"short-description":"Smart git commit"} |
If your input context contains [WORKSPACE CONTEXT] (injected by a multi-agents framework),
you are running as a sub-agent. Apply these optimizations:
All other phases (assess, stage, commit) run unchanged.
Target description: $ARGUMENTS
Stage files matching the target, write a concise commit message, commit.
Golden Rule: Commit messages should explain what changed and why. Use conventional commit format.
Note: This check is advisory only — warns but does NOT block commit. Skip quick validation (0.4) if invoked from run-all workflow (implement already validated).
git diff --cached --name-only
Grep staged files for common debug artifacts:
# TODO/FIXME comments (warning only)
git diff --cached | grep -n "TODO\|FIXME"
# Debug statements (warning)
git diff --cached | grep -n "console\.log\|console\.debug\|debugger\|pdb\.set_trace\|print("
# Scan for `any` type usage in staged .ts files (skip test files and .d.ts)
git diff --cached -- '*.ts' ':!*.test.ts' ':!*.spec.ts' ':!*.d.ts' | grep -n ": any\|as any\|<any>"
# Type-check + test (only if not already validated by implement step)
# Auto-detect: tsc/biome/eslint for type-check, jest/vitest/pytest for tests
Summarize findings:
Pre-commit Quality Check:
- Debug artifacts: {count} found (TODO: {n}, console.log: {n})
- Type safety: {count} `any` usage found
- Quick validation: {passed/skipped}
- Advisory: {warnings if any}
PHASE_0_CHECKPOINT:
git status --short
If nothing to commit, STOP: "Working directory clean, nothing to commit."
Check for a completed plan matching the current branch to enrich the commit message:
BRANCH=$(git branch --show-current)
PLAN_SLUG=$(echo "$BRANCH" | sed 's|^feature/||')
PLAN=$(ls -t .prp-output/plans/completed/*${PLAN_SLUG}*.plan.md 2>/dev/null | head -1)
If plan found, extract:
If not found: Skip silently — git diff is sufficient for message derivation.
Target interpretation:
| Input | Action |
|---|---|
| (blank) | git add -A (all changes) |
staged | Use current staging |
*.ts / typescript files | git add "*.ts" |
files in src/X | git add src/X/ |
except tests | Add all, then git reset *test* *spec* |
only new files | Add only untracked files |
the X changes | Interpret from diff/context |
Stage the matching files. Show what will be committed:
git diff --cached --name-only
PHASE_2_CHECKPOINT:
Write a single-line message in imperative mood:
{type}: {description}
Types: feat, fix, refactor, docs, test, chore
Monorepo scope: If a completed plan has Package in its Metadata (or changes are scoped to a single package directory), add the package name as scope:
{type}({package}): {description}
Example: feat(api): add OAuth2 authentication flow
git commit -m "{type}: {description}"
If plan context was loaded (Phase 1.5), include a body with plan reference:
git commit -m "{type}: {description}
Plan: {plan-filename}
Tasks: {N} completed
{If deviations: brief note}"
PHASE_3_CHECKPOINT:
**Committed**: {hash} - {message}
**Files**: {count} files (+{add}/-{del})
{If plan context used:}
**Plan**: {plan-filename}
Next: `git push` or `/prp-pr`
Note for orchestrators: The "Next" suggestion is for standalone usage only. If this command was invoked as part of run-all, the orchestrator should ignore it and proceed to its next step.
/prp-commit # All changes
/prp-commit typescript files # *.ts only
/prp-commit except package-lock # Exclude specific
/prp-commit only the new files # Untracked only
/prp-commit staged # Already-staged only
| Situation | Action |
|---|---|
| Nothing to commit | STOP — "Working directory clean, nothing to commit." |
| Only untracked files | git add the relevant ones, commit |
| Merge conflict markers in staged files | STOP — "Resolve conflicts before committing." |
| Pre-commit hook fails | Show error, suggest fix, retry |
| Staged binary files (images, PDFs) | Include in commit, note in message |
| Mixed staged/unstaged changes | Only commit what matches target description |