Getting Started Agentic Analysis Claude Code banner
SonarSource SonarSource

Getting Started Agentic Analysis Claude Code

Code Quality community

Description

A practical guide to using SonarQube Agentic Analysis and Context Augmentation with Claude Code to catch and prevent code quality issues before they reach CI.

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

Getting Started with SonarQube Agentic Analysis and Claude Code

A hands-on guide for SonarQube Cloud customers on using **Agentic Analysis** (the Verify phase) and **Context Augmentation** (the Guide phase) together with Claude Code to write cleaner code from the very first draft.

All examples use the real [clipper2-java](https://github.com/jon-lipsky-sonarsource/clipper2-java) project with actual analysis output from four structured experiments.


Table of Contents

  1. Overview — The Verification Gap
  2. How These Tools Actually Work
  3. Prerequisites and Setup
  4. Phase 1 — Crawl: Manual Verification
  5. Phase 2 — Walk: Skills and Standards
  6. Phase 3 — Run: Autonomous Guide-Generate-Verify Loop
  7. Insights: Getting the Most From These Tools
  8. Measuring Impact
  9. Appendix

Overview — The Verification Gap

Every team that adopts a static analysis tool like SonarQube quickly runs into the same frustration: the tool catches issues *after* the fact. A developer writes code, pushes a PR, and then — minutes or hours later — the CI pipeline returns a list of issues that have to be fixed before merge. The code has already been written, reviewed, and mentally filed away. Now it must be reopened.

This feedback lag is the **verification gap**: the distance between when code is written and when quality issues are detected.

AI coding assistants like Claude can close this gap — but only if they have access to the right context. By default, an AI assistant knows about general Java best practices and common patterns, but it does not know:

  • Which specific Sonar rules are configured for your project
  • Which rules your team has elevated to blocker