From bulletproof-ci
Use when the user wants to add, fix, or standardize GitHub Actions CI on a repo, asks for a "CI gate" / "bulletproof CI" / a single required status check, wants branch protection that requires CI without deadlocking, or says "/bulletproof-ci". Generates a per-stack ci.yml whose jobs all funnel into one aggregate gate job, and can apply matching branch protection. NEVER trigger for unrelated workflow edits (deploy, release, scheduled jobs).
How this skill is triggered — by the user, by Claude, or both
Slash command
/bulletproof-ci:bulletproof-ciThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Generate a GitHub Actions workflow whose jobs all funnel into **one** aggregate
Generate a GitHub Actions workflow whose jobs all funnel into one aggregate
gate job (default name CI passed). That single context is what branch
protection requires. Because the same workflow runs on both push and
pull_request for every integration branch, the gate is always producible, so
protecting dev / master / main on one required check never deadlocks.
The work is done by the bundled generator bin/bulletproof-ci. This skill is
the contract for invoking it correctly and reading its result. The generator is
dependency-light: bash, sed, git, gh (only for --protect / --pr),
and python3 (YAML validation).
Activates from the /bulletproof-ci slash command, or when the user asks to add
or repair CI on a repo. The working directory at invocation is the default
target unless the user names a path.
Resolve three things before running anything:
auto. Only pass --stack when detection would be wrong
(e.g. a polyglot repo where the user wants a specific stack).dev,master,main. Narrow it to the branches the repo
actually uses; protecting a branch that does not exist is skipped, not an error.bulletproof-ci [PATH] [flags]
Flags:
| Flag | Default | Effect |
|---|---|---|
--stack auto|python|node|shell|skill|generic | auto | Pick the template. auto detects from files. |
--branches a,b,c | dev,master,main | Workflow trigger branches and (with --protect) the branches to protect. |
--gate-name "NAME" | CI passed | Name of the aggregate gate job (the required context). |
--e2e | off | Add a Playwright e2e job. Node stacks only; ignored elsewhere. |
--protect | off | After writing, apply branch protection requiring the gate on each branch. Needs gh + jq. |
--enforce-admins / --no-enforce-admins | enforce | Whether protection binds admins too (with --protect). |
--reviews N | 0 | Required approving reviews for protection. |
--pr | off | Commit to a chore/ci branch, push, open a PR instead of only writing the tree. Needs gh. |
--dry-run | off | Print the plan and the would-be workflow; change nothing. |
-h, --help | Usage. |
Auto-detection order (first match wins): SKILL.md / .claude-plugin/plugin.json
/ skills/*/SKILL.md → skill; package.json → node; pyproject.toml
/ requirements.txt / setup.py / setup.cfg → python; mostly *.sh →
shell; otherwise generic.
The generator writes .github/workflows/ci.yml, substituting --branches and
--gate-name, then validates the emitted YAML before exiting. It logs to stderr;
in --dry-run the workflow preview goes to stdout.
bulletproof-ci --dry-run. Read the detected stack and gate name from the log.bulletproof-ci (or --pr to open a PR instead of
touching the working tree directly).CI passed context is registered): bulletproof-ci --protect.
Protecting before the check has ever reported can require the context before it
can be produced; the push trigger fixes this on first push, but verify a run
landed before relying on the gate.gh run list shows the workflow and the gate job appears
as CI passed. For --protect, confirm with
gh api repos/<owner>/<repo>/branches/<branch>/protection.tsc --noEmit (if tsconfig), test matrix (20/22), build. --e2e adds
Playwright. Each step no-ops with a note when the relevant script is absent.*.sh, actionlint on the workflows themselves,
YAML + markdown sanity.SKILL.md frontmatter has name + description,
validates any plugin.json / marketplace.json JSON, shellcheck on scripts,
lenient markdownlint.Every template ends with the CI passed gate: needs: all other jobs,
if: always(), fails if any needed job's result is not success. Least
privilege (contents: read), concurrency cancels superseded runs, action major
versions pinned.
--gate-name, change the protection (re-run with --protect).--protect, --pr touch the remote. Do not run them on a repo the user did
not ask you to change. Per homelab convention, never commit straight to dev
or the default branch: --pr opens a chore/ci branch.Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub phj6688/bulletproof-ci --plugin bulletproof-ci