ci
Skill35 starsChanged 53 days agoApache-2.0View on GitHub
CI/CD pipeline integration. Use when setting up or checking CI quality gates, exporting rules to GitHub Actions/GitLab CI/Bitbucket/Jenkins, or verifying pipeline alignment with local rules.
In this repository23 other files it gives its agents.
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 2 are distinctive, and 8 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
8
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 29
Read .craft-config.yml if it exists to pick up strictness and stack settings.
- Very specific: line 30
Check for composer.json (PHP), package.json (Node.js), and deptrac.yaml to tailor the workflow.
- Very specific: line 32
If .github/workflows/ does not exist, create it.
- Distinctive: line 33
If the file already exists, ask the user before overwriting.
- Distinctive: line 51
Check the following and report:
- Very specific: line 54
If yes: show strictness and stack from the embedded config, and the file's last modified date.
- Very specific: line 55
If no: suggest running /craftsman:ci export.
- Very specific: line 80
Never modify hooks/, agents/, or packs/ - CI is an additive integration layer.
- Very specific: line 82
If ci/craftsman-ci.sh is not present, warn the user - the workflow depends on it.
- Very specific: line 83
All shell commands use || true for optional tools (PHPStan, ESLint, deptrac) so the workflow degrades gracefully.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
/craftsman:ci - CI/CD Integration
Outcome Contract
- Outcome: a CI pipeline that enforces the same rules as the local hooks, from the same validators, the same rules engine and the same per-file severity resolution.
- Done when: the generated pipeline file exists for the target provider, references the same pack validators as the hooks, and a dry run reports the same violations locally and in CI.
- Evidence: craftsman-ci.sh output, the generated template, and the provider adapter used.
Integrate Craftsman quality gates into your CI/CD pipeline.
Subcommands
/craftsman:ci export- Generate.github/workflows/craftsman-quality-gate.yml/craftsman:ci status- Show current CI integration status
Execution
If the user runs /craftsman:ci export:
- Read
.craft-config.ymlif it exists to pick upstrictnessandstacksettings. - Check for
composer.json(PHP),package.json(Node.js), anddeptrac.yamlto tailor the workflow. - Copy
ci/templates/craftsman-quality-gate.ymlinto.github/workflows/craftsman-quality-gate.yml.- If
.github/workflows/does not exist, create it. - If the file already exists, ask the user before overwriting.
- If
- Confirm the export with a summary:
Craftsman CI workflow exported to:
.github/workflows/craftsman-quality-gate.yml
Detected stack: <stack>
Config: <strictness> strictness
Next steps:
1. Commit and push: git add .github/workflows/craftsman-quality-gate.yml
2. Open a PR to trigger the workflow
3. Review docs/ci-integration.md for advanced configurationIf the user runs /craftsman:ci status:
Check the following and report:
- Workflow file - Does
.github/workflows/craftsman-quality-gate.ymlexist?- If yes: show
strictnessandstackfrom the embedded config, and the file's last modified date. - If no: suggest running
/craftsman:ci export.
- If yes: show
- craftsman-ci CLI - Does
ci/craftsman-ci.shexist and is it executable? - Config file - Does
.craft-config.ymlexist? - Stack detection - Are
composer.json/package.json/deptrac.yamlpresent?
Output a clear status table:
Craftsman CI Status
===================
Workflow file: ✓ .github/workflows/craftsman-quality-gate.yml
craftsman-ci: ✓ ci/craftsman-ci.sh (executable)
Config: ✓ .craft-config.yml (strictness=strict, stack=fullstack)
Stack detected: PHP (composer.json), Node.js (package.json)
Run /craftsman:ci export to generate the workflow if missing.Constraints
- Never modify
hooks/,agents/, orpacks/- CI is an additive integration layer. - The exported workflow uses the same rules as the hooks; they must never diverge.
- If
ci/craftsman-ci.shis not present, warn the user - the workflow depends on it. - All shell commands use
|| truefor optional tools (PHPStan, ESLint, deptrac) so the workflow degrades gracefully.
Cross-Harness Doctrine Export
Teammates whose agent does not run this plugin's hooks can still read instruction files: Cursor, Gemini and Antigravity, which the plugin does not ship to; Copilot, whose adapter has no qualified surface yet; and a Codex or Grok session where the plugin's gate is not installed, wired and trusted as their quickstarts describe (both are qualified hosts in hooks/host-capabilities.json once it is). Export the active rules as those files so the doctrine travels with the repository:
craftsman-ci export --target agents-md # AGENTS.md (read by most agents)
craftsman-ci export --target cursor # .cursor/rules/craftsman.mdc
craftsman-ci export --target copilot # .github/copilot-instructions.md
craftsman-ci export --target codex-agents [--into "$HOME/.codex/agents"] # craftsman-<name>.toml, one role per agents/*.md; only ~/.codex/agents/ was seen offered on codex-cli 0.154.0
craftsman-ci export --target allThe rules engine remains the single source of truth: severity overrides and ignored rules in .craft-config.yml are reflected in the generated files. In AGENTS.md and .github/copilot-instructions.md the export owns one delimited block (<!-- craftsman:doctrine:begin ... --> to <!-- craftsman:doctrine:end -->), created when the file is absent, appended when the file has none, rewritten in place otherwise: everything the team wrote outside the markers is kept byte for byte, and a second export changes nothing. .cursor/rules/craftsman.mdc is a dedicated file and is regenerated whole. Enforcement is unchanged: hooks locally where craftsman runs, craftsman-ci in the pipeline for everyone else. Commit the generated files and re-run the export whenever the rules change.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

