CtrlK
BlogDocsLog inGet started
Tessl Logo

ast-grep

Use ast-grep (sg) for AST-aware code search and rewrite across 25 languages. Trigger for structural code matching or deterministic codemods: find every function/call/class/import shaped like X, rewrite console.log to logger.info, strip `as any`, migrate require() to import, find empty catch blocks or missing await, and scan/apply YAML rules. Prefer this over rg/grep when the target is syntax shape rather than text; use rg for string contents, comments, filenames, or regex-style byte searches.

75

Quality

92%

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

Quality

Content

85%

Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.

A highly actionable, well-structured skill body with excellent workflow guidance and progressive disclosure; its only real weakness is duplication between the invariants, dry-run, and 'internalize' sections that inflates length without adding new information.

Suggestions

Collapse the 'Invariants (do not break)' and 'Always run dry-run first when rewriting' sections into the earlier 'Three things the agent must internalize' section — they restate the two-pass write trick and dry-run-before-apply rule verbatim.

The body references install.sh (POSIX) and install.ps1 (Windows) as shipped scripts, but neither file is present in the bundle; either add them or point to references/install.md as the canonical install path to avoid a dead reference.

The two debug sections ('When sg returns 0 matches' and the validate subcommand examples) overlap on regex-misuse detection; merge the validate-first guidance into one place.

DimensionReasoningScore

Conciseness

The body is mostly tight and assumes Claude's competence (no 'what is an AST' padding), but the 'Invariants (do not break)' and 'Always run dry-run first when rewriting' sections restate the two-pass write trick and dry-run-before-apply guidance already covered in 'Three things the agent must internalize'. Not level 3 because this duplication is removable padding; not level 1 because it never bloats into explaining concepts Claude already knows.

2 / 3

Actionability

Dense with executable, copy-paste-ready commands — 'python3 scripts/ast_grep_helper.py search ...', 'sg run -p ... --json=compact', real subcommands (search/replace/scan/validate/doctor), and real flags. Not level 2 because the guidance is complete and runnable, not pseudocode or abstract.

3 / 3

Workflow Clarity

Multi-step processes are sequenced with explicit validation checkpoints: the numbered 5-step dry-run flow ('Search → dry-run → inspect → refine → apply'), the prioritized '0 matches' debug workflow, and the validate→fix→retry feedback loop for batch rewrites. Not level 2 because validation checkpoints and error-recovery loops are explicit rather than implicit.

3 / 3

Progressive Disclosure

A clear overview with a 'Required reading (in order of priority)' section that signals seven real one-level-deep reference files (patterns.md, pitfalls.md, recipes.md, cli.md, yaml-rules.md, sgconfig.md, install.md), each annotated with when to read it. Not level 2 because references are well-signaled and appropriately split rather than inlined.

3 / 3

Total

11

/

12

Passed

Description

100%

Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.

An exemplary description: concrete actions, natural trigger terms, explicit what-and-when guidance, and active disambiguation from adjacent tools, all in third-person imperative voice.

DimensionReasoningScore

Specificity

Lists multiple concrete actions — 'AST-aware code search and rewrite', 'find every function/call/class/import shaped like X', 'rewrite console.log to logger.info', 'strip `as any`', 'migrate require() to import', 'find empty catch blocks or missing await', 'scan/apply YAML rules'. Not level 2 because it goes well beyond naming a domain plus a couple of actions into a comprehensive, specific action list.

3 / 3

Completeness

Explicitly answers both what ('AST-aware code search and rewrite across 25 languages') and when ('Trigger for structural code matching or deterministic codemods', 'Prefer this over rg/grep when the target is syntax shape rather than text'). Not level 2 because the 'when' is stated as an explicit trigger clause, not merely implied.

3 / 3

Trigger Term Quality

Natural user phrasing is well covered: 'find every', 'rewrite', 'strip', 'migrate', 'codemod', 'empty catch blocks', 'missing await', 'YAML rules'. Not level 2 because it captures the common variations users actually say rather than just a few relevant keywords.

3 / 3

Distinctiveness Conflict Risk

Carves a clear niche (AST/structural code matching) and actively disambiguates from rg/grep ('use rg for string contents, comments, filenames, or regex-style byte searches'). Not level 2 because the contrast makes accidental triggering for the wrong skill unlikely.

3 / 3

Total

12

/

12

Passed

Validation

100%

Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.

Validation16 / 16 Passed

Validation for skill structure

No warnings or errors.

Repository
code-yeongyu/lazycodex
Reviewed

Table of Contents

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.