[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M74GJZ69MCST717T5X45T71K":3,"skill-same:01M74GJZ69MCST717T5X45T71K":56},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":14,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":29,"install":30,"resources":43},"01M74GJZ69MCST717T5X45T71K","slo-design",null,"Design an SLO — pick the right SLI per critical user journey, set the threshold by the 28-day error-budget arithmetic, document the measurement.","MohammadBafkar\u002Fpolymath","MohammadBafkar","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F34940462?v=4","01M74G540TQFZWK6KVAPKFVGNR","Mohammad Bafkar","01M74G541HG19QP9V5DQCJVKYE",0,"MIT","https:\u002F\u002Fgithub.com\u002FMohammadBafkar\u002Fpolymath\u002Fblob\u002Fmain\u002Fplugins\u002Fpolymath-sre\u002Fskills\u002Fslo-design\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: slo-design\ndescription: Design an SLO — pick the right SLI per critical user journey, set the threshold by the 28-day error-budget arithmetic, document the measurement.\n---\n\n# slo-design\n\n> Design one SLO per critical user journey. Output is the SLI, threshold, measurement window, and the burn-rate alert structure.\n\n**Mode:** analytical — judgment inside a fixed frame. Keep the output shape; every verdict cites its evidence; unknowns are marked `[TBD]` or `[VERIFY]`, never filled in.\n\n## When to use\n\n- A new service is going live and needs an SLO before opening real traffic.\n- An existing service has alerts but no SLO; on-call is firefighting symptoms not promises.\n\n## Inputs\n\n- The service and its users (required).\n- The critical user journey(s) to protect (optional) — absent: propose them from the service's user-facing endpoints, marked `[VERIFY]`.\n- Current performance data (optional): availability and latency percentiles over the last 28 days. Absent: thresholds are proposals marked `[VERIFY: baseline]`, never presented as measured.\n- Dependency SLOs (optional) — an SLO can't exceed what its hard dependencies deliver.\n\n## Procedure\n\n1. **Identify the critical user journey** (CUJ). Not the service — the journey. \"User opens checkout, sees totals within 1s\" is a CUJ; \"API responds with 200\" is not.\n2. **Pick the SLI** for that journey. Two flavors usually suffice:\n   - **Availability SLI**: `successful_requests \u002F total_requests` within the journey.\n   - **Latency SLI**: `requests_under_X_ms \u002F total_requests` within the journey.\n   \"Success\" must be defined precisely — does 5xx count as failure? Does 429? Does a 200 with empty body count as success? Document.\n3. **Pick the threshold**:\n   - Availability: 99.0%, 99.5%, 99.9%, 99.95% — based on what the journey actually needs. Don't reach for 99.99% reflexively; the budget gets too tight to ship anything.\n   - Latency: pick a single percentile (P95 or P99) and a single threshold. Avoid \"P50 \u003C 100ms AND P99 \u003C 500ms\" pyramids.\n4. **Measurement window** — 28 days rolling is the default. Long enough to absorb a bad day; short enough to be actionable.\n5. **Error budget arithmetic — run the bundled script, never compute by hand.** It prints the budget and the burn-rate table for any SLO and window:\n\n   ```bash\n   python3 \"${POLYMATH_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}\u002Fskills\u002Fslo-design\u002Fscripts\u002Ferror-budget.py\" --slo 99.5 --window-days 28\n   ```\n\n   Reference values it reproduces (28 days = 40,320 minutes; budget = (1 − SLO) × window):\n   - 99.0% = 6h 43m 12s per 28d.\n   - 99.5% = 3h 21m 36s per 28d.\n   - 99.9% = 40m 19s per 28d.\n   - 99.95% = 20m 10s per 28d.\n   - 99.99% = 4m 2s per 28d — almost certainly too tight.\n   (The familiar 43m 12s \u002F 21m 36s \u002F 4m 19s figures are for a 30-day window — don't mix them with 28d.)\n6. **Burn-rate alerts** — Google SRE workbook's multi-window, multi-burn-rate shape. Each alert fires only when **both** its long and short window exceed the rate (the short window makes it reset quickly once the burn stops):\n\n   | Long window | Short window | Budget consumed | Burn rate (30d \u002F 28d) | Severity |\n   | ----------- | ------------ | --------------- | --------------------- | -------- |\n   | 1h          | 5m           | 2%              | 14.4× \u002F 13.44×        | page |\n   | 6h          | 30m          | 5%              | 6× \u002F 5.6×             | page |\n   | 3d          | 6h           | 10%             | 1× \u002F 0.93×            | ticket |\n\n   burn rate = budget fraction × window hours ÷ long-window hours (the script computes it for your window). Using the workbook's 30-day numbers on a 28-day SLO is fine if you say so; don't invent thresholds.\n\n## Output\n\n```text\nSLO: refund-creation latency\n\nCritical user journey:\n  User triggers a refund from order details; refund record created in our DB.\n\nSLI:\n  fraction of POST \u002Fv1\u002Forders\u002F{id}\u002Frefunds requests returning 201 within 500ms,\n  excluding 4xx (counted as success) and 5xx (counted as failure).\n\nSLO:\n  99.5% of refund-creation requests succeed within 500ms over a 28-day\n  rolling window.\n\nError budget:\n  0.5% × 40,320 min = 201.6 min = 3h 21m 36s per 28d.\n\nBurn-rate alerts (28d rates):\n  - 1h & 5m windows  @ 13.44× burn → page payments oncall\n  - 6h & 30m windows @ 5.6× burn   → page payments oncall\n  - 3d & 6h windows  @ 0.93× burn  → ticket to payments team\n\nWhere measured:\n  Prometheus rule `slo_refund_latency_success_rate` (defined in\n  monitoring\u002Frefund-slo.yaml).\n```\n\n## Anti-patterns to avoid\n\n- One SLO covering \"the whole service\". Pick the journey.\n- 99.99% for a service whose dependencies are 99.9%.\n- Multi-percentile latency SLOs (\"P50 AND P99 AND…\").\n- Alerting on every threshold dip; alert on burn rate.\n","# slo-design\n\n> Design one SLO per critical user journey. Output is the SLI, threshold, measurement window, and the burn-rate alert structure.\n\n**Mode:** analytical — judgment inside a fixed frame. Keep the output shape; every verdict cites its evidence; unknowns are marked `[TBD]` or `[VERIFY]`, never filled in.\n\n## When to use\n\n- A new service is going live and needs an SLO before opening real traffic.\n- An existing service has alerts but no SLO; on-call is firefighting symptoms not promises.\n\n## Inputs\n\n- The service and its users (required).\n- The critical user journey(s) to protect (optional) — absent: propose them from the service's user-facing endpoints, marked `[VERIFY]`.\n- Current performance data (optional): availability and latency percentiles over the last 28 days. Absent: thresholds are proposals marked `[VERIFY: baseline]`, never presented as measured.\n- Dependency SLOs (optional) — an SLO can't exceed what its hard dependencies deliver.\n\n## Procedure\n\n1. **Identify the critical user journey** (CUJ). Not the service — the journey. \"User opens checkout, sees totals within 1s\" is a CUJ; \"API responds with 200\" is not.\n2. **Pick the SLI** for that journey. Two flavors usually suffice:\n   - **Availability SLI**: `successful_requests \u002F total_requests` within the journey.\n   - **Latency SLI**: `requests_under_X_ms \u002F total_requests` within the journey.\n   \"Success\" must be defined precisely — does 5xx count as failure? Does 429? Does a 200 with empty body count as success? Document.\n3. **Pick the threshold**:\n   - Availability: 99.0%, 99.5%, 99.9%, 99.95% — based on what the journey actually needs. Don't reach for 99.99% reflexively; the budget gets too tight to ship anything.\n   - Latency: pick a single percentile (P95 or P99) and a single threshold. Avoid \"P50 \u003C 100ms AND P99 \u003C 500ms\" pyramids.\n4. **Measurement window** — 28 days rolling is the default. Long enough to absorb a bad day; short enough to be actionable.\n5. **Error budget arithmetic — run the bundled script, never compute by hand.** It prints the budget and the burn-rate table for any SLO and window:\n\n   ```bash\n   python3 \"${POLYMATH_PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT}}\u002Fskills\u002Fslo-design\u002Fscripts\u002Ferror-budget.py\" --slo 99.5 --window-days 28\n   ```\n\n   Reference values it reproduces (28 days = 40,320 minutes; budget = (1 − SLO) × window):\n   - 99.0% = 6h 43m 12s per 28d.\n   - 99.5% = 3h 21m 36s per 28d.\n   - 99.9% = 40m 19s per 28d.\n   - 99.95% = 20m 10s per 28d.\n   - 99.99% = 4m 2s per 28d — almost certainly too tight.\n   (The familiar 43m 12s \u002F 21m 36s \u002F 4m 19s figures are for a 30-day window — don't mix them with 28d.)\n6. **Burn-rate alerts** — Google SRE workbook's multi-window, multi-burn-rate shape. Each alert fires only when **both** its long and short window exceed the rate (the short window makes it reset quickly once the burn stops):\n\n   | Long window | Short window | Budget consumed | Burn rate (30d \u002F 28d) | Severity |\n   | ----------- | ------------ | --------------- | --------------------- | -------- |\n   | 1h          | 5m           | 2%              | 14.4× \u002F 13.44×        | page |\n   | 6h          | 30m          | 5%              | 6× \u002F 5.6×             | page |\n   | 3d          | 6h           | 10%             | 1× \u002F 0.93×            | ticket |\n\n   burn rate = budget fraction × window hours ÷ long-window hours (the script computes it for your window). Using the workbook's 30-day numbers on a 28-day SLO is fine if you say so; don't invent thresholds.\n\n## Output\n\n```text\nSLO: refund-creation latency\n\nCritical user journey:\n  User triggers a refund from order details; refund record created in our DB.\n\nSLI:\n  fraction of POST \u002Fv1\u002Forders\u002F{id}\u002Frefunds requests returning 201 within 500ms,\n  excluding 4xx (counted as success) and 5xx (counted as failure).\n\nSLO:\n  99.5% of refund-creation requests succeed within 500ms over a 28-day\n  rolling window.\n\nError budget:\n  0.5% × 40,320 min = 201.6 min = 3h 21m 36s per 28d.\n\nBurn-rate alerts (28d rates):\n  - 1h & 5m windows  @ 13.44× burn → page payments oncall\n  - 6h & 30m windows @ 5.6× burn   → page payments oncall\n  - 3d & 6h windows  @ 0.93× burn  → ticket to payments team\n\nWhere measured:\n  Prometheus rule `slo_refund_latency_success_rate` (defined in\n  monitoring\u002Frefund-slo.yaml).\n```\n\n## Anti-patterns to avoid\n\n- One SLO covering \"the whole service\". Pick the journey.\n- 99.99% for a service whose dependencies are 99.9%.\n- Multi-percentile latency SLOs (\"P50 AND P99 AND…\").\n- Alerting on every threshold dip; alert on burn rate.\n",{"name":5,"description":7},"main","23f6e21841a39580c9da2b5ec941f39dda17cd86","plugins\u002Fpolymath-sre\u002Fskills\u002Fslo-design","https:\u002F\u002Fgithub.com\u002FMohammadBafkar\u002Fpolymath","https:\u002F\u002Fgithub.com\u002FMohammadBafkar","2026-10-29 18:34:59",{"source":8,"skillName":5,"commands":31,"prompt":41,"zipAvailable":42},[32,35,38],{"tool":33,"command":34},"npx","npx skills add MohammadBafkar\u002Fpolymath --skill slo-design",{"tool":36,"command":37},"bunx","bunx skills add MohammadBafkar\u002Fpolymath --skill slo-design",{"tool":39,"command":40},"pnpm","pnpm dlx skills add MohammadBafkar\u002Fpolymath --skill slo-design","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FMohammadBafkar\u002Fpolymath\u002Fblob\u002Fmain\u002Fplugins\u002Fpolymath-sre\u002Fskills\u002Fslo-design\u002FSKILL.md",true,[44,50],{"path":45,"resourceType":46,"resourceTypeDesc":47,"sizeBytes":48,"sourceHtmlUrl":49},"routing.yaml","REFERENCE","参考文档",318,"https:\u002F\u002Fgithub.com\u002FMohammadBafkar\u002Fpolymath\u002Fblob\u002Fmain\u002Fplugins\u002Fpolymath-sre\u002Fskills\u002Fslo-design\u002Frouting.yaml",{"path":51,"resourceType":52,"resourceTypeDesc":53,"sizeBytes":54,"sourceHtmlUrl":55},"scripts\u002Ferror-budget.py","SCRIPT","脚本",5204,"https:\u002F\u002Fgithub.com\u002FMohammadBafkar\u002Fpolymath\u002Fblob\u002Fmain\u002Fplugins\u002Fpolymath-sre\u002Fskills\u002Fslo-design\u002Fscripts\u002Ferror-budget.py",[57,64,71,78,85,92],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":19},"01M74GN87EBRHM9N87M7AP1HDD","runbook","Write or refresh an operational runbook for an alert\u002Fsymptom; structured as TL;DR + Pre-checks + Steps + Verification + Rollback + Escalation.","https:\u002F\u002Fgithub.com\u002FMohammadBafkar\u002Fpolymath\u002Fblob\u002Fmain\u002Fplugins\u002Fpolymath-writing\u002Fskills\u002Frunbook\u002FSKILL.md",[],[],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":19},"01M74GN5GPKEC1JEKP2DFQNEQJ","rfc","Draft a lightweight design RFC to docs\u002Frfcs\u002F\u003Cslug>.md; Summary, Motivation, Detailed design, Drawbacks, Alternatives, Unresolved questions. A proposal to debate, not a recorded decision (adr).","https:\u002F\u002Fgithub.com\u002FMohammadBafkar\u002Fpolymath\u002Fblob\u002Fmain\u002Fplugins\u002Fpolymath-writing\u002Fskills\u002Frfc\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":19},"01M74GN2F4CWPMV4X09TG4E304","editorial-pass","Review and tighten prose in a Markdown artifact for a target tone (terse, formal, friendly) without dropping information; preserve quotations and load-bearing constraints.","https:\u002F\u002Fgithub.com\u002FMohammadBafkar\u002Fpolymath\u002Fblob\u002Fmain\u002Fplugins\u002Fpolymath-writing\u002Fskills\u002Feditorial-pass\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":19},"01M74GMZWGYMZ37C4DYGT6P23G","architecture-review-facilitation","Run an architecture review as a process — entry criteria, reviewer checklist, decision log, and follow-up actions — pairing the design artifact with a red-team pass.","https:\u002F\u002Fgithub.com\u002FMohammadBafkar\u002Fpolymath\u002Fblob\u002Fmain\u002Fplugins\u002Fpolymath-writing\u002Fskills\u002Farchitecture-review-facilitation\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":19},"01M74GMXVX0YX3ETDXS527XDGM","architecture-doc","Write a C4-style architecture document; System Context + Containers (+ Components when interesting) with mermaid diagrams. Describes structure, not a decision (adr) or proposal (rfc).","https:\u002F\u002Fgithub.com\u002FMohammadBafkar\u002Fpolymath\u002Fblob\u002Fmain\u002Fplugins\u002Fpolymath-writing\u002Fskills\u002Farchitecture-doc\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":19},"01M74GMVG1WSMCK066S3KE6V5K","adr","Write an Architecture Decision Record (Michael Nygard format) to docs\u002Fadrs\u002FNNNN-\u003Cslug>.md; frontmatter validated by the ADR artifact schema. Records a made decision, not a proposal to debate (rfc).","https:\u002F\u002Fgithub.com\u002FMohammadBafkar\u002Fpolymath\u002Fblob\u002Fmain\u002Fplugins\u002Fpolymath-writing\u002Fskills\u002Fadr\u002FSKILL.md",[],[]]