askill
codemod

codemodSafety 75Repository

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, code transformation, or automated migration.

43 stars
1.2k downloads
Updated 2/19/2026

Package Files

Loading files...
SKILL.md

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:

  • Writing new codemods with JSSG or ast-grep
  • Designing workflow configurations for migrations
  • Debugging pattern matching or AST traversal issues
  • Reviewing codemod code for performance and safety
  • Setting up test fixtures for transform validation

Rule Categories by Priority

PriorityCategoryImpactPrefix
1AST UnderstandingCRITICALast-
2Pattern EfficiencyCRITICALpattern-
3Parsing StrategyCRITICALparse-
4Node TraversalHIGHtraverse-
5Semantic AnalysisHIGHsemantic-
6Edit OperationsMEDIUM-HIGHedit-
7Workflow DesignMEDIUM-HIGHworkflow-
8Testing StrategyMEDIUMtest-
9State ManagementMEDIUMstate-
10Security and CapabilitiesLOW-MEDIUMsecurity-
11Package StructureLOWpkg-

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.

Install

Download ZIP
Requires askill CLI v1.0+

AI Quality Score

62/100Analyzed 2/23/2026

Comprehensive reference guide structure for codemod best practices with 48 rules across 11 priority-ranked categories. Well-organized with clear tables and 'When to Apply' section. However, the actual content is largely skeletal - most rules are just link references to external files without real implementation details, code examples, or executable commands. The .experimental folder path and path depth of 4 suggest internal-only usage. Could be valuable if the reference files were populated with actual content."

75
85
60
50
55

Metadata

Licenseunknown
Version-
Updated2/19/2026
Publisherpproenca

Tags

github-actionssecuritytesting