@tank/ast-linter-codemod

Create custom ESLint rules with auto-fix and codemods for API migrations.

1|1|Updated Feb 20, 2026
One-click install
npx skills add https://github.com/tankpkg/skills --skill tank-ast-linter-codemod
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: @tank/ast-linter-codemod
Source: https://github.com/tankpkg/skills/tree/main/skills/ast-linter-codemod
Command: npx skills add https://github.com/tankpkg/skills --skill tank-ast-linter-codemod

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill empowers developers to build sophisticated code analysis and transformation tools, automating code quality checks, migrations, and large-scale refactoring.

Core Features & Use Cases

  • Custom Linters: Create ESLint rules with auto-fix capabilities.
  • Codemods: Write scripts to automatically migrate APIs or refactor codebases using tools like ts-morph and jscodeshift.
  • Code Transforms: Perform large-scale code changes across projects.
  • Use Case: Automatically update all usages of a deprecated function across your entire codebase, ensuring consistency and saving significant developer time.

Quick Start

Use the ast-linter-codemod skill to write a custom ESLint rule that automatically fixes unused variables.

Frequently Asked Questions about @tank/ast-linter-codemod

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write a custom ESLint rule with auto-fix for unused variables?

Writing a custom ESLint rule with auto-fix involves using the Visitor pattern to traverse the AST and the Fixer API to generate replacements. This Skill guides you through defining rule logic, identifying target nodes, and outputting automated code fixes.

What is the best way to automate API migrations across a large codebase?

Automating API migrations across a large codebase is best achieved using codemods with jscodeshift or ts-morph. This Skill enables you to build AST transformation scripts that programmatically locate deprecated API patterns and replace them.

Can I use ast-grep to write YAML rules for large-scale code transforms?

Yes, you can use ast-grep to write YAML rules for large-scale code transforms. This Skill covers YAML rule authoring to define structural search and replace patterns, enabling code transformations without writing complex imperative scripts.

Does ts-morph work well for TypeScript code analysis and refactoring?

ts-morph works well for TypeScript code analysis and refactoring by providing a typed AST manipulation API. This Skill utilizes ts-morph to perform structural code analysis, navigate syntax trees, and execute large-scale refactoring transformations.

How do I test codemods and custom linters before applying them?

Testing codemods and custom linters requires validating AST transformations against fixture files using established testing strategies. This Skill covers testing methodologies to ensure your code transforms and auto-fixes produce expected outputs without regressions.