CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

ast-grep-patterns

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.

Quality

87%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Low

Low-risk findings worth noting

SKILL.md
Quality
Evals
Security
Low

W007: Insecure credential handling in skill

What this means

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.

Why it was flagged

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.

Report incorrect finding
Repository

FlorianBruniaux/claude-code-ultimate-guide

Path

examples/skills/ast-grep-patterns/SKILL.md

Audited
Security analysis
Snyk

Is this your skill?

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.