/h2t-dev:pre-merge-checkfrom h2t-dev
This skill should be used before merging a feature branch to main or creating a PR. Triggers on "pre-merge", "ready to merge", "готов к мерджу", or when superpowers finishing-a-development-branch is about to run. Runs security, test, and build gates.
Ships in h2t-dev. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Quality gate before merge to main. Runs security audit, tests, build, and validates against plan.
git merge to mainsuperpowers:finishing-a-development-branch is invokeddigraph pre_merge {
"Trigger" [shape=doublecircle];
"1. Detect stack" [shape=box];
"2. Security gate" [shape=box];
"3. Test gate" [shape=box];
"4. Build gate" [shape=box];
"5. Plan compliance" [shape=box];
"All pass?" [shape=diamond];
"Report + proceed" [shape=box];
"Fix issues" [shape=box];
"Trigger" -> "1. Detect stack";
"1. Detect stack" -> "2. Security gate";
"2. Security gate" -> "3. Test gate";
"3. Test gate" -> "4. Build gate";
"4. Build gate" -> "5. Plan compliance";
"5. Plan compliance" -> "All pass?";
"All pass?" -> "Report + proceed" [label="yes"];
"All pass?" -> "Fix issues" [label="no"];
"Fix issues" -> "2. Security gate" [label="re-run"];
}
Auto-detect from project files (same logic as h2t:dev-session-start Step 4).
Check CLAUDE.md for ## Stack Config override.
Determine commands:
npm audit, npx playwright test or npm test, npm run buildpip-audit, pytest, ruff check, build command from pyproject.tomlcargo audit, cargo test, cargo clippy, cargo build --release{audit_command} # npm audit / pip-audit / cargo audit
Check project .claude/rules/security.md if it exists — run through ESSENTIAL items:
git diff main...HEAD -- '*.js' '*.ts' '*.py' | grep -i -E "(api_key|secret|password|token)" || echo "No secrets found"
FAIL if: critical/high vulnerabilities in audit, or secrets in diff.
{test_command} # npx playwright test / pytest / cargo test
FAIL if: any test fails. Zero tolerance for flaky — investigate, don't retry blindly.
{build_command} # npm run build / cargo build --release
FAIL if: build errors or warnings treated as errors.
If a plan file exists for this work (check docs/plans/):
If no plan exists, skip this step.
Present results as a table:
## Pre-Merge Check Results
| Gate | Status | Details |
|------|--------|---------|
| Security | PASS/FAIL | {audit output summary} |
| Tests | PASS/FAIL | {N passed, M failed} |
| Build | PASS/FAIL | {clean / errors} |
| Plan | PASS/SKIP | {N/M tasks complete} |
**Verdict:** READY TO MERGE / BLOCKED
If all pass → proceed with merge/PR. If any fail → list specific failures, suggest fixes.
| Mistake | Fix |
|---|---|
| Skipping audit for "small changes" | Every merge gets full check. No exceptions. |
| Retrying flaky tests | Investigate root cause, don't retry. |
| Ignoring build warnings | Warnings may become errors. Fix them. |
| Running wrong test command | Auto-detect stack first, check Stack Config. |
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub lichtpfad/h2t-skills --plugin h2t-dev5 skills in this plugin
/docs-lintAudit and maintain documentation/structure health in h2t-stack repos. Full pipeline: sniff → gate → analyze → plan → issues → fixes → validate. Scoped to repos using Claude Code + h2t standards./docs-sync-labelsSync canonical GitHub labels (from references/standards/labels.json) to the repositories you name, or those in your repo mapping, via gh CLI. Triggers on "sync labels", "update labels", "apply labels to repos", "docs-sync-labels"./github-issuesThis skill should be used when creating or updating GitHub issues. The issue contract itself lives in the repository's issue forms; this skill covers what the forms cannot — sizing, labels, milestones, duplicate check, and the gh command shape. Triggers on "create issue", "add to backlog", "github issue"./milestone-closureThis skill should be used when all issues in a GitHub milestone are closed and the phase is complete. Triggers on "close milestone", "milestone done", "phase complete", "закрыть milestone", or when the last issue in a milestone is closed.