CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

ast-grep

Searches and rewrites code by AST shape across 25 languages. Use when the target is a syntax pattern (every call/class/import shaped like X, a codemod, a YAML rule) rather than literal text; for plain strings, comments, or filenames, use rg.

Quality

90%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Passed

No findings from the security scan

SKILL.md
Quality
Evals
Security

Quality

Content

88%Weight 40%Scale 1-5

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

Excellent operational content: fully executable commands, a well-validated dry-run-first rewrite workflow, and a prioritized debugging path, with detailed material correctly split into real one-level reference files. The only deductions are mild redundancy between the 'Three things' sections and the 'Invariants' recap, and references to install scripts that are not present in the bundle.

Suggestions

Remove or fix the dangling references to install.sh and install.ps1 — they are not in the bundle, so 'helper install' (delegating to them) and 'Read only if install.sh / install.ps1 fail' point at nonexistent files; either ship them or route to references/install.md only.

Trim the duplication between 'Three things the agent must internalize' and the 'Invariants' section — each states the regex-misuse, dry-run-first, and two-pass rules twice; consolidating to one location with brief cross-references would cut tokens without losing the emphasis.

Consider moving the OmO-native MCP section into a reference file (e.g., references/mcp.md) since it only applies in one environment, keeping the SKILL.md body focused on the portable helper and sg CLI.

DimensionReasoningScore

Conciseness

The body is dense with ast-grep-specific knowledge (silent --json/--update-all conflict, regex-misuse table, two-pass writes) that Claude does not already know, and it avoids explaining generic concepts. Minor over-explanation: the same invariants (pattern-is-not-regex, dry-run-first, two-pass) appear both in the 'Three things' section and again in 'Invariants', and the OmO MCP section is environment-specific padding for most users. Not 5 due to this redundancy; well above the verbose anchors.

4 / 5

Actionability

Every section is copy-paste executable: full helper invocations with flags and expected exit codes ('validate' → 'exit 2: regex \w not supported'), direct sg idioms, jq pipelines, stdin patterns, and --debug-query diagnostics. Specific examples cover the common search/replace/scan/validate cases exactly as the top anchor requires.

5 / 5

Workflow Clarity

The rewrite workflow is an explicit 5-step sequence with validation checkpoints and a feedback loop (search → dry-run → inspect preview → refine if wrong → apply only when right, 'Never apply a rewrite that you have not first dry-run'), and the 0-match section adds a prioritized error-recovery loop with 'Do not blindly retry'. For a batch/destructive operation skill, validation is central and complete, matching the top anchor with checklists (Invariants).

5 / 5

Progressive Disclosure

Clear overview with seven one-level-deep reference files, all of which exist in the bundle, each signaled with when-to-read guidance in 'Required reading (in order of priority)'. The gap: the body claims the skill ships install.sh (POSIX) and install.ps1 (Windows), but neither file exists in the bundle (no assets/ directory, scripts/ contains only ast_grep_helper.py), leaving helper 'install' as a dead-end reference — a minor organization flaw that keeps it below the top anchor.

4 / 5

Total

18

/

20

Passed

Description

87%Weight 40%Scale 1-5

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

A strong description: concrete actions, an explicit 'Use when' clause with natural trigger phrases, and an unusually good negative boundary that routes text-shaped queries to rg. The only gaps are a few missing synonyms (refactor, AST, find-and-replace) and a what-clause that names just two actions.

DimensionReasoningScore

Specificity

"Searches and rewrites code by AST shape" names two core concrete actions, and the when-clause adds "a codemod, a YAML rule" as further capability signals — several specific actions with minor gaps (e.g., scan/lint rule enforcement is only implied via "YAML rule"). Not 5 because the what-clause itself states only two actions rather than comprehensive coverage; not 3 because codemod and YAML-rule triggers go beyond 1-2 generic actions.

4 / 5

Completeness

Explicitly answers what ("Searches and rewrites code by AST shape across 25 languages") and when ("Use when the target is a syntax pattern (every call/class/import shaped like X, a codemod, a YAML rule) rather than literal text") with concrete trigger phrases, plus a negative boundary ("for plain strings, comments, or filenames, use rg"). Matches the anchor for a clear, explicit what-and-when with concrete triggers.

5 / 5

Trigger Term Quality

Natural trigger phrases are present: "syntax pattern", "every call/class/import shaped like X", "a codemod", "a YAML rule" — terms users would plausibly say. A few common synonyms are missing ("refactor", "find and replace", "AST"), keeping it below the comprehensive-synonym anchor of 5; well above the sparse keyword anchors of 2-3.

4 / 5

Distinctiveness Conflict Risk

Clear niche (AST-shape matching) with distinct triggers and an explicit disambiguation against rg for text-shaped queries, minimizing conflict risk with grep/search skills. Could not overlap with unrelated skills; matches the clear-niche anchor.

5 / 5

Total

18

/

20

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.

Validation — 16 / 16 Passed

Validation for skill structure

No warnings or errors.

Repository

code-yeongyu/oh-my-openagent

Path

packages/shared-skills/skills/ast-grep/SKILL.md

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.