name: "preflight-checks"
description: "Use to decide whether the repository is ready for a requested commit, push, PR, merge, or release action."
maturity-level: "L3"
risk-scope: "R0-R1"
version: "1.0.0"
Preflight Checks
Core Question
Is the current repository state ready for the requested next Git action, and what blocks or warnings remain?
When To Use
Use this skill when:
- the user asks whether work is ready before commit, push, PR, merge, or release
- a skill needs a read-only readiness gate
- the user wants suggested verification commands
- the user asks for blockers and risks before acting
When Not To Use
Do not use this skill when:
- executing commits, pushes, merges, or releases
- fixing detected blockers
- running destructive cleanup
- publishing artifacts
Route to:
- commit execution routes to
atomic-commits - branch push or sync routes to
branch-workflow or sync-branch - secret issues route to
secret-scan - release prep routes to
version-bump, release-notes, changelog-maintenance, or tag-release
Required Evidence
Before action, inspect or establish:
- status and staged/unstaged/untracked groups
- changed file list and diff summary
- test, build, lint, and CI configuration
- secret-like paths or values in changed files
- generated or large file indicators
- version, changelog, and release-note requirements
- target action requested by the user
No-evidence rule:
- Do not make strong claims without observed evidence.
- State assumptions when proceeding under incomplete evidence.
- Stop when missing evidence affects safety, correctness, user work, remote state, or irreversible action.
Operating Contract
You MAY:
- inspect relevant repository state and project files.
- generate a plan, report, or local artifact within the declared risk scope.
- route to another skill when the requested action is outside this skill's owner boundary.
You MUST:
- inspect before acting.
- keep the task within the declared owner boundary.
- classify state and risk before any meaningful action.
- preserve unrelated user work.
- verify outcomes proportional to risk.
- report evidence, assumptions, actions, verification, and residual risk.
You MUST NOT:
- invent project policy.
- expose secrets or sensitive values.
- mutate unrelated files or refs.
- perform destructive, remote, shared, history-rewriting, or irreversible actions without explicit action-specific confirmation.
- continue after unexpected destructive output.
State / Risk Table
| State | Evidence | Risk | Default Action | Confirmation | Verification |
|---|
| Ready | required evidence inspected and no blockers | R1 | Report ready with verification performed/recommended | no | readiness summary |
| Blocking issue found | secret, conflict, missing evidence, or dirty scope mismatch | R1 | Report not ready and route owner | no | blocker list |
| Warnings only | non-blocking missing broad test or docs caveat | R1 | Report ready with caveats | no | warning list |
| Unknown target action | user did not name commit/push/PR/merge/release | R1 | Ask for target action or provide generic preflight | no | assumption stated |
Workflow
- Identify the user goal and current owner boundary.
- Inspect required evidence.
- Classify repository/task state.
- Classify risk using the declared scope.
- Choose the minimal sufficient action or route.
- Execute only allowed actions, if any.
- Verify outcome or self-check the artifact.
- Report result, evidence, verification, assumptions, and residual risk.
Decision Rules
- Readiness claims must not exceed inspected evidence.
- Do not fix blockers from this skill; route to the owner.
- Separate blockers from warnings.
- Recommend minimal verification commands from project evidence, not generic memory.
- May run read-only inspection and safe test discovery commands.
- May not mutate files, index, refs, remotes, or releases.
- Must not run long or destructive commands without user intent.
Verification
Minimum verification:
- Self-check readiness against target action.
- Ensure every blocker has an owner route.
- Report verification not run or unavailable.
Risk-based floor:
- R0-R1: evidence inspected and output self-checked.
- R2: inspect resulting diff or local state.
- R3: verify local state and report recovery limits.
- R4-R5: require explicit confirmation, preflight evidence, and post-action verification where this skill owns the action.
Output Contract
Final response must include:
## Result
- Decision, action, or artifact produced.
## Evidence
- Files, commands, diffs, refs, or assumptions used.
## Verification
- Checks performed and their result.
## Risks / Limitations
- Remaining uncertainty, blocked actions, or routed next steps.
Stop / Confirmation Rules
Stop when the repository state is dirty, conflicted, diverged, missing required evidence, or ambiguous in a way that could overwrite user work, invalidate the requested scope, or require a gated action.
Require explicit action-specific confirmation for:
- destructive local mutation.
- remote/shared mutation.
- history rewriting.
- security/secret/data impact.
- irreversible or hard-to-recover operation.
Broad approval such as "do whatever" is not enough for R4-R5 actions.
Lazy-load References
Load references/pre-commit.md when:
- the task needs the detailed guidance described by the file name.
- the state/risk table identifies an ambiguous or high-risk path.
Load references/pre-push.md when:
- the task needs the detailed guidance described by the file name.
- the state/risk table identifies an ambiguous or high-risk path.
Load references/pre-release.md when:
- the task needs the detailed guidance described by the file name.
- the state/risk table identifies an ambiguous or high-risk path.