Command Palette

Search for a command to run...

Назад к скиллам
скилл № 36252

automation-ci-helper

Instructions for managing CI pipelines, GitHub Actions workflows, Airflow DAGs, and automation scripts in the insurance analytics project.

БесплатноБез исполняемых скриптов
FDU-INSот FDU-INS★ 84 звезды на GitHub

Установить automation-ci-helper в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

Automation & CI Helper Skill

This skill covers all automation in the insurance analytics project: GitHub Actions CI workflows, the Apache Airflow data pipeline, the Makefile task runner, pre-commit hooks, and quality-gate tooling.

Automation components at a glance

Component Location Purpose
GitHub Actions – CI .github/workflows/ci-postgres.yml Lint → test → SonarCloud on every push/PR
GitHub Actions – Release .github/workflows/release.yml Manual workflow dispatch: bumps patch version tag and creates a GitHub Release (no build artifact is uploaded)
GitHub Actions – Scheduled .github/workflows/scheduled-pipeline.yml Runs the pipeline on a schedule (now delegates to a reusable workflow)
GitHub Actions – Reusable pipeline .github/workflows/run-pipeline.yml Reusable workflow that owns Postgres service and runs ingest/ETL/upload
Composite actions .github/actions/setup-python-env, .github/actions/run-etl Shared actions for Python setup and running ETL steps
Airflow DAG airflow/dags/insurance_pipeline_dag.py Orchestrates the ETL end-to-end
Makefile Makefile Developer task runner (local shortcuts)
Pre-commit hooks .pre-commit-config.yaml Auto-formats and lints on every git commit

GitHub Actions: CI workflow (ci-postgres.yml)

The CI workflow has three sequential jobs:

lint  →  etl  →  sonarcloud

Job 1 – lint (static analysis)

Runs on every push to main/master that touches src/**, tests/**, src/sql/**, requirements.txt, pyproject.toml, sonar-project.properties, or .github/workflows/ci-postgres.yml. Pull requests to those branches trigger lint only when src/**, tests/**, requirements.txt, or pyproject.toml are changed (src/sql/** and other config files do not trigger CI on PRs).

Steps:

  1. ruff format --check – formatting check
  2. ruff check + pylint – linting (ruff is non-blocking on auto-fixable issues; pylint is non-blocking)
  3. mypy src – static type checking
  4. bandit -r src – security scan
  5. radon cc + radon mi – cyclomatic complexity and maintainability index

Job 2 – etl (ETL smoke test with PostgreSQL)

The project now centralises the integration pipeline in a reusable workflow: .github/workflows/run-pipeline.yml.

Key points:

  • The reusable workflow owns the Postgres 15 service and offers two modes via inputs:
    • seed-db: true — initialise and seed the DB with stable fixtures (used by CI tests)
    • seed-db: false — run a live Kaggle ingest via src.load (used by the scheduled run)
  • Schema application is no longer performed with runner psql -f ... in multiple places; the loader/seed script executes the canonical DDL (src/sql/ddl_create_tables.sql) via the same Python helper (_apply_ddl()), so CI and scheduled runs share the exact schema logic.
  • The test flow (CI) typically calls the reusable workflow with seed-db: true, runs the ETL steps, and then a dedicated coverage job collects and uploads coverage artifacts.

Key environment variable set by the workflow:

DATABASE_URL: postgresql+psycopg2://postgres:postgres@localhost:5432/insurdb

Job 3 – sonarcloud

Downloads the test artifacts (coverage + JUnit XML) and runs SonarCloud analysis. The Sonar job now depends on the CI coverage job (which produces build/reports/coverage.xml and build/reports/junit-report.xml).

Secrets used:

  • SONAR_TOKEN – SonarCloud authentication
  • CODECOV_TOKEN – Codecov upload (used by the CI coverage job)

Triggering CI manually

Push any change to a file under src/, tests/, src/sql/, requirements.txt, pyproject.toml, sonar-project.properties, or .github/workflows/ci-postgres.yml on a branch targeting main/master. A pull request against those branches also triggers CI when src/**, tests/**, requirements.txt, or pyproject.toml are modified.

Note: because the ETL and service logic are now in a reusable workflow, changes to the pipeline are tested more consistently across CI and scheduled runs.

Makefile: local task runner

Run make help to see all targets. Most-used ones:

make install        # pip install all dependencies
make test           # pytest with coverage
make lint           # flake8 + ruff + pylint
make format         # black + isort + ruff format + docformatter
make check-types    # mypy --strict
make quality        # bandit + radon + xenon + cohesion + vulture
make check          # lint + check-types + test + quality (full gate)

make db-init        # apply src/sql/ddl_create_tables.sql
make db-reset       # DROP SCHEMA + re-apply DDL
make kaggle-load    # download Kaggle dataset and load into PostgreSQL
make setup          # install + db-init + kaggle-load (full first-time setup)

make airflow-up     # start Airflow via Docker Compose (port 8080)
make airflow-down   # stop Airflow
make airflow-logs   # tail scheduler logs

A

Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл automation-ci-helper?

Instructions for managing CI pipelines, GitHub Actions workflows, Airflow DAGs, and automation scripts in the insurance analytics project.

Как установить скилл automation-ci-helper?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл automation-ci-helper запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить automation-ci-helper с