---
name: setup-ci-8d309aa1348f
description: Generate a GitHub Actions workflow for SDLC validation. Use when setting up CI/CD for a new project.
disable-model-invocation: false
argument-hint: "[python | javascript | go]"
---

# Setup CI/CD

Generate a GitHub Actions workflow that mirrors the SDLC validation pipeline.

## Arguments

- `python` — Python project (ruff, mypy, pytest, bandit). Default if .py files detected.
- `javascript` — JS/TS project (eslint, tsc, jest/vitest).
- `go` — Go project (go vet, staticcheck, go test).

If no argument provided, detect language from project files.

## Steps

1. **Detect language** if not specified:
   - `*.py` files → python
   - `*.ts` or `*.js` files → javascript
   - `*.go` files → go

2. **Check for existing workflow**:
   - If `.github/workflows/sdlc-validate.yml` exists, warn and ask before overwriting.

3. **Create workflow directory**:
```bash
mkdir -p .github/workflows
```

4. **Generate workflow** from the appropriate template:
   - Python: use [templates/python.yml](templates/python.yml)
   - JavaScript/TypeScript: use [templates/javascript.yml](templates/javascript.yml)
   - Go: use [templates/go.yml](templates/go.yml)
   - Copy the chosen template to `.github/workflows/sdlc-validate.yml`

5. **Report** the created file and suggest next steps:
   ```
   Created .github/workflows/sdlc-validate.yml

   Python workflow runs on push and PR to main:
   - Lint (ruff)
   - Format check (ruff format)
   - Type check (mypy)
   - Tests (pytest)
   - Security (bandit)

   JavaScript/TypeScript workflow runs:
   - Install (npm ci)
   - Lint (npm run lint)
   - Type check (tsc --noEmit if tsconfig.json present)
   - Tests (npm test)
   - Security audit (npm audit --audit-level=high)

   Go workflow runs:
   - Modules (go mod download)
   - Vet (go vet ./...)
   - Lint (staticcheck ./...)
   - Tests with race detector (go test -race ./...)
   - Security scan (gosec ./...)

   Commit and push to activate CI.
   ```


---
Source attribution: SteveGJones
Original project: https://github.com/SteveGJones/ai-first-sdlc-practices/blob/631a626ff044f069e445d40777a0951e491a8132/plugins/sdlc-core/skills/setup-ci/SKILL.md
License: MIT
License information: https://opensource.org/license/mit
Original upstream instructions; downloaded from Mega AI Hub.

## Upstream license notice

MIT License

Copyright (c) 2024 Steve Jones

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.



# Mega AI Hub resource metadata

Creator / publisher: SteveGJones
Original project: https://github.com/SteveGJones/ai-first-sdlc-practices/blob/631a626ff044f069e445d40777a0951e491a8132/plugins/sdlc-core/skills/setup-ci/SKILL.md
Attribution basis: Source repository record

Fields of work: Development & Engineering, Product Management, Sales
Roles: Backend Developer, DevOps / SRE, Growth Product Manager, Product Manager, Sales Development Rep (SDR)
Specialties: DevOps, Git
Tools: GitHub
Country applicability: Country not specified
Classification basis: Source catalog labels
Instruction SHA-256: 16a0f06e85518e3fcd92c5ab367ca7c42d4a9d1a870656b536a3b5caa66a0709
