# Ci Gen

> Generate a GitHub Actions CI/CD pipeline for the current project. Use when: user says 'create ci pipeline', 'setup github actions', 'generate ci', 'add ci/cd', or '/ci-gen'.

- **Type:** Skill
- **Install:** `agentstack add skill-pulkit0x-claude-armory-ci-pipeline-generator`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [pulkit0x](https://agentstack.voostack.com/s/pulkit0x)
- **Installs:** 0
- **Category:** [Developer Tools](https://agentstack.voostack.com/c/developer-tools)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [pulkit0x](https://github.com/pulkit0x)
- **Source:** https://github.com/pulkit0x/claude-armory/tree/main/devops/skills/ci-pipeline-generator

## Install

```sh
agentstack add skill-pulkit0x-claude-armory-ci-pipeline-generator
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# CI Pipeline Generator

Analyze the current project and generate a production-ready GitHub Actions CI/CD workflow.

## Process

### 1. Detect Project Stack
Scan for:
- Language and framework (same detection as dockerfile-generator)
- Test framework (`jest.config.*`, `pytest.ini`, `*_test.go`, etc.)
- Linter config (`.eslintrc*`, `.flake8`, `golangci-lint`, `clippy`)
- Formatter config (`.prettierrc*`, `black`, `gofmt`)
- Build output (`dist/`, `build/`, `target/`)
- Existing CI files (`.github/workflows/`, `.gitlab-ci.yml`, `Jenkinsfile`)
- Docker presence (`Dockerfile`, `docker-compose.yml`)
- Deploy targets (`vercel.json`, `netlify.toml`, `fly.toml`, `Procfile`, Kubernetes manifests)

### 2. Generate Workflow

Create `.github/workflows/ci.yml` with these stages:

**Lint & Format Check**
- Run linter (ESLint, Flake8, golangci-lint, etc.)
- Check formatting (Prettier, Black, gofmt)
- Fail fast on style issues

**Test**
- Run unit tests with coverage
- Use matrix strategy for multiple versions if applicable (e.g., Node 18/20, Python 3.10/3.12)
- Cache dependencies for speed (npm cache, pip cache, Go module cache)
- Upload coverage report as artifact

**Build**
- Compile/build the project
- Verify build succeeds
- Upload build artifacts

**Security (optional)**
- Run `npm audit` / `pip-audit` / `govulncheck`
- Run CodeQL analysis for supported languages

**Deploy (if deploy target detected)**
- Deploy to detected platform (Vercel, Netlify, Fly.io, etc.)
- Only on push to `main` branch
- Use environment secrets

### 3. Best Practices

**Always:**
- Use specific action versions with SHA pins or major version tags (e.g., `actions/checkout@v4`)
- Cache dependencies (`actions/cache` or built-in caching)
- Set `concurrency` to cancel in-progress runs on same branch
- Use `permissions` block with least privilege
- Separate jobs for lint/test/build (parallel execution)
- Add `paths-ignore` for docs-only changes
- Use matrix strategy for multi-version testing when relevant

**Triggers:**
```yaml
on:
  push:
    branches: [main]
  pull_request:
    branches: [main]
```

**Concurrency:**
```yaml
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true
```

## Templates by Stack

### Node.js
```yaml
jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 20
          cache: npm
      - run: npm ci
      - run: npm run lint

  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        node-version: [18, 20]
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: ${{ matrix.node-version }}
          cache: npm
      - run: npm ci
      - run: npm test -- --coverage

  build:
    needs: [lint, test]
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 20
          cache: npm
      - run: npm ci
      - run: npm run build
```

### Python
```yaml
jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
        with:
          python-version: "3.12"
          cache: pip
      - run: pip install flake8 black
      - run: flake8 .
      - run: black --check .

  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python-version: ["3.10", "3.12"]
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
        with:
          python-version: ${{ matrix.python-version }}
          cache: pip
      - run: pip install -r requirements.txt
      - run: pytest --cov
```

### Java (Maven)
```yaml
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-java@v4
        with:
          distribution: temurin
          java-version: 21
          cache: maven
      - run: mvn verify
```

### Go
```yaml
jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-go@v5
        with:
          go-version: stable
      - uses: golangci/golangci-lint-action@v4

  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-go@v5
        with:
          go-version: stable
      - run: go test -race -coverprofile=coverage.out ./...
```

## Output

1. Write `.github/workflows/ci.yml`
2. Print summary of what was generated:
   ```
   ## CI Pipeline Generated

   **Stack:** Node.js 20 (Next.js)
   **File:** .github/workflows/ci.yml

   ### Stages
   1. Lint — ESLint + Prettier check
   2. Test — Jest with coverage (Node 18, 20 matrix)
   3. Build — Next.js production build
   4. Deploy — Vercel (on push to main)

   ### Next Steps
   - Add required secrets in GitHub Settings > Secrets
   - Merge this workflow to main to activate
   ```

## Notes
- If `$ARGUMENTS` specifies a deploy target, include deploy stage for that platform.
- If existing CI exists, read it first and offer to improve rather than overwrite.
- For monorepos, generate path-filtered workflows for each service.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [pulkit0x](https://github.com/pulkit0x)
- **Source:** [pulkit0x/claude-armory](https://github.com/pulkit0x/claude-armory)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-pulkit0x-claude-armory-ci-pipeline-generator
- Seller: https://agentstack.voostack.com/s/pulkit0x
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
