SonarQube/SonarCloud skill package for Codex and Claude.
This repository provides:
sonarqubeskill definitions for Codex and Claude/sonarqubeprompt command for Codex- installer script to copy skill files into user skill directories
- Scan only files changed on the current branch (vs base ref)
- Local mode auto-starts SonarQube, creates the project, configures the new code period, and persists a generated token in repo-local
.env - Two actions:
list: aggregated findings by severityautofix: iteratively fix findings at/above threshold
- Two scan modes:
local: local SonarQube instance/containercloud: SonarCloud/SonarQube cloud APIs or MCP
- Reads
sonar-project.propertiesforsonar.projectKey,sonar.host.url,sonar.sources, andsonar.tests - Warns when test paths are mixed into
sonar.sourceswithoutsonar.tests - Generates a Rust clippy report automatically when
Cargo.tomlis present - Supports both severity models (
high/medium/...andcritical/major/...)
python3sonar-scanner(local mode only)docker(local mode only, for SonarQube container workflows)
Cloud mode only requires python3, git, and a SONAR_TOKEN.
# project-local install
npx openskills install php-workx/skill-sonarqube
# global install
npx openskills install -g php-workx/skill-sonarqube# project-local install
npx skills add php-workx/skill-sonarqube
# global install
npx skills add -g php-workx/skill-sonarqubenpm install @php-workx/skill-sonarqubeThe npmjs package is published from GitHub Actions using npm trusted publishing, so CI does not require a long-lived npm publish token.
npm install @php-workx/skill-sonarqube --registry=https://npm.pkg.github.comgit clone --depth 1 --branch v1.3.0 https://github.com/php-workx/skill-sonarqube.git
cd skill-sonarqube
bash scripts/install-sonarqube-skill.shAfter install, restart Codex/Claude so new skills and slash commands are loaded.
Codex slash command:
/sonarqube list
/sonarqube autofix local high
/sonarqube autofix cloud medium
Natural language usage also works when sonarqube skill is selected by intent.
Runtime environment variables:
SONAR_TOKEN(preferred; falls back to repo-local.envin local mode)SONAR_USER,SONAR_PASSWORD(fallback)SONAR_HOST_URL(defaulthttp://localhost:9000)
Local mode also reads sonar-project.properties directly before falling back to .sonarqube-skill.yaml for host and source settings.
Installer destination overrides:
CLAUDE_SKILLS_DIRCODEX_SKILLS_DIRCODEX_PROMPTS_DIR
See docs/CONFIGURATION.md for details.
Repo-local Python tooling uses uv for optional development helpers such as skill-creator validation:
uv sync --dev
npm run validate:skillIf the skill-creator validator lives outside the default install locations, set SKILL_CREATOR_VALIDATE_SCRIPT to its quick_validate.py path before running npm run validate:skill.
skills/sonarqube/— canonical skill source for indexers and installers (SKILL.md, scripts, agents config)prompts/sonarqube.md— Codex slash command dispatcherscripts/install-sonarqube-skill.sh— copies skill to both Claude and Codex directories
See docs/TROUBLESHOOTING.md.
See docs/RELEASE.md.