Borrowing it
Nothing to install: this file belongs to swarm-ai-research/swarm. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/swarm-ai-research/swarm/main/.claude/commands/rename_symbol.mdgit clone --depth 1 https://github.com/swarm-ai-research/swarmWrote 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.
[](https://agentmods.dev/commands/swarm-ai-research/swarm/rename_symbol)<a href="https://agentmods.dev/commands/swarm-ai-research/swarm/rename_symbol"><img src="https://agentmods.dev/badge/commands/swarm-ai-research/swarm/rename_symbol/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.
<a href="https://agentmods.dev/commands/swarm-ai-research/swarm/rename_symbol"><img src="https://agentmods.dev/badge/commands/swarm-ai-research/swarm/rename_symbol.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.00878 |
| Opus 5 | $0.00000 | $0.00439 |
| Sonnet 5 | $0.00000 | $0.00176 |
| Haiku 4.5 | $0.00000 | $0.00088 |
Grade A, and why
rename_symbol 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 11d 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.
How it starts
The opening of the file, as written. The whole thing — 80 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/rename_symbol
Rename a Python symbol (class, function, variable, constant) across the entire codebase in one shot. Handles imports, type annotations, string references, docstrings, tests, and documentation.
Usage
/rename_symbol <old_name> <new_name> [--scope <path>]
Examples:
/rename_symbol TestableClaim VerifiableClaim/rename_symbol compute_v_hat compute_proxy_score --scope swarm/core/
Behavior
Phase 1: Discovery
- Run
grep -r <old_name>acrossswarm/,tests/,examples/,scripts/,docs/, and project root files (*.md,*.yaml). - Exclude
__pycache__,.git,node_modules,runs/,logs/,.eggs/. - If
--scopeis given, restrict search to that path (but always also checktests/and__init__.pyre-exports). - Present a summary table:
Symbol Rename: OldName → NewName
──────────────────────────────────
swarm/core/foo.py 3 occurrences
swarm/core/__init__.py 2 occurrences (re-export)
tests/test_foo.py 8 occurrences
CLAUDE.md 1 occurrence
──────────────────────────────────
Total: 14 occurrences in 4 files
Phase 2: Apply
For each file with occurrences:
- Read the file.
- Apply
replace_allfor<old_name>→<new_name>. - Important: also rename test classes that embed the old name (e.g.,
TestTestableClaim→TestVerifiableClaim). - Important: update string literals like
"OldName"in__all__lists,from_dictreturn annotations, and YAML references.
Apply edits file-by-file (not in parallel) to avoid the "file not read" error.
Phase 3: Verify
- Run
grep <old_name>again to confirm zero remaining occurrences. - Run
ruff checkon all modified Python files. - Run
python -m pytest <affected_test_files> -x -q --tb=shortto verify nothing broke. - If any test fails, report the failure and stop — do not attempt auto-fix.
Phase 4: Report
Rename Complete: OldName → NewName
──────────────────────────────────
Files modified: 4
Occurrences: 14
Remaining: 0
Lint: clean
Tests: 32 passed
──────────────────────────────────
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.
- 11d ago First seen · 80 lines · 0 tokens per session scan A 600e964084bb
rename_symbol is a command published in the GitHub repository swarm-ai-research/swarm (42 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 878 tokens. 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-08-30.
Other commands, from other repositories
notebook-review
Comprehensive review of Jupyter notebooks and Python scripts.
python-review
Comprehensive Python code review for PEP 8 compliance, type hints, security, and Pythonic idioms. Invokes the python-reviewer agent.
review-uv-script
Review uv Python script for PEP 723 compliance and best practices.
review-react-code
A command that reviews React and TypeScript code, including how components are organised, how Hooks are used, how state is handled, and how the code performs.
py-structure
Analyze and recommend project structure improvements. Checks file sizes, layer organization, module splitting, and hexagonal architecture compliance.
python-review
A Python code review command that checks changed Python files for style, type, security, and common coding problems.