[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7ERJ9JFVPA01327SSSPWAG3":3,"skill-same:01M7ERJ9JFVPA01327SSSPWAG3":48},{"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":26,"commitSha":27,"skillDirectory":28,"forksCount":29,"repositoryHtmlUrl":30,"repositoryHomepageUrl":6,"ownerHtmlUrl":31,"ownerBlogUrl":6,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M7ERJ9JFVPA01327SSSPWAG3","cost-federation",null,"Consumer-side wiring for ADR-097 Phase 3 federation_spend events — per-peer rolling windows + suspension-threshold check","lza6\u002FArmor-piercing-system-prompts","lza6","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F128880206?v=4","01M7EB3K7WPX5T28EJ2NVHE6EG","Chinese-tingfeng","01M7EB3K97E1KQ16QWKJMFNGX8",11,"MIT","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F04-安全渗透\u002Fruflo\u002Fplugins\u002Fruflo-cost-tracker\u002Fskills\u002Fcost-federation\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: cost-federation\ndescription: Consumer-side wiring for ADR-097 Phase 3 federation_spend events — per-peer rolling windows + suspension-threshold check\nargument-hint: \"\"\nallowed-tools: Bash\n---\n\n# Cost Federation\n\nADR-097 Phase 3 specifies a `federation_spend` event bus that publishes one event per `federation_send` completion: `{peerId, taskId, tokensUsed, usdSpent, ts}`. Cost-tracker is the declared consumer — it aggregates per-peer rolling windows (1h \u002F 24h \u002F 7d) and the federation breaker queries that aggregate to suspend peers exceeding the configured threshold.\n\n**Phase 3 isn't landed upstream yet.** This skill is the consumer-side wiring; it activates the moment upstream publishes events to the `federation-spend` namespace. Until then it reports cleanly with a \"no events found\" notice.\n\n## When to use\n\n- Before opening federation traffic to a new peer — establish baseline.\n- Periodically (e.g. `\u002Floop 5m`) to monitor per-peer spend across windows.\n- After ADR-097 Phase 2\u002F3 lands — to verify breaker suspension reasoning.\n\n## Steps\n\n1. **Run the script**:\n\n   ```bash\n   node plugins\u002Fruflo-cost-tracker\u002Fscripts\u002Ffederation.mjs\n   ```\n\n   Optional env:\n   - `FED_FORMAT=json` — JSON instead of markdown\n   - `FED_NAMESPACE=federation-spend` — override target namespace\n   - `FED_SUSPEND_THRESHOLD_USD=5.0` — breaker threshold (ADR-097 default)\n\n2. **Inspect** — per-peer 1h\u002F24h\u002F7d windows of count + USD spent, plus a \"Suspension threshold check\" block flagging peers over the breaker line.\n\n## Storage contract (consumer side)\n\nWhen Phase 3 lands, events should be persisted to namespace `federation-spend` with key prefix `fed-spend-` and JSON value matching:\n\n```json\n{\n  \"peerId\": \"\u003Cpeer-uuid>\",\n  \"taskId\": \"\u003Ctask-uuid>\",\n  \"tokensUsed\": 12345,\n  \"usdSpent\": 0.0287,\n  \"ts\": \"2026-05-05T...\"\n}\n```\n\nThe script reads any record matching that prefix, regardless of how upstream produces them. Multiple events per peer accumulate cleanly into the rolling-window sums.\n\n## Cross-references\n\n- [ADR-097: Federation budget circuit breaker](..\u002F..\u002Fv3\u002Fdocs\u002Fadr\u002FADR-097-federation-budget-circuit-breaker.md) — the complete spec\n- `cost-report` — same data, different lens (cost-report focuses on local agent spend; this skill on per-peer federated spend)\n- `ruflo-federation` plugin — the producer side (when Phase 3 lands)\n","# Cost Federation\n\nADR-097 Phase 3 specifies a `federation_spend` event bus that publishes one event per `federation_send` completion: `{peerId, taskId, tokensUsed, usdSpent, ts}`. Cost-tracker is the declared consumer — it aggregates per-peer rolling windows (1h \u002F 24h \u002F 7d) and the federation breaker queries that aggregate to suspend peers exceeding the configured threshold.\n\n**Phase 3 isn't landed upstream yet.** This skill is the consumer-side wiring; it activates the moment upstream publishes events to the `federation-spend` namespace. Until then it reports cleanly with a \"no events found\" notice.\n\n## When to use\n\n- Before opening federation traffic to a new peer — establish baseline.\n- Periodically (e.g. `\u002Floop 5m`) to monitor per-peer spend across windows.\n- After ADR-097 Phase 2\u002F3 lands — to verify breaker suspension reasoning.\n\n## Steps\n\n1. **Run the script**:\n\n   ```bash\n   node plugins\u002Fruflo-cost-tracker\u002Fscripts\u002Ffederation.mjs\n   ```\n\n   Optional env:\n   - `FED_FORMAT=json` — JSON instead of markdown\n   - `FED_NAMESPACE=federation-spend` — override target namespace\n   - `FED_SUSPEND_THRESHOLD_USD=5.0` — breaker threshold (ADR-097 default)\n\n2. **Inspect** — per-peer 1h\u002F24h\u002F7d windows of count + USD spent, plus a \"Suspension threshold check\" block flagging peers over the breaker line.\n\n## Storage contract (consumer side)\n\nWhen Phase 3 lands, events should be persisted to namespace `federation-spend` with key prefix `fed-spend-` and JSON value matching:\n\n```json\n{\n  \"peerId\": \"\u003Cpeer-uuid>\",\n  \"taskId\": \"\u003Ctask-uuid>\",\n  \"tokensUsed\": 12345,\n  \"usdSpent\": 0.0287,\n  \"ts\": \"2026-05-05T...\"\n}\n```\n\nThe script reads any record matching that prefix, regardless of how upstream produces them. Multiple events per peer accumulate cleanly into the rolling-window sums.\n\n## Cross-references\n\n- [ADR-097: Federation budget circuit breaker](..\u002F..\u002Fv3\u002Fdocs\u002Fadr\u002FADR-097-federation-budget-circuit-breaker.md) — the complete spec\n- `cost-report` — same data, different lens (cost-report focuses on local agent spend; this skill on per-peer federated spend)\n- `ruflo-federation` plugin — the producer side (when Phase 3 lands)\n",{"name":5,"description":7,"allowed-tools":24,"argument-hint":25},"Bash","","main","d69096e239f2a89aabc2cd078c47664a9d3b1e11","04-安全渗透\u002Fruflo\u002Fplugins\u002Fruflo-cost-tracker\u002Fskills\u002Fcost-federation",3,"https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts","https:\u002F\u002Fgithub.com\u002Flza6","个人vx：Tf00798\r\n个人✈：@TFGY999","2026-10-08 14:29:22",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add lza6\u002FArmor-piercing-system-prompts --skill cost-federation",{"tool":40,"command":41},"bunx","bunx skills add lza6\u002FArmor-piercing-system-prompts --skill cost-federation",{"tool":43,"command":44},"pnpm","pnpm dlx skills add lza6\u002FArmor-piercing-system-prompts --skill cost-federation","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F04-安全渗透\u002Fruflo\u002Fplugins\u002Fruflo-cost-tracker\u002Fskills\u002Fcost-federation\u002FSKILL.md",true,[],[49,57,62,69,76,83],{"skillNo":50,"name":51,"nameZh":6,"description":52,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":53,"categories":54,"keywords":55,"publishedAt":56},"01M7FFG485KY83TD6HSC4YPCMC","obsidian-clipper-template-creator","Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator\u002FSKILL.md",[],[],"2026-11-16 10:05:34",{"skillNo":58,"name":51,"nameZh":6,"description":52,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":56},"01M7FFG0T6AZ0STEJPSB3CX84K","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobsidian-clipper-template-creator-antigravity-awesome-skills-main\u002FSKILL.md",[],[],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":56},"01M7FFFY0QEM14SKWPDYGMXM2P","python-api","Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP\u002FmAP semantics, and source-style import diagnostics.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Fpython-api\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":56},"01M7FFFVZQZ2GJ0C0TGP7JHD20","file-evaluation","Folder-based PASCAL VOC AP\u002FmAP evaluation from ground-truth and detection text files.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002Fsub-skills\u002Ffile-evaluation\u002FSKILL.md",[],[],{"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":82,"publishedAt":56},"01M7FFFSFNYSE77SJ6PE1CK2DA","object-detection-metrics","Guides legacy Object-Detection-Metrics PASCAL VOC AP\u002FmAP evaluation from detection text folders and direct Python API classes.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fobject-detection-metrics\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":56},"01M7FFFP0GCK1RVXBCPQ8APBMT","nx-workspace-patterns","Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.","https:\u002F\u002Fgithub.com\u002Flza6\u002FArmor-piercing-system-prompts\u002Fblob\u002Fmain\u002F07-后端与架构\u002Fnx-workspace-patterns\u002FSKILL.md",[],[]]