← ClaudeAtlas

rename-refslisted

Atomic rename of Python symbols (functions, classes, methods) or modules using the structural index. Finds all static callers, import sites, __all__ re-exports, and Sphinx docstring cross-refs (:func:, :class:, :meth:, :mod:, :attr:). Optional: keep old name as deprecated alias via pydeprecate (--deprecate) or hard-delete when zero callers (--remove-if-no-callers). TRIGGER when: user asks to rename a Python function, class, method, or module; phrases: "rename X to Y", "rename function", "rename class", "rename module", "move module X to Y", "refactor symbol X into Y", "update all references to X". SKIP: non-Python project; codemap index not built (run /codemap:scan-codebase first); renaming a local variable (not a symbol definition or module path); user explicitly wants grep-only rename without index verification; user performing rename via IDE/LSP and only wants advisory coverage (use --dry-run).
Borda/AI-Rig · ★ 19 · AI & Automation · score 77
Install: claude install-skill Borda/AI-Rig
<objective> Rename Python symbol or module atomically. Coverage: - Definition site (def/class line) - `__all__` re-exports in `__init__.py` files - Import call sites across all callers (located via fn-rdeps + symbol line-range narrowing) - Sphinx docstring cross-refs across `.py` and `.rst` - Optional `@deprecated` alias for old name (pydeprecate with `warnings.warn` fallback) - Optional hard-delete when exhaustive=true and zero callers **Subcommands**: - `symbol <old_qname> <new_qname>` — function, class, or method. qname = bare name (`MyClass`), qualified (`MyClass.method`), or full (`mypackage.auth::validate_token`) - `module <old_module_path> <new_module_path>` — dotted path (`mypackage.old_name`). Renames file + all import lines. **Flags**: - `--dry-run` — print all sites that would change; no edits - `--deprecate` — symbol only: keep old name as `@deprecated` wrapper pointing to new name - `--since <ver>` / `--removed-in <ver>` — passed to deprecation decorator; optional, defaults to `"?"` - `--remove-if-no-callers` — symbol only: delete definition when exhaustive=true + zero callers; requires explicit confirmation **Hard limits** (static analysis boundary — not fixable): - `getattr(obj, "old_name")` — string not statically bound to symbol; Step 6 emits grep advisory - Cross-repo callers — out of scope by definition; use `--deprecate` + semver bump for public APIs NOT for: building index (`/codemap:scan-codebase`); querying without rename intent (`/codemap:query-co