Code Refactor Pack
★Trusted◇Sandbox optionalv1.0.0MIT✔Verified80by AgentNode · published 5 months ago · toolpack
Refactor code to improve readability, performance, and maintainability.
Apply DRY principles, extract functions, improve naming, simplify conditionals, and remove dead code. Supports Python, JavaScript, TypeScript, and Go.
Quick Start
agentnode install code-refactor-packRuns in a subprocess with filtered environment by default. Declared permissions are policy-checked, not sandboxed.
Usage
From packagefrom code_refactor_pack.tool import run
result = run(
capability="refactor_code",
params={
"path": "./src/services/order_processor.py",
"refactors": [
{
"type": "extract_function",
"source_lines": [45, 78],
"new_function_name": "validate_order_items"
},
{
"type": "simplify_conditionals",
"scope": "function:process_order"
}
]
}
)
print(f"Refactors applied: {result['refactors_applied']}")
print(f"Lines changed: {result['lines_changed']}")
for change in result["changes"]:
print(f" {change['type']}: {change['description']}")Runs locally on your machine. No execution data is sent to AgentNode. Permissions are checked before execution. Learn how this works
Verification
Package installs and imports correctly. runtime checks passed.
This package was executed and validated by AgentNode before listing. Install, import, and runtime checks passed.
Verified in real_auto mode
Last verified 2d ago· Runner v2.0.0
Use this when you need to...
- ›Extract long functions into smaller composable units
- ›Rename variables and functions across a codebase
- ›Convert callback-based code to async/await patterns
- ›Remove dead code and unused imports
- ›Simplify deeply nested conditional logic
README
Version History
Capabilities
Permissions
Declared by the publisher. Checked before execution by the policy gate.
Permissions are policy-checked before execution. For trusted and curated packages that run on the host, network and filesystem access are policy-checked but not OS-sandboxed. When runtime isolation is required for untrusted/community code, AgentNode uses sandbox-or-fail-closed if the required container runtime and pinned image are available. Learn more
Privacy
All tool execution happens locally on your machine. AgentNode never receives:
- • Tool inputs or outputs
- • Execution logs
- • Data your agent processes
Only install events and search queries are sent to the registry.
agentnode install code-refactor-packFiles (3)
License
MITStats
Compatibility
Frameworks
Runtime
pythonPython Version
>=3.10Trust & Security
Publisher
AgentNode
@agentnode