一键导入
pr-threshold
Track commit accumulation and trigger PR when thresholds crossed
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Track commit accumulation and trigger PR when thresholds crossed
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Connect and verify the Well MCP — authenticate, confirm the tools work, and show what to ask. Use when the user runs /well:connect, just installed the Well plugin, or says the Well connection/MCP "isn't working" / "nothing happened".
Produce an accounts-receivable aging report and surface overdue invoices for a Well workspace. Use when the user asks who owes them money, an AR aging report, overdue invoices, days sales outstanding (DSO), or which customers to chase.
Forecast cash flow and runway for a Well workspace from booked invoices and collected bank transactions. Use when the user asks for a cash-flow forecast, runway, how long until they run out of cash, projected balance, or expected inflows/outflows.
Run a month-end (or period) close checklist against a Well workspace — verify everything is reconciled and posted before the books are closed. Use when the user asks to close the month/period, run a close checklist, check if the books are ready to close, or what's left before closing.
Produce a VAT / sales-tax summary for a period from a Well workspace's posted ledger. Use when the user asks for a VAT return, VAT summary, sales tax owed, output vs input VAT, or tax declaration figures for a period.
Build a balance sheet (bilan) from a Well workspace. Use when the user asks for a balance sheet, bilan, assets/liabilities/equity, or financial position at a point in time.
| name | pr-threshold |
| description | Track commit accumulation and trigger PR when thresholds crossed |
Monitor accumulated commits and metrics to determine when a PR should be pushed for human review. Prevents PRs from becoming too large or complex for effective review.
| Metric | Trigger Value | Rationale |
|---|---|---|
| Lines of Code | > 300 | Human cognitive limit |
| Files Changed | > 10 | Context switching cost |
| Commits | > 5 | Review complexity |
| Risk Score | HIGH | Needs careful review |
| Scope Completion | 100% | Feature complete |
git diff origin/develop --stat | tail -1
Extract: insertions + deletions
git diff origin/develop --name-only | wc -l
git rev-list origin/develop..HEAD --count
Sum of risk from pr-review across all commits:
From Commit Plan:
## PR Threshold Check
| Metric | Current | Threshold | Status |
|--------|---------|-----------|--------|
| Lines of Code | [N] | 300 | OK/CROSSED |
| Files Changed | [N] | 10 | OK/CROSSED |
| Commits | [N] | 5 | OK/CROSSED |
| Risk Score | [N] | HIGH | OK/CROSSED |
| Scope Completion | [N]% | 100% | OK/CROSSED |
## Verdict: CONTINUE
No thresholds crossed. Proceeding to next commit.
### Current Accumulation:
- LOC: [N]/300
- Files: [N]/10
- Commits: [N]/5
- Scope: [N]%
### Next Commit:
[Name of next commit from plan]
## Verdict: TRIGGER_PR
**Threshold crossed:** [Which metric(s)]
### Recommendation:
Push PR now for human review before continuing.
### PR Scope:
- Commits: [List of commit names]
- Total LOC: [N]
- Files: [N]
- Risk: [LOW/MEDIUM/HIGH]
### Remaining Work:
- Commits left: [N]
- Features incomplete: [List]
**Proceed to push-pr mode?** (Yes / Continue anyway)
If threshold crossed and user has NOT provided explicit override:
## Verdict: BLOCK
**Threshold crossed:** [Which metric(s)]
IMPLEMENTATION PAUSED - User decision required.
| Option | Action |
|--------|--------|
| A | Push PR now (recommended) |
| B | Continue anyway (override logged) |
Reply with A or B to proceed.
Do NOT continue until user responds. This is a hard stop per 00-hard-rules.mdc.
User can override thresholds with explicit confirmation:
**Warning:** LOC threshold exceeded (350/300).
Continuing without PR may make review harder.
**Override and continue?** (Yes / Push PR now)
Log overrides for later review.
This skill is invoked by:
agent.mdc - After each successful commitcommit.mdc - After commit completesTrack across commits:
Accumulated Metrics:
- Total LOC: [running sum]
- Total Files: [unique count]
- Commit Count: [N]
- Highest Risk: [LOW/MEDIUM/HIGH]
- Started: [timestamp]
Reset after successful PR push.
## PR Threshold Status
**Verdict:** [CONTINUE / TRIGGER_PR]
| Metric | Value | Threshold | % |
|--------|-------|-----------|---|
| LOC | [N] | 300 | [N]% |
| Files | [N] | 10 | [N]% |
| Commits | [N] | 5 | [N]% |
| Scope | [N]% | 100% | [N]% |
[Action recommendation]
Invoked automatically after each commit, or manually with "use pr-threshold skill".