/SKILL.md
Use when a user wants to add or standardize GitHub CI/CD for a repository, especially for Go, Node, Python, Java, Rust, Dockerized apps, or monorepos with one or more sub-services. This skill detects the project type, can generate high-performance Dockerfiles when needed, supports ci-only, docker-ssh, and docker-registry-only strategies, generates GitHub Actions workflows, creates a setup checklist, and validates the resulting CI/CD files.
npx skillsauth add alan666gg/cicd-bootstrap github-cicd-bootstrapInstall 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.
This skill builds a reusable GitHub Actions pipeline for a repository with as little manual setup as possible.
Use it when the user asks to:
Use the bootstrap script when the user wants the skill to do the full setup in one pass.
python3 scripts/bootstrap_repo.py \
--project-root . \
--app-name my-service \
--service-path services/api
Language-specific fast examples:
python3 scripts/bootstrap_repo.py --project-root . --generate-dockerfile --deploy-strategy docker-registry-only --force
python3 scripts/bootstrap_repo.py --project-root . --service-path services/python-api --generate-dockerfile --force
python3 scripts/bootstrap_repo.py --project-root . --service-path services/java-api --generate-dockerfile --force
python3 scripts/bootstrap_repo.py --project-root . --service-path services/rust-worker --generate-dockerfile --force
If the skill is installed into the default Codex skills directory:
python3 ~/.codex/skills/github-cicd-bootstrap/scripts/bootstrap_repo.py \
--project-root . \
--service-path services/api
This command:
.github/cicd-bootstrap.json automatically when present.github/workflowsscripts/remote_deploy.sh automatically for docker-ssh.github/cicd-bootstrap-checklist.mdpython3 scripts/detect_project.py --project-root . --service-path services/api
python3 scripts/render_workflow.py --project-root . --service-path services/api --output-dir .github/workflows
python3 scripts/generate_checklist.py \
--project-root . \
--service-path services/api \
--output-file .github/cicd-bootstrap-checklist.md
python3 scripts/validate_workflow.py --workflow-dir .github/workflows
If the repository does not yet have a Dockerfile, generate one first:
python3 scripts/generate_dockerfile.py \
--project-root . \
--service-path services/api
Or let bootstrap do it in one shot:
python3 scripts/bootstrap_repo.py \
--project-root . \
--service-path services/api \
--generate-dockerfile \
--deploy-strategy docker-registry-only \
--force
If the repo has repeated CI/CD conventions, create:
.github/cicd-bootstrap.json
Example:
{
"app_name": "my-service",
"deploy_strategy": "docker-registry-only",
"service_paths": ["services/api", "services/worker"],
"default_branch": "main",
"test_branches": ["develop", "release/*"],
"image_registry": "ghcr.io/acme-platform",
"healthcheck_url_test": "http://127.0.0.1:8080/healthz",
"healthcheck_url_prod": "http://127.0.0.1:8080/healthz",
"healthcheck_timeout_seconds": 40,
"rollback_on_failure": true,
"remote_image_retention": 3,
"runner": "ubuntu-latest",
"default_shell": "bash --noprofile --norc -euo pipefail {0}",
"default_job_timeout_minutes": 20,
"deploy_job_timeout_minutes": 30,
"enable_security_scan": true,
"security_scan_blocking": false,
"action_pin_mode": "tag",
"allow_actions": ["actions/checkout", "docker/build-push-action"],
"enable_cache": true
}
app_name and generated multi-service slug values are normalized to lowercase kebab-case before they are used in workflow names, Docker image names, and related artifact names. For example, sourceBinance becomes source-binance.
For docker-registry-only, the workflow also lowercases the final registry prefix at runtime, so defaults like ghcr.io/${{ github.repository_owner }} and optional IMAGE_REGISTRY overrides remain valid for GHCR and similar registries.
When a monorepo service does not specify app_name, the generator prefixes the service slug with the repository name by default so image names stay unique under owner-scoped registries.
Bootstrap output keeps security scans enabled but defaults them to non-blocking mode so transient Trivy setup failures do not fail every first-run pipeline. Setting security_scan_blocking to true switches pushes to the default branch and release branches into blocking mode while keeping pull requests and develop-style test branches non-blocking.
action_pin_mode defaults to tag; when set to sha, the repo config must provide pinned_actions for the actions actually used by the rendered workflow.
Generated jobs now default to bash --noprofile --norc -euo pipefail {0}, keep required permissions/concurrency/timeout fields, and can be constrained by an allow_actions whitelist.
For docker-ssh, the generated workflows create the remote directory automatically, upload a generated scripts/remote_deploy.sh, run an optional healthcheck, roll back to the previous image by default when the new container fails healthchecks, and prune older images using remote_image_retention.
When a service depends on Redis, MySQL, MQ, or internal HTTP dependencies, prefer declaring dependency_checks_test and dependency_checks_prod in repo config. Supported formats are tcp://host:port, http(s)://..., and cmd:<shell command>. These checks default to reminder mode unless dependency_checks_blocking is set to true.
When this file exists, bootstrap_repo.py will load it automatically. CLI flags still override the config file.
ci.yml
deploy-test.yml
deploy-prod.yml
The generator supports three deploy strategies:
docker-ssh
docker-registry-only
ci-only
It also supports high-performance Dockerfile generation for:
go-servicenode-servicepython-servicejava-servicerust-servicestatic-webRun scripts/detect_project.py first. It decides:
go-service, node-service, python-service, java-service, rust-service, or docker-serviceDockerfileIf detection is wrong, rerun the render step with explicit flags instead of editing the detector.
For monorepos, prefer --service-path.
For batch generation, use --service-paths services/api,services/web.
If the repo is missing a Dockerfile but the user wants deployment automation, generate the Dockerfile before rendering workflows.
Use this decision order:
Dockerfile, prefer docker-sshdocker-registry-onlyci-onlyUse scripts/render_workflow.py. It fills templates and writes workflow files.
Recommended command for a Dockerized service:
python3 scripts/render_workflow.py \
--project-root . \
--service-path services/api \
--output-dir .github/workflows \
--deploy-strategy docker-ssh \
--app-name my-service
Recommended command for a non-Docker repo that still needs CI scaffolding:
python3 scripts/render_workflow.py \
--project-root . \
--service-path services/api \
--output-dir .github/workflows \
--deploy-strategy ci-only \
--app-name my-service
Recommended command for a multi-service monorepo:
python3 scripts/render_workflow.py \
--project-root . \
--service-paths services/api,services/web \
--deploy-strategy docker-registry-only \
--output-dir .github/workflows
Always run:
python3 scripts/validate_repo_config.py --project-root .
python3 scripts/validate_workflow.py --workflow-dir .github/workflows
Validation checks:
name, on, jobs, permissions, and concurrencyruns-on and timeout-minutesenvironmentactionlint runs automatically when availableAlways summarize:
Use references/secrets-checklist.md when summarizing setup requirements.
Use references/deploy-patterns.md when deciding between docker-ssh, docker-registry-only, and ci-only.
Use references/repo-config.md when a team wants to standardize defaults across many repositories.
If the user wants direct output in one shot, prefer scripts/bootstrap_repo.py.
When the user asks how a new teammate should use this skill, what the handoff flow should look like, or asks for a short SOP, answer with a direct operational flow instead of abstract feature descriptions.
Cover these points in order:
Preconditions
github-cicd-bootstrapFirst command to run
python3 ~/.agents/skills/github-cicd-bootstrap/scripts/bootstrap_repo.py \
--project-root . \
--deploy-mode docker-registry-only \
--generate-dockerfile \
--force
python3 ~/.agents/skills/github-cicd-bootstrap/scripts/bootstrap_repo.py \
--project-root . \
--service-path services/python-api \
--generate-dockerfile \
--force
python3 ~/.agents/skills/github-cicd-bootstrap/scripts/bootstrap_repo.py \
--project-root . \
--service-path services/java-api \
--generate-dockerfile \
--force
python3 ~/.agents/skills/github-cicd-bootstrap/scripts/bootstrap_repo.py \
--project-root . \
--service-path services/rust-worker \
--generate-dockerfile \
--force
python3 ~/.agents/skills/github-cicd-bootstrap/scripts/bootstrap_repo.py \
--project-root . \
--service-paths web_api,sourceBinance \
--deploy-mode docker-registry-only \
--force
~/.codex/skills/... instead of ~/.agents/skills/...What files get generated
.github/workflows/*.yml.github/cicd-bootstrap-checklist.mdDockerfile / .dockerignoreGitHub setup
Settings -> Secrets and variables -> Actionsdocker-registry-only, call out:
REGISTRY_USERNAMEREGISTRY_PASSWORDIMAGE_REGISTRYCommit and trigger flow
git add .
git commit -m "chore: bootstrap ci/cd"
git push
CI, Deploy Test, and Deploy Prod in GitHub ActionsTeam defaults
.github/cicd-bootstrap.jsondeploy_mode / deploy_strategyservice_path / service_pathstest_branch / test_branchesimage_registryhealthcheck_url_test / healthcheck_url_prodhealthcheck_timeout_secondsrollback_on_failureenable_security_scansecurity_scan_blockingCommon pitfalls
unknown -> add --service-path or --service-pathspip cache may miss more often; this is expectedchmod +x ./gradlew, but the wrapper itself still needs to existcargo dependencies and target cache need warmingNatural-language prompts teammates can give AI
用 github-cicd-bootstrap 给这个仓库补一套 GitHub CI/CD,走 docker-registry-only,并在需要时自动生成 Dockerfile。这是个 monorepo,请给 web_api 和 sourceBinance 生成 workflow,并告诉我还缺哪些 GitHub Secrets。先帮我检测这个仓库该用哪种 deploy strategy,再生成 workflow 和 checklist。If the user asks for a very short version, give them this one-liner:
进仓库根目录,先跑 bootstrap_repo.py;再按 .github/cicd-bootstrap-checklist.md 去补 GitHub Secrets / Variables;最后 git push 看 Actions。
.github/workflows and then showing a concise diff summary.docker-ssh only if the repo is already Dockerized or the user explicitly wants Docker-based delivery.docker-registry-only when the repo is Dockerized but release orchestration belongs to another platform team.ci-only when the release target is still undecided.detect_project.py
render_workflow.py
generate_checklist.py
generate_dockerfile.py
.dockerignore filesbootstrap_repo.py
validate_repo_config.py
.github/cicd-bootstrap.json against the bundled compatibility rules and schema defaultsvalidate_workflow.py
smoke_test_templates.py
verify_template_snapshots.py
apply_github_config.py
gh, supports --dry-run and --mode skip|upsertdeploy-patterns.md
docker-ssh vs docker-registry-only vs ci-onlysecrets-checklist.md
repo-config.md
cicd-bootstrap.schema.json
go-servicenode-servicepython-servicejava-servicerust-servicedocker-servicego-servicenode-servicepython-servicejava-servicerust-servicestatic-webci-only placeholdersdocker-ssh remote Docker deploymentdocker-registry-only image publishingdevelopment
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.
development
Maintainer workflow for OpenClaw releases, prereleases, changelog release notes, and publish validation. Use when Codex needs to prepare or verify stable or beta release steps, align version naming, assemble release notes, check release auth requirements, or validate publish-time commands and artifacts.
development
Run, watch, debug, and extend OpenClaw QA testing with qa-lab and qa-channel. Use when Codex needs to execute the repo-backed QA suite, inspect live QA artifacts, debug failing scenarios, add new QA scenarios, or explain the OpenClaw QA workflow. Prefer the live OpenAI lane with regular openai/gpt-5.4 in fast mode; do not use gpt-5.4-pro or gpt-5.4-mini unless the user explicitly overrides that policy.
development
End-to-end Parallels smoke, upgrade, and rerun workflow for OpenClaw across macOS, Windows, and Linux guests. Use when Codex needs to run, rerun, debug, or interpret VM-based install, onboarding, gateway smoke tests, latest-release-to-main upgrade checks, fresh snapshot retests, or optional Discord roundtrip verification under Parallels.