AGENT SKILL

sonarclaude

Query SonarCloud API for code quality data. Use when: checking quality gate status, fetching code issues or security hotspots, reviewing metrics (coverage, bugs, code smells), or the user says "sonar", "quality gate", "code quality", "sonarclaude".

License 许可
Apache-2.0
最近更新
2026-09-29
Stars
★ 3
Forks
0

01 前言 Front Matter

name
sonarclaude
type
command
description
Query SonarCloud API for code quality data. Use when: checking quality gate status, fetching code issues or security hotspots, reviewing metrics (coverage, bugs, code smells), or the user says "sonar", "quality gate", "code quality", "sonarclaude".

02 资源文件 1

03 SKILL.md 正文

SonarClaude

Query SonarCloud projects for quality gate status, issues, metrics, and security hotspots.

Prerequisites

The script requires the following tools on PATH:

  • bash
  • curl — talks to the SonarCloud REST API
  • jq — parses responses and URL-encodes accept comments

Environment

Requires SONAR_TOKEN environment variable. Set the project key per-repo via the SONAR_PROJECT environment variable (or pass --project KEY on each invocation).

Usage

# Quality gate status (pass/fail)
bash .claude/skills/sonarclaude/scripts/sonar.sh status

# List issues (bugs, vulnerabilities, code smells)
bash .claude/skills/sonarclaude/scripts/sonar.sh issues

# Filter issues by severity and type
bash .claude/skills/sonarclaude/scripts/sonar.sh issues --severity CRITICAL --type BUG

# Key metrics (coverage, bugs, code smells, duplication, LOC)
bash .claude/skills/sonarclaude/scripts/sonar.sh metrics

# Security hotspots
bash .claude/skills/sonarclaude/scripts/sonar.sh hotspots

# Accept (won't-fix) an OPEN issue with a rationale comment
bash .claude/skills/sonarclaude/scripts/sonar.sh accept \
  --issue AZ3Ep83i4ywi8V_l99p0 \
  --comment "Pushback: rule premise doesn't fit our test fixture pattern."

# Different project
bash .claude/skills/sonarclaude/scripts/sonar.sh status --project OtherOrg_OtherProject

# Raw JSON output
bash .claude/skills/sonarclaude/scripts/sonar.sh issues --raw

# Limit results
bash .claude/skills/sonarclaude/scripts/sonar.sh issues --limit 10

Options

Flag Default Description
--project $SONAR_PROJECT SonarCloud project key
--severity all Filter: BLOCKER, CRITICAL, MAJOR, MINOR, INFO
--type all Filter: BUG, VULNERABILITY, CODE_SMELL
--limit 25 Max results returned
--raw off Output raw JSON instead of formatted summary
--issue — Issue key (required for accept)
--comment — Rationale comment (required for accept)

When to use accept

Sonar rules occasionally flag patterns where the rule's premise does not fit the code (e.g. test fixtures with intentional bad-password literals, contradictory rule pairs like S7494 vs S7500). After deciding pushback in PR review, run sonar.sh accept with a rationale comment instead of leaving the issue OPEN — this moves it to ACCEPTED/WONTFIX in SonarCloud history (visible to future maintainers) while clearing the quality-gate signal. Always include a --comment explaining why; silent dismissals are not acceptable curation.

Do not call SonarCloud's HTTP API directly from other skills or one-off scripts — sonar.sh accept is the supported entry point so the rationale flow stays consistent.

04 同仓库更多 Skills

agentculture
agentculture/culture-nodes

sample

Fixture skill proving the .qwen/skills leg carries at least one skill.

★ 3
agentculture
agentculture/culture-nodes

sample

Fixture skill proving the .qwen/skills leg carries at least one skill.

★ 3
agentculture
agentculture/culture-nodes

sample

Fixture skill proving the .qwen/skills leg carries at least one skill.

★ 3
agentculture
agentculture/culture-nodes

think

Think a vague feature idea into a buildable spec by working backwards (the idea→spec leg; drives the `devague` CLI). Start from the announcement ("pretend it shipped"), capture and classify claims, interrogate them with honesty conditions and hard questions, park open vagueness as a first-class object, and export a spec only once the frame *converges*. Use when the user says "think this through", "spec this", "work backwards", "turn this idea into a spec", "announcement frame", or "devague", or when a feature request is too vague to build yet. Explore scope first when the idea touches an existing codebase — the sibling `scope` skill is the optional opening leg ahead of `think`. Once a spec exports, hand off to the sibling `spec-to-plan` skill to turn it into a plan. Authored and maintained in agentculture/devague (origin = devague); guildmaster pulls this skill from here and broadcasts it to the AgentCulture mesh — it is NOT vendored from guildmaster like the other skills here.

★ 3
agentculture
agentculture/culture-nodes

summarize-delivery

Close the loop after an `assign-to-workforce` run by turning what actually happened into an accountability artifact — planned versus actual delivery, mid-work decisions, plan drift, evidence-backed delivery claims, and remaining work. The plan the user confirmed is the contract; this skill records where execution obeyed it, where it changed, and what is genuinely safe to claim as delivered. Runs on complete, partial, AND failed runs — failure is reported faithfully, never smoothed over. Use when the user says "summarize delivery", "delivery summary", "wrap up", "close the loop", "what did we actually ship", or "plan versus actual", or after `assign-to-workforce` merges (or fails to merge) a plan's waves. Authored and maintained in agentculture/devague (origin = devague); guildmaster pulls this skill from here and broadcasts it to the AgentCulture mesh — it is NOT vendored from guildmaster like the inbound skills here.

★ 3
agentculture
agentculture/culture-nodes

spec-to-plan

Turn a converged devague spec into a buildable plan by working forwards (the spec→plan leg; drives the `devague plan` CLI group). Seed a plan from a converged frame, add tasks that collectively cover every coverage target (the frame's confirmed claims + honesty conditions), give each task acceptance criteria and an honest dependency order, park genuine unknowns as first-class risks, and export a plan only once it *converges*. Use when the user says "spec to plan", "stp", "turn this spec into a plan", "plan this spec", "make a build plan", or after the `think` skill exports a spec. Authored and maintained in agentculture/devague (origin = devague); guildmaster pulls this skill from here and broadcasts it to the AgentCulture mesh — it is NOT vendored from guildmaster like the other skills here.

★ 3