Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Une commande directe contourne le prompt de vérification. Examinez la source avant de l'exécuter.
ALWAYS specify the language with --lang flag — without a language flag, ast-grep applies heuristics that produce false positives; specify --lang ts, --lang py, etc. for accurate AST parsing.
ALWAYS use ripgrep/keyword search first to narrow the target set — structural search over the whole codebase is slow; use ripgrep to find candidate files first, then apply ast-grep for precise matching.
NEVER use regex for structural code patterns — regex breaks on formatting differences, nested structures, and multi-line code; AST patterns are format-independent and semantically precise.
ALWAYS test patterns on a known match before running project-wide — patterns with incorrect syntax silently match nothing; verify the pattern finds at least one known example before broad application.
ALWAYS use $$$ for variable argument lists, not * or . — ast-grep uses metavariable syntax ($NAME, $$$, $$); regex or glob syntax in patterns produces silent failures.
Anti-Patterns
Anti-Pattern
Why It Fails
Correct Approach
No --lang flag
Wrong parser applied; produces false positives and misses
Always specify --lang ts, --lang py, etc.
Running project-wide without ripgrep pre-filter
Slow on large codebases; many irrelevant results
Use ripgrep to identify candidate files first
Regex for structural matching
Breaks on multi-line, whitespace variations, nesting
Use ast-grep AST patterns ($NAME, $$$, etc.)
Untested pattern on full codebase
Incorrect patterns silently return nothing
Test on one known match first
Using * or . for wildcards
Not valid ast-grep syntax; ignored or errors
Use $NAME for single node, $$$ for sequences
Memory Protocol (MANDATORY)
Before starting:
Read .claude/context/memory/learnings.md
After completing:
New pattern → .claude/context/memory/learnings.md
Issue found → .claude/context/memory/issues.md
Decision made → .claude/context/memory/decisions.md
ASSUME INTERRUPTION: If it's not in memory, it didn't happen.