一键导入
precommit-review
Review uncommitted changes like a PR reviewer — catch bugs, missed patterns, and common errors before committing.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Review uncommitted changes like a PR reviewer — catch bugs, missed patterns, and common errors before committing.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Create or flesh out a Jira story with structured sections for POs, Devs, and Claude. Accepts an optional Jira key to update an existing card.
Export Water Quality Management Plans for one jurisdiction from the local Neptune database to an Esri File Geodatabase in native projection. Use when a client requests WQMP spatial data for a specific city/jurisdiction.
Extract rework items from a Jira card's Acceptance Criteria and produce a fix plan. Auto-detects issue key from branch or accepts one as argument.
Fetch a Jira card by key (e.g. NPT-100) and produce a detailed implementation plan. Use this when starting work on a new story.
Build the SQL Server DACPAC and scaffold EF Core entities. Run this after finishing all SQL schema edits in Neptune.Database/.
Add a scrollspy Table of Contents sidebar to a page component with signal-based scroll tracking.
| name | precommit-review |
| description | Review uncommitted changes like a PR reviewer — catch bugs, missed patterns, and common errors before committing. |
| allowed-tools | ["Bash(git diff:*)","Bash(git status:*)","Bash(git log:*)","Bash(dotnet test:*)","Read","Glob","Grep","mcp__atlassian__getJiraIssue","mcp__atlassian__getAccessibleAtlassianResources"] |
Review all staged and unstaged changes as if performing a thorough PR review, catching issues before they are committed.
$ARGUMENTS — Optional. Supports two flags that can be combined:
--card <JIRA-KEY> to also check the implementation against a Jira card's acceptance criteria./precommit-review
/precommit-review --card NPT-1224
/precommit-review Neptune.EFModels/Entities/TreatmentBMPs.cs
/precommit-review Neptune.Web/src/app/pages/treatment-bmps/ --card NPT-1225
Gather the diff. Run git diff HEAD (or scoped to the provided paths) to see all uncommitted changes. Also run git status to identify untracked files. For untracked files, read their full contents.
Read context. For each changed file, read enough surrounding context to understand the change (the full file if small, or the relevant class/method if large). Also read closely related files when needed (e.g. if a controller changed, read the corresponding business logic class in Neptune.EFModels/Entities/; if a DTO changed, read the controller that uses it; if a component TS changed, read its template).
Review against this checklist. Evaluate every change against each category below. Only report actual issues found — do not list categories that pass.
await on async callsNeptune.EFModels/Entities/ (e.g. TreatmentBMPs.cs, Projects.cs), not in controllers. Controllers extend SitkaController<T>(dbContext, logger, neptuneConfiguration) with 3 params. Authorization uses BaseAuthorizationAttribute derivatives: [AdminFeature], [SitkaAdminFeature], [JurisdictionEditFeature], [UserViewFeature], [LoggedInUnclassifiedFeature], [TreatmentBMPViewFeature].@if/@for flow control in templates (not *ngIf/*ngFor). Observables + async pipe for data display. Full import paths from src/app/. SCSS imports: @use "/src/scss/abstracts" as *;. Reactive forms with src/app/shared/components/forms/form-field/.*/Generated/ directories and Neptune.Web/src/app/shared/generated/ should not be hand-edited.Include)AsNoTracking() on read-only queriesCheck against Jira card (only if --card <KEY> was provided). Fetch the Jira issue using getAccessibleAtlassianResources then getJiraIssue (with cloudId from the first call). Compare the card's scope/acceptance criteria against the uncommitted changes:
Run tests. Execute the full test suite:
dotnet test Neptune.Tests/Neptune.Tests.csproj --no-restore
Present findings organized by severity:
## 🔴 Critical (Must Fix)
1. **[file:line]** Description of the issue and suggested fix
2. **[file:line]** Description of the issue and suggested fix
## 🟠 Good Idea (Probably Should Fix)
1. **[file:line]** Description of the issue and suggested fix
2. **[file:line]** Description of the issue and suggested fix
## 🟡 Nits (Dealer's Choice)
1. **[file:line]** Description of the suggestion
2. **[file:line]** Description of the suggestion
## 🟢 Looks Good
Brief summary of what was reviewed and found to be correct.
Number each finding sequentially within its category (starting at 1 per category) so findings can be referenced easily (e.g. "fix Good Idea #2").
IMPORTANT: Use the literal Unicode emoji characters shown above (🔴, 🟠, 🟡, 🟢), NOT markdown shortcodes like :red_circle: — shortcodes do not render in Windows Terminal.
If there are no issues at any severity level, say so and summarize what was reviewed.
Do NOT make any changes. This skill is read-only — it only reports findings. The user decides what to act on.