feature-refactor-proposal
Skill11 starsChanged 18 days agoMITView on GitHub
Analyze codebase against new feature requirements, map affected modules and dependencies, identify architectural risks, and propose a structured refactoring and implementation plan before writing code. Use when starting a new feature, planning refactoring, analyzing codebase impact, or reviewing feature feasibility.
In this repository48 other files it gives its agents.
- agents.mdAGENTS.md
- .agents/skills/react-best-practices/AGENTS.mdAGENTS.md
- .agents/skills/react-native-skills/AGENTS.mdAGENTS.md
- .agents/skills/react-view-transitions/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- agent-initSkill
- agy-delegateSkill
- audit-docsSkill
- code-audit-expertSkill
- computer-diagnosisSkill
- create-builtin-toolSkill
- create-prSkill
- critique-builtin-toolSkill
- doc-auditorSkill
- docxSkill
- extract-log-debugSkill
- gatekeeper-loopSkill
- harbor-harness-improvement-loopSkill
- i18n-language-standardsSkill
- jobs-trace-analyzerSkill
- lean-builtin-tool-auditorSkill
- libragent-qualitySkill
- libr-delegateSkill
- libr-tool-e2e-harness-loopSkill
- modular-large-file-refactorSkill
- performance-auditSkill
- pptxSkill
- vercel-react-best-practicesSkill
- vercel-react-native-skillsSkill
- vercel-react-view-transitionsSkill
- readme-showcase-syncSkill
- refactor-builtin-toolSkill
- release-managerSkill
- review-local-changesSkill
- review-pr-commentsSkill
- science-searchSkill
- setup-wizardSkill
- skill-creatorSkill
- soul-awakeningSkill
- sqlite-analyzerSkill
- sync-pending-approvalsSkill
- tool-creatorSkill
- trace-analyzerSkill
- trace-eval-loopSkill
- vitepress-doc-syncSkill
- worker-loopSkill
- x-cliSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Use this skill when:
- Very specific: line 55
Search for relevant existing files using workspace__grepFiles and workspace__globFiles.
- Distinctive: line 73
Use the structure provided in references/proposal_template.md.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Feature Refactor Proposal
This skill provides a structured methodology for analyzing an existing codebase against new feature requirements, identifying technical debt and risks, and producing a clear refactoring and implementation proposal before writing code.
When to Use
Use this skill when:
- Adding a complex new feature to an existing codebase
- Extending existing components or state management that could cause architectural regression
- Assessing feature feasibility and breaking changes before implementation
- Preparing an architecture proposal or technical design review for a feature request
Workflow Decision Tree
User provides New Feature Requirements / Issue
│
├── 1. Parse Requirements & Define Boundaries
│ └─ Identify UI, state, API, and backend scope
│
├── 2. Map Codebase Impact
│ └─ Locate affected components, hooks, services, types
│
├── 3. Evaluate Risks & Trade-offs
│ └─ Consult [risk_checklist.md](references/risk_checklist.md)
│
├── 4. Draft Refactoring & Implementation Plan
│ └─ Use [proposal_template.md](references/proposal_template.md)
│
└── 5. Present Proposal & Verification Steps
└─ Provide phased steps and validation commandsDetailed Steps
Step 1: Requirement Breakdown & Scope Mapping
- Extract core requirements and non-goals from the user prompt or issue document.
- Categorize requirements by impact layer:
- UI Layer: Pages, components, modals, styles
- State Layer: React state, context, custom hooks, global stores
- Service / API Layer: Frontend API client, backend commands, Tauri IPC
- Data Layer: Types, schemas, entities, database tables
Step 2: Codebase Exploration & Dependency Tracing
- Search for relevant existing files using
workspace__grepFilesandworkspace__globFiles. - Inspect target files with
workspace__readFileto understand:- Current responsibilities and size of components
- Existing data flow and state propagation
- Shared dependencies and props interface
- Map component dependencies to anticipate ripple effects when modifying signatures or state.
Step 3: Risk Assessment & Architecture Trade-offs
- Load and evaluate against references/risk_checklist.md:
- Type Safety: Prop changes, boundary validation, schema changes
- State Complexity: State duplication vs context extension vs hook extraction
- UI/UX Resilience: Virtualized lists, scroll pinning, loading/error states
- Backward Compatibility: Impact on other features using the same components
- Compare architectural choices (e.g., Option A: Direct Extension vs Option B: Modular Refactoring).
Step 4: Generate Proposal Report
- Use the structure provided in references/proposal_template.md.
- Document:
- Affected files and modification scope
- Recommended refactoring approach with trade-off justification
- Phased execution steps (Preparation/Refactor -> Feature Implementation -> Verification)
- Specific verification criteria (
pnpm refactor:validate, tests, manual checks)
References
- proposal_template.md: Standard template for feature refactoring proposals.
- risk_checklist.md: Architectural and quality risk review checklist.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

