sonarqube-analyzer
暂无简介
- License 许可
- MIT
- 最近更新
- 2026-06-07
- Stars
- ★ 0
- Forks
- 1
03 SKILL.md 正文
SonarQube Analyzer Skill
Analisa projetos no SonarQube self-hosted, obtém issues e sugere soluções automatizadas.
Ferramentas Registradas
sonar_get_issues
Obtém lista de issues de um projeto/PR no SonarQube.
Parâmetros:
projectKey(string, obrigatório): Chave do projetopullRequest(string, opcional): Número da PR para análise específicaseverities(string[], opcional): Severidades a filtrar (BLOCKER, CRITICAL, MAJOR, MINOR, INFO)status(string, opcional): Status das issues (OPEN, CONFIRMED, FALSE_POSITIVE, etc.)limit(number, opcional): Limite de issues (padrão: 100)
Exemplo:
{
"projectKey": "openclaw-panel",
"pullRequest": "5",
"severities": ["CRITICAL", "MAJOR"],
"limit": 50
}
sonar_analyze_and_suggest
Analisa issues e sugere soluções com base nas regras do SonarQube.
Parâmetros:
projectKey(string, obrigatório): Chave do projetopullRequest(string, opcional): Número da PRautoFix(boolean, opcional): Tentar aplicar correções automáticas (padrão: false)
Exemplo:
{
"projectKey": "openclaw-panel",
"pullRequest": "5",
"autoFix": false
}
sonar_quality_gate
Verifica o status do Quality Gate de um projeto.
Parâmetros:
projectKey(string, obrigatório): Chave do projetopullRequest(string, opcional): Número da PR
Exemplo:
{
"projectKey": "openclaw-panel",
"pullRequest": "5"
}
Configuração
O skill usa as seguintes configurações do ambiente:
SONAR_HOST_URL=http://127.0.0.1:9000 # URL do SonarQube
SONAR_TOKEN=admin # Token de autenticação
Uso
Analisar uma PR específica:
node scripts/analyze.js --project=my-project --pr=5
Gerar relatório de issues:
node scripts/report.js --project=my-project --format=markdown
Verificar Quality Gate:
node scripts/quality-gate.js --project=my-project --pr=5
Estrutura de Resposta
sonar_get_issues
{
"total": 12,
"issues": [
{
"key": "...",
"severity": "MAJOR",
"component": "apps/web/src/ui/App.tsx",
"line": 346,
"message": "Extract this nested ternary...",
"rule": "typescript:S3358",
"status": "OPEN",
"solution": "Extract nested ternary into a separate function..."
}
],
"summary": {
"BLOCKER": 0,
"CRITICAL": 0,
"MAJOR": 2,
"MINOR": 10,
"INFO": 0
}
}
sonar_analyze_and_suggest
{
"projectKey": "openclaw-panel",
"analysis": {
"totalIssues": 12,
"fixableAutomatically": 8,
"requiresManualFix": 4
},
"suggestions": [
{
"file": "apps/web/src/ui/App.tsx",
"line": 346,
"issue": "Nested ternary operation",
"suggestion": "Extract into independent component",
"codeExample": "...",
"autoFixable": false
}
],
"nextSteps": [
"Run lint:fix for auto-fixable issues",
"Refactor nested ternaries in App.tsx",
"Replace || with ?? operators"
]
}
Soluções Automáticas Disponíveis
| Regra | Problema | Solução Automática |
|---|---|---|
| S6606 | Use || instead of ?? |
✅ Substituir por ?? |
| S3358 | Nested ternary | ❌ Requer refatoração manual |
| S6749 | Redundant fragment | ✅ Remover fragment |
| S6759 | Non-readonly props | ✅ Adicionar readonly |
| S3776 | Cognitive complexity | ❌ Requer extração de componentes |
| S6571 | any in union type |
✅ Remover redundância |
Requisitos
- Node.js 18+
- Acesso ao SonarQube (localhost:9000)
- Token de autenticação configurado
Integração com Workflows
Exemplo de uso em GitHub Actions:
- name: Analyze with SonarQube Skill
run: |
npm install -g @felipeoff/sonarqube-analyzer
sonarqube-analyzer \
--project=my-project \
--pr=${{ github.event.pull_request.number }} \
--suggest-fixes
04 同仓库更多 Skills
crowd-prompting
A marketplace where AI agents improve prompts, system instructions, tool descriptions, and other text-based content with domain expertise from real-world operations — and earn tokens for valuable contributions.
ceaser
Interact with the Ceaser privacy protocol on Base L2 using the ceaser-mcp MCP tools. This skill uses the ceaser-mcp npm package for ALL operations -- shield, unshield, note management, and protocol queries. All ceaser tool calls use CLI subcommands (npx -y ceaser-mcp <subcommand>). Ceaser is a privacy-preserving ETH wrapper using Noir/UltraHonk zero-knowledge proofs on Base L2 (chain ID 8453).
ceaser-send
Fully automated private ETH transfer via Ceaser Protocol on Base L2 using the ceaser-mcp MCP tools. This skill uses the ceaser-mcp npm package for ALL operations -- all ceaser tool calls use CLI subcommands (npx -y ceaser-mcp <subcommand>). WARNING -- creates observable on-chain links between user wallet and hot wallet (see Privacy Warning). Generates an ephemeral hot wallet with BIP-39 mnemonic recovery, user funds it, agent signs and broadcasts the Shield TX automatically. Exactly one manual step required (funding the hot wallet with ETH). Uses Noir/UltraHonk zero-knowledge proofs.
dilemm-ai
Compete in DilemmAI, the prisoner's dilemma AI arena at dilemm.ai. Use when an OpenClaw agent wants to create an account, design and submit strategy prompts for their bot, enter matchmaking, analyze historical matches and leaderboards, and iterate on bot strategy. Requires headless browser automation (no API available yet).
moldium
Post and manage content on the Moldium blog platform. Triggered by "post to Moldium", "write a blog post", "publish an article", etc.
arxiv-paper-reviews
Interact with arXiv Crawler API to fetch papers, read reviews, submit comments, search papers, and import papers. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, submitting paper reviews, searching papers by title, or importing papers from arXiv URLs via API at http://weakaccept.top:8000/.