pr-threshold
Track commit accumulation and trigger PR when thresholds crossed
Install
mkdir -p .claude/skills/pr-threshold && curl -L -o skill.zip "https://mcp.directory/api/skills/download/3984" && unzip -o skill.zip -d .claude/skills/pr-threshold && rm skill.zipInstalls to .claude/skills/pr-threshold
About this skill
PR Threshold Skill
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.
When to Use
- After each successful git commit
- During Agent Mode commit-level workflow
- Manually with "use pr-threshold skill"
Thresholds
| 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 |
Phase 1: Gather Metrics
1.1 Lines of Code
git diff origin/develop --stat | tail -1
Extract: insertions + deletions
1.2 Files Changed
git diff origin/develop --name-only | wc -l
1.3 Commit Count
git rev-list origin/develop..HEAD --count
1.4 Risk Score
Sum of risk from pr-review across all commits:
- LOW = 1
- MEDIUM = 2
- HIGH = 3
1.5 Scope Completion
From Commit Plan:
- Total commits planned: N
- Commits completed: M
- Completion: M/N * 100%
Phase 2: Evaluate Thresholds
## 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 |
Phase 3: Determine Action
CONTINUE (No threshold 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]
TRIGGER_PR (Threshold crossed)
## 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)
BLOCK (Threshold crossed, no override)
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.
Phase 4: Handle Decision
If TRIGGER_PR
- Present metrics summary
- Recommend push-pr mode
- If user approves: Switch to push-pr mode
- If user continues: Log override, proceed
If CONTINUE
- Proceed to next commit in plan
- Update accumulated metrics
Threshold Overrides
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.
Integration
This skill is invoked by:
agent.mdc- After each successful commitcommit.mdc- After commit completes
Metrics Storage
Track 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.
Output Format
## 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]
Invocation
Invoked automatically after each commit, or manually with "use pr-threshold skill".
More by WellApp-ai
View all skills by WellApp-ai →You might also like
flutter-development
aj-geddes
Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.
drawio-diagrams-enhanced
jgtolentino
Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.
ui-ux-pro-max
nextlevelbuilder
"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."
godot
bfollington
This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.
nano-banana-pro
garg-aayush
Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.
fastapi-templates
wshobson
Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.
Related MCP Servers
Browse all serversOctocode seamlessly integrates with GitHub CLI and npm for fast code discovery, repo analysis, and commit tracking with
MicroManage (Task Flowchart Visualizer) helps you manage tasks as interactive flowcharts, track progress, and streamline
Access and interact with Jira and Linear tickets directly in conversations—no context switching to Jira ticketing softwa
Git Commit Aider uses AI to make Git commits for you, tracking contributions with '(aider)' for improved codebase analyt
AI Intervention Agent enables human-in-the-loop AI with real-time intervention via a web UI—review context, give feedbac
n8n offers conversational workflow automation, enabling seamless software workflow creation and management without platf
Stay ahead of the MCP ecosystem
Get weekly updates on new skills and servers.