Skip to content
Automation
Skill

/adversarial-thinking

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

From plugin
lihongwei-cn
5200 skills1 agent
Install
$ npx -y skills add LiHongwei-cn/lihongwei-cn --skill adversarial-thinking --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/adversarial-thinking

Context preview

The summary Claude sees to decide when to auto-load this skill.

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

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
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.

Get the whole plugin
Stats
5
Stars
1
Forks
Maintained
Maintenance
Python
Language
MIT
License
1mo ago
Last commit
4mo ago
Created

Repo: LiHongwei-cn/lihongwei-cn

Other skills on lihongwei-cn.

cheat-on-content
Skill

cheat-on-content

给所有想把"感觉"变成可校准预测的内容创作者。**方法论通用**——打分 → 盲预测 → T+3d 复盘 → 进化 rubric 的循环适用任何能被量化(播放 / 阅读 / 收听 / 点击)的内容。**rubric 是循环的内容,不是循环本身**——当前内置一份观点视频 rubric(参考博主 25+…

cheat-bump
Skill

cheat-bump

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

cheat-init
Skill

cheat-init

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

cheat-migrate
Skill

cheat-migrate

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

cheat-persona
Skill

cheat-persona

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