codemod

codemod is a skill for Claude Code, Codex from pproenca/dot-skills. It costs 81 tokens per session (1,872 once invoked), scanned A, original, MIT.

A guide to building codemods, which are programs that automatically transform source code, using tools such as JSSG and ast-grep. It covers matching code patterns, parsing, editing, testing, and safe execution.

In plain words
What is it for?
Use it when writing, reviewing, or debugging automated refactoring tools, AST transformations, workflows, or their test fixtures.
Why use it?
It helps avoid transformations that miss cases, change the wrong code, or are difficult to test and maintain.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions AGENTS.md.

Good fit Use it when writing, reviewing, or debugging automated refactoring tools, AST transformations, workflows, or their test fixtures.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pproenca/dot-skills/codemod
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add pproenca/dot-skills --skill codemod
Clone the repo
git clone --depth 1 https://github.com/pproenca/dot-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for codemod

README.md
[![agentmods](https://agentmods.dev/badge/skills/pproenca/dot-skills/codemod/github.svg)](https://agentmods.dev/skills/pproenca/dot-skills/codemod)
Your own site
<a href="https://agentmods.dev/skills/pproenca/dot-skills/codemod"><img src="https://agentmods.dev/badge/skills/pproenca/dot-skills/codemod/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for codemod

Your own site · 80×15
<a href="https://agentmods.dev/skills/pproenca/dot-skills/codemod"><img src="https://agentmods.dev/badge/skills/pproenca/dot-skills/codemod.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 81 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,872 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00081 $0.01872
Opus 5.5 $0.00032 $0.00749
Sonnet 5.5 $0.00016 $0.00374
Haiku 4.5 $0.00008 $0.00187

Measured 2mo ago against content hash 40ec28d16cc6, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

codemod scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/.experimental/codemod/SKILL.md · 128 lines

How it starts

The opening of the file, as written. The whole thing — 128 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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

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)

Read the full file on GitHub · 128 lines

Files

What ships with it

53 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 128 lines · 81 tokens per session scan A 40ec28d16cc6

Subscribe to this mod's changes

codemod is a skill published in the GitHub repository pproenca/dot-skills (231 stars, last pushed 3mo ago), licensed MIT. It adds 81 tokens to every session and 1,872 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

codemod compared with skills from other repositories

codemod next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
codemodpproenca/dot-skillsSkill2313mo agoMITA81Claude Code, Codex
systematic-debuggingopen-metadata/OpenMetadataSkill16ktodayApache-2.0A37Claude Code
log-error-digestzebbern/claude-code-guideSkill4.7ktodayMITA71Claude Code, Codex
observability-audit-sessionsIBM/mcp-context-forgeSkill4.9kyesterdayApache-2.0A64Claude Code, Codex
cwv-optimizeradobe/skillsSkill342todayApache-2.0A112Claude Code
ci-fixersipyourdrink-ltd/bernsteinSkill1.2ktodayApache-2.0A15Claude Code, Codex
diagnosing-missing-recordingsPostHog/posthogSkill41ktodaynoneA76Claude Code, Codex