Runs local tests, linting, and security scans, then refreshes SonarQube metrics.
Install
mkdir -p .claude/skills/ci-pioneershub && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/18776" && unzip -o skill.zip -d .claude/skills/ci-pioneershub && rm skill.zipInstalls to .claude/skills/ci-pioneershub
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Run the local CI pipeline (ruff, bandit, pytest, sonar-scanner) and refresh SonarQube.Key capabilities
- →Remove stale CI reports
- →Synchronize development and test dependencies
- →Run ruff with JSON output
- →Execute bandit with JSON output
- →Run pytest suite and generate coverage report
- →Invoke sonar-scanner to refresh SonarQube
How it works
The skill first clears old reports, syncs dependencies, then runs ruff, bandit, and pytest to generate JSON reports and a coverage XML. It then invokes sonar-scanner to upload these reports to SonarQube.
Inputs & outputs
When to use ci
- →Run local CI checks
- →Generate code coverage reports
- →Sync dependencies
- →Run security scans
About this skill
/ci — Full local CI + SonarQube refresh
Run this before opening a PR, or whenever the mcp__sonarqube__* findings look stale. The scanner
uploads the JSON reports that ruff, bandit, and pytest produce, so those have to run first.
Steps
- Drop stale reports so the scanner never uploads yesterday's data.
- Sync dev and test deps.
- Run ruff with a JSON report (exit-zero so the chain continues even if there are findings).
- Run bandit with a JSON report (exit-zero, same reason).
- Run the full pytest suite (must pass; pytest-cov writes
reports/coverage.xml). - Assert
reports/coverage.xmlexists and is non-empty. This guards against the "0% coverage" trap wheresonar-scannersilently ships an empty report. - Invoke
sonar-scanner, tee the log toreports/sonar-scan.log.
rm -f reports/coverage.xml reports/lcov.info reports/ruff_report.json reports/bandit_report.json && \
uv sync --group dev --group test && \
uv run ruff check --fix --output-format=json --output-file=reports/ruff_report.json --exit-zero . && \
uv run bandit --configfile pyproject.toml --recursive --format json --output reports/bandit_report.json --exit-zero . && \
uv run pytest && \
test -s reports/coverage.xml && \
sonar-scanner 2>&1 | tee reports/sonar-scan.log
After the scanner finishes, use mcp__sonarqube__search_sonar_issues_in_projects to pull new
findings for review.
Notes
- pytest is the gate: if tests fail, the chain stops before the scanner runs.
- The
test -s reports/coverage.xmlguard is the second gate. If coverage.xml is missing or empty the chain stops before upload, so the SonarCloud dashboard never flips back to 0%. - ruff and bandit are set to
--exit-zeroon purpose so report JSON is always written. - Do not skip this pipeline to make findings disappear. If something is flaky, fix the flake.
- Do not run
sonar-scanneron its own. Without a freshreports/coverage.xmlit uploads an analysis with 0% coverage and overwrites the last good one.
When not to use it
- →When pytest tests fail
- →When reports/coverage.xml is missing or empty
- →To make findings disappear by skipping the pipeline
Limitations
- →Requires pytest to pass for the chain to continue
- →Requires reports/coverage.xml to exist and be non-empty for sonar-scanner to run
- →Does not run sonar-scanner if coverage.xml is missing or empty
How it compares
This workflow automates the sequential execution of multiple CI tools and their report generation, ensuring all necessary data is produced before SonarQube is updated, unlike manually running each tool.
Compared to similar skills
ci side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| ci (this skill) | 0 | 1mo | Review | Intermediate |
| verification-loop | 0 | 3mo | Review | Intermediate |
| release-candidate-gate | 0 | 2mo | No flags | Intermediate |
| pr-review | 6 | 1mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
verification-loop
tom237ttkk
A comprehensive verification system for Codex work sessions.
release-candidate-gate
Remaker-Digital
Run the non-deploying Agent Red release-candidate gate before treating a build as production deployable. Covers Python security checks, targeted regression tests, frontend builds, and GroundTruth governance adoption checks.
pr-review
pytorch
Review PyTorch pull requests for code quality, test coverage, security, and backward compatibility. Use when reviewing PRs, when asked to review code changes, or when the user mentions "review PR", "code review", or "check this PR".
code-change-verification
openai
Run the mandatory verification stack when changes affect runtime code, tests, or build/test behavior in the OpenAI Agents Python repository.
discovering-make-commands
streamlit
Lists available make commands for Streamlit development. Use for build, test, lint, or format tasks.
django-verification
affaan-m
Verification loop for Django projects: migrations, linting, tests with coverage, security scans, and deployment readiness checks before release or PR.