This reference explains when to use ast-grep instead of plain-text search and provides commands and recipes for finding or rewriting code by structure. It covers checks for error handling, deprecated APIs, SQL injection risks, secret-like literals, and other code patterns, along with troubleshooting and prompt templates. It recommends testing patterns on a small file first and waiting for approval before applying a rewrite in the large-refactor prompt template.
87%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Low
Low-risk findings worth noting
The skill handles credentials insecurely by requiring the agent to include secret values verbatim in its generated output. This exposes credentials in the agent’s context and conversation history, creating a risk of data exfiltration.
The main ast-grep workflow never handles credential values, but the "Hardcoded secret-looking properties" recipe directs a scan that would return matched source literals, which can include real secrets, into the model's tool results.
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.