[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7F30PK5WAR9BS9CYWTM28CY":3,"skill-same:01M7F30PK5WAR9BS9CYWTM28CY":49},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":28,"commitSha":29,"skillDirectory":30,"forksCount":31,"repositoryHtmlUrl":32,"repositoryHomepageUrl":6,"ownerHtmlUrl":33,"ownerBlogUrl":34,"ownerDescription":12,"updatedAt":35,"install":36,"resources":48},"01M7F30PK5WAR9BS9CYWTM28CY","refactor",null,"Analyze code for SOLID violations and suggest targeted improvements","313DEVGRP\u002FJava-Service-Tree-Framework-Multi-Agent-Workspace","313DEVGRP","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F34762848?v=4","01M7F2M535Z5X8XGHYD8TDVAB3","A-RMS by 313DEVGRP","01M7F2M54CR0P3631F4YM0D014",0,"MIT","https:\u002F\u002Fgithub.com\u002F313DEVGRP\u002FJava-Service-Tree-Framework-Multi-Agent-Workspace\u002Fblob\u002Fmain\u002Freference\u002Fclaude-code-ultimate-guide-main\u002Fexamples\u002Fskills\u002Frefactor\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\nname: refactor\ndescription: Analyze code for SOLID violations and suggest targeted improvements\nargument-hint: \"\u003Cfile_or_module> [--pattern \u003Cname>]\"\neffort: medium\nwhen_to_use: \"Use when a module has SOLID violations, code smells, or duplication to address.\"\ndisable-model-invocation: true\n---\n\n# SOLID refactoring assistant\n\nAnalyze code for SOLID violations and suggest targeted improvements.\n\n## Purpose\n\nIdentify refactoring opportunities based on:\n- SOLID principle violations\n- Code smells and anti-patterns\n- Complexity metrics\n- Duplication detection\n\n## Instructions\n\n### Step 1: Scope analysis\n\nDetermine the refactoring scope from user input:\n- Single file: Deep analysis\n- Directory: Pattern detection across files\n- Function\u002Fclass: Focused extraction suggestions\n\n```bash\n# Get file\u002Fdirectory stats\nif [ -f \"$TARGET\" ]; then\n  wc -l \"$TARGET\"\n  echo \"Single file analysis\"\nelif [ -d \"$TARGET\" ]; then\n  find \"$TARGET\" -type f \\( -name \"*.ts\" -o -name \"*.js\" -o -name \"*.py\" \\) | wc -l\n  echo \"Directory analysis\"\nfi\n```\n\n### Step 2: SOLID violations detection\n\n#### S - single responsibility\n\nLook for:\n- Files > 300 lines\n- Functions > 50 lines\n- Classes with > 10 methods\n- Mixed concerns (data + UI + business logic)\n\n```bash\n# Find large files\nfind . -name \"*.{ts,js,py}\" -exec wc -l {} + 2>\u002Fdev\u002Fnull | sort -rn | head -10\n\n# Functions with high line count (approximate)\ngrep -rn \"function\\|def \\|fn \" --include=\"*.{ts,js,py,rs}\" . | head -20\n```\n\n#### O - open\u002Fclosed principle\n\nLook for:\n- Switch\u002Fcase statements on types\n- Repeated if\u002Felse type checking\n- Direct modifications vs extensions\n\n#### L - liskov substitution\n\nLook for:\n- Overridden methods that throw \"not implemented\"\n- Type checks before method calls\n- Empty method overrides\n\n#### I - interface segregation\n\nLook for:\n- Large interfaces (> 10 methods)\n- Classes implementing unused interface methods\n- Fat service classes\n\n#### D - dependency inversion\n\nLook for:\n- Direct instantiation of dependencies (`new Service()`)\n- Hardcoded class references\n- Missing dependency injection\n\n### Step 3: Code smells\n\n```bash\n# Duplication patterns\ngrep -rn --include=\"*.{ts,js,py}\" . 2>\u002Fdev\u002Fnull | \\\n  awk -F: '{print $3}' | sort | uniq -c | sort -rn | head -10\n\n# Long parameter lists (> 4 params)\ngrep -rn \"function.*,.*,.*,.*,\" --include=\"*.{ts,js}\" . 2>\u002Fdev\u002Fnull | head -10\n\n# Deep nesting (4+ levels)\ngrep -rn \"^\\s\\{16,\\}\" --include=\"*.{ts,js,py}\" . 2>\u002Fdev\u002Fnull | head -10\n```\n\n### Step 4: Complexity assessment\n\nFor each issue found, assess:\n- **Impact**: How much code is affected?\n- **Risk**: What could break?\n- **Effort**: Lines to change, tests needed?\n\n## Output format\n\n---\n\n### 🔧 Refactoring analysis\n\n**Target**: [file\u002Fdirectory]\n**Lines Analyzed**: [count]\n\n### 📊 SOLID scorecard\n\n| Principle | Status | Issues Found |\n|-----------|--------|--------------|\n| Single Responsibility | 🟡 | 3 large classes |\n| Open\u002FClosed | 🟢 | OK |\n| Liskov Substitution | 🟢 | OK |\n| Interface Segregation | 🔴 | 2 fat interfaces |\n| Dependency Inversion | 🟡 | 5 direct instantiations |\n\n### 🎯 Priority refactorings\n\n#### 1. [Highest Impact] - Extract class from `UserService`\n\n**Violation**: Single Responsibility\n**Current**: 450 lines handling auth + profile + notifications\n**Suggested**:\n```\nUserService.ts (450 lines)\n    ↓ Extract\nAuthService.ts (~150 lines)\nProfileService.ts (~150 lines)\nNotificationService.ts (~100 lines)\n```\n**Risk**: Medium (update imports)\n**Tests Needed**: Update dependency injection in tests\n\n#### 2. [Second Priority] - Replace switch with polymorphism\n\n**Location**: `src\u002Fhandlers\u002Fpayment.ts:45`\n**Current**:\n```typescript\nswitch (paymentType) {\n  case 'card': \u002F\u002F 50 lines\n  case 'bank': \u002F\u002F 50 lines\n  case 'crypto': \u002F\u002F 50 lines\n}\n```\n**Suggested**: Strategy pattern with `PaymentProcessor` interface\n**Risk**: Low (isolated change)\n\n### 📝 Code smells\n\n| Smell | Location | Severity |\n|-------|----------|----------|\n| Long Method | `api.ts:calculateTotal` (120 lines) | 🟠 High |\n| Duplicate Code | `utils\u002F*.ts` (3 similar blocks) | 🟡 Medium |\n| Deep Nesting | `parser.ts:parse` (6 levels) | 🟡 Medium |\n\n### 🚀 Quick wins (low risk, high value)\n\n1. Extract `validateEmail()` to shared utils (used in 4 places)\n2. Replace magic numbers with named constants\n3. Add early returns to reduce nesting in `processOrder()`\n\n### ⚠️ Technical debt notes\n\n- [Item to track for future sprints]\n\n---\n\n## Refactoring safety checklist\n\nBefore applying suggestions:\n\n- [ ] Tests exist for affected code\n- [ ] Create feature branch\n- [ ] Commit current state\n- [ ] Apply one refactoring at a time\n- [ ] Run tests after each change\n- [ ] Review diff before committing\n\n## Usage\n\n**Analyze specific file:**\n```\n\u002Frefactor src\u002Fservices\u002Fuser.ts\n```\n\n**Analyze directory:**\n```\n\u002Frefactor src\u002Fapi\u002F\n```\n\n**Focus on specific principle:**\n```\n\u002Frefactor --focus=srp src\u002Fservices\u002F\n```\n\n**With complexity threshold:**\n```\n\u002Frefactor --threshold=high\n```\n\n## References\n\n- Martin Fowler's Refactoring Catalog\n- Clean Code by Robert C. Martin\n- SOLID principles by Robert C. Martin\n\n$ARGUMENTS\n","# SOLID refactoring assistant\n\nAnalyze code for SOLID violations and suggest targeted improvements.\n\n## Purpose\n\nIdentify refactoring opportunities based on:\n- SOLID principle violations\n- Code smells and anti-patterns\n- Complexity metrics\n- Duplication detection\n\n## Instructions\n\n### Step 1: Scope analysis\n\nDetermine the refactoring scope from user input:\n- Single file: Deep analysis\n- Directory: Pattern detection across files\n- Function\u002Fclass: Focused extraction suggestions\n\n```bash\n# Get file\u002Fdirectory stats\nif [ -f \"$TARGET\" ]; then\n  wc -l \"$TARGET\"\n  echo \"Single file analysis\"\nelif [ -d \"$TARGET\" ]; then\n  find \"$TARGET\" -type f \\( -name \"*.ts\" -o -name \"*.js\" -o -name \"*.py\" \\) | wc -l\n  echo \"Directory analysis\"\nfi\n```\n\n### Step 2: SOLID violations detection\n\n#### S - single responsibility\n\nLook for:\n- Files > 300 lines\n- Functions > 50 lines\n- Classes with > 10 methods\n- Mixed concerns (data + UI + business logic)\n\n```bash\n# Find large files\nfind . -name \"*.{ts,js,py}\" -exec wc -l {} + 2>\u002Fdev\u002Fnull | sort -rn | head -10\n\n# Functions with high line count (approximate)\ngrep -rn \"function\\|def \\|fn \" --include=\"*.{ts,js,py,rs}\" . | head -20\n```\n\n#### O - open\u002Fclosed principle\n\nLook for:\n- Switch\u002Fcase statements on types\n- Repeated if\u002Felse type checking\n- Direct modifications vs extensions\n\n#### L - liskov substitution\n\nLook for:\n- Overridden methods that throw \"not implemented\"\n- Type checks before method calls\n- Empty method overrides\n\n#### I - interface segregation\n\nLook for:\n- Large interfaces (> 10 methods)\n- Classes implementing unused interface methods\n- Fat service classes\n\n#### D - dependency inversion\n\nLook for:\n- Direct instantiation of dependencies (`new Service()`)\n- Hardcoded class references\n- Missing dependency injection\n\n### Step 3: Code smells\n\n```bash\n# Duplication patterns\ngrep -rn --include=\"*.{ts,js,py}\" . 2>\u002Fdev\u002Fnull | \\\n  awk -F: '{print $3}' | sort | uniq -c | sort -rn | head -10\n\n# Long parameter lists (> 4 params)\ngrep -rn \"function.*,.*,.*,.*,\" --include=\"*.{ts,js}\" . 2>\u002Fdev\u002Fnull | head -10\n\n# Deep nesting (4+ levels)\ngrep -rn \"^\\s\\{16,\\}\" --include=\"*.{ts,js,py}\" . 2>\u002Fdev\u002Fnull | head -10\n```\n\n### Step 4: Complexity assessment\n\nFor each issue found, assess:\n- **Impact**: How much code is affected?\n- **Risk**: What could break?\n- **Effort**: Lines to change, tests needed?\n\n## Output format\n\n---\n\n### 🔧 Refactoring analysis\n\n**Target**: [file\u002Fdirectory]\n**Lines Analyzed**: [count]\n\n### 📊 SOLID scorecard\n\n| Principle | Status | Issues Found |\n|-----------|--------|--------------|\n| Single Responsibility | 🟡 | 3 large classes |\n| Open\u002FClosed | 🟢 | OK |\n| Liskov Substitution | 🟢 | OK |\n| Interface Segregation | 🔴 | 2 fat interfaces |\n| Dependency Inversion | 🟡 | 5 direct instantiations |\n\n### 🎯 Priority refactorings\n\n#### 1. [Highest Impact] - Extract class from `UserService`\n\n**Violation**: Single Responsibility\n**Current**: 450 lines handling auth + profile + notifications\n**Suggested**:\n```\nUserService.ts (450 lines)\n    ↓ Extract\nAuthService.ts (~150 lines)\nProfileService.ts (~150 lines)\nNotificationService.ts (~100 lines)\n```\n**Risk**: Medium (update imports)\n**Tests Needed**: Update dependency injection in tests\n\n#### 2. [Second Priority] - Replace switch with polymorphism\n\n**Location**: `src\u002Fhandlers\u002Fpayment.ts:45`\n**Current**:\n```typescript\nswitch (paymentType) {\n  case 'card': \u002F\u002F 50 lines\n  case 'bank': \u002F\u002F 50 lines\n  case 'crypto': \u002F\u002F 50 lines\n}\n```\n**Suggested**: Strategy pattern with `PaymentProcessor` interface\n**Risk**: Low (isolated change)\n\n### 📝 Code smells\n\n| Smell | Location | Severity |\n|-------|----------|----------|\n| Long Method | `api.ts:calculateTotal` (120 lines) | 🟠 High |\n| Duplicate Code | `utils\u002F*.ts` (3 similar blocks) | 🟡 Medium |\n| Deep Nesting | `parser.ts:parse` (6 levels) | 🟡 Medium |\n\n### 🚀 Quick wins (low risk, high value)\n\n1. Extract `validateEmail()` to shared utils (used in 4 places)\n2. Replace magic numbers with named constants\n3. Add early returns to reduce nesting in `processOrder()`\n\n### ⚠️ Technical debt notes\n\n- [Item to track for future sprints]\n\n---\n\n## Refactoring safety checklist\n\nBefore applying suggestions:\n\n- [ ] Tests exist for affected code\n- [ ] Create feature branch\n- [ ] Commit current state\n- [ ] Apply one refactoring at a time\n- [ ] Run tests after each change\n- [ ] Review diff before committing\n\n## Usage\n\n**Analyze specific file:**\n```\n\u002Frefactor src\u002Fservices\u002Fuser.ts\n```\n\n**Analyze directory:**\n```\n\u002Frefactor src\u002Fapi\u002F\n```\n\n**Focus on specific principle:**\n```\n\u002Frefactor --focus=srp src\u002Fservices\u002F\n```\n\n**With complexity threshold:**\n```\n\u002Frefactor --threshold=high\n```\n\n## References\n\n- Martin Fowler's Refactoring Catalog\n- Clean Code by Robert C. Martin\n- SOLID principles by Robert C. Martin\n\n$ARGUMENTS\n",{"name":5,"effort":24,"description":7,"when_to_use":25,"argument-hint":26,"disable-model-invocation":27},"medium","Use when a module has SOLID violations, code smells, or duplication to address.","\u003Cfile_or_module> [--pattern \u003Cname>]",true,"main","f2cc95bc769ca4c3a398965b767dfb41cdf8d698","reference\u002Fclaude-code-ultimate-guide-main\u002Fexamples\u002Fskills\u002Frefactor",2,"https:\u002F\u002Fgithub.com\u002F313DEVGRP\u002FJava-Service-Tree-Framework-Multi-Agent-Workspace","https:\u002F\u002Fgithub.com\u002F313DEVGRP","https:\u002F\u002Fwww.a-rms.net","2026-10-18 12:48:10",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":27},[38,41,44],{"tool":39,"command":40},"npx","npx skills add 313DEVGRP\u002FJava-Service-Tree-Framework-Multi-Agent-Workspace --skill refactor",{"tool":42,"command":43},"bunx","bunx skills add 313DEVGRP\u002FJava-Service-Tree-Framework-Multi-Agent-Workspace --skill refactor",{"tool":45,"command":46},"pnpm","pnpm dlx skills add 313DEVGRP\u002FJava-Service-Tree-Framework-Multi-Agent-Workspace --skill refactor","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002F313DEVGRP\u002FJava-Service-Tree-Framework-Multi-Agent-Workspace\u002Fblob\u002Fmain\u002Freference\u002Fclaude-code-ultimate-guide-main\u002Fexamples\u002Fskills\u002Frefactor\u002FSKILL.md",[],[50,57,64,71,78,85],{"skillNo":51,"name":52,"nameZh":6,"description":53,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":54,"categories":55,"keywords":56,"publishedAt":19},"01M7F343WNVHZWWYJDD77QEJ7J","voice-refine","Transform verbose voice input into structured, token-efficient Claude prompts. Use when cleaning up voice memos, dictation output, or speech-to-text transcriptions that contain filler words, repetitions, and unstructured thoughts.","https:\u002F\u002Fgithub.com\u002F313DEVGRP\u002FJava-Service-Tree-Framework-Multi-Agent-Workspace\u002Fblob\u002Fmain\u002Freference\u002Fclaude-code-ultimate-guide-main\u002Fexamples\u002Fskills\u002Fvoice-refine\u002FSKILL.md",[],[],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":19},"01M7F3417SNXASFTDA1B2X4XYZ","validate-changes","Evaluate staged changes using LLM-as-a-Judge before committing","https:\u002F\u002Fgithub.com\u002F313DEVGRP\u002FJava-Service-Tree-Framework-Multi-Agent-Workspace\u002Fblob\u002Fmain\u002Freference\u002Fclaude-code-ultimate-guide-main\u002Fexamples\u002Fskills\u002Fvalidate-changes\u002FSKILL.md",[],[],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":19},"01M7F33YN9QK88H2B81PVHMNG1","update-threat-db","Delegate threat-intelligence research and updates to AgentSec, then validate the guide and landing mirrors.","https:\u002F\u002Fgithub.com\u002F313DEVGRP\u002FJava-Service-Tree-Framework-Multi-Agent-Workspace\u002Fblob\u002Fmain\u002Freference\u002Fclaude-code-ultimate-guide-main\u002Fexamples\u002Fskills\u002Fupdate-threat-db\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":19},"01M7F33SXQ57G2FVFK094T4584","token-audit","Audit Claude Code configuration to measure fixed-context token overhead and produce a prioritized action plan. Use when hitting rate limits, experiencing early context compression, or after adding significant config files.","https:\u002F\u002Fgithub.com\u002F313DEVGRP\u002FJava-Service-Tree-Framework-Multi-Agent-Workspace\u002Fblob\u002Fmain\u002Freference\u002Fclaude-code-ultimate-guide-main\u002Fexamples\u002Fskills\u002Ftoken-audit\u002Fskill.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":19},"01M7F33NAWXFPHW59CF52EAGGK","talk-stage6-revision","Produces revision sheets with quick navigation by act, a master concept-to-URL table, Q&A cheat-sheet with 6-10 anticipated questions, glossary, and external resources list. Use when preparing for a talk with Q&A, creating shareable reference material for attendees, or building a safety-net glossary for live delivery.","https:\u002F\u002Fgithub.com\u002F313DEVGRP\u002FJava-Service-Tree-Framework-Multi-Agent-Workspace\u002Fblob\u002Fmain\u002Freference\u002Fclaude-code-ultimate-guide-main\u002Fexamples\u002Fskills\u002Ftalk-pipeline\u002Fstage-6-revision\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":19},"01M7F33G9V96HVZKAGZ84J4EBR","talk-stage5-script","Produces a complete 5-act pitch with speaker notes, a slide-by-slide specification, and a ready-to-paste Kimi prompt for AI slide generation. Requires validated angle and title from Stage 4. Use when you have a confirmed talk angle and need the full script, slide spec, and AI-generated presentation prompt.","https:\u002F\u002Fgithub.com\u002F313DEVGRP\u002FJava-Service-Tree-Framework-Multi-Agent-Workspace\u002Fblob\u002Fmain\u002Freference\u002Fclaude-code-ultimate-guide-main\u002Fexamples\u002Fskills\u002Ftalk-pipeline\u002Fstage-5-script\u002FSKILL.md",[],[]]