Agent Skill
2/7/2026refactoring-skill
Improving code structure and readability while maintaining behavioral parity and project standards.
S
samgvann
0GitHub Stars
1Views
npx skills add SamGVanN/Derot-my-brain
SKILL.md
| Name | refactoring-skill |
| Description | Improving code structure and readability while maintaining behavioral parity and project standards. |
name: refactoring-skill description: Improving code structure and readability while maintaining behavioral parity and project standards.
Instructions
- Safety Net:
- Ensure a solid test suite exists. Check
d:\Repos\Derot-my-brain\src\backend\DerotMyBrain.Testsfor backend coverage. - Run existing tests:
dotnet testornpm test.
- Ensure a solid test suite exists. Check
- Standards Alignment:
- Dumb Components: Move side effects and business logic to Custom Hooks in
src/frontend/src/hooks. - Thin Controllers: Move business logic to Services in
DerotMyBrain.Core. - Dependency Inversion: Ensure interfaces are defined in Core and implementation in Infrastructure.
- Dumb Components: Move side effects and business logic to Custom Hooks in
- Design System Compliance:
- Replace hardcoded hex colors or Tailwind absolute colors (e.g.,
text-blue-500) with semantic tokens (e.g.,text-primary). - Verify dark mode using
dark:variants or CSS variables defined inindex.css.
- Replace hardcoded hex colors or Tailwind absolute colors (e.g.,
- De-mocking: Replace
sampleArticlesor hardcoded responses with real API/LLM calls. - State Management: Ensure Zustand stores are never accessed directly; use exported Custom Hooks.
- Clean Code:
- Apply SOLID principles.
- Improve naming based on
d:\Repos\Derot-my-brain\Docs\Reference\Glossary.md. - Update
d:\Repos\Derot-my-brain\Docs\Reference\DataModel.mdif new entities or relationships were introduced.
- Verification:
- Run tests after every change to ensure zero regression.
Checklist
- Logic moved from Component to Hook?
- Logic moved from Controller to Service?
- Semantic colors used throughout?
- Tests still passing?
- Clean Architecture respected?
Skills Info
Original Name:refactoring-skillAuthor:samgvann
Download