SC CI Automation Skill
Coordinates pull → build → test → fix → PR. Keeps instructions lean; heavy details live in references and contracts file. Agent Runner is required for all agent calls (registry-enforced, audited).
Commands
/sc-ci-automation (flags: --build, --test, --dest, --src, --allow-warnings, --patch, --yolo, --help)
Agents (v0.1.0)
ci-validate-agent: pre-flight checks (clean repo, config present, auth available)
ci-pull-agent: pull target branch, handle simple conflicts
ci-build-agent: run build, classify failures
ci-test-agent: run tests, classify failures/warnings
ci-fix-agent: apply straightforward fixes
ci-root-cause-agent: summarize unresolved issues, recommend actions
ci-pr-agent: commit/push/PR when gates pass
Flow
- Validate via Agent Runner →
ci-validate-agent
- Pull via Agent Runner →
ci-pull-agent (dest inferred from tracking; --dest overrides)
- Build via Agent Runner →
ci-build-agent
- On build fail: Agent Runner →
ci-fix-agent (only straightforward fixes), repeat
- Test via Agent Runner →
ci-test-agent
- On test/warn fail: Agent Runner →
ci-fix-agent if straightforward, else ci-root-cause-agent
- If clean and confirmed (or
--yolo): Agent Runner → ci-pr-agent to commit/push/PR
Config
Preferred: .claude/ci-automation.yaml (fallback: .claude/config.yaml) with upstream_branch, build_command, test_command, warn_patterns, allow_warnings, auto_fix_enabled, pr_template_path, repo_root. Detect stack (e.g., .NET/Python/Node) and prompt to save suggested commands.
Safety
- No force-push; respect protected branches.
- Default is conservative: auto-fix only; stop before commit/PR unless clean and confirmed.
--yolo: allow commit/push/PR after gates pass.
- Warnings block PR unless
--allow-warnings or config override.
- Explicit confirmation for PRs to main/master unless
--dest main provided.
- Audit: Agent Runner logs to
.claude/state/logs/ci-automation/.
References
.claude/references/ci-automation-commands.md
.claude/references/ci-automation-checklists.md
.claude/references/ci-automation-contracts.md
Size Guidance
- Keep SKILL.md under ~2KB: overview, flags, agent list, flow summary, contracts, config, safety, references.
1---2name: sc-ci-automation3description: Run CI quality gates with optional auto-fix and PR creation.4---5
6# SC CI Automation Skill
7
8Coordinates pull → build → test → fix → PR. Keeps instructions lean; heavy details live in references and contracts file. Agent Runner is required for all agent calls (registry-enforced, audited).
9
10## Commands
11- `/sc-ci-automation` (flags: `--build`, `--test`, `--dest`, `--src`, `--allow-warnings`, `--patch`, `--yolo`, `--help`)
12
13## Agents (v0.1.0)
14- `ci-validate-agent`: pre-flight checks (clean repo, config present, auth available)
15- `ci-pull-agent`: pull target branch, handle simple conflicts
16- `ci-build-agent`: run build, classify failures
17- `ci-test-agent`: run tests, classify failures/warnings
18- `ci-fix-agent`: apply straightforward fixes
19- `ci-root-cause-agent`: summarize unresolved issues, recommend actions
20- `ci-pr-agent`: commit/push/PR when gates pass
21
22## Flow
230. Validate via Agent Runner → `ci-validate-agent`
241. Pull via Agent Runner → `ci-pull-agent` (dest inferred from tracking; `--dest` overrides)
252. Build via Agent Runner → `ci-build-agent`
263. On build fail: Agent Runner → `ci-fix-agent` (only straightforward fixes), repeat
274. Test via Agent Runner → `ci-test-agent`
285. On test/warn fail: Agent Runner → `ci-fix-agent` if straightforward, else `ci-root-cause-agent`
296. If clean and confirmed (or `--yolo`): Agent Runner → `ci-pr-agent` to commit/push/PR
30
31## Config
32Preferred: `.claude/ci-automation.yaml` (fallback: `.claude/config.yaml`) with `upstream_branch`, `build_command`, `test_command`, `warn_patterns`, `allow_warnings`, `auto_fix_enabled`, `pr_template_path`, `repo_root`. Detect stack (e.g., .NET/Python/Node) and prompt to save suggested commands.
33
34## Safety
35- No force-push; respect protected branches.
36- Default is conservative: auto-fix only; stop before commit/PR unless clean and confirmed.
37- `--yolo`: allow commit/push/PR after gates pass.
38- Warnings block PR unless `--allow-warnings` or config override.
39- Explicit confirmation for PRs to main/master unless `--dest main` provided.
40- Audit: Agent Runner logs to `.claude/state/logs/ci-automation/`.
41
42## References
43- `.claude/references/ci-automation-commands.md`
44- `.claude/references/ci-automation-checklists.md`
45- `.claude/references/ci-automation-contracts.md`
46
47## Size Guidance
48- Keep SKILL.md under ~2KB: overview, flags, agent list, flow summary, contracts, config, safety, references.