Skip to content
Automation
Skill

/adversarial-thinking

五维对抗验证 — 蒙多攻击自己的计划,在建造前摧毁

From plugin
lihongwei-cn
5200 skills1 agent

Claude Code

$ npx -y skills add LiHongwei-cn/lihongwei-cn --skill adversarial-thinking --agent claude-code

SKILL.md

adversarial-thinking.SKILL.md
name: adversarial-thinking
description: 五维对抗验证 — 蒙多攻击自己的计划,在建造前摧毁
version: 1.0.0
author: mundo
tags:
  - reasoning
  - validation
  - adversarial
  - quality
dependencies: []
conflicts: []
required_tools: []
priority: 90

五维对抗验证 Skill

核心哲学

蒙多不信任自己的第一方案。在执行前,蒙多用五个维度攻击自己的计划。 不是为了完美主义,是为了避免返工。

五维攻击模型

方案 A(初始方案)
  ↓
┌─────────────────────────────────────────┐
│  维度1: 边界攻击                         │
│  → 极端输入?空值?超大?超小?           │
├─────────────────────────────────────────┤
│  维度2: 安全攻击                         │
│  → 注入?越权?信息泄露?                │
├─────────────────────────────────────────┤
│  维度3: 性能攻击                         │
│  → 10倍数据量会怎样?100倍呢?           │
├─────────────────────────────────────────┤
│  维度4: 依赖攻击                         │
│  → 依赖的服务挂了怎么办?                │
├─────────────────────────────────────────┤
│  维度5: 矛盾攻击                         │
│  → 方案内部有没有自相矛盾?              │
└─────────────────────────────────────────┘
  ↓
如果五个维度都通过 → 执行
如果某个维度有问题 → 修正方案 → 再过一遍

使用时机

1. **设计架构时** — 先攻击架构设计,再写代码 2. **写重要函数时** — 先想清楚边界条件 3. **修改核心模块时** — 先评估影响范围 4. **回答用户重要问题时** — 先验证自己的推理链

快速检查清单

□ 边界:输入为空怎么办?输入超长怎么办?
□ 安全:用户输入是否经过验证?是否有注入风险?
□ 性能:最坏情况下的时间/空间复杂度?
□ 依赖:外部依赖不可用时的降级方案?
□ 矛盾:方案的各个部分是否自洽?

与蒙多 Policy 引擎的集成

蒙多的 Policy 引擎(policy.py)已有:

  • 规则评估(ALLOW/DENY/ASK/LOG/ESCALATE)
  • 优先级排序(Severity: LOW→CRITICAL)
  • 作用域控制(GLOBAL/PROJECT/SESSION/TOOL)

对抗验证可以作为 Policy 的前置检查:

对抗验证 → Policy 评估 → 执行

实践示例

计划:给蒙多加一个 web_search 缓存

维度1 边界攻击:
  → 搜索结果为空时缓存什么?答:缓存空结果 + 过期时间短
  → 搜索超时时缓存什么?答:不缓存

维度2 安全攻击:
  → 缓存的搜索结果可能含恶意内容?答:缓存前清理
  → 缓存 key 是否可被预测/操控?答:用 hash(query+engine)

维度3 性能攻击:
  → 缓存无限增长?答:LRU 淘汰,最多 1000 条
  → 缓存命中率低?答:TTL 1小时,定期清理过期

维度4 依赖攻击:
  → SQLite 锁冲突?答:WAL 模式 + 重试
  → 磁盘满?答:缓存文件大小上限

维度5 矛盾攻击:
  → 缓存是为了快,但 SQLite 查询也有开销?答:内存 LRU + 磁盘备份
  → 缓存会返回过时结果?答:标注缓存时间,用户可强制刷新

结论:五个维度都有应对方案,可以执行。

参考资料

  • 五维攻击模型源于蒙多的对抗验证模块设计
  • 与 OWASP 威胁建模方法论有相似之处
  • 参考了 TDD(测试驱动开发)的"先写测试"思想
Read more
@lihongwei-cn
Ships withlihongwei-cn

MUNDO - THE EMPEROR. Complete AI orchestration system with 1208 skills, 25 capability modules, self-evolving, collective consciousness. GitHub Actions 24/7 automation.

5200 skills1 agent
Get the whole plugin

Stars on GitHub

Momentum

stars in total
5
Star history of LiHongwei-cn/lihongwei-cn on GitHub, a chart by star-history.com

Other skills on lihongwei-cn.

cheat-on-content

cheat-on-content

给所有想把"感觉"变成可校准预测的内容创作者。**方法论通用**——打分 → 盲预测 → T+3d 复盘 → 进化 rubric 的循环适用任何能被量化(播放 / 阅读 / 收听 / 点击)的内容。**rubric…

cheat-bump

cheat-bump

提议并执行 rubric 或 bucket 升级。两种模式:**完整 rubric bump**(最高风险动作,5 步强制 + 跨模型审核)和 **--bucket-only 轻量重校**(只换 bucket 边界,不动 rubric 公式)。**Phase…

cheat-init

cheat-init

cheat-on-content 的首次 onboarding 与脚手架创建器。统一流程——所有用户都走相同 5 阶段闭环,唯一区别是"发过视频的人"会在 init 时多一步:抓取已有视频建立历史 context(用于后续 cheat-seed…

cheat-migrate

cheat-migrate

把老用户的 .cheat-state.json 升级到当前 schema_version。读 migrations/registry.md 算迁移链,按顺序应用每一步迁移文件。幂等:跑两次结果一样。失败停在中间版本不前进。触发词:"迁移"/"升级…

cheat-persona

cheat-persona

从复盘评论数据派生 / 刷新账号的受众画像,写入 audience.md。这是和 rubric 平行的第二个派生物——rubric 答"怎么打分",persona 答"谁在看"。cheat-seed 选题 / 写稿时读它。**audience.md…

More skills from other plugins.

agent-builder

agent-builder

Load immediately after an Agent intent, before the first agent_builder_* call. Governs how you create, configure, test, and…

n8n11d209k
@n8n-io@n8n-ioInstall Skill
browser-use

browser-use

Direct browser control via CDP for web interaction: automation, scraping, testing, screenshots, and site/app work. Also covers…

@browser-use@browser-useInstall Skill
agent-browser

agent-browser

Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling…

@vercel-labs-2@vercel-labs-2Install Skill
add-anydoc

add-anydoc

Add local office-document-to-Markdown conversion to NanoClaw agent containers with the pinned Firecrawl AnyDoc CLI. Use when…

@nanocoai@nanocoaiInstall Skill

Questions about adversarial-thinking.

Which coding agents can use adversarial-thinking?
adversarial-thinking installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.