Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add mushroomTW/MushroomTW-Skills --skill local-sonarqube-setupgit clone --depth 1 https://github.com/mushroomTW/MushroomTW-SkillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/mushroomtw/mushroomtw-skills/local-sonarqube-setup)<a href="https://agentmods.dev/skills/mushroomtw/mushroomtw-skills/local-sonarqube-setup"><img src="https://agentmods.dev/badge/skills/mushroomtw/mushroomtw-skills/local-sonarqube-setup/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/mushroomtw/mushroomtw-skills/local-sonarqube-setup"><img src="https://agentmods.dev/badge/skills/mushroomtw/mushroomtw-skills/local-sonarqube-setup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00083 | $0.01792 |
| Opus 5 | $0.00042 | $0.00896 |
| Sonnet 5 | $0.00017 | $0.00358 |
| Haiku 4.5 | $0.00008 | $0.00179 |
Grade A, and why
local-sonarqube-setup scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 73 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Local SonarQube Setup
Local Docker at
127.0.0.1:9000· PowerShell on Windows ·SONAR_TOKENenv only · no scanner install.
TL;DR routing
pom.xml / build.gradle[.kts] exists? → use mvn/gradle plugin, not CLI
*.csproj / .sln? → .NET scanner required; SONAR_TOKEN env unsupported → credential STOP
NPM / Python / Other? → sonar-scanner CLI (or Docker fallback)
shallow clone? → git fetch --unshallow before scan
Java <21 and auto-provisioning OFF? → upgrade or enable auto
Invariants
- Token only in process memory — never in args/URL/log/file; describe only as set/not set; if leaked → tell user to revoke; read once and do all steps in same process, no
setx, clear only after verify. - Never fake Gate with
Accepted/False positive/disabling rules/server-side threshold edits; never change production code/build semantics to pass. - Do not add services, modify CI/compose, commit or push unless explicitly asked; preserve uncommitted changes; do not overwrite unrelated files.
- Output only non-sensitive summaries (status, key, CE, Gate, URL), never full logs; query issues/measures only on failure or request.
- Discover language/build/coverage from repo, not defaults; Community Build loads only supported languages.
Workflow — 4 phases, 7 steps
| Phase | Step | Action | Output | 🛑 Checkpoint |
|---|---|---|---|---|
| A · Preflight | 1 Discovery | Read AGENTS.md/README/build docs/sonar config; git status --short; derive language/sources/tests/reports. Shallow=true→git fetch --unshallow. Not git→note no rollback. |
Evidence table (path→source) | — |
| 2 Service+Scanner+Java | GET /api/system/status=UP; sonar-scanner --version; java -version 21+ (or 11+ if auto-provisioning ON — CLI 6.0+ default). Scanner per table: Maven mvn verify sonar:sonar · Gradle gradle sonar · .NET requires dotnet sonarscanner, but current scanner does not support env-only token transport · Other CLI. Docker CLI permission fail ≠ blocker. |
UP + version + chosen scanner |
🔴 Scanner+Java if mixed toolchain; 🔴 .NET credential STOP | |
| B · Setup | 3 Project | Key order: sonar.projectKey → .sonarlint/connectedMode.json → git remote → dir name; sanitize [A-Za-z0-9-_.:] not all digits; monorepo ambiguity→ask. Query mcp__sonarqube__search_my_sonarqube_projects; host mismatch→stop. Reuse or POST /api/projects/create. |
key / name / dashboard URL |
🔴 Key/name before create (cannot delete) |
| 4 Config | Minimal merge into sonar-project.properties (create only if none). Exclude only confirmed artifacts, never whole src/tests. Hierarchy Global < Project < file < CLI (file/CLI not persisted; Global Exclusions cannot override). sonar.projectBaseDir/project.settings in reference/commands.md §5. |
Diff shown | 🔴 Diff before write | |
| C · Execute | 5 Reports | Run repo checks/tests first (report failures). Then native coverage before scanner; format per reference/coverage.md (JaCoCo jacoco.xml→sonar.coverage.jacoco.xmlReportPaths, JS lcov.info→sonar.javascript.lcov.reportPaths, Python coverage.xml→sonar.python.coverage.reportPaths, .NET Coverlet/dotCover→sonar.cs.*, Generic→sonar.coverageReportPaths). Verify non-empty. None→state none. |
path (bytes, format) list |
— |
| 6 Scan | Same process: SONAR_HOST_URL + SONAR_TOKEN → run chosen scanner. Need EXECUTION SUCCESS + exit 0 + key/URL match. Docker fallback: sonar-scanner-cli with -v cache:/opt/sonar-scanner/.sonar/cache (user 1000 RW, Windows→host.docker.internal). OOM→SONAR_SCANNER_JAVA_OPTS="-Xmx512m" (pre-6.0 SONAR_SCANNER_OPTS). |
3-line summary | — | |
| D · Verify | 7 CE+Gate+Wrap | CE: parse .scannerwork/report-task.txt → poll GET /api/ce/task?id= to SUCCESS/FAILED (5m; timeout→report taskId+status). Gate: mcp__sonarqube__get_project_quality_gate_status; ERROR→list name: actual vs threshold, hand back. Wrap: add .scannerwork//coverage to ignore, git diff --check+git status --short, report key/Gate/imported types/URL. Debug: sonar.scanner.internal.dumpToFile or Background Tasks > Show SonarScanner Context. |
CE / Gate / URL |
— |
What ships with it
4 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 11d ago First seen · 73 lines · 83 tokens per session scan A bf981ec8e926
local-sonarqube-setup is a skill published in the GitHub repository mushroomTW/MushroomTW-Skills (0 stars, last pushed yesterday), licensed MIT. It adds 83 tokens to every session and 1,792 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
ai-development-guide
Applies language-agnostic and backend technical decision criteria, anti-pattern detection, debugging, and quality gates. Use when reviewing general/backend implementation choices, code smells, failures, or implementation completeness.
dorodango
Polishes working code through successive quality passes in fresh subagents. Use after tests pass when code needs multi-dimension refinement before release.
ring:searching-code
Forensic code search and analysis with optional Chain of Draft (CoD) ultra-concise mode. Five-phase methodology (clarification, planning, execution, analysis, synthesis) with severity assessment. Use for targeted investigation of specific patterns, bugs, or vulnerabilities. Skip for broad architecture mapping (use…
ring:test-driven-development
Enforcing the RED-GREEN-REFACTOR loop: write one failing test and watch it fail, write minimal code to pass, then refactor green. Use when starting implementation of a new feature or bugfix, or writing any new production code. Requires pasted failure output as proof of RED; code written before its test must be…
argot-refresh
Refresh Argot's committed fit snapshot safely — first diagnose why maintenance is recommended, re-audit corpus scope and structural path changes, review stale mutes and policy entries with the user, then fit locally, verify, and prepare the reviewed .argot/ update. Use when argot status, argot check, MCP, or CI…
code-confidence-map
Assesses code comprehensibility and maintainability risk. Use when the user asks about code confidence, risk, maintainability, tech debt, code health, or whether code is safe to change. Also use when the user asks to analyze code quality, scan for risks, check if code is messy or complex, audit code, do a code…