← スキル一覧に戻る

ast-grep
by anntnzrb
Configurations for LLM Harnesses
⭐ 0🍴 0📅 2026年1月23日
SKILL.md
name: ast-grep description: "Read-only structural code search with ast-grep/sg. Grep/rg/sed alternative for AST-aware CLI exploration, pattern search, and fast code discovery. Activates on ast-grep/sg, structural search, AST search, find usages, tree-sitter."
ast-grep
Overview
Read-only CLI search with sg or ast-grep. AST-aware grep for code exploration and SWE tasks.
Quick start
- Prefer
sg. Fallbackast-grep. Last resort:nix run nixpkgs#ast-grep --. - Basic pattern search:
sg -p 'console.log($MSG)' -l ts src
- Files with matches only:
sg -p 'console.log($$$)' -l ts --files-with-matches src
- Show JSON (stream):
sg -p 'console.log($$$)' -l ts --json=stream src
Workflow
- Locate: start with narrow paths +
--globsinclude/exclude. - Verify language: set
-l/--langfor stdin or ambiguous files. - Inspect: use
--debug-queryor--inspect summarywhen matches surprise. - Report:
--files-with-matchesor--json=streamfor pipelines. - Prefer read-only search; skip rewrite flags.
Tasks
- Pattern search:
run(default) with-p/--pattern. - Context:
-A/-B/-Cfor line context. - Performance: narrow paths,
--globs,--files-with-matches,--json=stream.
Guardrails
- Read-only: never use
--rewrite,-r,--update-all, or--interactive. - Stdin requires
--lang.
Resources
reference.md: patterns, strictness, selectors, output formats.cookbook/: practical recipes.
スコア
総合スコア
40/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です