ESLint Custom Rule Builder by agentskillexchange/skills
npx skills add https://github.com/agentskillexchange/skills --skill 'ESLint Custom Rule Builder'使用 RuleTester API 和 AST Explorer 模式来搭建和测试自定义 ESLint 规则。生成包含可自动修复实现的规则文档。
ESLint 自定义规则构建器技能能够根据代码模式的自然语言描述,生成可用于生产环境的自定义 ESLint 规则。它使用 ESLint RuleTester API 进行全面的测试生成,并使用 espree 解析器来定位 AST 节点。
该构建器使用与 AST Explorer 兼容的选择器来分析目标代码模式,以识别所需的确切节点类型和遍历路径。它生成包含适当元对象的规则实现,这些元对象包括类型、文档、可修复属性以及规则选项的模式定义。自动修复实现使用修复器 API,包含 insertTextBefore、replaceText 和 remove 操作。
测试套件包含有效和无效的代码示例,以及预期的错误消息和修复输出验证。该技能处理复杂的模式,包括通过 eslint-scope 进行的作用域分析、使用 typescript-eslint 解析器服务的类型感知规则,以及通过共享设置进行的跨文件分析。文档生成会生成符合 eslint-plugin-* 文档约定的 Markdown 文件,包含示例、选项表格和相关规则部分。
npx skills add agentskillexchange/skills --skill eslint-custom-rule-builder
npx skills add agentskillexchange/skills --skill eslint-custom-rule-builder -a claude-code
npx skills add agentskillexchange/skills --skill eslint-custom-rule-builder -a cursor
npx skills add agentskillexchange/skills --skill eslint-custom-rule-builder -a codex
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
clawhub install eslint-custom-rule-builder
每周安装次数
–
代码仓库
GitHub 星标数
1
首次出现时间
–
安全审计
Scaffolds and tests custom ESLint rules using the RuleTester API and AST Explorer patterns. Generates rule documentation with fixable autofix implementations.
The ESLint Custom Rule Builder skill generates production-ready custom ESLint rules from natural language descriptions of code patterns to detect or enforce. It uses the ESLint RuleTester API for comprehensive test generation and the espree parser for AST node targeting.
The builder analyzes target code patterns using AST Explorer-compatible selectors to identify the precise node types and traversal paths needed. It generates rule implementations with proper meta objects including type, docs, fixable properties, and schema definitions for rule options. Autofix implementations use the fixer API with insertTextBefore, replaceText, and remove operations.
Test suites include valid and invalid code samples with expected error messages and fix output verification. The skill handles complex patterns including scope analysis via eslint-scope, type-aware rules using typescript-eslint parser services, and cross-file analysis through shared settings. Documentation generation produces markdown files matching the eslint-plugin-* documentation conventions with examples, options tables, and related rules sections.
npx skills add agentskillexchange/skills --skill eslint-custom-rule-builder
npx skills add agentskillexchange/skills --skill eslint-custom-rule-builder -a claude-code
npx skills add agentskillexchange/skills --skill eslint-custom-rule-builder -a cursor
npx skills add agentskillexchange/skills --skill eslint-custom-rule-builder -a codex
clawhub install eslint-custom-rule-builder
Weekly Installs
–
Repository
GitHub Stars
1
First Seen
–
Security Audits
Skills CLI 使用指南:AI Agent 技能包管理器安装与管理教程
29,800 周安装