[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6PZ8RWM5MT8CKJPQGAQP25W":3,"skill-same:01M6PZ8RWM5MT8CKJPQGAQP25W":75},{"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":26,"publishedAt":46,"linkOnly":47,"markdownContent":48,"markdownBody":49,"frontMatter":50,"refName":54,"commitSha":55,"skillDirectory":56,"forksCount":57,"repositoryHtmlUrl":58,"repositoryHomepageUrl":6,"ownerHtmlUrl":59,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":60,"install":61,"resources":74},"01M6PZ8RWM5MT8CKJPQGAQP25W","refactor",null,"Surgical code refactoring to improve maintainability without changing behavior. Covers extracting functions, renaming variables, breaking down god functions, improving type safety, eliminating code smells, and applying design patterns. Less drastic than repo-rebuilder; use for gradual improvements.","ibragimov-oasis\u002Fvibe-coder","ibragimov-oasis","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F240665573?v=4","01M6DF78Y45R8228FHAZ7G6JXM","IBRAGIMOV MUKHAMMADJON","01M6K5ZYR8TDPAFG4R6693E2A6",3,"MIT","https:\u002F\u002Fgithub.com\u002Fibragimov-oasis\u002Fvibe-coder\u002Fblob\u002Fmain\u002Fvc-kit\u002Fcontent\u002FCOMBINED\u002FCOMBINED\u002Fskills\u002Fskills-copilot\u002Frefactor\u002FSKILL.md",[18,23],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000007","代码审查","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000015","视觉设计",[5,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],"code refactoring","down","source","source\u002Fskills-copilot","for","Variables","extracting","artifact","domain","patterns","design","design patterns","repo","refactoring","improve","Safety","Type Safety","code","copilot","2026-11-10 10:12:30",false,"---\nname: refactor\ndescription: 'Surgical code refactoring to improve maintainability without changing behavior. Covers extracting functions, renaming variables, breaking down god functions, improving type safety, eliminating code smells, and applying design patterns. Less drastic than repo-rebuilder; use for gradual improvements.'\nlicense: MIT\ntags:\n  - domain\u002Fagents\n  - artifact\u002Fskill\n  - source\u002Fskills-copilot\n---\n\n# Refactor\n\n## Overview\n\nImprove code structure and readability without changing external behavior. Refactoring is gradual evolution, not revolution. Use this for improving existing code, not rewriting from scratch.\n\n## When to Use\n\nUse this skill when:\n\n- Code is hard to understand or maintain\n- Functions\u002Fclasses are too large\n- Code smells need addressing\n- Adding features is difficult due to code structure\n- User asks \"clean up this code\", \"refactor this\", \"improve this\"\n\n---\n\n## Refactoring Principles\n\n### The Golden Rules\n\n1. **Behavior is preserved** - Refactoring doesn't change what the code does, only how\n2. **Small steps** - Make tiny changes, test after each\n3. **Version control is your friend** - Commit before and after each safe state\n4. **Tests are essential** - Without tests, you're not refactoring, you're editing\n5. **One thing at a time** - Don't mix refactoring with feature changes\n\n### When NOT to Refactor\n\n```\n- Code that works and won't change again (if it ain't broke...)\n- Critical production code without tests (add tests first)\n- When you're under a tight deadline\n- \"Just because\" - need a clear purpose\n```\n\n---\n\n## Common Code Smells & Fixes\n\n### 1. Long Method\u002FFunction\n\n```diff\n# BAD: 200-line function that does everything\n- async function processOrder(orderId) {\n-   \u002F\u002F 50 lines: fetch order\n-   \u002F\u002F 30 lines: validate order\n-   \u002F\u002F 40 lines: calculate pricing\n-   \u002F\u002F 30 lines: update inventory\n-   \u002F\u002F 20 lines: create shipment\n-   \u002F\u002F 30 lines: send notifications\n- }\n\n# GOOD: Broken into focused functions\n+ async function processOrder(orderId) {\n+   const order = await fetchOrder(orderId);\n+   validateOrder(order);\n+   const pricing = calculatePricing(order);\n+   await updateInventory(order);\n+   const shipment = await createShipment(order);\n+   await sendNotifications(order, pricing, shipment);\n+   return { order, pricing, shipment };\n+ }\n```\n\n### 2. Duplicated Code\n\n```diff\n# BAD: Same logic in multiple places\n- function calculateUserDiscount(user) {\n-   if (user.membership === 'gold') return user.total * 0.2;\n-   if (user.membership === 'silver') return user.total * 0.1;\n-   return 0;\n- }\n-\n- function calculateOrderDiscount(order) {\n-   if (order.user.membership === 'gold') return order.total * 0.2;\n-   if (order.user.membership === 'silver') return order.total * 0.1;\n-   return 0;\n- }\n\n# GOOD: Extract common logic\n+ function getMembershipDiscountRate(membership) {\n+   const rates = { gold: 0.2, silver: 0.1 };\n+   return rates[membership] || 0;\n+ }\n+\n+ function calculateUserDiscount(user) {\n+   return user.total * getMembershipDiscountRate(user.membership);\n+ }\n+\n+ function calculateOrderDiscount(order) {\n+   return order.total * getMembershipDiscountRate(order.user.membership);\n+ }\n```\n\n### 3. Large Class\u002FModule\n\n```diff\n# BAD: God object that knows too much\n- class UserManager {\n-   createUser() { \u002F* ... *\u002F }\n-   updateUser() { \u002F* ... *\u002F }\n-   deleteUser() { \u002F* ... *\u002F }\n-   sendEmail() { \u002F* ... *\u002F }\n-   generateReport() { \u002F* ... *\u002F }\n-   handlePayment() { \u002F* ... *\u002F }\n-   validateAddress() { \u002F* ... *\u002F }\n-   \u002F\u002F 50 more methods...\n- }\n\n# GOOD: Single responsibility per class\n+ class UserService {\n+   create(data) { \u002F* ... *\u002F }\n+   update(id, data) { \u002F* ... *\u002F }\n+   delete(id) { \u002F* ... *\u002F }\n+ }\n+\n+ class EmailService {\n+   send(to, subject, body) { \u002F* ... *\u002F }\n+ }\n+\n+ class ReportService {\n+   generate(type, params) { \u002F* ... *\u002F }\n+ }\n+\n+ class PaymentService {\n+   process(amount, method) { \u002F* ... *\u002F }\n+ }\n```\n\n### 4. Long Parameter List\n\n```diff\n# BAD: Too many parameters\n- function createUser(email, password, name, age, address, city, country, phone) {\n-   \u002F* ... *\u002F\n- }\n\n# GOOD: Group related parameters\n+ interface UserData {\n+   email: string;\n+   password: string;\n+   name: string;\n+   age?: number;\n+   address?: Address;\n+   phone?: string;\n+ }\n+\n+ function createUser(data: UserData) {\n+   \u002F* ... *\u002F\n+ }\n\n# EVEN BETTER: Use builder pattern for complex construction\n+ const user = UserBuilder\n+   .email('test@example.com')\n+   .password('secure123')\n+   .name('Test User')\n+   .address(address)\n+   .build();\n```\n\n### 5. Feature Envy\n\n```diff\n# BAD: Method that uses another object's data more than its own\n- class Order {\n-   calculateDiscount(user) {\n-     if (user.membershipLevel === 'gold') {\n+       return this.total * 0.2;\n+     }\n+     if (user.accountAge > 365) {\n+       return this.total * 0.1;\n+     }\n+     return 0;\n+   }\n+ }\n\n# GOOD: Move logic to the object that owns the data\n+ class User {\n+   getDiscountRate(orderTotal) {\n+     if (this.membershipLevel === 'gold') return 0.2;\n+     if (this.accountAge > 365) return 0.1;\n+     return 0;\n+   }\n+ }\n+\n+ class Order {\n+   calculateDiscount(user) {\n+     return this.total * user.getDiscountRate(this.total);\n+   }\n+ }\n```\n\n### 6. Primitive Obsession\n\n```diff\n# BAD: Using primitives for domain concepts\n- function sendEmail(to, subject, body) { \u002F* ... *\u002F }\n- sendEmail('user@example.com', 'Hello', '...');\n\n- function createPhone(country, number) {\n-   return `${country}-${number}`;\n- }\n\n# GOOD: Use domain types\n+ class Email {\n+   private constructor(public readonly value: string) {\n+     if (!Email.isValid(value)) throw new Error('Invalid email');\n+   }\n+   static create(value: string) { return new Email(value); }\n+   static isValid(email: string) { return \u002F^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$\u002F.test(email); }\n+ }\n+\n+ class PhoneNumber {\n+   constructor(\n+     public readonly country: string,\n+     public readonly number: string\n+   ) {\n+     if (!PhoneNumber.isValid(country, number)) throw new Error('Invalid phone');\n+   }\n+   toString() { return `${this.country}-${this.number}`; }\n+   static isValid(country: string, number: string) { \u002F* ... *\u002F }\n+ }\n+\n+ \u002F\u002F Usage\n+ const email = Email.create('user@example.com');\n+ const phone = new PhoneNumber('1', '555-1234');\n```\n\n### 7. Magic Numbers\u002FStrings\n\n```diff\n# BAD: Unexplained values\n- if (user.status === 2) { \u002F* ... *\u002F }\n- const discount = total * 0.15;\n- setTimeout(callback, 86400000);\n\n# GOOD: Named constants\n+ const UserStatus = {\n+   ACTIVE: 1,\n+   INACTIVE: 2,\n+   SUSPENDED: 3\n+ } as const;\n+\n+ const DISCOUNT_RATES = {\n+   STANDARD: 0.1,\n+   PREMIUM: 0.15,\n+   VIP: 0.2\n+ } as const;\n+\n+ const ONE_DAY_MS = 24 * 60 * 60 * 1000;\n+\n+ if (user.status === UserStatus.INACTIVE) { \u002F* ... *\u002F }\n+ const discount = total * DISCOUNT_RATES.PREMIUM;\n+ setTimeout(callback, ONE_DAY_MS);\n```\n\n### 8. Nested Conditionals\n\n```diff\n# BAD: Arrow code\n- function process(order) {\n-   if (order) {\n-     if (order.user) {\n-       if (order.user.isActive) {\n-         if (order.total > 0) {\n-           return processOrder(order);\n+         } else {\n+           return { error: 'Invalid total' };\n+         }\n+       } else {\n+         return { error: 'User inactive' };\n+       }\n+     } else {\n+       return { error: 'No user' };\n+     }\n+   } else {\n+     return { error: 'No order' };\n+   }\n+ }\n\n# GOOD: Guard clauses \u002F early returns\n+ function process(order) {\n+   if (!order) return { error: 'No order' };\n+   if (!order.user) return { error: 'No user' };\n+   if (!order.user.isActive) return { error: 'User inactive' };\n+   if (order.total \u003C= 0) return { error: 'Invalid total' };\n+   return processOrder(order);\n+ }\n\n# EVEN BETTER: Using Result type\n+ function process(order): Result\u003CProcessedOrder, Error> {\n+   return Result.combine([\n+     validateOrderExists(order),\n+     validateUserExists(order),\n+     validateUserActive(order.user),\n+     validateOrderTotal(order)\n+   ]).flatMap(() => processOrder(order));\n+ }\n```\n\n### 9. Dead Code\n\n```diff\n# BAD: Unused code lingers\n- function oldImplementation() { \u002F* ... *\u002F }\n- const DEPRECATED_VALUE = 5;\n- import { unusedThing } from '.\u002Fsomewhere';\n- \u002F\u002F Commented out code\n- \u002F\u002F function oldCode() { \u002F* ... *\u002F }\n\n# GOOD: Remove it\n+ \u002F\u002F Delete unused functions, imports, and commented code\n+ \u002F\u002F If you need it again, git history has it\n```\n\n### 10. Inappropriate Intimacy\n\n```diff\n# BAD: One class reaches deep into another\n- class OrderProcessor {\n-   process(order) {\n-     order.user.profile.address.street;  \u002F\u002F Too intimate\n-     order.repository.connection.config;  \u002F\u002F Breaking encapsulation\n+   }\n+ }\n\n# GOOD: Ask, don't tell\n+ class OrderProcessor {\n+   process(order) {\n+     order.getShippingAddress();  \u002F\u002F Order knows how to get it\n+     order.save();  \u002F\u002F Order knows how to save itself\n+   }\n+ }\n```\n\n---\n\n## Extract Method Refactoring\n\n### Before and After\n\n```diff\n# Before: One long function\n- function printReport(users) {\n-   console.log('USER REPORT');\n-   console.log('============');\n-   console.log('');\n-   console.log(`Total users: ${users.length}`);\n-   console.log('');\n-   console.log('ACTIVE USERS');\n-   console.log('------------');\n-   const active = users.filter(u => u.isActive);\n-   active.forEach(u => {\n-     console.log(`- ${u.name} (${u.email})`);\n-   });\n-   console.log('');\n-   console.log(`Active: ${active.length}`);\n-   console.log('');\n-   console.log('INACTIVE USERS');\n-   console.log('--------------');\n-   const inactive = users.filter(u => !u.isActive);\n-   inactive.forEach(u => {\n-     console.log(`- ${u.name} (${u.email})`);\n-   });\n-   console.log('');\n-   console.log(`Inactive: ${inactive.length}`);\n- }\n\n# After: Extracted methods\n+ function printReport(users) {\n+   printHeader('USER REPORT');\n+   console.log(`Total users: ${users.length}\\n`);\n+   printUserSection('ACTIVE USERS', users.filter(u => u.isActive));\n+   printUserSection('INACTIVE USERS', users.filter(u => !u.isActive));\n+ }\n+\n+ function printHeader(title) {\n+   const line = '='.repeat(title.length);\n+   console.log(title);\n+   console.log(line);\n+   console.log('');\n+ }\n+\n+ function printUserSection(title, users) {\n+   console.log(title);\n+   console.log('-'.repeat(title.length));\n+   users.forEach(u => console.log(`- ${u.name} (${u.email})`));\n+   console.log('');\n+   console.log(`${title.split(' ')[0]}: ${users.length}`);\n+   console.log('');\n+ }\n```\n\n---\n\n## Introducing Type Safety\n\n### From Untyped to Typed\n\n```diff\n# Before: No types\n- function calculateDiscount(user, total, membership, date) {\n-   if (membership === 'gold' && date.getDay() === 5) {\n-     return total * 0.25;\n-   }\n-   if (membership === 'gold') return total * 0.2;\n-   return total * 0.1;\n- }\n\n# After: Full type safety\n+ type Membership = 'bronze' | 'silver' | 'gold';\n+\n+ interface User {\n+   id: string;\n+   name: string;\n+   membership: Membership;\n+ }\n+\n+ interface DiscountResult {\n+   original: number;\n+   discount: number;\n+   final: number;\n+   rate: number;\n+ }\n+\n+ function calculateDiscount(\n+   user: User,\n+   total: number,\n+   date: Date = new Date()\n+ ): DiscountResult {\n+   if (total \u003C 0) throw new Error('Total cannot be negative');\n+\n+   let rate = 0.1; \u002F\u002F Default bronze\n+\n+   if (user.membership === 'gold' && date.getDay() === 5) {\n+     rate = 0.25; \u002F\u002F Friday bonus for gold\n+   } else if (user.membership === 'gold') {\n+     rate = 0.2;\n+   } else if (user.membership === 'silver') {\n+     rate = 0.15;\n+   }\n+\n+   const discount = total * rate;\n+\n+   return {\n+     original: total,\n+     discount,\n+     final: total - discount,\n+     rate\n+   };\n+ }\n```\n\n---\n\n## Design Patterns for Refactoring\n\n### Strategy Pattern\n\n```diff\n# Before: Conditional logic\n- function calculateShipping(order, method) {\n-   if (method === 'standard') {\n-     return order.total > 50 ? 0 : 5.99;\n-   } else if (method === 'express') {\n-     return order.total > 100 ? 9.99 : 14.99;\n+   } else if (method === 'overnight') {\n+     return 29.99;\n+   }\n+ }\n\n# After: Strategy pattern\n+ interface ShippingStrategy {\n+   calculate(order: Order): number;\n+ }\n+\n+ class StandardShipping implements ShippingStrategy {\n+   calculate(order: Order) {\n+     return order.total > 50 ? 0 : 5.99;\n+   }\n+ }\n+\n+ class ExpressShipping implements ShippingStrategy {\n+   calculate(order: Order) {\n+     return order.total > 100 ? 9.99 : 14.99;\n+   }\n+ }\n+\n+ class OvernightShipping implements ShippingStrategy {\n+   calculate(order: Order) {\n+     return 29.99;\n+   }\n+ }\n+\n+ function calculateShipping(order: Order, strategy: ShippingStrategy) {\n+   return strategy.calculate(order);\n+ }\n```\n\n### Chain of Responsibility\n\n```diff\n# Before: Nested validation\n- function validate(user) {\n-   const errors = [];\n-   if (!user.email) errors.push('Email required');\n+   else if (!isValidEmail(user.email)) errors.push('Invalid email');\n+   if (!user.name) errors.push('Name required');\n+   if (user.age \u003C 18) errors.push('Must be 18+');\n+   if (user.country === 'blocked') errors.push('Country not supported');\n+   return errors;\n+ }\n\n# After: Chain of responsibility\n+ abstract class Validator {\n+   abstract validate(user: User): string | null;\n+   setNext(validator: Validator): Validator {\n+     this.next = validator;\n+     return validator;\n+   }\n+   validate(user: User): string | null {\n+     const error = this.doValidate(user);\n+     if (error) return error;\n+     return this.next?.validate(user) ?? null;\n+   }\n+ }\n+\n+ class EmailRequiredValidator extends Validator {\n+   doValidate(user: User) {\n+     return !user.email ? 'Email required' : null;\n+   }\n+ }\n+\n+ class EmailFormatValidator extends Validator {\n+   doValidate(user: User) {\n+     return user.email && !isValidEmail(user.email) ? 'Invalid email' : null;\n+   }\n+ }\n+\n+ \u002F\u002F Build the chain\n+ const validator = new EmailRequiredValidator()\n+   .setNext(new EmailFormatValidator())\n+   .setNext(new NameRequiredValidator())\n+   .setNext(new AgeValidator())\n+   .setNext(new CountryValidator());\n```\n\n---\n\n## Refactoring Steps\n\n### Safe Refactoring Process\n\n```\n1. PREPARE\n   - Ensure tests exist (write them if missing)\n   - Commit current state\n   - Create feature branch\n\n2. IDENTIFY\n   - Find the code smell to address\n   - Understand what the code does\n   - Plan the refactoring\n\n3. REFACTOR (small steps)\n   - Make one small change\n   - Run tests\n   - Commit if tests pass\n   - Repeat\n\n4. VERIFY\n   - All tests pass\n   - Manual testing if needed\n   - Performance unchanged or improved\n\n5. CLEAN UP\n   - Update comments\n   - Update documentation\n   - Final commit\n```\n\n---\n\n## Refactoring Checklist\n\n### Code Quality\n\n- [ ] Functions are small (\u003C 50 lines)\n- [ ] Functions do one thing\n- [ ] No duplicated code\n- [ ] Descriptive names (variables, functions, classes)\n- [ ] No magic numbers\u002Fstrings\n- [ ] Dead code removed\n\n### Structure\n\n- [ ] Related code is together\n- [ ] Clear module boundaries\n- [ ] Dependencies flow in one direction\n- [ ] No circular dependencies\n\n### Type Safety\n\n- [ ] Types defined for all public APIs\n- [ ] No `any` types without justification\n- [ ] Nullable types explicitly marked\n\n### Testing\n\n- [ ] Refactored code is tested\n- [ ] Tests cover edge cases\n- [ ] All tests pass\n\n---\n\n## Common Refactoring Operations\n\n| Operation                                     | Description                           |\n| --------------------------------------------- | ------------------------------------- |\n| Extract Method                                | Turn code fragment into method        |\n| Extract Class                                 | Move behavior to new class            |\n| Extract Interface                             | Create interface from implementation  |\n| Inline Method                                 | Move method body back to caller       |\n| Inline Class                                  | Move class behavior to caller         |\n| Pull Up Method                                | Move method to superclass             |\n| Push Down Method                              | Move method to subclass               |\n| Rename Method\u002FVariable                        | Improve clarity                       |\n| Introduce Parameter Object                    | Group related parameters              |\n| Replace Conditional with Polymorphism         | Use polymorphism instead of switch\u002Fif |\n| Replace Magic Number with Constant            | Named constants                       |\n| Decompose Conditional                         | Break complex conditions              |\n| Consolidate Conditional                       | Combine duplicate conditions          |\n| Replace Nested Conditional with Guard Clauses | Early returns                         |\n| Introduce Null Object                         | Eliminate null checks                 |\n| Replace Type Code with Class\u002FEnum             | Strong typing                         |\n| Replace Inheritance with Delegation           | Composition over inheritance          |\n\n## ? Связи\n\n- [[MOC - Skills]] — Skills library\n- [[skills\u002Fskills-copilot]] — Category: skills-copilot\n- [[MOC - Agents]] — Copilot agents\n\n","# Refactor\n\n## Overview\n\nImprove code structure and readability without changing external behavior. Refactoring is gradual evolution, not revolution. Use this for improving existing code, not rewriting from scratch.\n\n## When to Use\n\nUse this skill when:\n\n- Code is hard to understand or maintain\n- Functions\u002Fclasses are too large\n- Code smells need addressing\n- Adding features is difficult due to code structure\n- User asks \"clean up this code\", \"refactor this\", \"improve this\"\n\n---\n\n## Refactoring Principles\n\n### The Golden Rules\n\n1. **Behavior is preserved** - Refactoring doesn't change what the code does, only how\n2. **Small steps** - Make tiny changes, test after each\n3. **Version control is your friend** - Commit before and after each safe state\n4. **Tests are essential** - Without tests, you're not refactoring, you're editing\n5. **One thing at a time** - Don't mix refactoring with feature changes\n\n### When NOT to Refactor\n\n```\n- Code that works and won't change again (if it ain't broke...)\n- Critical production code without tests (add tests first)\n- When you're under a tight deadline\n- \"Just because\" - need a clear purpose\n```\n\n---\n\n## Common Code Smells & Fixes\n\n### 1. Long Method\u002FFunction\n\n```diff\n# BAD: 200-line function that does everything\n- async function processOrder(orderId) {\n-   \u002F\u002F 50 lines: fetch order\n-   \u002F\u002F 30 lines: validate order\n-   \u002F\u002F 40 lines: calculate pricing\n-   \u002F\u002F 30 lines: update inventory\n-   \u002F\u002F 20 lines: create shipment\n-   \u002F\u002F 30 lines: send notifications\n- }\n\n# GOOD: Broken into focused functions\n+ async function processOrder(orderId) {\n+   const order = await fetchOrder(orderId);\n+   validateOrder(order);\n+   const pricing = calculatePricing(order);\n+   await updateInventory(order);\n+   const shipment = await createShipment(order);\n+   await sendNotifications(order, pricing, shipment);\n+   return { order, pricing, shipment };\n+ }\n```\n\n### 2. Duplicated Code\n\n```diff\n# BAD: Same logic in multiple places\n- function calculateUserDiscount(user) {\n-   if (user.membership === 'gold') return user.total * 0.2;\n-   if (user.membership === 'silver') return user.total * 0.1;\n-   return 0;\n- }\n-\n- function calculateOrderDiscount(order) {\n-   if (order.user.membership === 'gold') return order.total * 0.2;\n-   if (order.user.membership === 'silver') return order.total * 0.1;\n-   return 0;\n- }\n\n# GOOD: Extract common logic\n+ function getMembershipDiscountRate(membership) {\n+   const rates = { gold: 0.2, silver: 0.1 };\n+   return rates[membership] || 0;\n+ }\n+\n+ function calculateUserDiscount(user) {\n+   return user.total * getMembershipDiscountRate(user.membership);\n+ }\n+\n+ function calculateOrderDiscount(order) {\n+   return order.total * getMembershipDiscountRate(order.user.membership);\n+ }\n```\n\n### 3. Large Class\u002FModule\n\n```diff\n# BAD: God object that knows too much\n- class UserManager {\n-   createUser() { \u002F* ... *\u002F }\n-   updateUser() { \u002F* ... *\u002F }\n-   deleteUser() { \u002F* ... *\u002F }\n-   sendEmail() { \u002F* ... *\u002F }\n-   generateReport() { \u002F* ... *\u002F }\n-   handlePayment() { \u002F* ... *\u002F }\n-   validateAddress() { \u002F* ... *\u002F }\n-   \u002F\u002F 50 more methods...\n- }\n\n# GOOD: Single responsibility per class\n+ class UserService {\n+   create(data) { \u002F* ... *\u002F }\n+   update(id, data) { \u002F* ... *\u002F }\n+   delete(id) { \u002F* ... *\u002F }\n+ }\n+\n+ class EmailService {\n+   send(to, subject, body) { \u002F* ... *\u002F }\n+ }\n+\n+ class ReportService {\n+   generate(type, params) { \u002F* ... *\u002F }\n+ }\n+\n+ class PaymentService {\n+   process(amount, method) { \u002F* ... *\u002F }\n+ }\n```\n\n### 4. Long Parameter List\n\n```diff\n# BAD: Too many parameters\n- function createUser(email, password, name, age, address, city, country, phone) {\n-   \u002F* ... *\u002F\n- }\n\n# GOOD: Group related parameters\n+ interface UserData {\n+   email: string;\n+   password: string;\n+   name: string;\n+   age?: number;\n+   address?: Address;\n+   phone?: string;\n+ }\n+\n+ function createUser(data: UserData) {\n+   \u002F* ... *\u002F\n+ }\n\n# EVEN BETTER: Use builder pattern for complex construction\n+ const user = UserBuilder\n+   .email('test@example.com')\n+   .password('secure123')\n+   .name('Test User')\n+   .address(address)\n+   .build();\n```\n\n### 5. Feature Envy\n\n```diff\n# BAD: Method that uses another object's data more than its own\n- class Order {\n-   calculateDiscount(user) {\n-     if (user.membershipLevel === 'gold') {\n+       return this.total * 0.2;\n+     }\n+     if (user.accountAge > 365) {\n+       return this.total * 0.1;\n+     }\n+     return 0;\n+   }\n+ }\n\n# GOOD: Move logic to the object that owns the data\n+ class User {\n+   getDiscountRate(orderTotal) {\n+     if (this.membershipLevel === 'gold') return 0.2;\n+     if (this.accountAge > 365) return 0.1;\n+     return 0;\n+   }\n+ }\n+\n+ class Order {\n+   calculateDiscount(user) {\n+     return this.total * user.getDiscountRate(this.total);\n+   }\n+ }\n```\n\n### 6. Primitive Obsession\n\n```diff\n# BAD: Using primitives for domain concepts\n- function sendEmail(to, subject, body) { \u002F* ... *\u002F }\n- sendEmail('user@example.com', 'Hello', '...');\n\n- function createPhone(country, number) {\n-   return `${country}-${number}`;\n- }\n\n# GOOD: Use domain types\n+ class Email {\n+   private constructor(public readonly value: string) {\n+     if (!Email.isValid(value)) throw new Error('Invalid email');\n+   }\n+   static create(value: string) { return new Email(value); }\n+   static isValid(email: string) { return \u002F^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$\u002F.test(email); }\n+ }\n+\n+ class PhoneNumber {\n+   constructor(\n+     public readonly country: string,\n+     public readonly number: string\n+   ) {\n+     if (!PhoneNumber.isValid(country, number)) throw new Error('Invalid phone');\n+   }\n+   toString() { return `${this.country}-${this.number}`; }\n+   static isValid(country: string, number: string) { \u002F* ... *\u002F }\n+ }\n+\n+ \u002F\u002F Usage\n+ const email = Email.create('user@example.com');\n+ const phone = new PhoneNumber('1', '555-1234');\n```\n\n### 7. Magic Numbers\u002FStrings\n\n```diff\n# BAD: Unexplained values\n- if (user.status === 2) { \u002F* ... *\u002F }\n- const discount = total * 0.15;\n- setTimeout(callback, 86400000);\n\n# GOOD: Named constants\n+ const UserStatus = {\n+   ACTIVE: 1,\n+   INACTIVE: 2,\n+   SUSPENDED: 3\n+ } as const;\n+\n+ const DISCOUNT_RATES = {\n+   STANDARD: 0.1,\n+   PREMIUM: 0.15,\n+   VIP: 0.2\n+ } as const;\n+\n+ const ONE_DAY_MS = 24 * 60 * 60 * 1000;\n+\n+ if (user.status === UserStatus.INACTIVE) { \u002F* ... *\u002F }\n+ const discount = total * DISCOUNT_RATES.PREMIUM;\n+ setTimeout(callback, ONE_DAY_MS);\n```\n\n### 8. Nested Conditionals\n\n```diff\n# BAD: Arrow code\n- function process(order) {\n-   if (order) {\n-     if (order.user) {\n-       if (order.user.isActive) {\n-         if (order.total > 0) {\n-           return processOrder(order);\n+         } else {\n+           return { error: 'Invalid total' };\n+         }\n+       } else {\n+         return { error: 'User inactive' };\n+       }\n+     } else {\n+       return { error: 'No user' };\n+     }\n+   } else {\n+     return { error: 'No order' };\n+   }\n+ }\n\n# GOOD: Guard clauses \u002F early returns\n+ function process(order) {\n+   if (!order) return { error: 'No order' };\n+   if (!order.user) return { error: 'No user' };\n+   if (!order.user.isActive) return { error: 'User inactive' };\n+   if (order.total \u003C= 0) return { error: 'Invalid total' };\n+   return processOrder(order);\n+ }\n\n# EVEN BETTER: Using Result type\n+ function process(order): Result\u003CProcessedOrder, Error> {\n+   return Result.combine([\n+     validateOrderExists(order),\n+     validateUserExists(order),\n+     validateUserActive(order.user),\n+     validateOrderTotal(order)\n+   ]).flatMap(() => processOrder(order));\n+ }\n```\n\n### 9. Dead Code\n\n```diff\n# BAD: Unused code lingers\n- function oldImplementation() { \u002F* ... *\u002F }\n- const DEPRECATED_VALUE = 5;\n- import { unusedThing } from '.\u002Fsomewhere';\n- \u002F\u002F Commented out code\n- \u002F\u002F function oldCode() { \u002F* ... *\u002F }\n\n# GOOD: Remove it\n+ \u002F\u002F Delete unused functions, imports, and commented code\n+ \u002F\u002F If you need it again, git history has it\n```\n\n### 10. Inappropriate Intimacy\n\n```diff\n# BAD: One class reaches deep into another\n- class OrderProcessor {\n-   process(order) {\n-     order.user.profile.address.street;  \u002F\u002F Too intimate\n-     order.repository.connection.config;  \u002F\u002F Breaking encapsulation\n+   }\n+ }\n\n# GOOD: Ask, don't tell\n+ class OrderProcessor {\n+   process(order) {\n+     order.getShippingAddress();  \u002F\u002F Order knows how to get it\n+     order.save();  \u002F\u002F Order knows how to save itself\n+   }\n+ }\n```\n\n---\n\n## Extract Method Refactoring\n\n### Before and After\n\n```diff\n# Before: One long function\n- function printReport(users) {\n-   console.log('USER REPORT');\n-   console.log('============');\n-   console.log('');\n-   console.log(`Total users: ${users.length}`);\n-   console.log('');\n-   console.log('ACTIVE USERS');\n-   console.log('------------');\n-   const active = users.filter(u => u.isActive);\n-   active.forEach(u => {\n-     console.log(`- ${u.name} (${u.email})`);\n-   });\n-   console.log('');\n-   console.log(`Active: ${active.length}`);\n-   console.log('');\n-   console.log('INACTIVE USERS');\n-   console.log('--------------');\n-   const inactive = users.filter(u => !u.isActive);\n-   inactive.forEach(u => {\n-     console.log(`- ${u.name} (${u.email})`);\n-   });\n-   console.log('');\n-   console.log(`Inactive: ${inactive.length}`);\n- }\n\n# After: Extracted methods\n+ function printReport(users) {\n+   printHeader('USER REPORT');\n+   console.log(`Total users: ${users.length}\\n`);\n+   printUserSection('ACTIVE USERS', users.filter(u => u.isActive));\n+   printUserSection('INACTIVE USERS', users.filter(u => !u.isActive));\n+ }\n+\n+ function printHeader(title) {\n+   const line = '='.repeat(title.length);\n+   console.log(title);\n+   console.log(line);\n+   console.log('');\n+ }\n+\n+ function printUserSection(title, users) {\n+   console.log(title);\n+   console.log('-'.repeat(title.length));\n+   users.forEach(u => console.log(`- ${u.name} (${u.email})`));\n+   console.log('');\n+   console.log(`${title.split(' ')[0]}: ${users.length}`);\n+   console.log('');\n+ }\n```\n\n---\n\n## Introducing Type Safety\n\n### From Untyped to Typed\n\n```diff\n# Before: No types\n- function calculateDiscount(user, total, membership, date) {\n-   if (membership === 'gold' && date.getDay() === 5) {\n-     return total * 0.25;\n-   }\n-   if (membership === 'gold') return total * 0.2;\n-   return total * 0.1;\n- }\n\n# After: Full type safety\n+ type Membership = 'bronze' | 'silver' | 'gold';\n+\n+ interface User {\n+   id: string;\n+   name: string;\n+   membership: Membership;\n+ }\n+\n+ interface DiscountResult {\n+   original: number;\n+   discount: number;\n+   final: number;\n+   rate: number;\n+ }\n+\n+ function calculateDiscount(\n+   user: User,\n+   total: number,\n+   date: Date = new Date()\n+ ): DiscountResult {\n+   if (total \u003C 0) throw new Error('Total cannot be negative');\n+\n+   let rate = 0.1; \u002F\u002F Default bronze\n+\n+   if (user.membership === 'gold' && date.getDay() === 5) {\n+     rate = 0.25; \u002F\u002F Friday bonus for gold\n+   } else if (user.membership === 'gold') {\n+     rate = 0.2;\n+   } else if (user.membership === 'silver') {\n+     rate = 0.15;\n+   }\n+\n+   const discount = total * rate;\n+\n+   return {\n+     original: total,\n+     discount,\n+     final: total - discount,\n+     rate\n+   };\n+ }\n```\n\n---\n\n## Design Patterns for Refactoring\n\n### Strategy Pattern\n\n```diff\n# Before: Conditional logic\n- function calculateShipping(order, method) {\n-   if (method === 'standard') {\n-     return order.total > 50 ? 0 : 5.99;\n-   } else if (method === 'express') {\n-     return order.total > 100 ? 9.99 : 14.99;\n+   } else if (method === 'overnight') {\n+     return 29.99;\n+   }\n+ }\n\n# After: Strategy pattern\n+ interface ShippingStrategy {\n+   calculate(order: Order): number;\n+ }\n+\n+ class StandardShipping implements ShippingStrategy {\n+   calculate(order: Order) {\n+     return order.total > 50 ? 0 : 5.99;\n+   }\n+ }\n+\n+ class ExpressShipping implements ShippingStrategy {\n+   calculate(order: Order) {\n+     return order.total > 100 ? 9.99 : 14.99;\n+   }\n+ }\n+\n+ class OvernightShipping implements ShippingStrategy {\n+   calculate(order: Order) {\n+     return 29.99;\n+   }\n+ }\n+\n+ function calculateShipping(order: Order, strategy: ShippingStrategy) {\n+   return strategy.calculate(order);\n+ }\n```\n\n### Chain of Responsibility\n\n```diff\n# Before: Nested validation\n- function validate(user) {\n-   const errors = [];\n-   if (!user.email) errors.push('Email required');\n+   else if (!isValidEmail(user.email)) errors.push('Invalid email');\n+   if (!user.name) errors.push('Name required');\n+   if (user.age \u003C 18) errors.push('Must be 18+');\n+   if (user.country === 'blocked') errors.push('Country not supported');\n+   return errors;\n+ }\n\n# After: Chain of responsibility\n+ abstract class Validator {\n+   abstract validate(user: User): string | null;\n+   setNext(validator: Validator): Validator {\n+     this.next = validator;\n+     return validator;\n+   }\n+   validate(user: User): string | null {\n+     const error = this.doValidate(user);\n+     if (error) return error;\n+     return this.next?.validate(user) ?? null;\n+   }\n+ }\n+\n+ class EmailRequiredValidator extends Validator {\n+   doValidate(user: User) {\n+     return !user.email ? 'Email required' : null;\n+   }\n+ }\n+\n+ class EmailFormatValidator extends Validator {\n+   doValidate(user: User) {\n+     return user.email && !isValidEmail(user.email) ? 'Invalid email' : null;\n+   }\n+ }\n+\n+ \u002F\u002F Build the chain\n+ const validator = new EmailRequiredValidator()\n+   .setNext(new EmailFormatValidator())\n+   .setNext(new NameRequiredValidator())\n+   .setNext(new AgeValidator())\n+   .setNext(new CountryValidator());\n```\n\n---\n\n## Refactoring Steps\n\n### Safe Refactoring Process\n\n```\n1. PREPARE\n   - Ensure tests exist (write them if missing)\n   - Commit current state\n   - Create feature branch\n\n2. IDENTIFY\n   - Find the code smell to address\n   - Understand what the code does\n   - Plan the refactoring\n\n3. REFACTOR (small steps)\n   - Make one small change\n   - Run tests\n   - Commit if tests pass\n   - Repeat\n\n4. VERIFY\n   - All tests pass\n   - Manual testing if needed\n   - Performance unchanged or improved\n\n5. CLEAN UP\n   - Update comments\n   - Update documentation\n   - Final commit\n```\n\n---\n\n## Refactoring Checklist\n\n### Code Quality\n\n- [ ] Functions are small (\u003C 50 lines)\n- [ ] Functions do one thing\n- [ ] No duplicated code\n- [ ] Descriptive names (variables, functions, classes)\n- [ ] No magic numbers\u002Fstrings\n- [ ] Dead code removed\n\n### Structure\n\n- [ ] Related code is together\n- [ ] Clear module boundaries\n- [ ] Dependencies flow in one direction\n- [ ] No circular dependencies\n\n### Type Safety\n\n- [ ] Types defined for all public APIs\n- [ ] No `any` types without justification\n- [ ] Nullable types explicitly marked\n\n### Testing\n\n- [ ] Refactored code is tested\n- [ ] Tests cover edge cases\n- [ ] All tests pass\n\n---\n\n## Common Refactoring Operations\n\n| Operation                                     | Description                           |\n| --------------------------------------------- | ------------------------------------- |\n| Extract Method                                | Turn code fragment into method        |\n| Extract Class                                 | Move behavior to new class            |\n| Extract Interface                             | Create interface from implementation  |\n| Inline Method                                 | Move method body back to caller       |\n| Inline Class                                  | Move class behavior to caller         |\n| Pull Up Method                                | Move method to superclass             |\n| Push Down Method                              | Move method to subclass               |\n| Rename Method\u002FVariable                        | Improve clarity                       |\n| Introduce Parameter Object                    | Group related parameters              |\n| Replace Conditional with Polymorphism         | Use polymorphism instead of switch\u002Fif |\n| Replace Magic Number with Constant            | Named constants                       |\n| Decompose Conditional                         | Break complex conditions              |\n| Consolidate Conditional                       | Combine duplicate conditions          |\n| Replace Nested Conditional with Guard Clauses | Early returns                         |\n| Introduce Null Object                         | Eliminate null checks                 |\n| Replace Type Code with Class\u002FEnum             | Strong typing                         |\n| Replace Inheritance with Delegation           | Composition over inheritance          |\n\n## ? Связи\n\n- [[MOC - Skills]] — Skills library\n- [[skills\u002Fskills-copilot]] — Category: skills-copilot\n- [[MOC - Agents]] — Copilot agents\n\n",{"name":5,"tags":51,"license":15,"description":7},[52,53,30],"domain\u002Fagents","artifact\u002Fskill","main","bdd9f958d7bb1a0f19b8ad8da020b0bab0f53eb1","vc-kit\u002Fcontent\u002FCOMBINED\u002FCOMBINED\u002Fskills\u002Fskills-copilot\u002Frefactor",1,"https:\u002F\u002Fgithub.com\u002Fibragimov-oasis\u002Fvibe-coder","https:\u002F\u002Fgithub.com\u002Fibragimov-oasis","2026-06-24 16:31:18",{"source":8,"skillName":5,"commands":62,"prompt":72,"zipAvailable":73},[63,66,69],{"tool":64,"command":65},"npx","npx skills add ibragimov-oasis\u002Fvibe-coder --skill refactor",{"tool":67,"command":68},"bunx","bunx skills add ibragimov-oasis\u002Fvibe-coder --skill refactor",{"tool":70,"command":71},"pnpm","pnpm dlx skills add ibragimov-oasis\u002Fvibe-coder --skill refactor","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fibragimov-oasis\u002Fvibe-coder\u002Fblob\u002Fmain\u002Fvc-kit\u002Fcontent\u002FCOMBINED\u002FCOMBINED\u002Fskills\u002Fskills-copilot\u002Frefactor\u002FSKILL.md",true,[],[76,108,134,153,179,210],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":88,"publishedAt":46},"01M6Q4Q22KKKVMJJYA411DQ4ER","ckm:ui-styling","Create beautiful, accessible user interfaces with shadcn\u002Fui components (built on Radix UI + Tailwind), Tailwind CSS utility-first styling, and canvas-based visual designs. Use when building user interfaces, implementing design systems, creating responsive layouts, adding accessible components (dialogs, dropdowns, forms, tables), customizing themes and colors, implementing dark mode, generating visual designs and posters, or establishing consistent styling patterns across applications.","https:\u002F\u002Fgithub.com\u002Fibragimov-oasis\u002Fvibe-coder\u002Fblob\u002Fmain\u002Fvc-kit\u002Fcontent\u002FCOMBINED\u002FCOMBINED\u002Fui-design\u002Fui-rules\u002Fui-ux-pro-max\u002Fclaude\u002Fskills\u002Fui-styling\u002FSKILL.md",[82,83],{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":84,"categoryName":85,"taxonomyType":86,"taxonomyTypeDesc":87},"01JBSEEDCAT000000000000032","设计师","PROFESSION","适用职业",[89,90,91,92,93,37,94,95,96,97,98,99,100,101,102,103,104,105,106,107],"ui styling","ui","styling","ckm:ui styling","ckm","css","canvas","components","component","create","design systems","Tailwind","across","themes","utility","mode","implementing","artifact\u002Fui-component","source\u002Fui-design",{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":122,"publishedAt":46},"01M6Q4PQ2NX4NDVWTEHA3MQ2R0","ckm:design","Comprehensive design skill: brand identity, design tokens, UI styling, logo generation (55 styles, Gemini AI), corporate identity program (50 deliverables, CIP mockups), HTML presentations (Chart.js), banner design (22 styles, social\u002Fads\u002Fweb\u002Fprint), icon design (15 styles, SVG, Gemini 3.1 Pro), social photos (HTML→screenshot, multi-platform). Actions: design logo, create CIP, generate mockups, build slides, design banner, generate icon, create social photos, social media images, brand identity, design system. Platforms: Facebook, Twitter, LinkedIn, YouTube, Instagram, Pinterest, TikTok, Threads, Google Ads.","https:\u002F\u002Fgithub.com\u002Fibragimov-oasis\u002Fvibe-coder\u002Fblob\u002Fmain\u002Fvc-kit\u002Fcontent\u002FCOMBINED\u002FCOMBINED\u002Fui-design\u002Fui-rules\u002Fui-ux-pro-max\u002Fclaude\u002Fskills\u002Fdesign\u002FSKILL.md",[114,117,118,121],{"categoryNo":115,"categoryName":116,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000003","演示文稿",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":119,"categoryName":120,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",{"categoryNo":84,"categoryName":85,"taxonomyType":86,"taxonomyTypeDesc":87},[37,110,93,123,97,89,124,98,125,126,127,128,129,130,131,132,34,133,106,107],"google","presentations","generate","screenshot","actions","Media","logo","ads","youtube","tiktok","chart",{"skillNo":135,"name":136,"nameZh":6,"description":137,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":138,"categories":139,"keywords":142,"publishedAt":46},"01M6Q4PJE27GEA3M0CECEBCZKS","ckm:design-system","Token architecture, component specifications, and slide generation. Three-layer tokens (primitive→semantic→component), CSS variables, spacing\u002Ftypography scales, component specs, strategic slide creation. Use for design tokens, systematic design, brand-compliant presentations.","https:\u002F\u002Fgithub.com\u002Fibragimov-oasis\u002Fvibe-coder\u002Fblob\u002Fmain\u002Fvc-kit\u002Fcontent\u002FCOMBINED\u002FCOMBINED\u002Fui-design\u002Fui-rules\u002Fui-ux-pro-max\u002Fclaude\u002Fskills\u002Fdesign-system\u002FSKILL.md",[140,141],{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":84,"categoryName":85,"taxonomyType":86,"taxonomyTypeDesc":87},[37,143,144,145,110,93,94,97,146,124,34,147,148,149,150,32,151,152,106,107],"design system","system","ckm:design system","architecture","token","creation","systematic","css variables","spacing","layer",{"skillNo":154,"name":155,"nameZh":6,"description":156,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":157,"categories":158,"keywords":164,"publishedAt":46},"01M6Q4P90JXFYMH2S634QM6SQJ","ckm:banner-design","Design banners for social media, ads, website heroes, creative assets, and print. Multiple art direction options with AI-generated visuals. Actions: design, create, generate banner. Platforms: Facebook, Twitter\u002FX, LinkedIn, YouTube, Instagram, Google Display, website hero, print. Styles: minimalist, gradient, bold typography, photo-based, illustrated, geometric, retro, glassmorphism, 3D, neon, duotone, editorial, collage. Uses ui-ux-pro-max, frontend-design, ai-artist, ai-multimodal skills.","https:\u002F\u002Fgithub.com\u002Fibragimov-oasis\u002Fvibe-coder\u002Fblob\u002Fmain\u002Fvc-kit\u002Fcontent\u002FCOMBINED\u002FCOMBINED\u002Fui-design\u002Fui-rules\u002Fui-ux-pro-max\u002Fclaude\u002Fskills\u002Fbanner-design\u002FSKILL.md",[159,162,163],{"categoryNo":160,"categoryName":161,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000009","前端开发",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":84,"categoryName":85,"taxonomyType":86,"taxonomyTypeDesc":87},[37,165,166,167,93,168,127,128,169,170,171,172,173,174,175,176,106,107,177,178],"banner design","ckm:banner design","banner","frontend","3D","generated","Art","social","dimensions","neon","direction","display","frontend-design","hero",{"skillNo":180,"name":181,"nameZh":6,"description":182,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":183,"categories":184,"keywords":191,"publishedAt":46},"01M6Q2RZXBJ9TBE413GXCYQNDB","seo","Comprehensive SEO analysis for any website or business type. Performs full site audits, single-page deep analysis, technical SEO checks (crawlability, indexability, Core Web Vitals with INP), schema markup detection\u002Fvalidation\u002Fgeneration, content quality assessment (E-E-A-T framework per Dec 2025 update extending to all competitive queries), image optimization, sitemap analysis, and Generative Engine Optimization (GEO) for AI Overviews, ChatGPT, and Perplexity citations. Analyzes AI crawler accessibility (GPTBot, ClaudeBot, PerplexityBot), llms.txt compliance, brand mention signals, and passage-level citability. Industry detection for SaaS, e-commerce, local business, publishers, agencies. Triggers on: \"SEO\", \"audit\", \"schema\", \"Core Web Vitals\", \"sitemap\", \"E-E-A-T\", \"AI Overviews\", \"GEO\", \"technical SEO\", \"content quality\", \"page speed\", \"structured data\".","https:\u002F\u002Fgithub.com\u002Fibragimov-oasis\u002Fvibe-coder\u002Fblob\u002Fmain\u002Fvc-kit\u002Fcontent\u002FCOMBINED\u002FCOMBINED\u002Fskills\u002Fskills-seo\u002Fseo\u002Fclaude-seo\u002Fskills\u002Fseo\u002FSKILL.md",[185,188],{"categoryNo":186,"categoryName":187,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000019","营销推广",{"categoryNo":189,"categoryName":190,"taxonomyType":86,"taxonomyTypeDesc":87},"01JBSEEDCAT000000000000035","市场营销",[181,192,193,194,195,196,197,34,198,199,200,201,202,203,204,205,206,207,208,209],"image","llms","assessment","deep analysis","Citations","analysis","local","deep","crawlability","seo analysis","2025","commerce","URL","domain\u002Fseo","source\u002Fskills-seo","vitals","generative","publishers",{"skillNo":211,"name":212,"nameZh":6,"description":213,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":214,"categories":215,"keywords":218,"publishedAt":46},"01M6Q2RVE7VGFCFQKBK468NHVY","seo-technical","Technical SEO audit across 9 categories: crawlability, indexability, security, URL structure, mobile, Core Web Vitals, structured data, JavaScript rendering, and IndexNow protocol. Use when user says \"technical SEO\", \"crawl issues\", \"robots.txt\", \"Core Web Vitals\", \"site speed\", or \"security headers\".","https:\u002F\u002Fgithub.com\u002Fibragimov-oasis\u002Fvibe-coder\u002Fblob\u002Fmain\u002Fvc-kit\u002Fcontent\u002FCOMBINED\u002FCOMBINED\u002Fskills\u002Fskills-seo\u002Fseo\u002Fclaude-seo\u002Fskills\u002Fseo-technical\u002FSKILL.md",[216,217],{"categoryNo":186,"categoryName":187,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":189,"categoryName":190,"taxonomyType":86,"taxonomyTypeDesc":87},[181,219,220,221,222,223,224,225,226,34,101,200,227,228,204,229,230,205,206,207],"technical","seo technical","issues","audit","data","mobile","crawl","structure","rendering","technical seo audit","headers","categories"]