Skip to content

unxed/f4 / .agents/skills/aif-ci

aif-ci

Flagged

Generate CI/CD pipeline (GitHub Actions / GitLab CI) with linting, static analysis, tests, security. Use when user says "ci", "setup ci", "github actions", "gitlab ci", "pipeline".

templates/gitlab/go.yml

View on GitHub
# GitLab CI — Go
# Template variables:
#   GO_VERSION: e.g., '1.23'
#   HAS_GOLANGCI_LINT: boolean
#   WANT_COVERAGE: boolean
#   WANT_SECURITY: boolean
#   BINARY_NAME: e.g., 'app'
#   MAIN_PACKAGE: e.g., './cmd/app'

image: golang:${GO_VERSION}

stages:
  - lint
  - test
  - build

workflow:
  rules:
    - if: $CI_PIPELINE_SOURCE == "merge_request_event"
    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH

default:
  interruptible: true

variables:
  GOPATH: $CI_PROJECT_DIR/.go
  GOLANGCI_LINT_CACHE: $CI_PROJECT_DIR/.golangci-lint-cache

.go-cache:
  cache:
    - key:
        files:
          - go.sum
      paths:
        - .go/pkg/mod/
      policy: pull-push

lint:
  stage: lint
  extends: .go-cache
  image: golangci/golangci-lint:latest
  script:
    - golangci-lint run --out-format code-climate > gl-code-quality-report.json
  artifacts:
    reports:
      codequality: gl-code-quality-report.json
    when: always

tests:
  stage: test
  extends: .go-cache
  script:
    - go mod verify
    - go vet ./...
    - go test -race -coverprofile=coverage.out -covermode=atomic ./...
    - go tool cover -func=coverage.out
  coverage: '/total:\s+\(statements\)\s+(\d+\.\d+)%/'
  artifacts:
    paths:
      - coverage.out
    reports:
      coverage_report:
        coverage_format: cobertura
        path: coverage.out
    when: always

security:
  stage: lint
  extends: .go-cache
  script:
    - go install golang.org/x/vuln/cmd/govulncheck@latest
    - govulncheck ./...
  allow_failure: true

build:
  stage: build
  extends: .go-cache
  needs: [lint, tests]
  script:
    - CGO_ENABLED=0 go build -ldflags="-s -w" -o ${BINARY_NAME} ${MAIN_PACKAGE}
  artifacts:
    paths:
      - ${BINARY_NAME}
    expire_in: 7 days
rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 194kUpdated Claude CodeCodexVerifiedInstall