v1bh0r/precise-ledger-pro/nw-refactor

Claude Code and agent skill by v1bh0r/precise-ledger-pro

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Applies the Refactoring Priority Premise (RPP) levels L1-L6 for systematic code refactoring. Use when improving code quality through structured refactoring passes.

Install

npx vskill@latest install v1bh0r/precise-ledger-pro/nw-refactor

SKILL.md

The same SKILL.md was published earlier as majiayu000/claude-skill-registry-data/nw-refactor.

NW-REFACTOR: Systematic Code Refactoring

Wave: CROSS_WAVE Agent: Crafty (nw-software-crafter) Command: *refactor

Overview

Applies the Refactoring Priority Premise (RPP) — cascading 6-level hierarchy where lower levels complete before higher. Levels: L1 Readability|L2 Complexity|L3 Responsibilities|L4 Abstractions|L5 Design Patterns|L6 SOLID++. Each builds on previous. For complex multi-class refactorings, agent applies Mikado Method internally.

Context Files Required

  • src/\* - Production codebase
  • tests/\* - Test codebase

Agent Invocation

@nw-software-crafter

Execute \*refactor for {target-class-or-module}.

Context Files:

  • src/\*
  • tests/\*

Configuration:

  • level: 3 # Shorthand: --from=1 --to=3 (RPP range)
  • from: 1 # Start RPP level (default: 1)
  • to: 3 # End RPP level (default: same as level)
  • scope: module # file/module/project
  • method: extract # extract/inline/rename/move
  • mikado_planning: false # Use Mikado Method for complex refactorings

Success Criteria

  • [ ] Code quality metrics improved (measured before/after)
  • [ ] All tests passing after refactoring
  • [ ] Refactoring levels applied in sequence (L1 before L2, etc.)
  • [ ] Technical debt reduced measurably

Next Wave

Handoff To: {invoking-agent-returns-to-workflow} Deliverables: Refactored codebase with quality improvements

Examples

Example 1: Module-level readability refactor
/nw-refactor src/auth/token_manager.py --level=2 --scope=module

Crafty applies RPP L1-L2: rename ambiguous variables|extract magic numbers into constants|remove dead code (L1), then simplify conditionals|extract long methods (L2).

Example 2: SOLID-level design refactor
/nw-refactor src/billing/ --level=6 --scope=module --mikado_planning=true

Crafty uses Mikado Method for multi-class refactoring, applies dependency inversion|interface segregation across billing module.

Example 3: RPP range sweep (L1-L3)
/nw-refactor src/des/domain/ --from=1 --to=3 --scope=module

Sweeps L1 readability|L2 complexity|L3 responsibility smells. Cascade rule: L2 only after L1 clean, L3 only after L2 clean.

Example 4: Targeted single-level refactor
/nw-refactor src/des/cli/verify.py --level=3 --scope=file

Targets L3 responsibility smells only (Large Class, Feature Envy, Shotgun Surgery). Assumes L1-L2 already clean.

Expected Outputs

src/* (refactored production code)
tests/* (refactored test code)
docs/refactoring/
refactoring-log.md
quality-metrics.md

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
5

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/v1bh0r/precise-ledger-pro/nw-refactor/badge)](https://verified-skill.com/skills/v1bh0r/precise-ledger-pro/nw-refactor)

Something wrong with this skill or its page? Tell us.