Get the FREE Ultimate OpenClaw Setup Guide →

ln-732-cicd-generator

Scanned
npx machina-cli add skill levnikolaevich/claude-code-skills/ln-732-cicd-generator --openclaw
Files (1)
SKILL.md
5.1 KB

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

InputSourceDescription
Stack Typeln-730 coordinatorbackend-dotnet, backend-python
VersionsAuto-detectedNode.js, .NET or Python versions
Frontend PathAuto-detectedPath to frontend directory
Build CommandsAuto-detectednpm scripts, dotnet/pytest commands

Outputs

FilePurposeTemplate
.github/workflows/ci.ymlMain CI pipelinegithub_ci_dotnet.template.yml or github_ci_python.template.yml

Workflow

Phase 1: Stack Analysis

Determine which template to use:

DetectionBackend Template
.sln or .csproj presentgithub_ci_dotnet.template.yml
requirements.txt or pyproject.toml presentgithub_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:

VariableSourceDefault
{{NODE_VERSION}}package.json engines22
{{DOTNET_VERSION}}*.csproj TargetFramework9.0.x
{{PYTHON_VERSION}}pyproject.toml3.12
{{FRONTEND_PATH}}Directory detectionsrc/frontend

Phase 3: Directory Creation

Create .github/workflows/ directory if not exists.

Phase 4: File Generation

Generate ci.yml from selected template:

  1. Check if workflow already exists (warn before overwrite)
  2. Apply variable substitution
  3. Write to .github/workflows/ci.yml
  4. Validate YAML syntax

Generated Pipeline Structure

Jobs Overview

JobPurposeDependencies
frontendLint, build, test React/ViteNone
backendBuild, test .NET or PythonNone
dockerBuild images, health checksfrontend, backend

Frontend Job Steps

  1. Checkout code
  2. Setup Node.js with caching
  3. Install dependencies (npm ci)
  4. Run linter (npm run lint)
  5. Build application (npm run build)
  6. Run tests (npm test)

Backend Job Steps (.NET)

  1. Checkout code
  2. Setup .NET SDK
  3. Restore dependencies (dotnet restore)
  4. Build (dotnet build)
  5. Run tests (dotnet test)

Backend Job Steps (Python)

  1. Checkout code
  2. Setup Python with pip caching
  3. Install dependencies (pip install -r requirements.txt)
  4. Run linter (ruff check)
  5. Run tests (pytest)

Docker Job Steps

  1. Checkout code
  2. Build images (docker compose build)
  3. Start containers (docker compose up -d)
  4. Wait for startup (30 seconds)
  5. Health check frontend (port 3000)
  6. Health check backend (port 5000/8000)
  7. Show logs on failure
  8. Stop containers (docker compose down)

Triggers

EventBranches
Pushmain, develop
Pull Requestmain

Best Practices Applied

PracticeImplementation
Dependency cachingnpm cache, pip cache
Pinned versionsactions/checkout@v4, setup-node@v4
Parallel jobsfrontend and backend run in parallel
Fail fastdocker job waits for both to succeed
Clean updocker compose down runs always
Debug supportlogs shown on failure

Quality Criteria

Generated workflow must:

  • Pass YAML syntax validation
  • Use pinned action versions (not @latest)
  • Include dependency caching
  • Have health checks for docker job
  • Clean up resources on completion

Critical Notes

  1. GitHub Actions Only: This skill generates only GitHub Actions workflows. No Azure/GitLab support.
  2. Template-based: Use templates from references/. Do NOT hardcode workflow contents.
  3. Idempotent: Check if .github/workflows/ exists. Warn before overwriting ci.yml.
  4. Version Detection: Use detected versions, not hardcoded defaults.

Reference Files

FilePurpose
github_ci.template.ymlFull template with comments
github_ci_dotnet.template.ymlCompact .NET stack template
github_ci_python.template.ymlCompact Python stack template

Version: 1.1.0 Last Updated: 2026-01-10

Source

git clone https://github.com/levnikolaevich/claude-code-skills/blob/master/ln-732-cicd-generator/SKILL.mdView on GitHub

Overview

ln-732-cicd-generator automatically creates a GitHub Actions CI pipeline by generating .github/workflows/ci.yml. It selects the correct template based on the project stack (dotnet or Python) and wires lint, tests, build, and docker jobs. It intentionally excludes deployment, secret management, or CD setup.

How This Skill Works

It analyzes the repository to choose the correct CI template (dotnet or python) and detects commands for linting, building, and testing. It then substitutes variables (NODE_VERSION, DOTNET_VERSION, PYTHON_VERSION, FRONTEND_PATH), creates the workflows directory if needed, and writes a validated ci.yml from the selected template.

When to Use It

  • You need a reproducible CI pipeline for a repo with backend-dotnet or backend-python and an auto-detected frontend path.
  • Setting up CI after adding GitHub Actions to a new project.
  • You want to enforce caching of dependencies (npm/pip) and pinned action versions.
  • You manage a mono-repo (frontend + backend) and want a single ci.yml to cover lint, tests, and docker.
  • You require automatic template selection based on project files (.sln/.csproj or requirements.txt/pyproject.toml).

Quick Start

  1. Step 1: Ensure the repo contains detectable files (package.json with engines, pyproject.toml, or a .csproj/.sln) so the generator can determine the stack.
  2. Step 2: Run the ln-732-cicd-generator to produce .github/workflows/ci.yml from the appropriate template.
  3. Step 3: Commit and push to trigger GitHub Actions; adjust variables or paths if needed.

Best Practices

  • Dependency caching for npm and pip to speed up builds
  • Pin actions to stable versions (e.g., actions/checkout@v4)
  • Run frontend, backend, and docker steps in parallel when possible
  • Validate YAML syntax and guard against overwriting existing workflows
  • Auto-detect stack and adapt CI template to avoid misconfiguration

Example Use Cases

  • Mono-repo with React frontend, .NET backend, and Python services using a single ci.yml
  • Python-based microservice with pytest and ruff lint
  • .NET Core API with Dockerized build and health checks
  • Frontend with npm scripts for lint/build/test and backend with dotnet test
  • Teams migrating from custom pipelines to generated GitHub Actions workflows

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers