一键导入
prepr
Pre-PR quality check with adaptive agent selection, code simplification with user approval, and optimized validation. Scales review depth by diff size.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Pre-PR quality check with adaptive agent selection, code simplification with user approval, and optimized validation. Scales review depth by diff size.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Security and quality review of code changes. Supports branch comparison (default) and uncommitted changes modes.
Full codebase consistency scan. Checks all hand-written source files against project coding rules for style, pattern, and quality violations. Excludes auto-generated files and node_modules. Use periodically (e.g. before a release or after onboarding new team members) to catch drift from project standards.
Pre-PR quality check with adaptive agent selection, code simplification with user approval, and optimized validation. Scales review depth by diff size.
Post-implementation side effect analysis. Checks consumer impact, shared state, UI components, function signatures, and layout cascade for unintended regressions.
Show concise summary of all changes on current branch vs parent branch. Outputs grouped bullet-point list.
Create React UI components. Use when building new components, forms, dialogs, data tables, or implementing UI features. Guides through component creation workflow from planning to verification.
基于 SOC 职业分类
| name | prepr |
| description | Pre-PR quality check with adaptive agent selection, code simplification with user approval, and optimized validation. Scales review depth by diff size. |
| disable-model-invocation | true |
Run comprehensive pre-PR checks to ensure code quality before committing.
git log --oneline --merges to find the branch pointgit diff to get the full list of changed files and the diffsrc/lib/ or src/hooks/:
__tests__/<filename>.test.ts(x) in the same directoryapi/ dirs (generated), types/ dirs, route
files, and UI componentsLaunch agents for the determined tier in a SINGLE message using multiple Agent tool calls:
Agent 1 — Code Review (code-reviewer agent):
Agent 2 — Semantic Logic Review (general-purpose agent):
Agent 3 — Utility Duplication Check (general-purpose agent, model: sonnet):
src/lib/ for existing
utilities that cover the same use case (even under different names).claude/rules/typescript.md "Helper Functions" section for
domain-to-file mappingAgent 4 — Side Effect Analysis (general-purpose agent):
components/ui/*)Grep tool with the changed file's basename
(e.g., pattern: "from.*useFeatureStore") to find importers efficiently.
Do NOT read every file in the project — search first, then read only
the matched files.select transforms, channel names, payload schemas.null vs
undefined vs "-" vs "0"), edge case behavior, formatting
differences, and import path updates.This step combines fix application, code simplification, and side-effect verification into ONE sequential pass to minimize overhead.
/simplify skill or code-simplifier agent):
If the "missing tests" list from Step 1 item 4 is non-empty, report it to the user after consolidation and before validation:
Unit Test Missing:
- `formatNewFunction` in src/lib/format.ts
→ Suggested: src/lib/__tests__/format.test.ts
- `calcNewMetric` in src/lib/calc.ts
→ Suggested: src/lib/__tests__/calc.test.ts
If the list is empty, skip this step silently.
pnpm biome:fix and pnpm type-check in parallel (two
separate Bash calls in one message)pnpm build: Execute build after biome + type-check pass| Tier | Condition | Agents | Estimated Time |
|---|---|---|---|
| LIGHT | < 30 changed lines | Agent 1 only | ~4 min |
| STANDARD | 30–99 changed lines | Agent 1 + Agent 2 + Agent 4 (if applicable) | ~6 min |
| FULL | ≥ 100 changed lines | All 4 agents (Agent 3 + 4 conditional) | ~8 min |
Override: If the user explicitly requests a full review regardless of diff size, always use the FULL tier.
To minimize agent processing time, pass only relevant portions of the diff:
| Agent | Receives |
|---|---|
| Agent 1 (Code Review) | Full diff + full file list |
| Agent 2 (Semantic Logic) | Full diff (needs full context for logic analysis) |
| Agent 3 (Utility Duplication) | Only new function/helper definitions extracted from the diff |
| Agent 4 (Side Effects) | Only diffs for files that change exports, shared state, or shared UI components |