Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add KtKID/x-dev-pipeline --skill x-adversarial-riskgit clone --depth 1 https://github.com/KtKID/x-dev-pipelineWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/ktkid/x-dev-pipeline/x-adversarial-risk)<a href="https://agentmods.dev/skills/ktkid/x-dev-pipeline/x-adversarial-risk"><img src="https://agentmods.dev/badge/skills/ktkid/x-dev-pipeline/x-adversarial-risk/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/ktkid/x-dev-pipeline/x-adversarial-risk"><img src="https://agentmods.dev/badge/skills/ktkid/x-dev-pipeline/x-adversarial-risk.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00085 | $0.01847 |
| Opus 5 | $0.00043 | $0.00924 |
| Sonnet 5 | $0.00017 | $0.00369 |
| Haiku 4.5 | $0.00009 | $0.00185 |
Grade A, and why
x-adversarial-risk scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 143 lines — stays where its author put it; the contents beside it link to each section on GitHub.
x-adversarial-risk
在 x-spec3 → x-req3 之间执行一次增量审查。目标是找出少量能区分正确实现与常见错误实现的反例,同时保持已有需求语义和 Scenario ID 稳定。
输入与边界
输入为一个 docs/spec/<spec-name>/spec.md。本轮只修改该文件。
Spec 是本轮唯一事实输入。Spec 证据不足以支持新行为时保留现有契约,并在回执中报告证据缺口。项目文件、任务原文、实现代码、QA 报告和脚本源码留给后续独立流程。
references/risk-mistakes.md 是五类通用风险的短示例卡。deep 和 full 在读取轮次中与 Spec 一起读取;示例卡只提供候选构造方法,适用性与可观察结果均由当前 Spec 决定。
对抗性定义
对抗性检查按以下算法生成候选:
- 选择损失最高或最容易被错误实现破坏的不变量。
- 写出该不变量成立依赖的前提。
- 每次只破坏一个前提,构造最小输入、状态、时序或故障窗口。
- 比较正确实现与最可能错误实现的可观察结果。
- 现有 Scenario 已能区分两者时复用;仍有区分缺口时才新增。
候选按“影响 × 发生可能性 × 区分能力”排序,优先覆盖状态跳跃、崩溃窗口、重复或乱序、权限边界、敏感数据、并发交错、资源耗尽和部分失败。
风险预算
根据 Spec 已记录事实独立重算 complexity、importance、risk_average 和 review_budget,以重算结果更新 Spec:
| 分数 | complexity 锚点 | importance 锚点 |
|---|---|---|
| 1 | 单点数据改写或简单 CRUD | 本地、单用户、内部非核心工具 |
| 2 | 单体校验或少量顺序分支 | 小范围内部日常能力 |
| 3 | 状态机、复杂分支或外部交互 | 全用户可用的非核心能力 |
| 4 | 核心高损失链路或多组件一致性 | 全用户核心链路 |
| 5 | 锁、幂等、跨进程并发、崩溃恢复、多阶段持久化提交或核心算法任一项 | 资金、隐私、合规或生命线 |
本地单用户内部 CLI 归入 importance 1;“所有调用者都依赖”描述依赖强度,用户影响范围仍按实际受众评分。预算映射为:
average < 3→standard3 <= average < 4→deepaverage >= 4→full- 任一维度为 4 → 至少
deep - 任一维度为 5 →
full
预算决定单次推理中的候选搜索深度:
standard:由 x-spec3 直接完成,不调用本 skill。deep:逐张检查五类短示例卡,聚焦适用的最高损失不变量,统一生成、去重和排序候选。full:逐张检查五类短示例卡,并增加一个由当前 Spec 独立推导的故障假设,再统一去重和排序。
Scenario 数量由区分缺口决定。已有 Scenario 足够区分正确实现与常见错误实现时直接复用;存在缺口时只增加可改变实现或验证决策的最小 Scenario 集合。
对每张适用示例卡,必须记录一个已有或新增 Scenario ID。候选不适用时记录当前 Spec 中缺少该卡触发信号的具体理由。示例卡 ID 用于追踪覆盖,卡片内容本身不产生需求。
四轮执行契约
第 1 轮:一次读取
调用方使用一个批量工具调用完整读取以下三份内容:
- 本
SKILL.md。 - 目标 Spec。
- 与本 skill 同目录的
references/risk-mistakes.md。
该批量调用是对抗审查唯一读取轮次。已经由调用方放入本轮上下文的内容直接复用,skill 内不再读取。
这一轮直接读取正文,省略 wc、find、rg 索引、分段预览和路径探测。相同文件在本轮保持单次读取。
读取完成后在当前推理中完成:
- 评分一致性复核。
- 模板头部格式复核:前七个元数据字段保持
> key: value形式。 - 现有 Scenario 覆盖判断。
- 五张示例卡的适用性、候选反例、覆盖 Scenario、去重和排序。
- 最终修改集合设计。
第 2 轮:一次集中修改
使用一个 patch 完成全部变化。修改范围只包含:
- 评分字段及“风险评分依据”中的必要纠正。
- 新 Scenario 直接依赖的不变量或 J-ID。
- 对应验收项与测试驱动顺序。
- 对抗性审查记录和状态。
- 区分缺口要求的最小新增 Scenario 集合。
What ships with it
3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 143 lines · 85 tokens per session scan A ed60a193328a
x-adversarial-risk is a skill published in the GitHub repository KtKID/x-dev-pipeline (12 stars, last pushed 2d ago), licensed MIT. It adds 85 tokens to every session and 1,847 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-09.
Other skills, from other repositories
maintainer-preflight
Use before claiming work is done, before committing, and before opening a PR in this repo — runs the mcp-server test/typecheck/build gates and the committed-bundle rule. Trigger on "done", "ready to commit", "open a PR", or any completion claim.
app-user-story-qa
End-to-end app feature inventory and user-story testing workflow with a canonical tracker. Use when the user asks to audit every feature, derive expected behavior from code, test user journeys, or explicitly fix and retest documented UX or logistical defects.
elegant-architecture
Guides clean architecture design with strict 200-line file limits. Use when starting new features, refactoring large files, or planning module structure. Enforces modular design and real testing.
agent-session-format-check
Verify agent session format compatibility for Agent Sessions. Use when any agent CLI updates, when monitoring flags drift, or when bumping max verified versions (fixtures + docs + tests). Covers session schema, usage/limits tracking, storage backends, and discovery path contracts for all supported agents.
skill-lifeguard
Use when a skill is brittle, drifting, repeatedly failing, or needs a Reliable Skill Contract. Trigger for phrases like skill lifeguard, reliable skill, self-maintaining skill, negative examples, verification checkpoints, drift signals, replay hooks, or failure log to skill patch. Audits or patches skills so…
test-driven-development
Enforces TDD discipline with RED-GREEN-REFACTOR cycle. Use when writing new features, fixing bugs, or refactoring code. Ensures tests genuinely verify behavior.