Every premium and members-only resource for $9.99/month, as a no-commitment subscription. See the plans

PalateKit

Menu

Request a resource

Describe the resource you are missing in one sentence. We will email you when it is published.

0 / 280

Unlock PalateKit

Unlock everything

Plan

Paying means accepting our terms of sale.

Secure payment by Stripe. Receipts and invoices sent by email.

Welcome back

Sign in to install, download or save this resource. A free account is enough for free resources.

Write safe codemods (JSSG, ast-grep) v1.0.0

Use this resource to write or debug a codemod that migrates code automatically

New

  • 451 downloads
  • 239 likes
  • 222 saves

Free

Install with the CLI

In a terminal, from the folder you want:

npx --yes palatekit@latest install codemod-ast-transformation-practices

With no option, the skill goes to ~/.agents/skills/; add --agent claude-code (or codex, cursor…) to target an agent.

First time: connect the CLI with

npx --yes palatekit@latest login

The agent applies 48 rules ranked by impact: exploring the AST before writing, efficient patterns, overlapping edit ranges and transformation tests. You get a tested codemod to run across the repository in batches.

Mostly picked by

Updated November 2, 2026

Card for the “Write safe codemods (JSSG, ast-grep)” skill

Details

Generates with
Your agent's model
Licence
MIT

Similar resources

View all

What you get

  • AGENTS.md: rules by category, from AST to tests
  • references/edit-add-imports-correctly.md: adding imports; references/edit-handle-overlapping-ranges.md: overlapping ranges

Good fit for

  • An API migration touches hundreds of files
  • Your codemod adds the wrong imports or rewrites the wrong calls

Not for

    Tags

    • codemod
    • ast-grep
    • migration
    • transformation

    About

    You say

    “Write an ast-grep codemod that replaces the old fetchUser calls with getUser in this folder.”

    Card for the “Write safe codemods (JSSG, ast-grep)” skill

    Skill published by pproenca under the MIT license, delivered in its original version.

    Show more

    How to use it

    1. Install the skill in your agent's skills folder
    2. Ask your agent to write or debug a codemod that migrates code automatically
    3. Review and adjust the result

    Content preview

    Files

    • AGENTS.md10.1 KB
    • assets/templates/_template.md0.9 KB
    • LICENSE1.1 KB
    • metadata.json0.9 KB
    • NOTICE-PALATEKIT.md0.5 KB
    • README.md4.6 KB
    • references/_sections.md2.5 KB
    • references/ast-check-null-before-access.md1.8 KB
    • references/ast-explore-before-writing.md1.5 KB
    • references/ast-field-access-for-structure.md1.7 KB
    • references/ast-understand-named-vs-anonymous.md1.5 KB
    • references/ast-use-kind-for-precision.md1.5 KB
    • references/edit-add-imports-correctly.md2.2 KB
    • references/edit-batch-before-commit.md1.8 KB
    • references/edit-handle-overlapping-ranges.md2.2 KB
    • references/edit-preserve-formatting.md2.3 KB
    • references/edit-use-flatmap-for-conditional.md2.1 KB
    • references/parse-early-return-non-applicable.md2.1 KB
    • references/parse-handle-embedded-languages.md2.3 KB
    • references/parse-provide-pattern-context.md1.9 KB
    • references/parse-select-correct-parser.md1.9 KB
    • references/pattern-avoid-overly-generic.md1.5 KB
    • references/pattern-combine-with-rules.md1.8 KB
    • references/pattern-ensure-idempotency.md2 KB
    • references/pattern-use-constraints.md1.8 KB
    • references/pattern-use-meta-variables.md1.6 KB
    • references/pattern-use-relational-patterns.md1.7 KB
    • references/pkg-organize-by-convention.md1.9 KB
    • references/pkg-use-semantic-versioning.md1.7 KB
    • references/pkg-write-descriptive-metadata.md1.8 KB
    • references/security-minimize-capabilities.md1.7 KB
    • references/security-review-before-running-third-party.md1.8 KB
    • references/security-validate-external-inputs.md1.9 KB
    • references/semantic-cache-cross-file-results.md2.4 KB
    • references/semantic-check-null-results.md2.1 KB
    • references/semantic-use-file-scope-first.md2.2 KB
    • references/semantic-verify-file-ownership.md2.3 KB
    • references/state-log-progress-for-observability.md2 KB
    • references/state-make-transforms-idempotent.md1.9 KB
    • references/state-use-for-resumability.md1.8 KB
    • references/test-cover-edge-cases.md1.9 KB
    • references/test-run-on-subset-first.md1.6 KB
    • references/test-update-fixtures-intentionally.md1.7 KB
    • references/test-use-fixture-pairs.md1.7 KB
    • references/test-use-strictness-levels.md1.8 KB
    • references/traverse-cache-repeated-lookups.md1.9 KB
    • references/traverse-single-pass-collection.md2 KB
    • references/traverse-use-find-vs-findall.md1.5 KB
    • references/traverse-use-siblings-efficiently.md1.8 KB
    • references/traverse-use-stopby-for-depth.md1.8 KB
    • references/workflow-order-nodes-by-dependency.md1.8 KB
    • references/workflow-use-conditional-steps.md2.1 KB
    • references/workflow-use-manual-gates.md1.9 KB
    • references/workflow-use-matrix-for-parallelism.md2.1 KB
    • references/workflow-validate-before-run.md1.6 KB
    • SKILL.md8.1 KB

    Origin and licence

    Listed unmodified

    Author
    pproenca
    Source
    github.com/pproenca/dot-skills/tree/cf93c57cac89d6fc3e4194686000411567f5caf3/skills/.experimental/codemod
    Licence
    MIT

    Notice

    « codemod » (pproenca, MIT) livré dans sa version d'origine : fiche en français et en anglais par PalateKit.

    User reviews

    –

    No ratings yet

    Loading reviews…

    Delete your review?

    Your rating and comment will be removed from the page.