/act101:refactoringfrom act101
AST-aware refactoring with rename, extract function/variable, inline, move symbol, and import organize. Provides preview and undo for safe code transformations.
Ships in act101. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
The MCP refactor tools are tree-sitter based and need no LSP; each call reports
the kinds it modeled in modeled_kinds. This skill covers
rename, extract_function, extract_variable, inline, move_symbol, and
import_organize. The Refactoring group also ships insert_body (insert or replace
a function body) and recipe_run (multi-site codemod recipes, Enterprise).
rename(file="src/user.ts", old_name="getData", new_name="fetchData", preview=true)
extract_function(file="src/utils.ts", new_name="validateInput", start_line=10, start_column=1, end_line=20, end_column=50, preview=true)
extract_variable(file="src/calc.ts", new_name="basePrice", start_line=15, start_column=5, end_line=15, end_column=40, preview=true)
inline(file="src/utils.ts", symbol="tempResult", preview=true)
move_symbol(file="src/models.ts", symbol="UserService", destination="src/services/user.ts", preview=true)
import_organize(file="src/main.ts", preview=true)
preview defaults to false, so set preview=true on the first
run, especially for rename and move_symbol, which touch many files.FileChange[].preview=false.diagnostics call, passing the edited paths in files.history_undo(preview=true) to see what reverts, then history_undo().Operations that touch different symbols and files are independent and can run in one parallel batch; sequence only the operations that consume another's output.
move_symbol and the CLI operations act refactor extract-class and
act refactor extract-interface create their destination files themselves; target
the operation at the destination path and let it create the file.
history_list(limit=10)
history_undo(count=1)
history_redo(count=1)
Sequences such as extract-then-rename, move-then-organize, and decompose-god-class are in compound-sequences.md.
After a structural refactor (extract class, extract interface) the new type usually needs boilerplate. The code-generation skill covers batch generation of constructors, accessors, equals, hash, serialization, and other derived methods.
The act CLI ships 180+ named operations, registered per language across 163
grammars (generate-constructor, convert-async, wrap-try-catch, and so on).
operation-catalog.md explains how to discover the
live per-language surface from the registry.
See error-recovery.md.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub act101-ai/act101 --plugin act10126 skills in this plugin
/agent-safety-auditUse before an autonomous agent edits a sensitive or high-blast-radius file, or to judge an edit it already made. Composes secret surface, taint flow, blast radius, API width, and the repo scan into one safety verdict./architectural-refactoringUse when breaking circular dependencies, splitting god classes, reducing coupling between modules, extracting interfaces at seams, or executing any structural change identified by an architecture audit. Requires a prior architecture-audit run that produced project-map.md and a report./architecture-auditUse when asked to audit architecture, get the full structural picture of a codebase, assess overall health or porting readiness, or find module boundaries, circular dependencies, coupling hotspots, dead code, or code smells. Full hypothesis-driven audit, optionally enriched with coverage and git evidence./boundary-analysisUse when looking for extraction candidates, planning a module split, analyzing module boundaries, or asked "where should I split this?". Produces ranked extraction candidates with cut costs, layer violations, interface width, orphan types, and a decomposition sequence./change-impactUse before modifying a file or symbol, or when asked "what breaks if I change X?". Returns a blast-radius, test-coverage, and cycle-risk verdict immediately, with no follow-up investigation./code-generationGenerates boilerplate (constructors, accessors, builders, equals and hash methods, JSON serialization, toString, interface stubs, test stubs) from a type's existing fields, previewed and reversible. Use when creating any of that boilerplate from an existing class or struct, or when porting a type and its boilerplate to another language. Business logic is written by hand.Other plugins' skills for the same job