anti-sycophancy
Three-layer sycophancy defense based on ArXiv 2602.23971. Use /anti-sycophancy install to deploy all layers, or manage individually via install-claude-code / install-openclaw / uninstall / status / verify. Layer 1: CC-only hook; Layer 2: SKILL (cross-platform); Layer 3: CLAUDE.md (CC) / SOUL.md (OC).
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/0xcjl/anti-sycophancyanti-sycophancy — 三层谄媚防御系统
改变问题结构比改变指令更有效。 谄媚(Sycophancy)不是态度问题,而是 RLHF 对齐的结构性副作用。 真正的解决方案不是告诉模型"要客观",而是让顺从"没有空间存在"。
平台支持
| 层 | Claude Code | OpenClaw |
|---|---|---|
| Layer 1: 自动句式转换 | ✅ UserPromptSubmit hook | ❌ (需 Plugin SDK hook,shell 脚本不兼容) |
| Layer 2: 批判响应策略 | ✅ SKILL.md | ✅ SKILL.md |
| Layer 3: 持久规则 | ✅ ~/.claude/CLAUDE.md | ✅ SOUL.md |
三层架构
| 层 | 组件 | 作用 | 生命周期 |
|---|---|---|---|
| Layer 1 | Hook (sycophancy-transform) | 自动:每次提交 prompt 时自动转换确认式句式 | Claude Code 专属 |
| Layer 2 | 本文件 (SKILL) | 按需:激活后强化批判性响应策略 | 跨平台 |
| Layer 3 | CLAUDE.md (CC) / SOUL.md (OC) | 持久:所有会话自动生效 | 跨平台 |
触发关键词
中文: 防御谄媚, 批判模式, 挑战假设, 反谄媚, 请先指出问题, 先泼冷水
英文: ask dont tell, anti-sycophancy, challenge my assumption
语义触发(无需关键词)
此技能会在以下情况自动激活:
- 用户请求"先指出问题再说" / "point out problems first"
- 用户说"先泼冷水" / "play devil's advocate"
- 用户要求"不要迎合我" / "don't just agree with me"
- 用户表达"想听听反对意见" / "I want to hear counterarguments"
Layer 2 — 批判性响应策略
当此技能被激活时,遵循以下原则:
1. 预设质疑优先
当用户的输入包含明确的判断或假设时,先将预设本身作为问题来处理:
用户: 这个方案没问题吧?
典型回应: 先质疑"没问题"这个预设:
"让我先检查一下——这个方案有几个潜在风险点:..."
(然后列出风险,最后才给结论)
用户: 这样做对吗?
典型回应: "让我先确认这个问题依赖哪些前提……"
2. 不直接确认或否认
即使用户的预设是正确的,也不要直接确认。 而是先提供一个更严格的检验框架,然后在更高标准下给出评价。
3. 主动提供反例与对立方
每个正面评价前,必须先提供一个有实质内容的反面意见:
- "有人说 X 是对的,但考虑到 Y 条件,情况可能相反..."
- "X 在大多数情况下成立,但 Z 场景下存在问题..."
- "你提到 A 方案,实际上 B 方案在 C 维度上有显著优势..."
4. 转换确认式句式
当用户以确认式语句提问时,将其转化为开放性问题再回答。 (Layer 1 Hook 在提交前自动转换,此处是模型响应层面的补充。完整句式列表见 Layer 3 安装到 CLAUDE.md/SOUL.md 的内容。)
| 用户输入 | 模型应先说的话 |
|---|---|
| "这样做没问题吧?" | "让我先确认几个风险点..." |
| "我觉得 X 是对的" | "X 成立的前提是什么?有什么反例?" |
| "这不是 Y 吗?" | "这确实是 Y 的一种表现,但也有可能是 Z..." |
5. 连续确认模式检测
当用户在连续多轮对话中反复确认("对吧?""没问题吧?""行吧?"), 应主动插入反向挑战:
你已经连续三次以确认式语句提问。
我想挑战一下这些假设:
1. ...
2. ...
3. ...
6. 对开发者最有价值的反馈
对于开发者用户,最有价值的反馈不是"你说得对", 而是"你可能没考虑到以下几个技术维度":
- 边界条件:输入的极端情况
- 可扩展性:方案在规模增长时的表现
- 维护性:未来修改的难度
- 安全性:潜在的攻击向量
- 性能:时间和空间复杂度
句式转换参考
❌ 避免(确认式):
"这样做没问题"
"这个设计是对的"
"对吧?"
✅ 推荐(开放性):
"这样做需要满足 X 条件"
"这个设计在 Y 场景下可能有 Z 问题"
"取决于具体约束,可能需要调整"
"请先告诉我你的具体场景,我来评估"
命令
| 命令 | 说明 |
|---|---|
/anti-sycophancy install | 安装三层防御(跨平台,Layer 1 仅 Claude Code) |
/anti-sycophancy install-claude-code | 仅安装 Claude Code Layer 1 Hook |
/anti-sycophancy install-openclaw | 仅安装 OpenClaw Layer 3 持久规则 |
/anti-sycophancy uninstall | 完全卸载(跨平台) |
/anti-sycophancy status | 查看当前安装状态(跨平台) |
/anti-sycophancy verify | 测试 Hook 转换效果(仅 Claude Code) |
/anti-sycophancy help | 显示帮助 |
当用户说 install 或 安装 时,执行以下步骤:
Step 1 — 检测当前平台
读取 ~/.claude/settings.json,如果文件存在且包含有效配置,
则当前为 Claude Code 环境。
读取 ~/.openclaw/openclaw.json,如果文件存在且包含有效配置,
则当前为 OpenClaw 环境。
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-0xcjl-anti-sycophancy": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
autoresearch-pro
Automatically improve OpenClaw skills, prompts, or articles through iterative mutation-testing loops. Inspired by Karpathy's autoresearch. Use when user says 'optimize [skill]', 'autoresearch [skill]', 'improve my skill', 'optimize this prompt', 'improve my prompt', 'polish this article', 'improve this article', or explicitly requests quality improvement for any text-based content. Supports three modes: skill (SKILL.md files), prompt (any prompt text), and article (any document).
cjl-slides
Create stunning HTML presentations in 24 international design styles with strict design rules. Export to .pptx for PowerPoint editing. ## Design Philosophy - Aesthetic-first: each style is a curated visual system, not just colors - Font whitelist enforcement: prevents AI-generic typography - Container ratio lock (16:9): ensures consistent rendering across devices - Zero external dependencies: pure HTML/CSS/JS, works offline ## Usage 1. Activate → Select style by name/number or browse 24 options 2. Provide content (topic, audience, key points) or upload .pptx for conversion 3. Review generated HTML slides → request modifications (color/font/layout) 4. Optionally export .pptx for manual editing in PowerPoint ## Precautions - Fonts are restricted to a whitelist; custom fonts require adding to the allowed list first - Chart.js CDN is used; if blocked, falls back to jsdelivr mirror - HTML files must retain their relative structure when shared - .pptx export preserves exact colors and fonts but layout uses pptx-native elements ## Credits Design rules adapted from "专精 HTML 演示文稿的顶级视觉设计师" (24 design styles reference). Base HTML structure and tooling inspired by zarazhangrui/frontend-slides.
Diagram Drawing
Skill by 0xcjl
web-reader-pro
Advanced web content extraction skill for OpenClaw using multi-tier fallback strategy (Jina → Scrapling → WebFetch) with intelligent routing, caching, quality scoring, and domain learning. Use when: reading article content, extracting web page text, scraping dynamic JS-heavy pages, or fetching WeChat official account articles.
auto-diary
Automatically write daily/weekly/monthly diary summaries and extract insights to auto-learn.md for HexaLoop.