[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6EV6R51TYYACQMXXASKPZ0D":3,"skill-same:01M6EV6R51TYYACQMXXASKPZ0D":86},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":44,"linkOnly":45,"markdownContent":46,"markdownBody":47,"frontMatter":48,"refName":49,"commitSha":50,"skillDirectory":51,"forksCount":52,"repositoryHtmlUrl":53,"repositoryHomepageUrl":54,"ownerHtmlUrl":55,"ownerBlogUrl":6,"ownerDescription":56,"updatedAt":57,"install":58,"resources":71},"01M6EV6R51TYYACQMXXASKPZ0D","ast-grep-rule-crafter",null,"Write AST-based code search and rewrite rules using ast-grep YAML. Create linting rules, code modernizations, and API migrations with auto-fix. Use when the user mentions ast-grep, tree-sitter patterns, code search rules, lint rules with YAML, AST matching, or code refactoring patterns.","ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fhylarucoder\u002Fast-grep-rule-crafter\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43],"ast grep rule crafter","rule","ast grep","grep","ast","fix","linting","rewrite","refactoring patterns","patterns","code refactoring","auto","use","create","write","Rules","refactoring","api","search","code","2026-11-10 10:12:30",false,"---\nname: ast-grep-rule-crafter\ndescription: Write AST-based code search and rewrite rules using ast-grep YAML. Create linting rules, code modernizations, and API migrations with auto-fix. Use when the user mentions ast-grep, tree-sitter patterns, code search rules, lint rules with YAML, AST matching, or code refactoring patterns.\n---\n\n# ast-grep Rule Crafter\n\nast-grep uses tree-sitter to parse code into AST, enabling precise pattern matching. Rules are defined in YAML for linting, searching, and rewriting code.\n\n## Quick Start\n\n```yaml\nid: no-console-log\nlanguage: JavaScript\nrule:\n  pattern: console.log($$$ARGS)\nfix: logger.log($$$ARGS)\nmessage: Replace console.log with logger\n```\n\n## Project Configuration\n\n项目级扫描需要 `sgconfig.yml` 配置文件：\n\n```yaml\n# sgconfig.yml (项目根目录)\nruleDirs:\n  - rules          # 规则目录，递归加载所有 .yml 文件\n```\n\n典型项目结构：\n\n```\nmy-project\u002F\n├── sgconfig.yml\n├── rules\u002F\n│   ├── no-console.yml\n│   └── custom\u002F\n│       └── team-rules.yml\n└── src\u002F\n```\n\n运行项目扫描：\n\n```bash\nast-grep scan              # 自动查找 sgconfig.yml\nast-grep scan --config path\u002Fto\u002Fsgconfig.yml  # 指定配置\n```\n\n> **注意**: `ast-grep scan` 命令必须有 `sgconfig.yml`，而 `ast-grep run -p` 可单独使用。\n\n## Rule Workflow\n\n### Lint Rule (常见)\n\n只检查不修复，用于 CI\u002F编辑器提示：\n\n```yaml\n# rules\u002Fno-console-log.yml\nid: no-console-log\nlanguage: JavaScript\nseverity: warning\nmessage: Avoid console.log in production code\nrule:\n  pattern: console.log($$$ARGS)\n```\n\n验证：\n\n```bash\nast-grep scan -r rules\u002Fno-console-log.yml src\u002F\n```\n\n### Rewrite Rule (可选)\n\n需要自动修复时添加 `fix`：\n\n```yaml\nid: no-console-log\nlanguage: JavaScript\nseverity: warning\nmessage: Replace console.log with logger\nrule:\n  pattern: console.log($$$ARGS)\nfix: logger.log($$$ARGS)\n```\n\n应用修复：\n\n```bash\nast-grep scan -r rules\u002Fno-console-log.yml --update-all src\u002F\n```\n\n### 开发流程\n\n```\n- [ ] 1. 用 CLI 探索 pattern: ast-grep -p 'pattern' src\u002F\n- [ ] 2. 创建规则文件 (.yml)\n- [ ] 3. 验证: ast-grep scan -r rule.yml src\u002F\n- [ ] 4. 如有误报 → 添加 constraints → 重新验证\n```\n\n调试 AST 结构：\n\n```bash\nast-grep -p 'console.log($ARG)' --debug-query ast\n```\n\n## Essential Syntax\n\n| Element | Syntax | Example |\n|---------|--------|---------|\n| Single node | `$VAR` | `console.log($MSG)` |\n| Multiple nodes | `$$$ARGS` | `fn($$$ARGS)` |\n| Same content | Use same name | `$A == $A` |\n| Non-capturing | `$_VAR` | `$_FN($_FN)` |\n\n## Core Rules Quick Reference\n\n| Type | Purpose | Example |\n|------|---------|---------|\n| `pattern` | Match code structure | `pattern: if ($COND) {}` |\n| `kind` | Match AST node type | `kind: function_declaration` |\n| `all` | Match ALL conditions | `all: [pattern: X, kind: Y]` |\n| `any` | Match ANY condition | `any: [pattern: var $A, pattern: let $A]` |\n| `not` | Exclude matches | `not: {pattern: safe_call()}` |\n| `has` | Must have child | `has: {kind: return_statement}` |\n| `inside` | Must be in ancestor | `inside: {kind: class_body}` |\n\n## Detailed References\n\n**Complete syntax guide**: See [references\u002Frule-syntax.md](references\u002Frule-syntax.md)\n- Atomic rules (pattern, kind, regex, nthChild, range)\n- Composite rules (all, any, not, matches)\n- Relational rules (has, inside, follows, precedes)\n- Transform and fixConfig\n\n**Language-specific patterns**: See [references\u002Fcommon-patterns.md](references\u002Fcommon-patterns.md)\n- JavaScript\u002FTypeScript examples\n- Python examples\n- Go and Rust examples\n\n## Supported Languages\n\nBash, C, Cpp, CSharp, Css, Elixir, Go, Haskell, Hcl, Html, Java, JavaScript, Json, Kotlin, Lua, Nix, Php, Python, Ruby, Rust, Scala, Solidity, Swift, Tsx, TypeScript, Yaml\n","# ast-grep Rule Crafter\n\nast-grep uses tree-sitter to parse code into AST, enabling precise pattern matching. Rules are defined in YAML for linting, searching, and rewriting code.\n\n## Quick Start\n\n```yaml\nid: no-console-log\nlanguage: JavaScript\nrule:\n  pattern: console.log($$$ARGS)\nfix: logger.log($$$ARGS)\nmessage: Replace console.log with logger\n```\n\n## Project Configuration\n\n项目级扫描需要 `sgconfig.yml` 配置文件：\n\n```yaml\n# sgconfig.yml (项目根目录)\nruleDirs:\n  - rules          # 规则目录，递归加载所有 .yml 文件\n```\n\n典型项目结构：\n\n```\nmy-project\u002F\n├── sgconfig.yml\n├── rules\u002F\n│   ├── no-console.yml\n│   └── custom\u002F\n│       └── team-rules.yml\n└── src\u002F\n```\n\n运行项目扫描：\n\n```bash\nast-grep scan              # 自动查找 sgconfig.yml\nast-grep scan --config path\u002Fto\u002Fsgconfig.yml  # 指定配置\n```\n\n> **注意**: `ast-grep scan` 命令必须有 `sgconfig.yml`，而 `ast-grep run -p` 可单独使用。\n\n## Rule Workflow\n\n### Lint Rule (常见)\n\n只检查不修复，用于 CI\u002F编辑器提示：\n\n```yaml\n# rules\u002Fno-console-log.yml\nid: no-console-log\nlanguage: JavaScript\nseverity: warning\nmessage: Avoid console.log in production code\nrule:\n  pattern: console.log($$$ARGS)\n```\n\n验证：\n\n```bash\nast-grep scan -r rules\u002Fno-console-log.yml src\u002F\n```\n\n### Rewrite Rule (可选)\n\n需要自动修复时添加 `fix`：\n\n```yaml\nid: no-console-log\nlanguage: JavaScript\nseverity: warning\nmessage: Replace console.log with logger\nrule:\n  pattern: console.log($$$ARGS)\nfix: logger.log($$$ARGS)\n```\n\n应用修复：\n\n```bash\nast-grep scan -r rules\u002Fno-console-log.yml --update-all src\u002F\n```\n\n### 开发流程\n\n```\n- [ ] 1. 用 CLI 探索 pattern: ast-grep -p 'pattern' src\u002F\n- [ ] 2. 创建规则文件 (.yml)\n- [ ] 3. 验证: ast-grep scan -r rule.yml src\u002F\n- [ ] 4. 如有误报 → 添加 constraints → 重新验证\n```\n\n调试 AST 结构：\n\n```bash\nast-grep -p 'console.log($ARG)' --debug-query ast\n```\n\n## Essential Syntax\n\n| Element | Syntax | Example |\n|---------|--------|---------|\n| Single node | `$VAR` | `console.log($MSG)` |\n| Multiple nodes | `$$$ARGS` | `fn($$$ARGS)` |\n| Same content | Use same name | `$A == $A` |\n| Non-capturing | `$_VAR` | `$_FN($_FN)` |\n\n## Core Rules Quick Reference\n\n| Type | Purpose | Example |\n|------|---------|---------|\n| `pattern` | Match code structure | `pattern: if ($COND) {}` |\n| `kind` | Match AST node type | `kind: function_declaration` |\n| `all` | Match ALL conditions | `all: [pattern: X, kind: Y]` |\n| `any` | Match ANY condition | `any: [pattern: var $A, pattern: let $A]` |\n| `not` | Exclude matches | `not: {pattern: safe_call()}` |\n| `has` | Must have child | `has: {kind: return_statement}` |\n| `inside` | Must be in ancestor | `inside: {kind: class_body}` |\n\n## Detailed References\n\n**Complete syntax guide**: See [references\u002Frule-syntax.md](references\u002Frule-syntax.md)\n- Atomic rules (pattern, kind, regex, nthChild, range)\n- Composite rules (all, any, not, matches)\n- Relational rules (has, inside, follows, precedes)\n- Transform and fixConfig\n\n**Language-specific patterns**: See [references\u002Fcommon-patterns.md](references\u002Fcommon-patterns.md)\n- JavaScript\u002FTypeScript examples\n- Python examples\n- Go and Rust examples\n\n## Supported Languages\n\nBash, C, Cpp, CSharp, Css, Elixir, Go, Haskell, Hcl, Html, Java, JavaScript, Json, Kotlin, Lua, Nix, Php, Python, Ruby, Rust, Scala, Solidity, Swift, Tsx, TypeScript, Yaml\n",{"name":5,"description":7},"main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Faiskillstore\u002Fmarketplace\u002Fhylarucoder\u002Fast-grep-rule-crafter",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":8,"skillName":5,"commands":59,"prompt":69,"zipAvailable":70},[60,63,66],{"tool":61,"command":62},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill ast-grep-rule-crafter",{"tool":64,"command":65},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill ast-grep-rule-crafter",{"tool":67,"command":68},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill ast-grep-rule-crafter","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fhylarucoder\u002Fast-grep-rule-crafter\u002FSKILL.md",true,[72,78,82],{"path":73,"resourceType":74,"resourceTypeDesc":75,"sizeBytes":76,"sourceHtmlUrl":77},"references\u002Fcommon-patterns.md","REFERENCE","参考文档",2251,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fhylarucoder\u002Fast-grep-rule-crafter\u002Freferences\u002Fcommon-patterns.md",{"path":79,"resourceType":74,"resourceTypeDesc":75,"sizeBytes":80,"sourceHtmlUrl":81},"references\u002Frule-syntax.md",4013,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fhylarucoder\u002Fast-grep-rule-crafter\u002Freferences\u002Frule-syntax.md",{"path":83,"resourceType":74,"resourceTypeDesc":75,"sizeBytes":84,"sourceHtmlUrl":85},"skill-report.json",8983,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fhylarucoder\u002Fast-grep-rule-crafter\u002Fskill-report.json",[87,101,111,120,126,133],{"skillNo":88,"name":89,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":97,"publishedAt":44},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[92],{"categoryNo":93,"categoryName":94,"taxonomyType":95,"taxonomyTypeDesc":96},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[98,99,100],"model","model hierarchy","model hierarchy skill",{"skillNo":102,"name":103,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":107,"publishedAt":44},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[106],{"categoryNo":93,"categoryName":94,"taxonomyType":95,"taxonomyTypeDesc":96},[108,109,110],"MCP","zoom","zoom mcp",{"skillNo":112,"name":113,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":114,"categories":115,"keywords":116,"publishedAt":44},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[117,118,119,109],"sdk","zoom apps sdk","apps",{"skillNo":121,"name":122,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":123,"categories":124,"keywords":125,"publishedAt":44},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[122],{"skillNo":127,"name":128,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":129,"categories":130,"keywords":132,"publishedAt":44},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[131],{"categoryNo":93,"categoryName":94,"taxonomyType":95,"taxonomyTypeDesc":96},[128],{"skillNo":134,"name":135,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":136,"categories":137,"keywords":138,"publishedAt":44},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[135]]