AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Refactor

skill-pradnyeshp-claude-skills-refactor · by Pradnyeshp

Restructure a file, function, or module toward a stated goal (readability, decoupling, extracting logic, reducing duplication) without changing its behavior. Use when the user says "refactor this", "clean up this function", "extract this into", "decouple", "restructure", or "make this more readable".

No reviews yet
0 installs
38 views
0.0% view→install

Install

$ agentstack add skill-pradnyeshp-claude-skills-refactor

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-pradnyeshp-claude-skills-refactor)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
2mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Refactor? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Test setup (used to verify behavior is preserved)

!ls package.json pyproject.toml Cargo.toml go.mod pom.xml build.gradle Makefile 2>/dev/null

Instructions

Refactor the target named in $ARGUMENTS toward the stated goal. If the target or goal is unclear, ask which code to refactor and what outcome they want before touching anything.

Core principle

Behavior must not change. A refactor changes how code is expressed, never what it does. Public APIs, return values, and side effects stay identical unless the user explicitly asks otherwise.

Method

  1. Read first. Open the target and its call sites (use Grep). Understand the current behavior and who depends on it before changing it.
  2. Establish a safety net. Identify the tests covering this code. If none exist and the change is non-trivial, say so and offer to add characterization tests first (the test-gen skill can help).
  3. Make small, reviewable moves toward the goal: extract functions/variables, rename for clarity, remove duplication, simplify conditionals, separate concerns. Keep each change focused.
  4. Update all call sites and imports affected by the change. Don't leave the codebase in a broken intermediate state.
  5. Verify. Run the relevant tests / type-checker / linter and confirm they still pass.

Rules

  1. Preserve behavior, signatures, and side effects. Flag explicitly if a change is unavoidably behavior-altering.
  2. Don't gold-plate — make the change the goal requires, not a sweeping rewrite of unrelated code.
  3. Match the project's existing style and idioms; don't introduce new patterns or dependencies just to refactor.
  4. Work in coherent steps and explain each. If the refactor is large, outline the plan and confirm before applying.
  5. End with a summary of what moved/changed and the verification result.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.