browser-automation
Browser automation for rendered UI exploration, validation, screenshots,
Batch behavior-preserving refactors for multi-file, repeated-pattern,
$ npx -y skills add alexei-led/cc-thingz --skill refactoring-code --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/refactoring-codeContext preview
The summary Claude sees to decide when to auto-load this skill.
Batch behavior-preserving refactors for multi-file, repeated-pattern,
description: Batch behavior-preserving refactors for multi-file, repeated-pattern, large-file, rename, move, extract, split, or restructure work. Use for "refactor across files", "batch rename", "update pattern everywhere", large files (500+ lines), or 5+ coordinated edits in one file. NOT for single targeted edits, behavior changes or bug fixes (use fixing-code), test-only refactors (use improving-tests), code review (use reviewing-code), or architecture redesign (use architecture-design/review). name: refactoring-code
Use this when many edits must preserve externally observable behavior. Stop if you cannot name the maintenance value and the behavior that must stay unchanged.
Detect capability from tools:
Do not use this for:
Load the matching reference for the language being refactored:
Unsupported language: use the general workflow in this file only.
Before editing:
1. Define goal, non-goals, preservation target, and safety gate. 2. Map every affected site with text search and language-aware tools. 3. For renames, moves, extracts, splits, or broad restructures, use graph tools when available:
4. Treat stale graph indexes as no evidence. Refresh if allowed; otherwise fall back to search/LSP and report the gap. 5. Check non-code references when names or paths change: config, routes, DI wiring, serialization keys, CLI entries, generated sources, scripts, and docs. 6. Read representative implementation files and tests. 7. Add characterization tests at the public boundary when behavior is under-specified and risk is not low.
No mapped site, no edit.
Good batches are small, reversible, and single-purpose:
Rules:
Engineer:
REFACTOR COMPLETE ================= Preservation target: <behavior that must not change> Safety gate: <tests/checks used> Files changed: N Status: CLEAN | NEEDS ATTENTION Mapping: - <tool/search> — <key affected sites or graph gap> Changes: - path:line — change Verification: - <command> — pass/fail
Reviewer:
## Proposed Changes Preservation target: <behavior that must not change> Safety gate: <tests/checks the applier should run> Mapping: - <tool/search> — <affected sites or graph gap> ### Change 1: <brief description> File: `path/to/file` Action: CREATE | MODIFY | DELETE Code: <changed regions with enough context to locate them> Rationale: <why this preserves behavior while improving structure>
For multi-file renames, list every mapped occurrence or explicitly mark ambiguous/unmapped references.
Portable skills, agents, hooks, and Pi-native extensions for Claude Code, Codex CLI, GitHub Copilot, Cursor, Grok, and Pi. Gemini is retired.
Repo: alexei-led/cc-thingz
Browser automation for rendered UI exploration, validation, screenshots,
Support-only Playwright runtime/reference for browser-automation — dev-server
Create normal git commits with logical grouping. Use when committing,
Create or update human-facing docs, agent-facing instructions, architecture
Fix code defects with a reproducible feedback loop, root-cause diagnosis,
Improve test design, speed, and coverage with behavior-focused tests,