Lsp Code Analysis
lsp-client/lsp-skill
Semantic code analysis via LSP. An agent skill from lsp-client/lsp-skill.
Write and debug ast-grep rules for structural code search and rewrite.
$ npx skills add BiFangKNT/mtga --skill ast-grep -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install BiFangKNT/mtga ast-grep --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/BiFangKNT/mtga.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.codex/skills/ast-grep .claude/skills/ast-grep && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "ast-grep" agent skill from https://github.com/BiFangKNT/mtga/tree/tauri/.codex/skills/ast-grep into .claude/skills/ast-grep/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ast-grep", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/BiFangKNT/mtga/tree/tauri/.codex/skills/ast-grepType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add BiFangKNT/mtga --skill ast-grep -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install BiFangKNT/mtga ast-grep --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/BiFangKNT/mtga.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.codex/skills/ast-grep .agents/skills/ast-grep && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "ast-grep" agent skill from https://github.com/BiFangKNT/mtga/tree/tauri/.codex/skills/ast-grep into .agents/skills/ast-grep/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ast-grep", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add BiFangKNT/mtga --skill ast-grep -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install BiFangKNT/mtga ast-grep --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/BiFangKNT/mtga.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.codex/skills/ast-grep .cursor/skills/ast-grep && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "ast-grep" agent skill from https://github.com/BiFangKNT/mtga/tree/tauri/.codex/skills/ast-grep into .cursor/skills/ast-grep/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ast-grep", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/BiFangKNT/mtga.git --path .codex/skills/ast-grep--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add BiFangKNT/mtga --skill ast-grep -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install BiFangKNT/mtga ast-grep --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/BiFangKNT/mtga.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.codex/skills/ast-grep .gemini/skills/ast-grep && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "ast-grep" agent skill from https://github.com/BiFangKNT/mtga/tree/tauri/.codex/skills/ast-grep into .gemini/skills/ast-grep/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ast-grep", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install BiFangKNT/mtga ast-grepInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add BiFangKNT/mtga --skill ast-grep -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/BiFangKNT/mtga.git skills-src && mkdir -p .github/skills && cp -r skills-src/.codex/skills/ast-grep .github/skills/ast-grep && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "ast-grep" agent skill from https://github.com/BiFangKNT/mtga/tree/tauri/.codex/skills/ast-grep into .github/skills/ast-grep/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ast-grep", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add BiFangKNT/mtga --skill ast-grep -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install BiFangKNT/mtga ast-grep --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/BiFangKNT/mtga.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.codex/skills/ast-grep .opencode/skills/ast-grep && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "ast-grep" agent skill from https://github.com/BiFangKNT/mtga/tree/tauri/.codex/skills/ast-grep into .opencode/skills/ast-grep/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "ast-grep", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
ast-grepWrite and debug ast-grep rules for structural code search and rewrite.
Ast Grep is an agent skill from BiFangKNT/mtga. Write and debug ast-grep rules for structural code search and rewrite. Use when tasks require AST-aware matching (not plain text), such as finding specific syntax shapes, relational patterns (inside/has), composite logic (all/any/not), or precise code refactors across a codebase.
Its SKILL.md is about 800 tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/rule_reference.md` and `references/windows.md`).
It sits in Development, covering Codebase onboarding and Refactoring. The repository describes itself as: 基于本地代理的方式,绕过 IDE 的固定模型服务商限制. The licence is AGPL-3.0.
4 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 72669fb. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are bash and yaml).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Ast Grep loads about 802 tokens when it runs, and up to ~3.7k if it reads all its reference files. Until then it costs about 72 tokens; SKILL.md has 258 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from BiFangKNT/mtga at commit 72669fb, republished under its AGPL-3.0 licence (© BiFangKNT). 258 words, ~802 tokens.
.claude/skills/ast-grep/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.Translate user intent into sg patterns/rules, validate quickly, then run against target scope.
Pin down:
Use sg run --pattern first.
sg run --pattern 'console.log($ARG)' --lang javascript srcFor relational/composite logic (inside / has / precedes / follows / all / any / not / matches), use sg scan --rule.
# rule.yml
id: async-with-await
language: javascript
rule:
kind: function_declaration
has:
pattern: await $EXPR
stopBy: endsg scan --rule rule.yml srcTest on a tiny sample first, then search the project.
echo "async function f(){ await g() }" | sg scan --rule rule.yml --stdin
sg scan --rule rule.yml src --json=compactUse when kind/pattern mismatch is unclear.
sg run --pattern 'class $NAME { $$$BODY }' \
--lang javascript \
--debug-query=patternecho "const x = await fetch();" | sg scan --inline-rules "id: test
language: javascript
rule:
pattern: await \$EXPR" --stdin --json=compactsg run --pattern 'function $NAME($$$)' --lang javascript src --json=compactsg scan --rule rule.yml src
sg scan --inline-rules "id: find-async
language: javascript
rule:
kind: function_declaration
has:
pattern: await \$EXPR
stopBy: end" srcFor relational rules (inside, has), default to:
has:
pattern: await $EXPR
stopBy: endThis ensures the search traverses the entire subtree rather than stopping at the first non-matching node.
patternkindinside/hasall/any/not$A, $$OP, $$$ARGS.all to guarantee match order.--json=compact.[], treat as no match and refine pattern/scope.rule_reference.md: Full rule syntax (atomic, relational, composite, metavariables)windows.md: PowerShell quoting/escaping tips and Vue SFC script-block workflowLoad only the reference needed for the current task.
© BiFangKNT, AGPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 2 other files (references) in .codex/skills/ast-grep of BiFangKNT/mtga.
Open the folder on GitHubat commit 72669fb
Ast Grep next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Ast Grep this skillBiFangKNT/mtga | 1.2k | — | ~802 | Automated safety check: Pass | AGPL-3.0 | |
| Lsp Code Analysislsp-client/lsp-skill | 118 | — | ~3k | Automated safety check: Pass | MIT | |
| Gograph Go Repository Intelligenceozgurcd/gograph | 228 | — | ~4.8k | Automated safety check: Notes | MIT | |
| Ripwire Graph Queryredhat-et/ripwire | 2.4k | — | ~1.1k | Automated safety check: Notes | Apache-2.0 | |
| CodeNavitech-leads-club/agent-skills | 7k | — | ~3.4k | Automated safety check: Pass | CC-BY-4.0 | |
| Golang Goplscontext-labs/whip | 1.1k | 1 repos | ~2.3k | Automated safety check: Pass | MIT |
lsp-client/lsp-skill
Semantic code analysis via LSP. An agent skill from lsp-client/lsp-skill.
ozgurcd/gograph
Gives an agent working in a Go codebase a structural view through a local MCP server: call graphs, blast-radius and impact analysis, and bounded first-call exploration.
redhat-et/ripwire
Answers call-graph questions that combine several conditions, such as complex functions that reach a target or untested symbols near main, using ripwire's graph-query mode.
tech-leads-club/agent-skills
Investigates unfamiliar codebases before changing them, makes small targeted edits and records what it learns in a .notebook/ folder for later sessions.
context-labs/whip
Golang semantic code intelligence via gopls — go-to-definition, references, call hierarchy, symbols, diagnostics, rename, refactors.
AnastasiyaW/codex-claude-code-config
Ranked symbol map of a codebase within a token budget — a compact "what matters in this repo" before reading files.
BiFangKNT/mtga
Maintain, debug, and recover MTGA's Trae native custom-model route.
BiFangKNT/mtga
使用 GitHub CLI (gh) 执行非交互式 GitHub 协作与自动化任务(PR、Issue、Actions、Release、API 查询/修改)。当用户要求“用 gh 命令完成任务”、需要结构化 JSON 输出(--json/--jq)、批量处理 PR/Issue(如“批量 review 多个 PR”)、按策略合并(如“检查通过后自动 squash 合并”)时使用此 skill。
BiFangKNT/mtga
构建、调试与发布 Tauri v2 应用的工程化工作流。覆盖项目初始化(create-tauri-app)、前端与 Rust 命令通信([tauri::command] + invoke)、状态管理、Capabilities 权限建模、插件接入、跨平台构建与问题排查。当用户需求涉及“创建 Tauri 项目”“把 Web 前端接到 Rust…
BiFangKNT/mtga
在 Windows/macOS/Linux 上使用 uv 执行 Python 运行、依赖同步、锁文件管理、Python 版本管理与工具命令(uv run、uv sync、uv lock、uv python、uv tool)。当任务涉及“用 uv 运行脚本/命令”“临时依赖(--with)”“锁文件一致性(--locked/--frozen)”“跨平台…
BiFangKNT/mtga
在 Windows PowerShell 5.1 与 PowerShell 7 中编写和执行稳定命令,重点处理引号、管道符、原生命令参数传递与跨版本兼容。遇到 --jq/过滤表达式被 PowerShell 误解析、同一命令在 pwsh5 与 pwsh7 行为不一致、或需要为 pwsh7.3+ 增加参数传递适配时使用此 skill。
Categories
Write and debug ast-grep rules for structural code search and rewrite. Ast Grep is an agent skill from BiFangKNT/mtga. Write and debug ast-grep rules for structural code search and rewrite.
Ast Grep fits situations like: tasks require AST-aware matching (not plain text); such as finding specific syntax shapes; relational patterns (inside/has); composite logic (all/any/not).
Run `npx skills add BiFangKNT/mtga --skill ast-grep -a claude-code`. Or copy the skill folder (.codex/skills/ast-grep in BiFangKNT/mtga) into .claude/skills/ast-grep in your project. Claude Code loads it when a task matches its description.
Run `npx skills add BiFangKNT/mtga --skill ast-grep -a codex`. Or copy the skill folder (.codex/skills/ast-grep in BiFangKNT/mtga) into .agents/skills/ast-grep in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add BiFangKNT/mtga --skill ast-grep -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ast-grep, .gemini/skills/ast-grep, .github/skills/ast-grep and .opencode/skills/ast-grep in your project.
SKILL.md names no scripts, command-line tools or credentials: Ast Grep is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Ast Grep is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 802 tokens (SKILL.md is roughly 3.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.9k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Ast Grep: Lsp Code Analysis (lsp-client/lsp-skill, 118 stars), Gograph Go Repository Intelligence (ozgurcd/gograph, 228 stars), Ripwire Graph Query (redhat-et/ripwire, 2.4k stars) and CodeNavi (tech-leads-club/agent-skills, 7k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
BiFangKNT (a GitHub user) maintains it in BiFangKNT/mtga, which has 1,169 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on June 18, 2026.
Source: BiFangKNT/mtga on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.