Install command
Provided
Intelligent code refactoring command that analyzes code structure and applies best practices for improved maintainability and performance
Open the source and read safety notes before installing.
Source-backed facts for citing this resource, derived directly from the registry — also available as plain text for AI assistants.
Decision playbook
Signals are present but mixed. Use the checklist below to confirm the source and operational safety for your environment.
0
78
—
No baseline selected
No major trust-signal divergence detected in the current selection.
Confirm ownership and provenance before trusting install instructions.
Source link availableRequired
Open the canonical repository and verify ownership.
Source provenance statusRequired
Marked as source-backed.
Metadata reviewed
Registry metadata indicates a reviewed listing.
Validate risk disclosures before installation or API wiring.
Safety notes presentRequired
Review the listed safety guidance before running commands.
Privacy notes presentRequired
Review data handling notes before connecting accounts or secrets.
Trust level risk gateRequired
Trust level does not block evaluation.
Check package metadata and artifact integrity signals.
Install payload available
Install or copy payload is available for review.
Package verification flag
No package verification flag provided.
Checksum metadata
No checksum provided for downloaded artifact.
Use compare context to validate trade-offs before adoption.
Compare tray has multiple entries
Add at least one more entry to compare trust differences.
Baseline comparison available
No baseline peer selected yet.
Diverging trust signals identified
No major trust-signal divergence found.
Setup at a glance
Copy-ready — paste the snippet to get started.
Install command
Provided
Config snippet
Not provided
Copy snippet
Provided
Prerequisites
None
Platforms
1 listed
Difficulty
100/100
Adoption plan
Current risk score 16/100. Use staged verification before broader rollout.
Validate source and review signals before any execution.
Confirm source provenanceRequired
Source URL/provenance metadata is present.
Confirm metadata review state
Listing has review metadata.
Verify install payload
Install/config payload exists and can be inspected.
Confirm safety, privacy, and package integrity signals.
Review safety notesRequired
Safety notes are present.
Review privacy notesRequired
Privacy notes are present.
Verify package integrity metadata
No package verification/checksum metadata.
Adopt in controlled steps based on the selected plan.
Run in isolated sandbox firstRequired
Use a constrained sandbox and observe behavior across multiple tasks.
Roll out graduallyRequired
Roll out to a small cohort before wider usage.
Set monitoring and fallback
Define rollback path and monitor errors after adoption.
Evidence readiness
Required evidence gates are covered (5/6 signals complete).
Source repository/provenance is listed.
Required in this preset
Review metadata is present.
Required in this preset
Safety notes are present.
Required in this preset
Privacy notes are present.
Optional in this preset
Package integrity metadata is missing.
Optional in this preset
Install payload is available.
Required in this preset
Required evidence gates are covered for this preset.
Decision timeline
5/6 steps complete with no blocking gaps for this preset.
triage
Source/provenance metadata is available.
triage
Review metadata is available.
verify
Safety notes are available.
verify
Privacy notes are available.
verify
Package integrity metadata is missing.
rollout
Install payload is available.
No required blockers for this timeline preset.
Safety & privacy surface
2 safety and 2 privacy notes across 4 risk areas. Review closely: credentials & tokens, permissions & scopes, third-party handling.
/refactor [options] <file_or_selection>The /refactor command provides intelligent code refactoring capabilities with multiple strategies and safety checks.
/refactor [options] <file_or_selection>
--extract-function - Extract repeated code into functions--extract-variable - Extract complex expressions into variables--extract-constant - Move magic numbers/strings to constants--inline - Inline simple functions/variables--rename - Rename variables/functions for clarity--simplify - Simplify complex conditional logic--modernize - Update to modern language features--performance - Apply performance optimizations--dry-run - Show proposed changes without applying--interactive - Prompt for each change--backup - Create backup before refactoring--test-first - Run tests before and after changes--javascript - Apply JS/TS specific refactoring--python - Apply Python-specific refactoring--java - Apply Java-specific refactoring--csharp - Apply C#-specific refactoring// Before
function processUsers(users) {
for (let user of users) {
if (user.email && user.email.includes("@")) {
user.isValid = true;
user.domain = user.email.split("@")[1];
} else {
user.isValid = false;
user.domain = null;
}
}
}
// After refactoring with --extract-function
function validateEmail(email) {
return email && email.includes("@");
}
function extractDomain(email) {
return email.split("@")[1];
}
function processUsers(users) {
for (let user of users) {
if (validateEmail(user.email)) {
user.isValid = true;
user.domain = extractDomain(user.email);
} else {
user.isValid = false;
user.domain = null;
}
}
}
# Before
def calculate_discount(price, customer_type):
if customer_type == "premium":
return price * 0.2
elif customer_type == "regular":
return price * 0.1
else:
return 0
# After refactoring with --extract-constant
PREMIUM_DISCOUNT_RATE = 0.2
REGULAR_DISCOUNT_RATE = 0.1
PREMIUM_CUSTOMER_TYPE = "premium"
REGULAR_CUSTOMER_TYPE = "regular"
def calculate_discount(price, customer_type):
if customer_type == PREMIUM_CUSTOMER_TYPE:
return price * PREMIUM_DISCOUNT_RATE
elif customer_type == REGULAR_CUSTOMER_TYPE:
return price * REGULAR_DISCOUNT_RATE
else:
return 0
// Before (ES5 style)
function getUserNames(users) {
var names = [];
for (var i = 0; i < users.length; i++) {
if (users[i].active) {
names.push(users[i].name);
}
}
return names;
}
// After refactoring with --modernize
function getUserNames(users) {
return users.filter((user) => user.active).map((user) => user.name);
}
Create a .refactor.json file in your project root:
{
"rules": {
"maxFunctionLength": 20,
"maxParameterCount": 4,
"enforceConstantExtraction": true,
"modernizeFeatures": true
},
"exclude": ["node_modules/**", "dist/**", "*.test.js"],
"backup": {
"enabled": true,
"directory": ".refactor-backups"
}
}
/refactor - Code Refactoring Command for Claude side by side with 3 alternatives on trust, install, platform support, and disclosed safety notes — all from reviewed registry metadata.
| Field | Intelligent code refactoring command that analyzes code structure and applies best practices for improved maintainability and performance Open dossier | Custom slash command for behavior-preserving, scoped refactors of one file, function, or selection — stays inside a narrow ownership boundary for a reviewable, PR-sized change instead of a repo-wide pass Open dossier | Deploy 100 specialized sub-agents for comprehensive enterprise-grade security, performance, and optimization audit of production codebase Open dossier | Advanced performance optimization with bottleneck analysis, memory profiling, and automated improvements Open dossier |
|---|---|---|---|---|
| Next steps | ||||
| Trust | ||||
| Review status | ReviewedMaintainer reviewed | ReviewedMaintainer reviewed | ReviewedMaintainer reviewed | ReviewedMaintainer reviewed |
| Package trust | Package not verified | Package not verified | Package not verified | Package not verified |
| Source provenance | Source-backed | Source-backed | Source-backed | Source-backed |
| Submitter | — | — | — | — |
| Install risk | Review first | Review first | Review first | Review first |
| Notes | Safety ✓ Privacy ✓ | Safety ✓ Privacy ✓ | Safety ✓ Privacy ✓ | Safety ✓ Privacy ✓ |
| Brand | — | — | — | — |
| Category | commands | commands | commands | commands |
| Source | source-backed | source-backed | source-backed | source-backed |
| Author | JSONbored | JSONbored | JSONbored | JSONbored |
| Added | 2025-09-16 | 2025-09-16 | 2025-10-25 | 2025-09-16 |
| Platforms | Claude Code | Claude Code | Claude Code | Claude Code |
| Source repo | — | — | — | — |
| Safety notes | ✓Review generated changes and commands before applying them; slash commands can ask the agent to read, write, edit, or run tools in the current project. Limit scope to the intended files and run in a trusted checkout when the command analyzes code, tests, security findings, or generated output. | ✓This command edits source files in your working directory. Review the proposed diff before accepting, and keep your work committed or backed up so changes are easy to revert. It is scoped on purpose — it should not perform repository-wide rewrites. Run your tests after applying to confirm behavior is unchanged. | ✓Review generated changes and commands before applying them; slash commands can ask the agent to read, write, edit, or run tools in the current project. Limit scope to the intended files and run in a trusted checkout when the command analyzes code, tests, security findings, or generated output. | ✓Review generated changes and commands before applying them; slash commands can ask the agent to read, write, edit, or run tools in the current project. Limit scope to the intended files and run in a trusted checkout when the command analyzes code, tests, security findings, or generated output. |
| Privacy notes | ✓Prompts, source files, logs, errors, dependency metadata, and generated reports may be sent to the configured AI model during command execution. Redact secrets, customer data, private repository details, and proprietary code before sharing command output outside the workspace. | ✓The command reads the local source you point it at so Claude can refactor it within your session. It does not send your code to any third-party service beyond the model you are already using. | ✓Prompts, source files, logs, errors, dependency metadata, and generated reports may be sent to the configured AI model during command execution. Redact secrets, customer data, private repository details, and proprietary code before sharing command output outside the workspace. | ✓Prompts, source files, logs, errors, dependency metadata, and generated reports may be sent to the configured AI model during command execution. Redact secrets, customer data, private repository details, and proprietary code before sharing command output outside the workspace. |
| Prerequisites | — none listed | — none listed | — none listed | — none listed |
| Install | | | | |
| Config | — | — | — | — |
| Citations | ||||
| Claim | Unclaimed | Unclaimed | Unclaimed | Unclaimed |
Source-backed guides for putting this to work.
Use Claude Code checkpoints to rewind code and conversation with /rewind before risky refactors, and know what they do not track.
Loading live community signals…
A short, calm digest of reviewed Claude resources. Unsubscribe any time.