Paths: File paths (shared/, references/, ../ln-*) are relative to skills repo root. If not found at CWD, locate this SKILL.md directory and go up one level for repo root.
ln-732-cicd-generator
Type: L3 Worker
Category: 7XX Project Bootstrap
Parent: ln-730-devops-setup
Generates GitHub Actions CI pipeline for automated testing and validation.
Purpose & Scope
Creates CI/CD workflow for GitHub:
- Does: Generate .github/workflows/ci.yml with lint, test, build, docker jobs
- Does NOT: Configure deployment, manage secrets, set up CD pipelines
Inputs
| Input |
Source |
Description |
| Stack Type |
ln-730 coordinator |
backend-dotnet, backend-python |
| Versions |
Auto-detected |
Node.js, .NET or Python versions |
| Frontend Path |
Auto-detected |
Path to frontend directory |
| Build Commands |
Auto-detected |
npm scripts, dotnet/pytest commands |
Outputs
| File |
Purpose |
Template |
.github/workflows/ci.yml |
Main CI pipeline |
github_ci_dotnet.template.yml or github_ci_python.template.yml |
Workflow
Phase 1: Stack Analysis
Determine which template to use:
| Detection |
Backend Template |
.sln or .csproj present |
github_ci_dotnet.template.yml |
requirements.txt or pyproject.toml present |
github_ci_python.template.yml |
Detect commands:
- Frontend: Read scripts from package.json (lint, build, test)
- .NET: Standard dotnet restore/build/test
- Python: pip install, ruff lint, pytest
Phase 2: Variable Substitution
Replace template variables:
| Variable |
Source |
Default |
{{NODE_VERSION}} |
package.json engines |
22 |
{{DOTNET_VERSION}} |
*.csproj TargetFramework |
9.0.x |
{{PYTHON_VERSION}} |
pyproject.toml |
3.12 |
{{FRONTEND_PATH}} |
Directory detection |
src/frontend |
Phase 3: Directory Creation
Create .github/workflows/ directory if not exists.
Phase 4: File Generation
Generate ci.yml from selected template:
- Check if workflow already exists (warn before overwrite)
- Apply variable substitution
- Write to
.github/workflows/ci.yml
- Validate YAML syntax
Generated Pipeline Structure
Jobs Overview
| Job |
Purpose |
Dependencies |
| frontend |
Lint, build, test React/Vite |
None |
| backend |
Build, test .NET or Python |
None |
| docker |
Build images, health checks |
frontend, backend |
Frontend Job Steps
- Checkout code
- Setup Node.js with caching
- Install dependencies (
npm ci)
- Run linter (
npm run lint)
- Build application (
npm run build)
- Run tests (
npm test)
Backend Job Steps (.NET)
- Checkout code
- Setup .NET SDK
- Restore dependencies (
dotnet restore)
- Build (
dotnet build)
- Run tests (
dotnet test)
Backend Job Steps (Python)
- Checkout code
- Setup Python with pip caching
- Install dependencies (
pip install -r requirements.txt)
- Run linter (
ruff check)
- Run tests (
pytest)
Docker Job Steps
- Checkout code
- Build images (
docker compose build)
- Start containers (
docker compose up -d)
- Wait for startup (30 seconds)
- Health check frontend (port 3000)
- Health check backend (port 5000/8000)
- Show logs on failure
- Stop containers (
docker compose down)
Triggers
| Event |
Branches |
| Push |
main, develop |
| Pull Request |
main |
Best Practices Applied
| Practice |
Implementation |
| Dependency caching |
npm cache, pip cache |
| Pinned versions |
actions/checkout@v4, setup-node@v4 |
| Parallel jobs |
frontend and backend run in parallel |
| Fail fast |
docker job waits for both to succeed |
| Clean up |
docker compose down runs always |
| Debug support |
logs shown on failure |
Quality Criteria
Generated workflow must:
Critical Notes
- GitHub Actions Only: This skill generates only GitHub Actions workflows. No Azure/GitLab support.
- Template-based: Use templates from references/. Do NOT hardcode workflow contents.
- Idempotent: Check if .github/workflows/ exists. Warn before overwriting ci.yml.
- Version Detection: Use detected versions, not hardcoded defaults.
Reference Files
| File |
Purpose |
| github_ci.template.yml |
Full template with comments |
| github_ci_dotnet.template.yml |
Compact .NET stack template |
| github_ci_python.template.yml |
Compact Python stack template |
Version: 1.1.0
Last Updated: 2026-01-10
1---2name: ln-732-cicd-generator3description: Generates GitHub Actions CI workflow configuration4license: MIT5---67> **Paths:** File paths (`shared/`, `references/`, `../ln-*`) are relative to skills repo root. If not found at CWD, locate this SKILL.md directory and go up one level for repo root.89# ln-732-cicd-generator1011**Type:** L3 Worker12**Category:** 7XX Project Bootstrap13**Parent:** ln-730-devops-setup1415Generates GitHub Actions CI pipeline for automated testing and validation.1617---1819## Purpose & Scope2021Creates CI/CD workflow for GitHub:22- **Does**: Generate .github/workflows/ci.yml with lint, test, build, docker jobs23- **Does NOT**: Configure deployment, manage secrets, set up CD pipelines2425---2627## Inputs2829| Input | Source | Description |30|-------|--------|-------------|31| **Stack Type** | ln-730 coordinator | backend-dotnet, backend-python |32| **Versions** | Auto-detected | Node.js, .NET or Python versions |33| **Frontend Path** | Auto-detected | Path to frontend directory |34| **Build Commands** | Auto-detected | npm scripts, dotnet/pytest commands |3536---3738## Outputs3940| File | Purpose | Template |41|------|---------|----------|42| `.github/workflows/ci.yml` | Main CI pipeline | [github_ci_dotnet.template.yml](references/github_ci_dotnet.template.yml) or [github_ci_python.template.yml](references/github_ci_python.template.yml) |4344---4546## Workflow4748### Phase 1: Stack Analysis4950Determine which template to use:5152| Detection | Backend Template |53|-----------|------------------|54| `.sln` or `.csproj` present | github_ci_dotnet.template.yml |55| `requirements.txt` or `pyproject.toml` present | github_ci_python.template.yml |5657Detect commands:58- Frontend: Read scripts from package.json (lint, build, test)59- .NET: Standard dotnet restore/build/test60- Python: pip install, ruff lint, pytest6162### Phase 2: Variable Substitution6364Replace template variables:6566| Variable | Source | Default |67|----------|--------|---------|68| `{{NODE_VERSION}}` | package.json engines | 22 |69| `{{DOTNET_VERSION}}` | *.csproj TargetFramework | 9.0.x |70| `{{PYTHON_VERSION}}` | pyproject.toml | 3.12 |71| `{{FRONTEND_PATH}}` | Directory detection | src/frontend |7273### Phase 3: Directory Creation7475Create `.github/workflows/` directory if not exists.7677### Phase 4: File Generation7879Generate ci.yml from selected template:801. Check if workflow already exists (warn before overwrite)812. Apply variable substitution823. Write to `.github/workflows/ci.yml`834. Validate YAML syntax8485---8687## Generated Pipeline Structure8889### Jobs Overview9091| Job | Purpose | Dependencies |92|-----|---------|--------------|93| **frontend** | Lint, build, test React/Vite | None |94| **backend** | Build, test .NET or Python | None |95| **docker** | Build images, health checks | frontend, backend |9697### Frontend Job Steps98991. Checkout code1002. Setup Node.js with caching1013. Install dependencies (`npm ci`)1024. Run linter (`npm run lint`)1035. Build application (`npm run build`)1046. Run tests (`npm test`)105106### Backend Job Steps (.NET)1071081. Checkout code1092. Setup .NET SDK1103. Restore dependencies (`dotnet restore`)1114. Build (`dotnet build`)1125. Run tests (`dotnet test`)113114### Backend Job Steps (Python)1151161. Checkout code1172. Setup Python with pip caching1183. Install dependencies (`pip install -r requirements.txt`)1194. Run linter (`ruff check`)1205. Run tests (`pytest`)121122### Docker Job Steps1231241. Checkout code1252. Build images (`docker compose build`)1263. Start containers (`docker compose up -d`)1274. Wait for startup (30 seconds)1285. Health check frontend (port 3000)1296. Health check backend (port 5000/8000)1307. Show logs on failure1318. Stop containers (`docker compose down`)132133---134135## Triggers136137| Event | Branches |138|-------|----------|139| **Push** | main, develop |140| **Pull Request** | main |141142---143144## Best Practices Applied145146| Practice | Implementation |147|----------|----------------|148| **Dependency caching** | npm cache, pip cache |149| **Pinned versions** | actions/checkout@v4, setup-node@v4 |150| **Parallel jobs** | frontend and backend run in parallel |151| **Fail fast** | docker job waits for both to succeed |152| **Clean up** | docker compose down runs always |153| **Debug support** | logs shown on failure |154155---156157## Quality Criteria158159Generated workflow must:160- [ ] Pass YAML syntax validation161- [ ] Use pinned action versions (not `@latest`)162- [ ] Include dependency caching163- [ ] Have health checks for docker job164- [ ] Clean up resources on completion165166---167168## Critical Notes1691701. **GitHub Actions Only**: This skill generates only GitHub Actions workflows. No Azure/GitLab support.1712. **Template-based**: Use templates from references/. Do NOT hardcode workflow contents.1723. **Idempotent**: Check if .github/workflows/ exists. Warn before overwriting ci.yml.1734. **Version Detection**: Use detected versions, not hardcoded defaults.174175---176177## Reference Files178179| File | Purpose |180|------|---------|181| [github_ci.template.yml](references/github_ci.template.yml) | Full template with comments |182| [github_ci_dotnet.template.yml](references/github_ci_dotnet.template.yml) | Compact .NET stack template |183| [github_ci_python.template.yml](references/github_ci_python.template.yml) | Compact Python stack template |184185---186187**Version:** 1.1.0188**Last Updated:** 2026-01-10