Codemod

From pproenca/dot-skills · View interactive version

Codemod is an AI agent skill from the GitHub repository pproenca/dot-skills. Codemod (JSSG, ast-grep, workflows) best practices for writing efficient, safe, and maintainable code transformations. This skill should be used when writing, reviewing, or debugging codemods, AST transformations, or automated refactoring tools. Triggers on tasks involving codemod, ast-grep, JSSG, c

How to use this skill

Skill file

Codemod Best Practices

Comprehensive best practices guide for Codemod (JSSG, ast-grep, workflows), designed for AI agents and LLMs. Contains 48 rules across 11 categories, prioritized by impact to guide automated refactoring and code generation.

When to Apply

Reference these guidelines when:

Rule Categories by Priority

| Priority | Category | Impact | Prefix |

|----------|----------|--------|--------|

| 1 | AST Understanding | CRITICAL | ast- |

| 2 | Pattern Efficiency | CRITICAL | pattern- |

| 3 | Parsing Strategy | CRITICAL | parse- |

| 4 | Node Traversal | HIGH | traverse- |

| 5 | Semantic Analysis | HIGH | semantic- |

| 6 | Edit Operations | MEDIUM-HIGH | edit- |

| 7 | Workflow Design | MEDIUM-HIGH | workflow- |

| 8 | Testing Strategy | MEDIUM | test- |

| 9 | State Management | MEDIUM | state- |

| 10 | Security and Capabilities | LOW-MEDIUM | security- |

| 11 | Package Structure | LOW | pkg- |

Quick Reference

1. AST Understanding (CRITICAL)

2. Pattern Efficiency (CRITICAL)

3. Parsing Strategy (CRITICAL)

4. Node Traversal (HIGH)

5. Semantic Analysis (HIGH)

6. Edit Operations (MEDIUM-HIGH)

7. Workflow Design (MEDIUM-HIGH)

8. Testing Strategy (MEDIUM)

9. State Management (MEDIUM)

10. Security and Capabilities (LOW-MEDIUM)

11. Package Structure (LOW)

How to Use

Read individual reference files for detailed explanations and code examples:

Full Compiled Document

For a complete guide with all rules expanded, see AGENTS.md.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.