claude-skills/engineering-team/skills/tdd-guide/references/ci-integration.md
Reza Rezvani 1851c8fb09 fix(plugins): restructure 9 multi-skill domain plugins into ./skills/ layout
Same root cause as #587/#591 — Claude Code's runtime loader rejects
array-form skills paths like ["./content-production", "./ai-seo", ...]
even when each entry is a valid subdirectory containing SKILL.md.
`claude plugin validate` accepts them but the loader does not.

The proven canonical layout (used by self-improving-agent in #536):

  <plugin>/
  ├── .claude-plugin/plugin.json    skills: "./skills"
  └── skills/
      ├── <skill-1>/SKILL.md
      ├── <skill-2>/SKILL.md
      └── ...

Restructured 9 multi-skill domain plugins:
- business-growth (4 skills moved)
- c-level-advisor (28)
- engineering (36)
- engineering-team (32)
- finance (2)
- marketing-skill (43)
- product-team (12)
- project-management (8)
- ra-qm-team (13)

Also fixed standalone plugins that had root SKILL.md + ./skills/ subdir
(agenthub, autoresearch-agent, executive-mentor, playwright-pro). The
loader rejected them despite skills="./skills" because of the conflicting
root SKILL.md (compare self-improving-agent which works because PR #536
moved its root SKILL.md). Moved each root SKILL.md into ./skills/<name>/.

Restored standalone plugin folders to their original paths after the
multi-skill restructure swept them into parent skills/ directories
(marketplace.json source paths require original locations).

Removed 7 orphaned marketplace entries that pointed to skill folders
without their own plugin.json (content-creator, demand-gen,
fullstack-engineer, aws-architect, product-manager, scrum-master,
skill-security-auditor) — these were already non-functional.

Bumped patch versions on every changed plugin and synced
marketplace.json. Marketplace now lists 29 working plugins (down
from 36).

After merge: users run `/plugin marketplace update claude-code-skills`
followed by `/plugin update --all` to pick up the working layout.
2026-05-02 22:51:20 +02:00

3.9 KiB

CI/CD Integration Guide

Integrating test coverage and quality gates into CI pipelines.


Table of Contents


Coverage in CI

Coverage Report Flow

  1. Run tests with coverage enabled
  2. Generate report in machine-readable format (LCOV, JSON, XML)
  3. Parse report for threshold validation
  4. Upload to coverage service (Codecov, Coveralls)
  5. Fail build if below threshold

Report Formats by Tool

Tool Command Output Format
Jest jest --coverage --coverageReporters=lcov LCOV
Pytest pytest --cov-report=xml Cobertura XML
JUnit/JaCoCo mvn jacoco:report JaCoCo XML
Vitest vitest --coverage LCOV/JSON

GitHub Actions Examples

Node.js (Jest)

name: Test and Coverage

on: [push, pull_request]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: '20'

      - run: npm ci
      - run: npm test -- --coverage

      - name: Check coverage threshold
        run: |
          COVERAGE=$(cat coverage/coverage-summary.json | jq '.total.lines.pct')
          if (( $(echo "$COVERAGE < 80" | bc -l) )); then
            echo "Coverage $COVERAGE% is below 80% threshold"
            exit 1
          fi

      - uses: codecov/codecov-action@v4
        with:
          file: coverage/lcov.info

Python (Pytest)

name: Test and Coverage

on: [push, pull_request]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
        with:
          python-version: '3.11'

      - run: pip install pytest pytest-cov
      - run: pytest --cov=src --cov-report=xml --cov-fail-under=80

      - uses: codecov/codecov-action@v4
        with:
          file: coverage.xml

Java (Maven + JaCoCo)

name: Test and Coverage

on: [push, pull_request]

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-java@v4
        with:
          distribution: 'temurin'
          java-version: '17'

      - run: mvn test jacoco:check

      - uses: codecov/codecov-action@v4
        with:
          file: target/site/jacoco/jacoco.xml

Quality Gates

Threshold Configuration

Jest (package.json):

{
  "jest": {
    "coverageThreshold": {
      "global": {
        "branches": 80,
        "functions": 80,
        "lines": 80,
        "statements": 80
      }
    }
  }
}

Pytest (pyproject.toml):

[tool.coverage.report]
fail_under = 80

JaCoCo (pom.xml):

<rule>
  <element>BUNDLE</element>
  <limits>
    <limit>
      <counter>LINE</counter>
      <value>COVEREDRATIO</value>
      <minimum>0.80</minimum>
    </limit>
  </limits>
</rule>

PR Coverage Checks

  • Block merge if coverage drops
  • Show coverage diff in PR comments
  • Require coverage for changed files
  • Allow exceptions with justification

Trend Tracking

Metrics to Track

Metric Purpose Alert Threshold
Overall line coverage Baseline health < 80%
Branch coverage Logic completeness < 70%
Coverage delta Regression detection < -2% per PR
Test execution time Performance > 5 min
Flaky test count Reliability > 0

Coverage Services

Service Features Integration
Codecov PR comments, badges, graphs GitHub, GitLab, Bitbucket
Coveralls History, trends, badges GitHub, GitLab
SonarCloud Full code quality suite Multiple CI platforms

Badge Generation

<!-- README.md -->
[![codecov](https://codecov.io/gh/org/repo/branch/main/graph/badge.svg)](https://codecov.io/gh/org/repo)