openclaw-skills/guardian/SKILL.md
Gatekeeping Git/PR by classifying change essence and recommending granularity, naming, and strategy. Use when PR preparation or commit strategy is needed.
npx skillsauth add seaworld008/commonly-used-high-value-skills guardianInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use Guardian when:
Route elsewhere when:
ASSESS: Analyze, Separate, Structure, Evaluate, Suggest, Summarize.SURVEY -> PLAN -> VERIFY -> PRESENT._common/GIT_GUIDELINES.md, _common/BOUNDARIES.md, and .agents/guardian.md.--update-refs (2.38+) reduces rebase overhead for manual stacking.Throughput = Batch Size × Success Rate ÷ Duration. Configure automatic bisection for failing batches to isolate bad PRs without blocking the queue. GitLab merge trains run up to 20 pipelines in parallel; GitHub merge queue and Graphite offer native batching with auto-bisection._common/OPUS_48_AUTHORING.md principles P3 (eagerly Read diff, commit history, branch state, and CI results at CLASSIFY — PR strategy depends on grounding in actual change essence and blast radius), P5 (think step-by-step at granularity (split vs bundle), naming (Conventional Commits), merge-queue throughput, and AI-review coverage gating) as critical for Guardian. P2 recommended: calibrated PR plan preserving classification, granularity rationale, and human-review gate. P1 recommended: front-load change type, target branch, and urgency at CLASSIFY.CRITICAL security to Sentinel, noise_ratio > 0.30 to Zen, and coverage_gap > 0.40 to Radar._common/GIT_GUIDELINES.md conventionsCRITICAL security handoff to Sentinel — unreviewed security-sensitive diffs have caused real CVE exposuresquality_score < 35 — F-grade PRs have unacceptable defect escape ratesSURVEY → PLAN → VERIFY → PRESENT
| Phase | Goal | Required actions | Read |
|------|------|------------------|------|
| SURVEY | Understand the change | Inspect diff, commits, affected files, branch state, review context | reference/ |
| PLAN | Build the Git strategy | Classify changes, pick branch/PR strategy, suggest split or squash plan | reference/ |
| VERIFY | Check safety and reviewability | Score quality, risk, hotspot overlap, coverage, and predictive issues | reference/ |
| PRESENT | Deliver a usable recommendation | Output branch, commit, PR, risk, reviewer, and handoff guidance | reference/ |
Core classifications: change = Essential / Supporting / Incidental / Generated / Configuration; security = CRITICAL / SENSITIVE / ADJACENT / NEUTRAL; AI code = Verified / Suspected / Untested / Human.
noise_ratio > 0.30 -> route to Zencoverage_gap > 0.40 -> route to Radarsecurity_classification == CRITICAL -> blocking Sentinel handoffquality_score < 35 -> stop and ask firstrisk_score > 85 -> treat as critical-risk changecross_module_changes > 3 -> consider Atlas or Ripple analysishigh_confidence_prediction >= 80% -> always warnmedium_confidence_prediction 60-79% -> warn only if risk_score > 50ai_code_ratio > 0.50 -> flag for enhanced security review (2.74x vulnerability risk) + mandatory secret scanrework_rate > 0.30 -> investigate upstream clarity (DORA 2025 5th metric — signals reactive churn)size >= M and feature scope -> recommend stacked PR workflow| Size | Files / lines | Action |
|------|---------------|--------|
| XS | 1-3 files, <50 lines | ideal |
| S | 4-10 files, 50-200 lines | standard review |
| M | 11-20 files, 200-500 lines | consider split |
| L | 21-50 files, 500-1000 lines | should split |
| XL | 50-100 files, 1000-3000 lines | guided split |
| XXL | 100-200 files, 3000-5000 lines | mandatory split or Sherpa |
| MEGA | 200+ files, 5000+ lines | Sherpa handoff |
PR quality bands and Risk bands → see reference/pr-quality-scoring.md (Grade Mapping) and reference/risk-assessment.md (Risk Bands).
Branch naming: default <type>/<short-kebab-description>; types feat / fix / refactor / docs / test / chore / perf / security. Branching strategy selection (GitHub Flow / Git Flow / Trunk-Based) and DORA-archetype correlation → reference/branching-strategies.md. Rework Rate gating (DORA 2025 5th metric) is enforced via the rework_rate > 0.30 hard gate above.
Review priority SLAs: hotfixes ≤ 2h, features ≤ 24h, refactoring ≤ 48h. Target 80%+ of PRs under team's size threshold.
PLAN_TO_GUARDIAN_HANDOFF, BUILDER_TO_GUARDIAN_HANDOFF, JUDGE_TO_GUARDIAN_HANDOFF, JUDGE_TO_GUARDIAN_FEEDBACK, ZEN_TO_GUARDIAN_HANDOFF, SCOUT_TO_GUARDIAN_HANDOFF, ATLAS_TO_GUARDIAN_HANDOFF, HARVEST_TO_GUARDIAN_HANDOFF, RIPPLE_TO_GUARDIAN_HANDOFF
GUARDIAN_TO_SENTINEL_HANDOFF, GUARDIAN_TO_PROBE_HANDOFF, GUARDIAN_TO_RADAR_HANDOFF, GUARDIAN_TO_ZEN_HANDOFF, GUARDIAN_TO_ATLAS_HANDOFF, GUARDIAN_TO_RIPPLE_HANDOFF, GUARDIAN_TO_JUDGE_HANDOFF, GUARDIAN_TO_BUILDER_HANDOFF, GUARDIAN_TO_CANVAS_HANDOFF, GUARDIAN_TO_SHERPA_HANDOFF
Use these routes respectively for security, runtime verification, coverage, noise cleanup, architecture, blast radius, review-ready packaging, commit-plan delivery, visualization, and XXL/MEGA decomposition. Use Harvest only as a reporting follow-up, not as a formal new token.
| Signal | Approach | Primary output | Read next |
|--------|----------|----------------|-----------|
| default request | Standard Guardian workflow | analysis / recommendation | reference/ |
| complex multi-agent task | Nexus-routed execution | structured handoff | _common/BOUNDARIES.md |
| unclear request | Clarify scope and route | scoped analysis | reference/ |
Routing rules:
_common/BOUNDARIES.md.reference/ files before producing output.| Recipe | Subcommand | Default? | When to Use | Read First |
|--------|-----------|---------|-------------|------------|
| PR Preparation | pr | ✓ | PR preparation (title/body/review angles/risk assessment) | reference/pr-workflow-patterns.md |
| Commit Granularity | commit | | Commit granularity split proposal (atomic commit design) | reference/commit-analysis.md |
| Naming Review | naming | | Branch/commit naming check (Conventional Commits) | reference/commit-conventions.md |
| Merge Strategy | strategy | | Merge strategy (squash/rebase/merge) selection | reference/branching-strategies.md |
| Reshape History | reshape | | Create a new branch off the base, squash-import the development branch, then recommit at optimal granularity to reshape history | reference/history-reshape.md |
| Audit History | audit | | Read-only diagnosis of a branch's commit history (WIP/fixup residue, Conventional Commits violations, atomicity, size deviation) | reference/history-audit.md |
| Split into Stacked PRs | split | | Plan to decompose an M+ branch into stacked PRs (dependency order, file boundaries, estimated review time) | reference/pr-split-strategy.md |
| Branch Health | health | | Repo-wide branch inventory (stale, diverged, merged-but-undeleted, conflict risk) | reference/branch-health.md |
| Ship PR | ship | | End-to-end PR delivery: create PR, watch CI, verify gates, merge, cleanup. Consumes pr and strategy Recipe outputs. Merge step is always Ask First. | reference/pr-ship-flow.md |
Parse the first token of user input.
pr = PR Preparation). Apply normal SURVEY → PLAN → VERIFY → PRESENT workflow.Behavior notes per Recipe:
pr: Execute in order Change Classification → Quality Score → Risk Assessment → PR title/body → Reviewer recommendation.commit: Classify changes as Essential/Supporting/Incidental and generate a plan to split into atomic commits.naming: Conventional Commits compliance check. Validate scope, verb, and 50-character limit.strategy: Choose GitHub Flow / Git Flow / Trunk-Based based on DORA metrics and branch lifetime.reshape: Create a new branch off the base → squash-import the development branch via git merge --squash → apply the same Change Classification as the commit Recipe to re-split into atomic commits and reshape history. Backup branch creation is required; force push or application to remote shared branches is Ask First; execution commands are proposals only and run after user consent.audit: Read-only diagnosis of commit history in the specified range (origin/main..HEAD by default). Detect WIP/fixup residue, Conventional Commits violations, atomicity score, size deviation, and missing signatures, then recommend the next Recipe (commit / reshape / pr / proceed as-is). Zero side effects.split: Generate a plan to decompose an M+ branch into stacked PRs. Size each PR to 10-15 minutes of review, and present dependency order (bottom-up), file boundaries, estimated review time, and tool selection (Graphite / ghstack / git-town / jj). Execution commands are proposals only; run in stages after user consent.health: Inventory the repo's local/remote branches. Classify stale (30+ days without updates), upstream divergence, merged-but-undeleted, and high conflict-probability branches, and recommend delete, rebase, or archive. Branch deletion is Ask First.ship: Execute end-to-end PR delivery — PREFLIGHT → CREATE → WATCH → GATE → MERGE → CLEANUP. Consume pr Recipe output for title/body/reviewers and strategy Recipe output for merge mode (default --squash --delete-branch). Hard gates: quality_score >= 65, risk_score <= 85, security != CRITICAL, all required CI green, reviewDecision == APPROVED, mergeStateStatus == CLEAN. Ask First on every MERGE execution; --admin bypass and force-merge over UNSTABLE are Ask First. Never auto-merge without explicit consent. For XXL/MEGA branches, refuse and route to split first.Every deliverable MUST include:
reference/pr-quality-scoring.mdAdditional sections as needed (use canonical headings from reference/output-templates.md):
## Guardian Change Analysis — Full change breakdown## PR Quality Score: {score}/100 ({grade}) — Detailed quality scoring## Commit Message Analysis — Message quality, atomicity, conventional commit compliance## Change Risk Assessment — Risk factors with hotspot amplification## Hotspot Analysis — Files with high churn × complexity## Reviewer Recommendations — Suggested reviewers based on CODEOWNERS and expertise; include review priority (hotfix: 2h, feature: 24h, refactor: 48h)## Branch Health Report — Stale branches, conflict risk, divergence metrics## Pre-Merge Checklist — CI status, coverage, approval count, security scan## Squash Optimization Report — Grouping and synthesis planReceives: Judge (review feedback, AI-assisted defect findings), Builder (implementation completion), Zen (refactoring results), Scout (bug investigation), Atlas (architecture analysis), Ripple (impact analysis), Harvest (release note context), Launch (release-affecting PR coordination) Sends: Sentinel (security escalation), Radar (coverage gaps), Zen (noise cleanup), Atlas (architecture review), Ripple (blast radius), Judge (review-ready packaging with risk context), Sherpa (decomposition for XXL/MEGA PRs), Canvas (visualization of change topology)
Overlap boundaries: Guardian classifies and structures changes; Judge evaluates code quality within those changes. Guardian recommends split; Sherpa executes decomposition. Guardian flags security signals; Sentinel performs deep analysis.
| Reference | Read this when... |
|-----------|-------------------|
| reference/commit-conventions.md | you need commit naming, atomicity, signing, or commitlint rules |
| reference/commit-analysis.md | you are scoring commit messages or rewriting a commit sequence |
| reference/pr-workflow-patterns.md | you are selecting PR size, stacked PR, draft PR, or description structure |
| reference/pr-quality-scoring.md | you need the exact PR quality component weights and grade mapping |
| reference/branching-strategies.md | you must choose GitHub Flow, Git Flow, or Trunk-Based workflow |
| reference/branch-health.md | you are evaluating stale, risky, or conflict-prone branches |
| reference/history-audit.md | you are running the audit recipe — read-only diagnosis of WIP/fixup residue, Conventional Commits violations, atomicity, and size deviation in a commit-history range |
| reference/history-reshape.md | you are running the reshape recipe — squash-import a development branch onto a fresh base and re-split into atomic commits with backup-branch protocol |
| reference/pr-split-strategy.md | you are running the split recipe — decompose an M+ branch into stacked PRs (10–15 min review each) with dependency order, file boundaries, and tool selection (Graphite/ghstack/git-town/jj) |
| reference/pr-ship-flow.md | you are running the ship recipe — end-to-end PR delivery (create, watch CI, verify gates, merge, cleanup) with hard gates and Ask First on every MERGE execution |
| reference/code-review-guide.md | you are assigning reviewers or checking review turnaround and CODEOWNERS fit |
| reference/git-automation.md | you need hooks, secret detection, auto-merge, or monorepo CI defaults |
| reference/git-recipes.md | you need concrete Git or gh command recipes |
| reference/squash-optimization.md | you are grouping, scoring, or synthesizing squash plans |
| reference/risk-assessment.md | you need risk-factor scoring, hotspot amplification, or rollout mitigation |
| reference/security-analysis.md | you need security classification, patterns, or Sentinel/Probe escalation |
| reference/predictive-quality-gate.md | you need Judge/Zen prediction rules and confidence handling |
| reference/coverage-integration.md | you need CI coverage correlation and Radar escalation rules |
| reference/learning-loop.md | you are calibrating Guardian from Judge, Zen, Harvest, or squash feedback |
| reference/collaboration-routing.md | you need detailed cross-agent flows, token usage, and auto-routing priority/trigger rules |
| reference/output-templates.md | you need canonical report headings and output skeletons |
| reference/autorun-mode.md | you are running Guardian in AUTORUN mode |
| _common/OPUS_48_AUTHORING.md | you are sizing the PR plan, deciding adaptive thinking depth at granularity/naming, or front-loading change type/target/urgency at CLASSIFY. Critical for Guardian: P3, P5. |
| _common/PROOF_CARRYING.md | you prepare PRs with embedded evidence packages in nexus acceptance Phase 4. Lists the 12 required evidence fields, Hot-Fix Fast-Path rules (P0/P1 triage downgrades Tier-S→A, normal-Gate follow-up within 24h), and Success-PR random-review sampling (G2: 5% Tier-S / 2% Tier-A). |
.agents/guardian.md and .agents/PROJECT.md; create if missing.| YYYY-MM-DD | Guardian | (action) | (files) | (outcome) | to .agents/PROJECT.md..agents/guardian.md — log decisions, threshold calibrations, and pattern discoveries only when reusable._common/OPERATIONAL.md.When Guardian receives _AGENT_CONTEXT, parse task_type, description, and Constraints, execute the standard workflow, and return _STEP_COMPLETE.
_STEP_COMPLETE_STEP_COMPLETE:
Agent: Guardian
Status: SUCCESS | PARTIAL | BLOCKED | FAILED
Output:
deliverable: [primary artifact]
parameters:
task_type: "[task type]"
scope: "[scope]"
Validations:
completeness: "[complete | partial | blocked]"
quality_check: "[passed | flagged | skipped]"
Next: [recommended next agent or DONE]
Reason: [Why this next step]
When input contains ## NEXUS_ROUTING, do not call other agents directly. Return all work via ## NEXUS_HANDOFF.
## NEXUS_HANDOFF## NEXUS_HANDOFF
- Step: [X/Y]
- Agent: Guardian
- Summary: [1-3 lines]
- Key findings / decisions:
- [domain-specific items]
- Artifacts: [file paths or "none"]
- Risks: [identified risks]
- Suggested next agent: [AgentName] (reason)
- Next action: CONTINUE
testing
Orchestrating specialist AI agent teams as a meta-coordinator. Decomposes requests into minimum viable chains, spawns each as an independent session in AUTORUN modes, and drives to final output. Use when a task spans multiple specialist domains, requires parallel agent execution, or needs hub-and-spoke routing across the skill ecosystem.
tools
用于 Next.js App Router 模式开发,包含 RSC、Server Actions 和路由最佳实践。来源:skills.sh 10.2K installs。
tools
Deploy web projects to Netlify using the Netlify CLI (`npx netlify`). Use when the user asks to deploy, host, publish, or link a site/repo on Netlify, including preview and production deploys.
tools
Guides and best practices for working with Neon Serverless Postgres. Covers setup, connection methods, branching, autoscaling, scale-to-zero, read replicas, connection pooling, Neon Auth, and the Neon CLI, MCP server, REST API, TypeScript SDK, and Python SDK. Use when users ask about "Neon setup", "connect to Neon", "Neon project", "DATABASE_URL", "serverless Postgres", "Neon CLI", "neonctl", "Neon MCP", "Neon Auth", "@neondatabase/serverless", "@neondatabase/neon-js", "scale to zero", "Neon autoscaling", "Neon read replica", or "Neon connection pooling".