Bring your own hook: a 5-line PostToolUse template calling sonar analyze agentic
sonar integrate claude will set up Sonar Vortex for you. That is the right call for most people. But sometimes you want to own the hook yourself: to scope it to a subset of files, to decide exactly when it blocks, to check it into a repo your teammates share, or just to understand what is running before you trust it. This post is the smallest hook that does the job. Five lines, one command, and your agent starts getting CI-grade feedback on every edit.One naming note up front. The CLI subcommand is sonar analyze agentic; sonar verify is an alias, and there is no sqaa subcommand (the installed hook is just named sonar-sqaa). As of CLI 0.14.x, sonar analyze has secrets, dependency-risks, and
…