[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6H6DDP5M70BBV1VE0GRYKJG":3,"skill-same:01M6H6DDP5M70BBV1VE0GRYKJG":66},{"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":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":44,"commitSha":45,"skillDirectory":46,"forksCount":47,"repositoryHtmlUrl":48,"repositoryHomepageUrl":6,"ownerHtmlUrl":49,"ownerBlogUrl":50,"ownerDescription":6,"updatedAt":51,"install":52,"resources":65},"01M6H6DDP5M70BBV1VE0GRYKJG","m13-domain-error",null,"Use when designing domain error handling. Keywords: domain error, error categorization, recovery strategy, retry, fallback, domain error hierarchy, user-facing vs internal errors, error code design, circuit breaker, graceful degradation, resilience, error context, backoff, retry with backoff, error recovery, transient vs permanent error, 领域错误, 错误分类, 恢复策略, 重试, 熔断器, 优雅降级","0xharryriddle\u002Fcodex-field-kit","0xharryriddle","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F100945007?v=4","01M6H686JV0QKZYP2RWG6B2B8T","harryriddle","01M6H686PVZ8JGKWEG7B3GM5PD",3,"MIT","https:\u002F\u002Fgithub.com\u002F0xharryriddle\u002Fcodex-field-kit\u002Fblob\u002Fmain\u002Farchive\u002Fupstream\u002Fchasebuild-agent-skills\u002Frust\u002Fskills\u002Fm13-domain-error\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"error","m13 domain error","domain","categorization","design","errors","backoff","retry","with","degradation","false","Circuit Breaker","use","user","strategy","recovery","error handling","code","error recovery","resilience","2026-11-10 10:12:30",false,"---\nname: m13-domain-error\ndescription: \"Use when designing domain error handling. Keywords: domain error, error categorization, recovery strategy, retry, fallback, domain error hierarchy, user-facing vs internal errors, error code design, circuit breaker, graceful degradation, resilience, error context, backoff, retry with backoff, error recovery, transient vs permanent error, 领域错误, 错误分类, 恢复策略, 重试, 熔断器, 优雅降级\"\nuser-invocable: false\n---\n\n# Domain Error Strategy\n\n> **Layer 2: Design Choices**\n\n## Core Question\n\n**Who needs to handle this error, and how should they recover?**\n\nBefore designing error types:\n- Is this user-facing or internal?\n- Is recovery possible?\n- What context is needed for debugging?\n\n---\n\n## Error Categorization\n\n| Error Type | Audience | Recovery | Example |\n|------------|----------|----------|---------|\n| User-facing | End users | Guide action | `InvalidEmail`, `NotFound` |\n| Internal | Developers | Debug info | `DatabaseError`, `ParseError` |\n| System | Ops\u002FSRE | Monitor\u002Falert | `ConnectionTimeout`, `RateLimited` |\n| Transient | Automation | Retry | `NetworkError`, `ServiceUnavailable` |\n| Permanent | Human | Investigate | `ConfigInvalid`, `DataCorrupted` |\n\n---\n\n## Thinking Prompt\n\nBefore designing error types:\n\n1. **Who sees this error?**\n   - End user → friendly message, actionable\n   - Developer → detailed, debuggable\n   - Ops → structured, alertable\n\n2. **Can we recover?**\n   - Transient → retry with backoff\n   - Degradable → fallback value\n   - Permanent → fail fast, alert\n\n3. **What context is needed?**\n   - Call chain → anyhow::Context\n   - Request ID → structured logging\n   - Input data → error payload\n\n---\n\n## Trace Up ↑\n\nTo domain constraints (Layer 3):\n\n```\n\"How should I handle payment failures?\"\n    ↑ Ask: What are the business rules for retries?\n    ↑ Check: domain-fintech (transaction requirements)\n    ↑ Check: SLA (availability requirements)\n```\n\n| Question | Trace To | Ask |\n|----------|----------|-----|\n| Retry policy | domain-* | What's acceptable latency for retry? |\n| User experience | domain-* | What message should users see? |\n| Compliance | domain-* | What must be logged for audit? |\n\n---\n\n## Trace Down ↓\n\nTo implementation (Layer 1):\n\n```\n\"Need typed errors\"\n    ↓ m06-error-handling: thiserror for library\n    ↓ m04-zero-cost: Error enum design\n\n\"Need error context\"\n    ↓ m06-error-handling: anyhow::Context\n    ↓ Logging: tracing with fields\n\n\"Need retry logic\"\n    ↓ m07-concurrency: async retry patterns\n    ↓ Crates: tokio-retry, backoff\n```\n\n---\n\n## Quick Reference\n\n| Recovery Pattern | When | Implementation |\n|------------------|------|----------------|\n| Retry | Transient failures | exponential backoff |\n| Fallback | Degraded mode | cached\u002Fdefault value |\n| Circuit Breaker | Cascading failures | failsafe-rs |\n| Timeout | Slow operations | `tokio::time::timeout` |\n| Bulkhead | Isolation | separate thread pools |\n\n## Error Hierarchy\n\n```rust\n#[derive(thiserror::Error, Debug)]\npub enum AppError {\n    \u002F\u002F User-facing\n    #[error(\"Invalid input: {0}\")]\n    Validation(String),\n\n    \u002F\u002F Transient (retryable)\n    #[error(\"Service temporarily unavailable\")]\n    ServiceUnavailable(#[source] reqwest::Error),\n\n    \u002F\u002F Internal (log details, show generic)\n    #[error(\"Internal error\")]\n    Internal(#[source] anyhow::Error),\n}\n\nimpl AppError {\n    pub fn is_retryable(&self) -> bool {\n        matches!(self, Self::ServiceUnavailable(_))\n    }\n}\n```\n\n## Retry Pattern\n\n```rust\nuse tokio_retry::{Retry, strategy::ExponentialBackoff};\n\nasync fn with_retry\u003CF, T, E>(f: F) -> Result\u003CT, E>\nwhere\n    F: Fn() -> impl Future\u003COutput = Result\u003CT, E>>,\n    E: std::fmt::Debug,\n{\n    let strategy = ExponentialBackoff::from_millis(100)\n        .max_delay(Duration::from_secs(10))\n        .take(5);\n\n    Retry::spawn(strategy, || f()).await\n}\n```\n\n---\n\n## Common Mistakes\n\n| Mistake | Why Wrong | Better |\n|---------|-----------|--------|\n| Same error for all | No actionability | Categorize by audience |\n| Retry everything | Wasted resources | Only transient errors |\n| Infinite retry | DoS self | Max attempts + backoff |\n| Expose internal errors | Security risk | User-friendly messages |\n| No context | Hard to debug | .context() everywhere |\n\n---\n\n## Anti-Patterns\n\n| Anti-Pattern | Why Bad | Better |\n|--------------|---------|--------|\n| String errors | No structure | thiserror types |\n| panic! for recoverable | Bad UX | Result with context |\n| Ignore errors | Silent failures | Log or propagate |\n| Box\u003Cdyn Error> everywhere | Lost type info | thiserror |\n| Error in happy path | Performance | Early validation |\n\n---\n\n## Related Skills\n\n| When | See |\n|------|-----|\n| Error handling basics | m06-error-handling |\n| Retry implementation | m07-concurrency |\n| Domain modeling | m09-domain |\n| User-facing APIs | domain-* |\n","# Domain Error Strategy\n\n> **Layer 2: Design Choices**\n\n## Core Question\n\n**Who needs to handle this error, and how should they recover?**\n\nBefore designing error types:\n- Is this user-facing or internal?\n- Is recovery possible?\n- What context is needed for debugging?\n\n---\n\n## Error Categorization\n\n| Error Type | Audience | Recovery | Example |\n|------------|----------|----------|---------|\n| User-facing | End users | Guide action | `InvalidEmail`, `NotFound` |\n| Internal | Developers | Debug info | `DatabaseError`, `ParseError` |\n| System | Ops\u002FSRE | Monitor\u002Falert | `ConnectionTimeout`, `RateLimited` |\n| Transient | Automation | Retry | `NetworkError`, `ServiceUnavailable` |\n| Permanent | Human | Investigate | `ConfigInvalid`, `DataCorrupted` |\n\n---\n\n## Thinking Prompt\n\nBefore designing error types:\n\n1. **Who sees this error?**\n   - End user → friendly message, actionable\n   - Developer → detailed, debuggable\n   - Ops → structured, alertable\n\n2. **Can we recover?**\n   - Transient → retry with backoff\n   - Degradable → fallback value\n   - Permanent → fail fast, alert\n\n3. **What context is needed?**\n   - Call chain → anyhow::Context\n   - Request ID → structured logging\n   - Input data → error payload\n\n---\n\n## Trace Up ↑\n\nTo domain constraints (Layer 3):\n\n```\n\"How should I handle payment failures?\"\n    ↑ Ask: What are the business rules for retries?\n    ↑ Check: domain-fintech (transaction requirements)\n    ↑ Check: SLA (availability requirements)\n```\n\n| Question | Trace To | Ask |\n|----------|----------|-----|\n| Retry policy | domain-* | What's acceptable latency for retry? |\n| User experience | domain-* | What message should users see? |\n| Compliance | domain-* | What must be logged for audit? |\n\n---\n\n## Trace Down ↓\n\nTo implementation (Layer 1):\n\n```\n\"Need typed errors\"\n    ↓ m06-error-handling: thiserror for library\n    ↓ m04-zero-cost: Error enum design\n\n\"Need error context\"\n    ↓ m06-error-handling: anyhow::Context\n    ↓ Logging: tracing with fields\n\n\"Need retry logic\"\n    ↓ m07-concurrency: async retry patterns\n    ↓ Crates: tokio-retry, backoff\n```\n\n---\n\n## Quick Reference\n\n| Recovery Pattern | When | Implementation |\n|------------------|------|----------------|\n| Retry | Transient failures | exponential backoff |\n| Fallback | Degraded mode | cached\u002Fdefault value |\n| Circuit Breaker | Cascading failures | failsafe-rs |\n| Timeout | Slow operations | `tokio::time::timeout` |\n| Bulkhead | Isolation | separate thread pools |\n\n## Error Hierarchy\n\n```rust\n#[derive(thiserror::Error, Debug)]\npub enum AppError {\n    \u002F\u002F User-facing\n    #[error(\"Invalid input: {0}\")]\n    Validation(String),\n\n    \u002F\u002F Transient (retryable)\n    #[error(\"Service temporarily unavailable\")]\n    ServiceUnavailable(#[source] reqwest::Error),\n\n    \u002F\u002F Internal (log details, show generic)\n    #[error(\"Internal error\")]\n    Internal(#[source] anyhow::Error),\n}\n\nimpl AppError {\n    pub fn is_retryable(&self) -> bool {\n        matches!(self, Self::ServiceUnavailable(_))\n    }\n}\n```\n\n## Retry Pattern\n\n```rust\nuse tokio_retry::{Retry, strategy::ExponentialBackoff};\n\nasync fn with_retry\u003CF, T, E>(f: F) -> Result\u003CT, E>\nwhere\n    F: Fn() -> impl Future\u003COutput = Result\u003CT, E>>,\n    E: std::fmt::Debug,\n{\n    let strategy = ExponentialBackoff::from_millis(100)\n        .max_delay(Duration::from_secs(10))\n        .take(5);\n\n    Retry::spawn(strategy, || f()).await\n}\n```\n\n---\n\n## Common Mistakes\n\n| Mistake | Why Wrong | Better |\n|---------|-----------|--------|\n| Same error for all | No actionability | Categorize by audience |\n| Retry everything | Wasted resources | Only transient errors |\n| Infinite retry | DoS self | Max attempts + backoff |\n| Expose internal errors | Security risk | User-friendly messages |\n| No context | Hard to debug | .context() everywhere |\n\n---\n\n## Anti-Patterns\n\n| Anti-Pattern | Why Bad | Better |\n|--------------|---------|--------|\n| String errors | No structure | thiserror types |\n| panic! for recoverable | Bad UX | Result with context |\n| Ignore errors | Silent failures | Log or propagate |\n| Box\u003Cdyn Error> everywhere | Lost type info | thiserror |\n| Error in happy path | Performance | Early validation |\n\n---\n\n## Related Skills\n\n| When | See |\n|------|-----|\n| Error handling basics | m06-error-handling |\n| Retry implementation | m07-concurrency |\n| Domain modeling | m09-domain |\n| User-facing APIs | domain-* |\n",{"name":5,"description":7,"user-invocable":40},"main","6c13f6f4ac5a3bc1e6b78cd2bb1704f122c4a73e","archive\u002Fupstream\u002Fchasebuild-agent-skills\u002Frust\u002Fskills\u002Fm13-domain-error",0,"https:\u002F\u002Fgithub.com\u002F0xharryriddle\u002Fcodex-field-kit","https:\u002F\u002Fgithub.com\u002F0xharryriddle","https:\u002F\u002Fharryriddle.vercel.app","2026-04-11 11:49:51",{"source":8,"skillName":5,"commands":53,"prompt":63,"zipAvailable":64},[54,57,60],{"tool":55,"command":56},"npx","npx skills add 0xharryriddle\u002Fcodex-field-kit --skill m13-domain-error",{"tool":58,"command":59},"bunx","bunx skills add 0xharryriddle\u002Fcodex-field-kit --skill m13-domain-error",{"tool":61,"command":62},"pnpm","pnpm dlx skills add 0xharryriddle\u002Fcodex-field-kit --skill m13-domain-error","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002F0xharryriddle\u002Fcodex-field-kit\u002Fblob\u002Fmain\u002Farchive\u002Fupstream\u002Fchasebuild-agent-skills\u002Frust\u002Fskills\u002Fm13-domain-error\u002FSKILL.md",true,[],[67,93,112,122,148,171],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":39},"01M6H7ZKE6MR33HC84QZ1TA6MV","vercel-react-best-practices","React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React\u002FNext.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.","https:\u002F\u002Fgithub.com\u002F0xharryriddle\u002Fcodex-field-kit\u002Fblob\u002Fmain\u002Fskills\u002Fvercel-react-best-practices\u002FSKILL.md",[],[74,75,76,77,78,79,80,81,82,83,84,85,86,87,36,88,89,90,91,92],"react best practices","react","vercel react best practices","best practices","vercel","tasks","data fetching","triggers","pages","next","performance optimization","refactoring","Next.js","Optimization","guidelines","react components","components","performance","writing",{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":39},"01M6H7ZGC2WK8SEKYHWDNTMDA9","swarm-planner","[EXPLICIT INVOCATION ONLY] Creates dependency-aware implementation plans optimized for parallel multi-agent execution.","https:\u002F\u002Fgithub.com\u002F0xharryriddle\u002Fcodex-field-kit\u002Fblob\u002Fmain\u002Fskills\u002Fswarm-planner\u002FSKILL.md",[],[100,101,102,103,104,105,106,107,108,109,110,111],"swarm","swarm planner","planner","parallel","multi-agent","only","execution","plans","dependency","for","multi","implementation",{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":39},"01M6H7ZD93853RZCYQWH1D38TM","super-swarm-spark","Only to be triggered by explicit super-swarm-spark commands.","https:\u002F\u002Fgithub.com\u002F0xharryriddle\u002Fcodex-field-kit\u002Fblob\u002Fmain\u002Fskills\u002Fsuper-swarm-spark\u002FSKILL.md",[],[119,100,120,105,121],"super swarm spark","spark","commands",{"skillNo":123,"name":124,"nameZh":6,"description":125,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":126,"categories":127,"keywords":128,"publishedAt":39},"01M6H7Z987QBY49JCCPT953EAZ","role-creator","Create and install Codex custom agent roles in ~\u002F.codex\u002Fconfig.toml, generate role config files, enforce supported keys, and guide users through required role inputs (model, reasoning effort, developer_instructions).","https:\u002F\u002Fgithub.com\u002F0xharryriddle\u002Fcodex-field-kit\u002Fblob\u002Fmain\u002Fskills\u002Frole-creator\u002FSKILL.md",[],[129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147],"role","creator","role creator","keys","users","roles","toml","enforce","install","guide","instructions","model","developer","reasoning","generate","create","config","codex","files",{"skillNo":149,"name":150,"nameZh":6,"description":151,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":152,"categories":153,"keywords":154,"publishedAt":39},"01M6H7Z5TRPMDQ7YSZQXPN1G60","read-github","Read and search GitHub repository documentation via gitmcp.io MCP service.\n\n**WHEN TO USE:**\n- User provides a GitHub URL\n- User mentions a specific repo in owner\u002Frepo format\n- User asks \"what does this repo do?\", \"read the docs for X repo\", or similar\n- User wants to search code or docs within a repo","https:\u002F\u002Fgithub.com\u002F0xharryriddle\u002Fcodex-field-kit\u002Fblob\u002Fmain\u002Fskills\u002Fread-github\u002FSKILL.md",[],[155,156,157,36,158,159,160,161,109,162,163,164,165,166,167,31,32,168,169,170],"github","read github","read","documentation","docs","MCP","search","when to use","URL","via","io","service","do","repo","format","repository",{"skillNo":172,"name":102,"nameZh":6,"description":173,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":174,"categories":175,"keywords":176,"publishedAt":39},"01M6H7Z215CTKYJ4Y1X6EQWN6M","Create comprehensive, phased implementation plans with sprints and atomic tasks. Use when user says: \"make a plan\", \"create a plan\", \"plan this out\", \"plan the implementation\", \"help me plan\", \"design a plan\", \"draft a plan\", \"write a plan\", \"outline the steps\", \"break this down into tasks\", \"what's the plan for\", or any similar planning request. Also triggers on explicit \"\u002Fplanner\" or \"\u002Fplan\" commands.","https:\u002F\u002Fgithub.com\u002F0xharryriddle\u002Fcodex-field-kit\u002Fblob\u002Fmain\u002Fskills\u002Fplanner\u002FSKILL.md",[],[102,177,109,178,27,179,81,107,121,180,181,31,182,183,184,185,186,144,79,23],"outline","atomic","sprints","draft","me","write","phased implementation","plan","help","planning"]