Individual skill
jscodeshift
jscodeshift codemod development best practices from Facebook/Meta. This skill should be used when writing, reviewing, or debugging jscodeshift codemods. Triggers on tasks involving AST transformation, code migration, automated refactoring, or codemod development.
skills/.experimental/jscodeshift/SKILL.md
Source commit cf93c57cac89d6fc3e4194686000411567f5caf3
What was checked
- Matches the observed repository HEAD
- Yes
- Scanner rules are current
- No
- Repository scan complete
- No
- Skill scan complete
- No
- Observed behavior
- Not checked yet
- Last checked
- Nov 5, 2026
These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.
Install this skill
Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.
An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.
Repository context
- Repository stars (not skill ratings)
- 222
- Repository last updated
- Aug 15, 2026
- License
- MIT
Observed agent integration: codex
Files and excerpt
File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.
Browse files
AGENTS.mddoc · 8,735 bytesREADME.mddoc · 4,580 bytesSKILL.mdcore · 7,127 bytesSKILL.mdcore · 7,127 bytesSKILL.mdcore · 7,127 bytesSKILL.mdcore · 7,127 bytesSKILL.mdcore · 7,127 bytesassets/templates/_template.mddoc · 1,090 bytesmetadata.jsonasset · 949 bytesreferences/_sections.mddoc · 1,697 bytesreferences/advanced-compose-transforms.mddoc · 2,384 bytesreferences/advanced-custom-collections.mddoc · 2,464 bytesreferences/advanced-multi-file-state.mddoc · 2,402 bytesreferences/advanced-scope-analysis.mddoc · 2,334 bytesreferences/codegen-preserve-style.mddoc · 1,750 bytesreferences/codegen-print-width.mddoc · 1,672 bytesreferences/codegen-template-literals.mddoc · 1,940 bytesreferences/codegen-tosource-options.mddoc · 1,851 bytesreferences/filter-computed-properties.mddoc · 1,979 bytesreferences/filter-import-binding.mddoc · 2,152 bytesreferences/filter-jsx-context.mddoc · 1,821 bytesreferences/filter-nullish-checks.mddoc · 1,876 bytesreferences/filter-path-parent-check.mddoc · 1,819 bytesreferences/parser-astexplorer-match.mddoc · 1,574 bytesreferences/parser-babel5-compat.mddoc · 1,484 bytesreferences/parser-export-declaration.mddoc · 1,355 bytesreferences/parser-flow-annotation.mddoc · 1,310 bytesreferences/parser-typescript-config.mddoc · 1,241 bytesreferences/runner-batch-processing.mddoc · 1,571 bytesreferences/runner-extensions-filter.mddoc · 1,682 bytesreferences/runner-ignore-patterns.mddoc · 1,626 bytesreferences/runner-parallel-workers.mddoc · 1,732 bytesreferences/runner-verbose-output.mddoc · 1,790 bytesreferences/test-dry-run-exploration.mddoc · 1,978 bytesreferences/test-fixture-files.mddoc · 1,867 bytesreferences/test-inline-snapshots.mddoc · 1,817 bytesreferences/test-negative-cases.mddoc · 1,964 bytesreferences/test-parse-errors.mddoc · 1,963 bytesreferences/transform-builder-api.mddoc · 1,633 bytesreferences/transform-insert-import.mddoc · 2,512 bytesreferences/transform-preserve-comments.mddoc · 1,908 bytesreferences/transform-remove-unused-imports.mddoc · 1,944 bytesreferences/transform-renameto.mddoc · 1,687 bytesreferences/transform-replacewith-callback.mddoc · 1,846 bytesreferences/traverse-avoid-repeated-find.mddoc · 1,658 bytesreferences/traverse-closest-scope.mddoc · 1,882 bytesreferences/traverse-early-return.mddoc · 1,745 bytesreferences/traverse-find-filter-pattern.mddoc · 1,645 bytesreferences/traverse-find-specific-type.mddoc · 1,366 bytesreferences/traverse-two-pass-pattern.mddoc · 1,802 bytes
Read excerpt
# Facebook/Meta jscodeshift Best Practices
Comprehensive best practices guide for jscodeshift codemod development, designed for AI agents and LLMs. Contains 40 rules across 8 categories, prioritized by impact from critical (parser configuration, AST traversal) to incremental (advanced patterns). Each rule includes detailed explanations, real-world examples, and specific impact metrics.
## When to Apply
Reference these guidelines when:
- Writing new jscodeshift codemods for code migrations
- Debugging transform failures or unexpected behavior
- Optimizing codemod performance on large codebases
- Reviewing codemod code for correctness
- Testing codemods for edge cases and regressions
## Rule Categories by Priority