[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6CD21K3E62J9ND703J96GQ9":3,"skill-same:01M6CD21K3E62J9ND703J96GQ9":97},{"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":31,"linkOnly":32,"markdownContent":33,"markdownBody":34,"frontMatter":35,"refName":39,"commitSha":40,"skillDirectory":41,"forksCount":14,"repositoryHtmlUrl":42,"repositoryHomepageUrl":6,"ownerHtmlUrl":43,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":44,"install":45,"resources":58},"01M6CD21K3E62J9ND703J96GQ9","programming-advisor",null,"Evaluate existing solutions (libraries, SaaS, open source) before custom development to avoid reinventing the wheel. Use when considering building new features, asking \"should I build or use existing\", or need build vs buy cost analysis with token estimates.","loriensleafs\u002Fbrain","loriensleafs","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F315385?v=4","01M6CCYZETMCJPTHNS258YRCBC","Peter Kloss","01M6CCYZK25T8516A39S9PCJT7",0,"MIT","https:\u002F\u002Fgithub.com\u002Floriensleafs\u002Fbrain\u002Fblob\u002Fmain\u002Ftemplates\u002Fskills\u002Fprogramming-advisor\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30],"programming","advisor","programming advisor","cost analysis","libraries","development","open source","saas","analysis","open","use","cost","2026-11-10 10:12:30",false,"---\nname: programming-advisor\ndescription: Evaluate existing solutions (libraries, SaaS, open source) before custom development to avoid reinventing the wheel. Use when considering building new features, asking \"should I build or use existing\", or need build vs buy cost analysis with token estimates.\nlicense: MIT\nmetadata:\n  version: 1.0.0\n  model: claude-opus-4-5\n---\n\n# Programming Advisor - \"Reinventing the Wheel\" Detector\n\n## Triggers\n\n| Trigger Phrase | Action |\n|----------------|--------|\n| \"should I build X or use a library\" | Search existing solutions, provide comparison |\n| \"find existing solutions for X\" | Web search, categorize findings |\n| \"is there a package for X\" | Search npm\u002Fpip\u002Fcargo\u002Fetc |\n| \"build vs buy for X\" | Generate cost comparison table |\n| \"check if X exists before building\" | Run full wheel detection workflow |\n\n## Core Philosophy\n\nBefore writing a single line of code, determine if the wheel already exists. Vibe coding burns tokens, time, and creates maintenance burden. Existing solutions often provide better quality, security patches, and community support.\n\n## Workflow\n\n### Step 1: Capture Intent\n\nExtract from user request:\n\n- **What**: Core functionality needed\n- **Why**: Use case \u002F problem being solved\n- **Constraints**: Language, platform, budget, licensing requirements\n\n### Step 2: Search for Existing Solutions\n\nSearch strategy (use web_search):\n\n1. `\"{functionality} library {language}\"`\n2. `\"{functionality} open source\"`\n3. `\"{functionality} SaaS tool\"`\n4. `\"best {functionality} solution 2024\"`\n5. `\"{functionality} npm\u002Fpip\u002Fcargo package\"` (based on ecosystem)\n\nCategorize findings:\n\n- **Libraries\u002FPackages**: npm, pip, cargo, etc. (free, integrate into code)\n- **Open Source Tools**: Full applications (free, self-host)\n- **SaaS\u002FCommercial**: Paid services (cost, no maintenance)\n- **Frameworks**: Scaffolding for common patterns\n\n### Step 3: Estimate Vibe Coding Cost\n\nUse the token estimation reference: [references\u002Ftoken-estimates.md](references\u002Ftoken-estimates.md)\n\nFactors to estimate:\n\n| Factor | Low | Medium | High |\n|--------|-----|--------|------|\n| Lines of Code | \u003C200 | 200-1000 | >1000 |\n| Token Burn (est.) | 5-20K | 20-100K | 100K+ |\n| Development Iterations | 1-3 | 4-10 | 10+ |\n| Debugging Sessions | Minimal | Moderate | Extensive |\n| Maintenance Burden | Low | Medium | High |\n\n### Step 4: Generate Comparison Table\n\nAlways present a decision table:\n\n```markdown\n| Option | Type | Cost | Setup Time | Maintenance | Token Burn | Verdict |\n|--------|------|------|------------|-------------|------------|---------|\n| [Solution A] | Library | Free | 5 min | Updates only | 0 | ✅ Recommended |\n| [Solution B] | SaaS | $X\u002Fmo | Instant | None | 0 | ⚡ Fastest |\n| Vibe Code | Custom | Free | X hrs | You own it | ~XK tokens | ? Full control |\n```\n\n### Step 5: Buy vs Build Evaluation Framework\n\n#### When to Build\n\n- [ ] Software is core to business differentiation\n- [ ] Competitive advantage requires 100% control\n- [ ] Vendor solutions insufficient for requirements\n- [ ] Team has capacity without additional investment\n- [ ] Long-term total cost of ownership favors build\n\n#### When to Buy\n\n- [ ] Time to value critical (weeks not months)\n- [ ] Standard capability, not differentiating\n- [ ] Vendor efficiencies reduce total cost\n- [ ] Team should focus on higher-impact projects\n- [ ] Acceptable vendor lock-in trade-off\n\n#### Evaluation Matrix\n\n| Factor | Build | Buy | Weight | Score |\n|--------|-------|-----|--------|-------|\n| Core competency | [Evidence] | [Evidence] | 30% | [Weighted score] |\n| Time to value | [Evidence] | [Evidence] | 25% | [Weighted score] |\n| Total cost (5 years) | [Evidence] | [Evidence] | 20% | [Weighted score] |\n| Customization needs | [Evidence] | [Evidence] | 15% | [Weighted score] |\n| Team expertise | [Evidence] | [Evidence] | 10% | [Weighted score] |\n| **Total Score** | | | **100%** | [Sum] |\n\n#### Hidden Costs Analysis\n\n**Build Hidden Costs**:\n\n- Maintenance burden (20-40% of build cost annually)\n- Opportunity cost (what else could team build?)\n- Expertise acquisition\u002Fretention\n- Testing and security validation\n- Documentation and knowledge transfer\n\n**Buy Hidden Costs**:\n\n- Integration complexity (API changes, data mapping)\n- Vendor lock-in (switching cost estimation)\n- Customization limitations (workarounds needed?)\n- Ongoing licensing (per-user, per-transaction costs)\n- Vendor stability risk (acquisition, discontinuation)\n\n#### Core vs Context Assessment\n\nUse Geoffrey Moore's framework to prioritize investment:\n\n| Capability | Type | Rationale | Strategy |\n|------------|------|-----------|----------|\n| [Capability 1] | Core | [Differentiates business] | Build, own, invest |\n| [Capability 2] | Context | [Necessary but commodity] | Buy, outsource |\n\n**Key Insight**: Building context is a distraction from core. Buy context, build core.\n\n#### Lindy Effect Consideration\n\nEvaluate technology maturity:\n\n- **Build**: Are you creating novel solution in unstable space? (High risk)\n- **Buy**: Is vendor solution based on Lindy survivor tech? (Lower risk)\n\n#### Buy vs Build Recommendation Template\n\n```markdown\n## Buy vs Build Recommendation: [Capability]\n\n**Verdict**: [BUILD | BUY | HYBRID]\n\n### Core Rationale\n[Primary reason in 2-3 sentences]\n\n### Evaluation Scores\n- Build score: [X\u002F100]\n- Buy score: [Y\u002F100]\n\n### Core vs Context\n[Core\u002FContext classification with justification]\n\n### Hidden Costs Accepted\n**If Build**: [Maintenance burden, opportunity cost, expertise]\n**If Buy**: [Lock-in level, integration complexity, licensing]\n\n### Decision Confidence\n[High | Medium | Low] - [Why]\n\n### Review Trigger\nRevisit if: [Conditions that would change this decision]\n```\n\n### Step 6: Recommendation Framework (Quick Reference)\n\nRecommend **existing solutions** when:\n\n- Mature library exists with >1K GitHub stars\n- SaaS solves it for \u003C$20\u002Fmo\n- Common problem with well-tested solutions\n- Security-sensitive (auth, crypto, payments)\n\nRecommend **vibe coding** when:\n\n- Highly specific business logic\n- Simple glue code (\u003C50 lines)\n- Learning exercise (explicitly stated)\n- No good existing solution found\n- Integration requirements are unusual\n\n### Step 7: If Vibe Coding Proceeds\n\nIf user chooses to build after seeing alternatives:\n\n1. Acknowledge the valid reasons\n2. Suggest existing code as reference\u002Finspiration\n3. Recommend libraries for sub-components\n4. Provide a hybrid approach when possible\n\n### Step 8: Integration Planning (When User Accepts Recommendation)\n\nWhen the user accepts a recommended solution, provide a complete integration plan:\n\n#### 8.1 Detect Project Context\n\nBefore generating the plan, analyze the user's project:\n\n- **Package manager**: Check for `package.json` (npm\u002Fyarn\u002Fpnpm), `requirements.txt`\u002F`pyproject.toml` (pip\u002Fpoetry), `Cargo.toml` (cargo), `go.mod` (go)\n- **Framework**: Identify React, Vue, Next.js, Rails, Django, FastAPI, etc.\n- **Existing dependencies**: Check for conflicts or complementary packages\n- **Project structure**: Understand where new code should live (src\u002F, lib\u002F, app\u002F, etc.)\n- **Code style**: Match existing patterns (TypeScript vs JS, ESM vs CJS, etc.)\n\n#### 8.2 Generate Installation Commands\n\nProvide ready-to-run commands for the detected package manager:\n\n```bash\n# npm\nnpm install \u003Cpackage>\n\n# yarn\nyarn add \u003Cpackage>\n\n# pnpm\npnpm add \u003Cpackage>\n\n# pip\npip install \u003Cpackage>\n\n# poetry\npoetry add \u003Cpackage>\n```\n\n#### 8.3 Provide Integration Steps\n\nCreate a numbered action plan:\n\n1. **Install dependencies** - Exact commands\n2. **Create\u002Fupdate config files** - If the library needs configuration\n3. **Add to existing code** - Where to import and initialize\n4. **Create new files** - With suggested file paths matching project structure\n5. **Update related files** - Any existing files that need modification\n\n#### 8.4 Generate Starter Code\n\nProvide code scaffolding that:\n\n- Matches the user's detected code style (TypeScript\u002FJavaScript, etc.)\n- Uses their existing patterns and conventions\n- Includes necessary imports\n- Shows basic usage with comments\n- Handles common edge cases\n\n#### 8.5 Warn About Potential Issues\n\nFlag any concerns:\n\n- **Dependency conflicts**: \"Note: This requires React 18+, you have React 17\"\n- **Breaking changes**: \"This library had major changes in v3, examples are for v3\"\n- **Peer dependencies**: \"You'll also need to install X\"\n- **Config requirements**: \"Requires adding to your tsconfig\u002Fbabel\u002Fwebpack config\"\n\n### Step 9: Cost Analysis (For Significant Decisions)\n\nFor features with meaningful cost implications (auth, payments, email, infrastructure), provide a Total Cost of Ownership (TCO) comparison.\n\n#### 9.1 When to Include Cost Analysis\n\nInclude cost table when:\n\n- SaaS options have monthly fees > $10\n- DIY token estimate > 50K tokens\n- User asks about costs or \"is it worth it\"\n- Comparing multiple paid services\n- Security-sensitive features (auth, payments)\n\n#### 9.2 Cost Calculation\n\nUse the pricing reference: [references\u002Fpricing-data.md](references\u002Fpricing-data.md)\n\n**Formula:**\n\n```text\nYear N Cost = Setup Cost + (Monthly × 12 × N) + (Maintenance × N)\n\nWhere:\n- Setup Cost (DIY) = Token Estimate × $0.015\u002F1K tokens\n- Maintenance (DIY) = 20% of Setup Cost annually\n- Maintenance (SaaS) = $0\n```\n\n#### 9.3 Cost Table Format\n\n```markdown\n## ? Cost Analysis\n\n| Option | Setup | Monthly | Year 1 | Year 3 | Notes |\n|--------|-------|---------|--------|--------|-------|\n| [SaaS A] | 10min | $25 | $300 | $900 | Free tier: 10K MAU |\n| [SaaS B] | 15min | $35 | $420 | $1,260 | More features |\n| [Free\u002FOSS] | 1hr | $0 | $0 | $0 | Self-host required |\n| DIY | Xhrs | $0 | ~$Y | ~$Z | + maintenance burden |\n\n? **Break-even:** [When DIY becomes cheaper, if ever]\n⚠️ **Hidden costs:** [Security audits, compliance, on-call burden]\n```\n\n#### 9.4 Hidden Costs to Surface\n\nAlways mention relevant hidden costs:\n\n- **Security audits**: $5K-50K for custom auth systems\n- **Compliance**: SOC2, GDPR, PCI implementation time\n- **On-call burden**: DIY = you're the support team\n- **Opportunity cost**: Time not spent on core product\n- **Technical debt**: Custom code needs maintenance forever\n\n#### 9.5 Red Flags to Call Out\n\nWarn users when they say:\n\n- \"It's just a simple auth system\" → Auth is never simple\n- \"We can build it in a weekend\" → You can't, securely\n- \"We'll add security later\" → Security debt is expensive\n- \"It's cheaper long-term\" → Usually false under 10K users\n\n## Response Template\n\n```markdown\n## ? Existing Solutions Found\n\nI found [N] existing solutions before we write custom code:\n\n### Libraries\u002FPackages\n- **[Name]**: [one-line description] | [stars\u002Fdownloads] | [link]\n\n### Open Source Tools  \n- **[Name]**: [one-line description] | [stars] | [link]\n\n### SaaS Options\n- **[Name]**: [one-line description] | [pricing] | [link]\n\n## ? Build vs Buy Comparison\n\n| Option | Type | Cost | Setup | Maintenance | Est. Tokens |\n|--------|------|------|-------|-------------|-------------|\n| ... | ... | ... | ... | ... | ... |\n\n## ? Cost Analysis (for significant decisions)\n\n| Option | Setup | Monthly | Year 1 | Year 3 | Notes |\n|--------|-------|---------|--------|--------|-------|\n| ... | ... | ... | ... | ... | ... |\n\n? **Break-even:** [analysis]\n⚠️ **Hidden costs:** [security, compliance, maintenance]\n\n## ? Recommendation\n\n[Clear recommendation with reasoning]\n\n## ? If You Still Want to Build\n\n[Only if user wants custom solution - suggest hybrid approach]\n```\n\n### Integration Plan Template (When User Accepts)\n\nWhen the user says \"let's use [recommended solution]\" or \"how do I add this?\", respond with:\n\n```markdown\n## ? Integration Plan: [Solution Name]\n\n### Your Project Context\n- **Detected**: [framework], [package manager], [language]\n- **Project structure**: [src\u002Fapp\u002Flib layout]\n\n### Step 1: Install Dependencies\n\n\\`\\`\\`bash\n[exact install command for their package manager]\n\\`\\`\\`\n\n### Step 2: Configuration (if needed)\n\n[Any config file changes needed]\n\n### Step 3: Create New Files\n\n? `[suggested\u002Ffile\u002Fpath.ts]`\n\\`\\`\\`typescript\n[starter code matching their project style]\n\\`\\`\\`\n\n### Step 4: Update Existing Files\n\n? `[existing\u002Ffile\u002Fto\u002Fmodify.ts]`\n\\`\\`\\`typescript\n\u002F\u002F Add this import\nimport { X } from '[package]'\n\n\u002F\u002F Use it like this\n[integration code]\n\\`\\`\\`\n\n### ⚠️ Notes\n- [Any warnings about versions, conflicts, or requirements]\n\n### ? Resources\n- [Official docs link]\n- [Relevant examples]\n```\n\n## Anti-Patterns to Flag\n\nAlert users when they're about to reinvent:\n\n- Authentication systems → \"Use Auth0, Clerk, Supabase Auth\"\n- State management → \"Consider Zustand, Redux Toolkit, Jotai\"\n- Form validation → \"Check out Zod, Yup, React Hook Form\"\n- API clients → \"Look at Axios, ky, ofetch\"\n- Date handling → \"Use date-fns, dayjs, Luxon\"\n- CLI tools → \"Consider Commander, yargs, oclif\"\n- PDF generation → \"Use pdf-lib, jsPDF, Puppeteer\"\n- Email sending → \"Check Resend, SendGrid, Nodemailer\"\n- Cron jobs → \"Use node-cron, Bull, Agenda\"\n- Database ORMs → \"Consider Prisma, Drizzle, TypeORM\"\n\n## Quick Reference: Common Token Burns\n\n| Task Complexity | Typical Token Burn | Time Equivalent |\n|-----------------|-------------------|-----------------|\n| Simple script (\u003C100 LOC) | 5-15K | 30min-1hr |\n| Utility module (100-500 LOC) | 15-50K | 2-4hrs |\n| Feature component (500-2K LOC) | 50-150K | 1-2 days |\n| Full application | 150K-500K+ | Days-weeks |\n\nSee [references\u002Ftoken-estimates.md](references\u002Ftoken-estimates.md) for detailed breakdowns.\n\nSee [references\u002Fcommon-solutions.md](references\u002Fcommon-solutions.md) for exhaustive list of commonly reinvented wheels.\n\nSee [references\u002Fintegration-patterns.md](references\u002Fintegration-patterns.md) for project detection and starter code patterns.\n\nSee [references\u002Fpricing-data.md](references\u002Fpricing-data.md) for SaaS pricing and cost calculation data.\n","# Programming Advisor - \"Reinventing the Wheel\" Detector\n\n## Triggers\n\n| Trigger Phrase | Action |\n|----------------|--------|\n| \"should I build X or use a library\" | Search existing solutions, provide comparison |\n| \"find existing solutions for X\" | Web search, categorize findings |\n| \"is there a package for X\" | Search npm\u002Fpip\u002Fcargo\u002Fetc |\n| \"build vs buy for X\" | Generate cost comparison table |\n| \"check if X exists before building\" | Run full wheel detection workflow |\n\n## Core Philosophy\n\nBefore writing a single line of code, determine if the wheel already exists. Vibe coding burns tokens, time, and creates maintenance burden. Existing solutions often provide better quality, security patches, and community support.\n\n## Workflow\n\n### Step 1: Capture Intent\n\nExtract from user request:\n\n- **What**: Core functionality needed\n- **Why**: Use case \u002F problem being solved\n- **Constraints**: Language, platform, budget, licensing requirements\n\n### Step 2: Search for Existing Solutions\n\nSearch strategy (use web_search):\n\n1. `\"{functionality} library {language}\"`\n2. `\"{functionality} open source\"`\n3. `\"{functionality} SaaS tool\"`\n4. `\"best {functionality} solution 2024\"`\n5. `\"{functionality} npm\u002Fpip\u002Fcargo package\"` (based on ecosystem)\n\nCategorize findings:\n\n- **Libraries\u002FPackages**: npm, pip, cargo, etc. (free, integrate into code)\n- **Open Source Tools**: Full applications (free, self-host)\n- **SaaS\u002FCommercial**: Paid services (cost, no maintenance)\n- **Frameworks**: Scaffolding for common patterns\n\n### Step 3: Estimate Vibe Coding Cost\n\nUse the token estimation reference: [references\u002Ftoken-estimates.md](references\u002Ftoken-estimates.md)\n\nFactors to estimate:\n\n| Factor | Low | Medium | High |\n|--------|-----|--------|------|\n| Lines of Code | \u003C200 | 200-1000 | >1000 |\n| Token Burn (est.) | 5-20K | 20-100K | 100K+ |\n| Development Iterations | 1-3 | 4-10 | 10+ |\n| Debugging Sessions | Minimal | Moderate | Extensive |\n| Maintenance Burden | Low | Medium | High |\n\n### Step 4: Generate Comparison Table\n\nAlways present a decision table:\n\n```markdown\n| Option | Type | Cost | Setup Time | Maintenance | Token Burn | Verdict |\n|--------|------|------|------------|-------------|------------|---------|\n| [Solution A] | Library | Free | 5 min | Updates only | 0 | ✅ Recommended |\n| [Solution B] | SaaS | $X\u002Fmo | Instant | None | 0 | ⚡ Fastest |\n| Vibe Code | Custom | Free | X hrs | You own it | ~XK tokens | ? Full control |\n```\n\n### Step 5: Buy vs Build Evaluation Framework\n\n#### When to Build\n\n- [ ] Software is core to business differentiation\n- [ ] Competitive advantage requires 100% control\n- [ ] Vendor solutions insufficient for requirements\n- [ ] Team has capacity without additional investment\n- [ ] Long-term total cost of ownership favors build\n\n#### When to Buy\n\n- [ ] Time to value critical (weeks not months)\n- [ ] Standard capability, not differentiating\n- [ ] Vendor efficiencies reduce total cost\n- [ ] Team should focus on higher-impact projects\n- [ ] Acceptable vendor lock-in trade-off\n\n#### Evaluation Matrix\n\n| Factor | Build | Buy | Weight | Score |\n|--------|-------|-----|--------|-------|\n| Core competency | [Evidence] | [Evidence] | 30% | [Weighted score] |\n| Time to value | [Evidence] | [Evidence] | 25% | [Weighted score] |\n| Total cost (5 years) | [Evidence] | [Evidence] | 20% | [Weighted score] |\n| Customization needs | [Evidence] | [Evidence] | 15% | [Weighted score] |\n| Team expertise | [Evidence] | [Evidence] | 10% | [Weighted score] |\n| **Total Score** | | | **100%** | [Sum] |\n\n#### Hidden Costs Analysis\n\n**Build Hidden Costs**:\n\n- Maintenance burden (20-40% of build cost annually)\n- Opportunity cost (what else could team build?)\n- Expertise acquisition\u002Fretention\n- Testing and security validation\n- Documentation and knowledge transfer\n\n**Buy Hidden Costs**:\n\n- Integration complexity (API changes, data mapping)\n- Vendor lock-in (switching cost estimation)\n- Customization limitations (workarounds needed?)\n- Ongoing licensing (per-user, per-transaction costs)\n- Vendor stability risk (acquisition, discontinuation)\n\n#### Core vs Context Assessment\n\nUse Geoffrey Moore's framework to prioritize investment:\n\n| Capability | Type | Rationale | Strategy |\n|------------|------|-----------|----------|\n| [Capability 1] | Core | [Differentiates business] | Build, own, invest |\n| [Capability 2] | Context | [Necessary but commodity] | Buy, outsource |\n\n**Key Insight**: Building context is a distraction from core. Buy context, build core.\n\n#### Lindy Effect Consideration\n\nEvaluate technology maturity:\n\n- **Build**: Are you creating novel solution in unstable space? (High risk)\n- **Buy**: Is vendor solution based on Lindy survivor tech? (Lower risk)\n\n#### Buy vs Build Recommendation Template\n\n```markdown\n## Buy vs Build Recommendation: [Capability]\n\n**Verdict**: [BUILD | BUY | HYBRID]\n\n### Core Rationale\n[Primary reason in 2-3 sentences]\n\n### Evaluation Scores\n- Build score: [X\u002F100]\n- Buy score: [Y\u002F100]\n\n### Core vs Context\n[Core\u002FContext classification with justification]\n\n### Hidden Costs Accepted\n**If Build**: [Maintenance burden, opportunity cost, expertise]\n**If Buy**: [Lock-in level, integration complexity, licensing]\n\n### Decision Confidence\n[High | Medium | Low] - [Why]\n\n### Review Trigger\nRevisit if: [Conditions that would change this decision]\n```\n\n### Step 6: Recommendation Framework (Quick Reference)\n\nRecommend **existing solutions** when:\n\n- Mature library exists with >1K GitHub stars\n- SaaS solves it for \u003C$20\u002Fmo\n- Common problem with well-tested solutions\n- Security-sensitive (auth, crypto, payments)\n\nRecommend **vibe coding** when:\n\n- Highly specific business logic\n- Simple glue code (\u003C50 lines)\n- Learning exercise (explicitly stated)\n- No good existing solution found\n- Integration requirements are unusual\n\n### Step 7: If Vibe Coding Proceeds\n\nIf user chooses to build after seeing alternatives:\n\n1. Acknowledge the valid reasons\n2. Suggest existing code as reference\u002Finspiration\n3. Recommend libraries for sub-components\n4. Provide a hybrid approach when possible\n\n### Step 8: Integration Planning (When User Accepts Recommendation)\n\nWhen the user accepts a recommended solution, provide a complete integration plan:\n\n#### 8.1 Detect Project Context\n\nBefore generating the plan, analyze the user's project:\n\n- **Package manager**: Check for `package.json` (npm\u002Fyarn\u002Fpnpm), `requirements.txt`\u002F`pyproject.toml` (pip\u002Fpoetry), `Cargo.toml` (cargo), `go.mod` (go)\n- **Framework**: Identify React, Vue, Next.js, Rails, Django, FastAPI, etc.\n- **Existing dependencies**: Check for conflicts or complementary packages\n- **Project structure**: Understand where new code should live (src\u002F, lib\u002F, app\u002F, etc.)\n- **Code style**: Match existing patterns (TypeScript vs JS, ESM vs CJS, etc.)\n\n#### 8.2 Generate Installation Commands\n\nProvide ready-to-run commands for the detected package manager:\n\n```bash\n# npm\nnpm install \u003Cpackage>\n\n# yarn\nyarn add \u003Cpackage>\n\n# pnpm\npnpm add \u003Cpackage>\n\n# pip\npip install \u003Cpackage>\n\n# poetry\npoetry add \u003Cpackage>\n```\n\n#### 8.3 Provide Integration Steps\n\nCreate a numbered action plan:\n\n1. **Install dependencies** - Exact commands\n2. **Create\u002Fupdate config files** - If the library needs configuration\n3. **Add to existing code** - Where to import and initialize\n4. **Create new files** - With suggested file paths matching project structure\n5. **Update related files** - Any existing files that need modification\n\n#### 8.4 Generate Starter Code\n\nProvide code scaffolding that:\n\n- Matches the user's detected code style (TypeScript\u002FJavaScript, etc.)\n- Uses their existing patterns and conventions\n- Includes necessary imports\n- Shows basic usage with comments\n- Handles common edge cases\n\n#### 8.5 Warn About Potential Issues\n\nFlag any concerns:\n\n- **Dependency conflicts**: \"Note: This requires React 18+, you have React 17\"\n- **Breaking changes**: \"This library had major changes in v3, examples are for v3\"\n- **Peer dependencies**: \"You'll also need to install X\"\n- **Config requirements**: \"Requires adding to your tsconfig\u002Fbabel\u002Fwebpack config\"\n\n### Step 9: Cost Analysis (For Significant Decisions)\n\nFor features with meaningful cost implications (auth, payments, email, infrastructure), provide a Total Cost of Ownership (TCO) comparison.\n\n#### 9.1 When to Include Cost Analysis\n\nInclude cost table when:\n\n- SaaS options have monthly fees > $10\n- DIY token estimate > 50K tokens\n- User asks about costs or \"is it worth it\"\n- Comparing multiple paid services\n- Security-sensitive features (auth, payments)\n\n#### 9.2 Cost Calculation\n\nUse the pricing reference: [references\u002Fpricing-data.md](references\u002Fpricing-data.md)\n\n**Formula:**\n\n```text\nYear N Cost = Setup Cost + (Monthly × 12 × N) + (Maintenance × N)\n\nWhere:\n- Setup Cost (DIY) = Token Estimate × $0.015\u002F1K tokens\n- Maintenance (DIY) = 20% of Setup Cost annually\n- Maintenance (SaaS) = $0\n```\n\n#### 9.3 Cost Table Format\n\n```markdown\n## ? Cost Analysis\n\n| Option | Setup | Monthly | Year 1 | Year 3 | Notes |\n|--------|-------|---------|--------|--------|-------|\n| [SaaS A] | 10min | $25 | $300 | $900 | Free tier: 10K MAU |\n| [SaaS B] | 15min | $35 | $420 | $1,260 | More features |\n| [Free\u002FOSS] | 1hr | $0 | $0 | $0 | Self-host required |\n| DIY | Xhrs | $0 | ~$Y | ~$Z | + maintenance burden |\n\n? **Break-even:** [When DIY becomes cheaper, if ever]\n⚠️ **Hidden costs:** [Security audits, compliance, on-call burden]\n```\n\n#### 9.4 Hidden Costs to Surface\n\nAlways mention relevant hidden costs:\n\n- **Security audits**: $5K-50K for custom auth systems\n- **Compliance**: SOC2, GDPR, PCI implementation time\n- **On-call burden**: DIY = you're the support team\n- **Opportunity cost**: Time not spent on core product\n- **Technical debt**: Custom code needs maintenance forever\n\n#### 9.5 Red Flags to Call Out\n\nWarn users when they say:\n\n- \"It's just a simple auth system\" → Auth is never simple\n- \"We can build it in a weekend\" → You can't, securely\n- \"We'll add security later\" → Security debt is expensive\n- \"It's cheaper long-term\" → Usually false under 10K users\n\n## Response Template\n\n```markdown\n## ? Existing Solutions Found\n\nI found [N] existing solutions before we write custom code:\n\n### Libraries\u002FPackages\n- **[Name]**: [one-line description] | [stars\u002Fdownloads] | [link]\n\n### Open Source Tools  \n- **[Name]**: [one-line description] | [stars] | [link]\n\n### SaaS Options\n- **[Name]**: [one-line description] | [pricing] | [link]\n\n## ? Build vs Buy Comparison\n\n| Option | Type | Cost | Setup | Maintenance | Est. Tokens |\n|--------|------|------|-------|-------------|-------------|\n| ... | ... | ... | ... | ... | ... |\n\n## ? Cost Analysis (for significant decisions)\n\n| Option | Setup | Monthly | Year 1 | Year 3 | Notes |\n|--------|-------|---------|--------|--------|-------|\n| ... | ... | ... | ... | ... | ... |\n\n? **Break-even:** [analysis]\n⚠️ **Hidden costs:** [security, compliance, maintenance]\n\n## ? Recommendation\n\n[Clear recommendation with reasoning]\n\n## ? If You Still Want to Build\n\n[Only if user wants custom solution - suggest hybrid approach]\n```\n\n### Integration Plan Template (When User Accepts)\n\nWhen the user says \"let's use [recommended solution]\" or \"how do I add this?\", respond with:\n\n```markdown\n## ? Integration Plan: [Solution Name]\n\n### Your Project Context\n- **Detected**: [framework], [package manager], [language]\n- **Project structure**: [src\u002Fapp\u002Flib layout]\n\n### Step 1: Install Dependencies\n\n\\`\\`\\`bash\n[exact install command for their package manager]\n\\`\\`\\`\n\n### Step 2: Configuration (if needed)\n\n[Any config file changes needed]\n\n### Step 3: Create New Files\n\n? `[suggested\u002Ffile\u002Fpath.ts]`\n\\`\\`\\`typescript\n[starter code matching their project style]\n\\`\\`\\`\n\n### Step 4: Update Existing Files\n\n? `[existing\u002Ffile\u002Fto\u002Fmodify.ts]`\n\\`\\`\\`typescript\n\u002F\u002F Add this import\nimport { X } from '[package]'\n\n\u002F\u002F Use it like this\n[integration code]\n\\`\\`\\`\n\n### ⚠️ Notes\n- [Any warnings about versions, conflicts, or requirements]\n\n### ? Resources\n- [Official docs link]\n- [Relevant examples]\n```\n\n## Anti-Patterns to Flag\n\nAlert users when they're about to reinvent:\n\n- Authentication systems → \"Use Auth0, Clerk, Supabase Auth\"\n- State management → \"Consider Zustand, Redux Toolkit, Jotai\"\n- Form validation → \"Check out Zod, Yup, React Hook Form\"\n- API clients → \"Look at Axios, ky, ofetch\"\n- Date handling → \"Use date-fns, dayjs, Luxon\"\n- CLI tools → \"Consider Commander, yargs, oclif\"\n- PDF generation → \"Use pdf-lib, jsPDF, Puppeteer\"\n- Email sending → \"Check Resend, SendGrid, Nodemailer\"\n- Cron jobs → \"Use node-cron, Bull, Agenda\"\n- Database ORMs → \"Consider Prisma, Drizzle, TypeORM\"\n\n## Quick Reference: Common Token Burns\n\n| Task Complexity | Typical Token Burn | Time Equivalent |\n|-----------------|-------------------|-----------------|\n| Simple script (\u003C100 LOC) | 5-15K | 30min-1hr |\n| Utility module (100-500 LOC) | 15-50K | 2-4hrs |\n| Feature component (500-2K LOC) | 50-150K | 1-2 days |\n| Full application | 150K-500K+ | Days-weeks |\n\nSee [references\u002Ftoken-estimates.md](references\u002Ftoken-estimates.md) for detailed breakdowns.\n\nSee [references\u002Fcommon-solutions.md](references\u002Fcommon-solutions.md) for exhaustive list of commonly reinvented wheels.\n\nSee [references\u002Fintegration-patterns.md](references\u002Fintegration-patterns.md) for project detection and starter code patterns.\n\nSee [references\u002Fpricing-data.md](references\u002Fpricing-data.md) for SaaS pricing and cost calculation data.\n",{"name":5,"license":15,"metadata":36,"description":7},{"model":37,"version":38},"claude-opus-4-5","1.0.0","main","2bd10cb7ca989f88dbf338b57957763718eda59b","templates\u002Fskills\u002Fprogramming-advisor","https:\u002F\u002Fgithub.com\u002Floriensleafs\u002Fbrain","https:\u002F\u002Fgithub.com\u002Floriensleafs","2026-03-11 23:51:59",{"source":8,"skillName":5,"commands":46,"prompt":56,"zipAvailable":57},[47,50,53],{"tool":48,"command":49},"npx","npx skills add loriensleafs\u002Fbrain --skill programming-advisor",{"tool":51,"command":52},"bunx","bunx skills add loriensleafs\u002Fbrain --skill programming-advisor",{"tool":54,"command":55},"pnpm","pnpm dlx skills add loriensleafs\u002Fbrain --skill programming-advisor","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Floriensleafs\u002Fbrain\u002Fblob\u002Fmain\u002Ftemplates\u002Fskills\u002Fprogramming-advisor\u002FSKILL.md",true,[59,65,69,73,77,81,85,89,93],{"path":60,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":63,"sourceHtmlUrl":64},"DEEP-AUDIT.md","REFERENCE","参考文档",6772,"https:\u002F\u002Fgithub.com\u002Fmalinskibeniamin\u002Fskills\u002Fblob\u002Fmain\u002Freview\u002FDEEP-AUDIT.md",{"path":66,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":67,"sourceHtmlUrl":68},"GATES.md",11732,"https:\u002F\u002Fgithub.com\u002Fmalinskibeniamin\u002Fskills\u002Fblob\u002Fmain\u002Freview\u002FGATES.md",{"path":70,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":71,"sourceHtmlUrl":72},"OPERATING-MODEL.md",6290,"https:\u002F\u002Fgithub.com\u002Fmalinskibeniamin\u002Fskills\u002Fblob\u002Fmain\u002Freview\u002FOPERATING-MODEL.md",{"path":74,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":75,"sourceHtmlUrl":76},"REFERENCE.md",7320,"https:\u002F\u002Fgithub.com\u002Fmalinskibeniamin\u002Fskills\u002Fblob\u002Fmain\u002Freview\u002FREFERENCE.md",{"path":78,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":79,"sourceHtmlUrl":80},"references\u002Fcommon-solutions.md",5290,"https:\u002F\u002Fgithub.com\u002Floriensleafs\u002Fbrain\u002Fblob\u002Fmain\u002Ftemplates\u002Fskills\u002Fprogramming-advisor\u002Freferences\u002Fcommon-solutions.md",{"path":82,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":83,"sourceHtmlUrl":84},"references\u002Fintegration-patterns.md",6330,"https:\u002F\u002Fgithub.com\u002Floriensleafs\u002Fbrain\u002Fblob\u002Fmain\u002Ftemplates\u002Fskills\u002Fprogramming-advisor\u002Freferences\u002Fintegration-patterns.md",{"path":86,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":87,"sourceHtmlUrl":88},"references\u002Fpricing-data.md",5910,"https:\u002F\u002Fgithub.com\u002Floriensleafs\u002Fbrain\u002Fblob\u002Fmain\u002Ftemplates\u002Fskills\u002Fprogramming-advisor\u002Freferences\u002Fpricing-data.md",{"path":90,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":91,"sourceHtmlUrl":92},"references\u002Ftoken-estimates.md",4054,"https:\u002F\u002Fgithub.com\u002Floriensleafs\u002Fbrain\u002Fblob\u002Fmain\u002Ftemplates\u002Fskills\u002Fprogramming-advisor\u002Freferences\u002Ftoken-estimates.md",{"path":94,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":95,"sourceHtmlUrl":96},"REVIEWERS.md",5884,"https:\u002F\u002Fgithub.com\u002Fmalinskibeniamin\u002Fskills\u002Fblob\u002Fmain\u002Freview\u002FREVIEWERS.md",[98,114,131,153,169,193],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":31},"01M6CD3KHDHPR633RVP95G4XWN","validation-authority","Treat upstream validators as authoritative. Align local config to them. Use when validation fails unexpectedly, before modifying validator behavior, or when tempted to change upstream tool code.","https:\u002F\u002Fgithub.com\u002Floriensleafs\u002Fbrain\u002Fblob\u002Fmain\u002Ftemplates\u002Fskills\u002Fvalidation-authority\u002FSKILL.md",[],[105,106,107,29,108,109,110,111,112,113],"validation authority","validation","config","implementer","behavior","tool","architect","code","change",{"skillNo":115,"name":116,"nameZh":6,"description":117,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":118,"categories":119,"keywords":120,"publishedAt":31},"01M6CD3H29Q8FWN9YETT8YVQTS","using-brain-memory","Guidance for using Brain semantic memory effectively. Applies Zettelkasten atomic note principles with observations and relations. Use when deciding whether to query or create notes, structuring note content, or understanding the semantic knowledge graph.","https:\u002F\u002Fgithub.com\u002Floriensleafs\u002Fbrain\u002Fblob\u002Fmain\u002Ftemplates\u002Fskills\u002Fusing-forgetful-memory\u002FSKILL.md",[],[121,122,123,124,125,126,127,29,128,129,130],"using brain memory","memory","content","create","notes","graph","guidance","context","knowledge","knowledge graph",{"skillNo":132,"name":133,"nameZh":6,"description":134,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":135,"categories":136,"keywords":137,"publishedAt":31},"01M6CD3E2KTTMNSWXRJAAZA7D1","threat-modeling","Structured security analysis using OWASP Four-Question Framework and STRIDE methodology. Generates threat matrices with risk ratings, mitigations, and prioritization. Use for attack surface analysis, security architecture review, or when asking what can go wrong.","https:\u002F\u002Fgithub.com\u002Floriensleafs\u002Fbrain\u002Fblob\u002Fmain\u002Ftemplates\u002Fskills\u002Fthreat-modeling\u002FSKILL.md",[],[138,139,140,29,141,111,142,143,27,144,145,146,147,148,149,150,151,152],"threat","threat modeling","prioritization","question","architecture review","stride","risk","owasp","methodology","framework","security analysis","architecture","security","go","review",{"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":159,"publishedAt":31},"01M6CD3BC6G0Q2MDNW6X51XHBQ","taste-lints","Custom lints with agent-readable remediation instructions. Enforces taste invariants (file size, naming conventions, structured logging, complexity) and surfaces errors that agents can act on directly. Use when writing or reviewing code to catch style violations early.","https:\u002F\u002Fgithub.com\u002Floriensleafs\u002Fbrain\u002Fblob\u002Fmain\u002Ftemplates\u002Fskills\u002Ftaste-lints\u002FSKILL.md",[],[160,108,161,162,29,163,164,165,166,167,112,168],"taste lints","surfaces","complexity","instructions","remediation","file","logging","qa","writing",{"skillNo":170,"name":171,"nameZh":6,"description":172,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":173,"categories":174,"keywords":175,"publishedAt":31},"01M6CD37Z7VD22BH42TG0GM66V","style-enforcement","Validate code against style rules from .editorconfig, StyleCop.json, and Directory.Build.props. Detects line ending violations, naming convention issues, indentation problems, and charset mismatches across C#, Python, TypeScript, and JavaScript. Produces JSON reports for pre-commit hooks and CI pipelines.","https:\u002F\u002Fgithub.com\u002Floriensleafs\u002Fbrain\u002Fblob\u002Fmain\u002Ftemplates\u002Fskills\u002Fstyle-enforcement\u002FSKILL.md",[],[176,177,178,179,180,181,108,182,183,184,185,186,167,187,112,188,189,190,191,192],"style enforcement","enforcement","ci","pipelines","directory","hooks","Rules","json","pre-commit","editorconfig","reports","issues","validate","commit","javascript","python","typescript",{"skillNo":194,"name":195,"nameZh":196,"description":197,"descriptionZh":198,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":199,"categories":200,"keywords":211,"publishedAt":31},"01M6CD35JW73TPMCZBF9DTDEE8","steering-matcher","引导规则路径匹配","Match file paths against steering file glob patterns to determine applicable steering guidance. Use when orchestrator needs to inject context-aware guidance based on files being modified.","将文件路径与引导文件的 glob 模式进行匹配，以确定适用的引导规范。适用于编排器需要根据被修改的文件注入上下文感知的指导时。","https:\u002F\u002Fgithub.com\u002Floriensleafs\u002Fbrain\u002Fblob\u002Fmain\u002Ftemplates\u002Fskills\u002Fsteering-matcher\u002FSKILL.md",[201,206],{"categoryNo":202,"categoryName":203,"taxonomyType":204,"taxonomyTypeDesc":205},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师","PROFESSION","适用职业",{"categoryNo":207,"categoryName":208,"taxonomyType":209,"taxonomyTypeDesc":210},"01M8BSAA4FBTWZP6X98STEHG99","智能体开发","SCENARIO","使用场景",[212,29,213,214,128,215,127,165],"steering matcher","files","haiku","orchestrator"]