Initial scaffold: Researcher Endorsement frontend
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
31
.github/skills/refactor-specialist/SKILL.md
vendored
Normal file
31
.github/skills/refactor-specialist/SKILL.md
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
---
|
||||
name: refactor-specialist
|
||||
description: "Detects duplicated code in organisms and suggests moving repeated logic into shared molecules or utility functions."
|
||||
license: MIT
|
||||
triggers:
|
||||
- "find duplicate code"
|
||||
- "refactor repeated logic"
|
||||
---
|
||||
|
||||
# Refactor Specialist
|
||||
|
||||
When to use this skill
|
||||
|
||||
- Use when multiple organisms contain the same rendering logic or state transformation.
|
||||
- Triggered by requests to reduce duplication and improve maintainability.
|
||||
|
||||
Instructions
|
||||
|
||||
1. First Step: Scan the codebase for duplicated JSX blocks or near-identical functions using `grep`, `ripgrep`, or AST comparison.
|
||||
|
||||
2. Second Step: Propose a refactor plan: extract a Molecule, a utility function in `src/utils`, or move a hook into `src/hooks`.
|
||||
|
||||
3. Third Step: Provide a code diff or patch demonstrating the extraction and update imports across affected files.
|
||||
|
||||
Examples
|
||||
|
||||
- Extracting a `UserAvatarWithMeta` molecule used in two different organisms.
|
||||
|
||||
Notes
|
||||
|
||||
- Prefer small, incremental refactors and keep tests passing after each change.
|
||||
Reference in New Issue
Block a user