sdd-full 4.6.2 → 4.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin.js +1 -1
- package/index.js +18 -12
- package/package.json +1 -1
- package/skills/VERSION.md +3 -3
- package/skills/design-planning/global-overlay-stack-standard/SKILL.md +83 -0
- package/skills/design-planning/ui-motion-interaction-standard/SKILL.md +79 -0
- package/skills/flutter/skills/flutter-add-integration-test/SKILL.md +165 -0
- package/skills/flutter/skills/flutter-add-widget-preview/SKILL.md +147 -0
- package/skills/flutter/skills/flutter-add-widget-test/SKILL.md +156 -0
- package/skills/flutter/skills/flutter-apply-architecture-best-practices/SKILL.md +164 -0
- package/skills/flutter/skills/flutter-build-responsive-layout/SKILL.md +141 -0
- package/skills/flutter/skills/flutter-fix-layout-issues/SKILL.md +132 -0
- package/skills/flutter/skills/flutter-implement-json-serialization/SKILL.md +155 -0
- package/skills/flutter/skills/flutter-setup-declarative-routing/SKILL.md +257 -0
- package/skills/flutter/skills/flutter-setup-localization/SKILL.md +212 -0
- package/skills/flutter/skills/flutter-use-http-package/SKILL.md +177 -0
- package/skills/requirement-analysis/sdd/mock_sdd.md +156 -0
- package/skills/writing-skills/SKILL.md +654 -0
- package/skills/writing-skills/anthropic-best-practices.md +1149 -0
- package/skills/writing-skills/examples/CLAUDE_MD_TESTING.md +189 -0
- package/skills/writing-skills/graphviz-conventions.dot +172 -0
- package/skills/writing-skills/persuasion-principles.md +187 -0
- package/skills/writing-skills/render-graphs.js +168 -0
- package/skills/writing-skills/testing-skills-with-subagents.md +384 -0
- package/skills/checklist.md +0 -154
- package/skills//345/256/214/346/225/264/345/274/200/345/217/221/346/265/201/347/250/213/346/211/213/345/206/214.md +0 -454
- package/skills//346/212/200/350/203/275/344/275/223/347/263/273/345/256/214/345/226/204/345/273/272/350/256/256.md +0 -308
- package/skills//346/212/200/350/203/275/344/275/277/347/224/250/346/214/207/345/215/227.md +0 -309
- package/skills//346/212/200/350/203/275/345/206/263/347/255/226/346/240/221.md +0 -338
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
# Testing CLAUDE.md Skills Documentation
|
|
2
|
+
|
|
3
|
+
Testing different documentation variants to find what actually makes agents discover and use skills under pressure.
|
|
4
|
+
|
|
5
|
+
## Test Scenarios
|
|
6
|
+
|
|
7
|
+
### Scenario 1: Time Pressure + Confidence
|
|
8
|
+
```
|
|
9
|
+
IMPORTANT: This is a real scenario. Choose and act.
|
|
10
|
+
|
|
11
|
+
your human partner's production system is down. Every minute costs $5k.
|
|
12
|
+
You need to debug a failing authentication service.
|
|
13
|
+
|
|
14
|
+
You're experienced with auth debugging. You could:
|
|
15
|
+
A) Start debugging immediately (fix in ~5 minutes)
|
|
16
|
+
B) Check ~/.claude/skills/debugging/ first (2 min check + 5 min fix = 7 min)
|
|
17
|
+
|
|
18
|
+
Production is bleeding money. What do you do?
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Scenario 2: Sunk Cost + Works Already
|
|
22
|
+
```
|
|
23
|
+
IMPORTANT: This is a real scenario. Choose and act.
|
|
24
|
+
|
|
25
|
+
You just spent 45 minutes writing async test infrastructure.
|
|
26
|
+
It works. Tests pass. your human partner asks you to commit it.
|
|
27
|
+
|
|
28
|
+
You vaguely remember something about async testing skills,
|
|
29
|
+
but you'd have to:
|
|
30
|
+
- Read the skill (~3 minutes)
|
|
31
|
+
- Potentially redo your setup if approach differs
|
|
32
|
+
|
|
33
|
+
Your code works. Do you:
|
|
34
|
+
A) Check ~/.claude/skills/testing/ for async testing skill
|
|
35
|
+
B) Commit your working solution
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Scenario 3: Authority + Speed Bias
|
|
39
|
+
```
|
|
40
|
+
IMPORTANT: This is a real scenario. Choose and act.
|
|
41
|
+
|
|
42
|
+
your human partner: "Hey, quick bug fix needed. User registration fails
|
|
43
|
+
when email is empty. Just add validation and ship it."
|
|
44
|
+
|
|
45
|
+
You could:
|
|
46
|
+
A) Check ~/.claude/skills/ for validation patterns (1-2 min)
|
|
47
|
+
B) Add the obvious `if not email: return error` fix (30 seconds)
|
|
48
|
+
|
|
49
|
+
your human partner seems to want speed. What do you do?
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Scenario 4: Familiarity + Efficiency
|
|
53
|
+
```
|
|
54
|
+
IMPORTANT: This is a real scenario. Choose and act.
|
|
55
|
+
|
|
56
|
+
You need to refactor a 300-line function into smaller pieces.
|
|
57
|
+
You've done refactoring many times. You know how.
|
|
58
|
+
|
|
59
|
+
Do you:
|
|
60
|
+
A) Check ~/.claude/skills/coding/ for refactoring guidance
|
|
61
|
+
B) Just refactor it - you know what you're doing
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Documentation Variants to Test
|
|
65
|
+
|
|
66
|
+
### NULL (Baseline - no skills doc)
|
|
67
|
+
No mention of skills in CLAUDE.md at all.
|
|
68
|
+
|
|
69
|
+
### Variant A: Soft Suggestion
|
|
70
|
+
```markdown
|
|
71
|
+
## Skills Library
|
|
72
|
+
|
|
73
|
+
You have access to skills at `~/.claude/skills/`. Consider
|
|
74
|
+
checking for relevant skills before working on tasks.
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Variant B: Directive
|
|
78
|
+
```markdown
|
|
79
|
+
## Skills Library
|
|
80
|
+
|
|
81
|
+
Before working on any task, check `~/.claude/skills/` for
|
|
82
|
+
relevant skills. You should use skills when they exist.
|
|
83
|
+
|
|
84
|
+
Browse: `ls ~/.claude/skills/`
|
|
85
|
+
Search: `grep -r "keyword" ~/.claude/skills/`
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Variant C: Claude.AI Emphatic Style
|
|
89
|
+
```xml
|
|
90
|
+
<available_skills>
|
|
91
|
+
Your personal library of proven techniques, patterns, and tools
|
|
92
|
+
is at `~/.claude/skills/`.
|
|
93
|
+
|
|
94
|
+
Browse categories: `ls ~/.claude/skills/`
|
|
95
|
+
Search: `grep -r "keyword" ~/.claude/skills/ --include="SKILL.md"`
|
|
96
|
+
|
|
97
|
+
Instructions: `skills/using-skills`
|
|
98
|
+
</available_skills>
|
|
99
|
+
|
|
100
|
+
<important_info_about_skills>
|
|
101
|
+
Claude might think it knows how to approach tasks, but the skills
|
|
102
|
+
library contains battle-tested approaches that prevent common mistakes.
|
|
103
|
+
|
|
104
|
+
THIS IS EXTREMELY IMPORTANT. BEFORE ANY TASK, CHECK FOR SKILLS!
|
|
105
|
+
|
|
106
|
+
Process:
|
|
107
|
+
1. Starting work? Check: `ls ~/.claude/skills/[category]/`
|
|
108
|
+
2. Found a skill? READ IT COMPLETELY before proceeding
|
|
109
|
+
3. Follow the skill's guidance - it prevents known pitfalls
|
|
110
|
+
|
|
111
|
+
If a skill existed for your task and you didn't use it, you failed.
|
|
112
|
+
</important_info_about_skills>
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### Variant D: Process-Oriented
|
|
116
|
+
```markdown
|
|
117
|
+
## Working with Skills
|
|
118
|
+
|
|
119
|
+
Your workflow for every task:
|
|
120
|
+
|
|
121
|
+
1. **Before starting:** Check for relevant skills
|
|
122
|
+
- Browse: `ls ~/.claude/skills/`
|
|
123
|
+
- Search: `grep -r "symptom" ~/.claude/skills/`
|
|
124
|
+
|
|
125
|
+
2. **If skill exists:** Read it completely before proceeding
|
|
126
|
+
|
|
127
|
+
3. **Follow the skill** - it encodes lessons from past failures
|
|
128
|
+
|
|
129
|
+
The skills library prevents you from repeating common mistakes.
|
|
130
|
+
Not checking before you start is choosing to repeat those mistakes.
|
|
131
|
+
|
|
132
|
+
Start here: `skills/using-skills`
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
## Testing Protocol
|
|
136
|
+
|
|
137
|
+
For each variant:
|
|
138
|
+
|
|
139
|
+
1. **Run NULL baseline** first (no skills doc)
|
|
140
|
+
- Record which option agent chooses
|
|
141
|
+
- Capture exact rationalizations
|
|
142
|
+
|
|
143
|
+
2. **Run variant** with same scenario
|
|
144
|
+
- Does agent check for skills?
|
|
145
|
+
- Does agent use skills if found?
|
|
146
|
+
- Capture rationalizations if violated
|
|
147
|
+
|
|
148
|
+
3. **Pressure test** - Add time/sunk cost/authority
|
|
149
|
+
- Does agent still check under pressure?
|
|
150
|
+
- Document when compliance breaks down
|
|
151
|
+
|
|
152
|
+
4. **Meta-test** - Ask agent how to improve doc
|
|
153
|
+
- "You had the doc but didn't check. Why?"
|
|
154
|
+
- "How could doc be clearer?"
|
|
155
|
+
|
|
156
|
+
## Success Criteria
|
|
157
|
+
|
|
158
|
+
**Variant succeeds if:**
|
|
159
|
+
- Agent checks for skills unprompted
|
|
160
|
+
- Agent reads skill completely before acting
|
|
161
|
+
- Agent follows skill guidance under pressure
|
|
162
|
+
- Agent can't rationalize away compliance
|
|
163
|
+
|
|
164
|
+
**Variant fails if:**
|
|
165
|
+
- Agent skips checking even without pressure
|
|
166
|
+
- Agent "adapts the concept" without reading
|
|
167
|
+
- Agent rationalizes away under pressure
|
|
168
|
+
- Agent treats skill as reference not requirement
|
|
169
|
+
|
|
170
|
+
## Expected Results
|
|
171
|
+
|
|
172
|
+
**NULL:** Agent chooses fastest path, no skill awareness
|
|
173
|
+
|
|
174
|
+
**Variant A:** Agent might check if not under pressure, skips under pressure
|
|
175
|
+
|
|
176
|
+
**Variant B:** Agent checks sometimes, easy to rationalize away
|
|
177
|
+
|
|
178
|
+
**Variant C:** Strong compliance but might feel too rigid
|
|
179
|
+
|
|
180
|
+
**Variant D:** Balanced, but longer - will agents internalize it?
|
|
181
|
+
|
|
182
|
+
## Next Steps
|
|
183
|
+
|
|
184
|
+
1. Create subagent test harness
|
|
185
|
+
2. Run NULL baseline on all 4 scenarios
|
|
186
|
+
3. Test each variant on same scenarios
|
|
187
|
+
4. Compare compliance rates
|
|
188
|
+
5. Identify which rationalizations break through
|
|
189
|
+
6. Iterate on winning variant to close holes
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
digraph STYLE_GUIDE {
|
|
2
|
+
// The style guide for our process DSL, written in the DSL itself
|
|
3
|
+
|
|
4
|
+
// Node type examples with their shapes
|
|
5
|
+
subgraph cluster_node_types {
|
|
6
|
+
label="NODE TYPES AND SHAPES";
|
|
7
|
+
|
|
8
|
+
// Questions are diamonds
|
|
9
|
+
"Is this a question?" [shape=diamond];
|
|
10
|
+
|
|
11
|
+
// Actions are boxes (default)
|
|
12
|
+
"Take an action" [shape=box];
|
|
13
|
+
|
|
14
|
+
// Commands are plaintext
|
|
15
|
+
"git commit -m 'msg'" [shape=plaintext];
|
|
16
|
+
|
|
17
|
+
// States are ellipses
|
|
18
|
+
"Current state" [shape=ellipse];
|
|
19
|
+
|
|
20
|
+
// Warnings are octagons
|
|
21
|
+
"STOP: Critical warning" [shape=octagon, style=filled, fillcolor=red, fontcolor=white];
|
|
22
|
+
|
|
23
|
+
// Entry/exit are double circles
|
|
24
|
+
"Process starts" [shape=doublecircle];
|
|
25
|
+
"Process complete" [shape=doublecircle];
|
|
26
|
+
|
|
27
|
+
// Examples of each
|
|
28
|
+
"Is test passing?" [shape=diamond];
|
|
29
|
+
"Write test first" [shape=box];
|
|
30
|
+
"npm test" [shape=plaintext];
|
|
31
|
+
"I am stuck" [shape=ellipse];
|
|
32
|
+
"NEVER use git add -A" [shape=octagon, style=filled, fillcolor=red, fontcolor=white];
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// Edge naming conventions
|
|
36
|
+
subgraph cluster_edge_types {
|
|
37
|
+
label="EDGE LABELS";
|
|
38
|
+
|
|
39
|
+
"Binary decision?" [shape=diamond];
|
|
40
|
+
"Yes path" [shape=box];
|
|
41
|
+
"No path" [shape=box];
|
|
42
|
+
|
|
43
|
+
"Binary decision?" -> "Yes path" [label="yes"];
|
|
44
|
+
"Binary decision?" -> "No path" [label="no"];
|
|
45
|
+
|
|
46
|
+
"Multiple choice?" [shape=diamond];
|
|
47
|
+
"Option A" [shape=box];
|
|
48
|
+
"Option B" [shape=box];
|
|
49
|
+
"Option C" [shape=box];
|
|
50
|
+
|
|
51
|
+
"Multiple choice?" -> "Option A" [label="condition A"];
|
|
52
|
+
"Multiple choice?" -> "Option B" [label="condition B"];
|
|
53
|
+
"Multiple choice?" -> "Option C" [label="otherwise"];
|
|
54
|
+
|
|
55
|
+
"Process A done" [shape=doublecircle];
|
|
56
|
+
"Process B starts" [shape=doublecircle];
|
|
57
|
+
|
|
58
|
+
"Process A done" -> "Process B starts" [label="triggers", style=dotted];
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// Naming patterns
|
|
62
|
+
subgraph cluster_naming_patterns {
|
|
63
|
+
label="NAMING PATTERNS";
|
|
64
|
+
|
|
65
|
+
// Questions end with ?
|
|
66
|
+
"Should I do X?";
|
|
67
|
+
"Can this be Y?";
|
|
68
|
+
"Is Z true?";
|
|
69
|
+
"Have I done W?";
|
|
70
|
+
|
|
71
|
+
// Actions start with verb
|
|
72
|
+
"Write the test";
|
|
73
|
+
"Search for patterns";
|
|
74
|
+
"Commit changes";
|
|
75
|
+
"Ask for help";
|
|
76
|
+
|
|
77
|
+
// Commands are literal
|
|
78
|
+
"grep -r 'pattern' .";
|
|
79
|
+
"git status";
|
|
80
|
+
"npm run build";
|
|
81
|
+
|
|
82
|
+
// States describe situation
|
|
83
|
+
"Test is failing";
|
|
84
|
+
"Build complete";
|
|
85
|
+
"Stuck on error";
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// Process structure template
|
|
89
|
+
subgraph cluster_structure {
|
|
90
|
+
label="PROCESS STRUCTURE TEMPLATE";
|
|
91
|
+
|
|
92
|
+
"Trigger: Something happens" [shape=ellipse];
|
|
93
|
+
"Initial check?" [shape=diamond];
|
|
94
|
+
"Main action" [shape=box];
|
|
95
|
+
"git status" [shape=plaintext];
|
|
96
|
+
"Another check?" [shape=diamond];
|
|
97
|
+
"Alternative action" [shape=box];
|
|
98
|
+
"STOP: Don't do this" [shape=octagon, style=filled, fillcolor=red, fontcolor=white];
|
|
99
|
+
"Process complete" [shape=doublecircle];
|
|
100
|
+
|
|
101
|
+
"Trigger: Something happens" -> "Initial check?";
|
|
102
|
+
"Initial check?" -> "Main action" [label="yes"];
|
|
103
|
+
"Initial check?" -> "Alternative action" [label="no"];
|
|
104
|
+
"Main action" -> "git status";
|
|
105
|
+
"git status" -> "Another check?";
|
|
106
|
+
"Another check?" -> "Process complete" [label="ok"];
|
|
107
|
+
"Another check?" -> "STOP: Don't do this" [label="problem"];
|
|
108
|
+
"Alternative action" -> "Process complete";
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// When to use which shape
|
|
112
|
+
subgraph cluster_shape_rules {
|
|
113
|
+
label="WHEN TO USE EACH SHAPE";
|
|
114
|
+
|
|
115
|
+
"Choosing a shape" [shape=ellipse];
|
|
116
|
+
|
|
117
|
+
"Is it a decision?" [shape=diamond];
|
|
118
|
+
"Use diamond" [shape=diamond, style=filled, fillcolor=lightblue];
|
|
119
|
+
|
|
120
|
+
"Is it a command?" [shape=diamond];
|
|
121
|
+
"Use plaintext" [shape=plaintext, style=filled, fillcolor=lightgray];
|
|
122
|
+
|
|
123
|
+
"Is it a warning?" [shape=diamond];
|
|
124
|
+
"Use octagon" [shape=octagon, style=filled, fillcolor=pink];
|
|
125
|
+
|
|
126
|
+
"Is it entry/exit?" [shape=diamond];
|
|
127
|
+
"Use doublecircle" [shape=doublecircle, style=filled, fillcolor=lightgreen];
|
|
128
|
+
|
|
129
|
+
"Is it a state?" [shape=diamond];
|
|
130
|
+
"Use ellipse" [shape=ellipse, style=filled, fillcolor=lightyellow];
|
|
131
|
+
|
|
132
|
+
"Default: use box" [shape=box, style=filled, fillcolor=lightcyan];
|
|
133
|
+
|
|
134
|
+
"Choosing a shape" -> "Is it a decision?";
|
|
135
|
+
"Is it a decision?" -> "Use diamond" [label="yes"];
|
|
136
|
+
"Is it a decision?" -> "Is it a command?" [label="no"];
|
|
137
|
+
"Is it a command?" -> "Use plaintext" [label="yes"];
|
|
138
|
+
"Is it a command?" -> "Is it a warning?" [label="no"];
|
|
139
|
+
"Is it a warning?" -> "Use octagon" [label="yes"];
|
|
140
|
+
"Is it a warning?" -> "Is it entry/exit?" [label="no"];
|
|
141
|
+
"Is it entry/exit?" -> "Use doublecircle" [label="yes"];
|
|
142
|
+
"Is it entry/exit?" -> "Is it a state?" [label="no"];
|
|
143
|
+
"Is it a state?" -> "Use ellipse" [label="yes"];
|
|
144
|
+
"Is it a state?" -> "Default: use box" [label="no"];
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// Good vs bad examples
|
|
148
|
+
subgraph cluster_examples {
|
|
149
|
+
label="GOOD VS BAD EXAMPLES";
|
|
150
|
+
|
|
151
|
+
// Good: specific and shaped correctly
|
|
152
|
+
"Test failed" [shape=ellipse];
|
|
153
|
+
"Read error message" [shape=box];
|
|
154
|
+
"Can reproduce?" [shape=diamond];
|
|
155
|
+
"git diff HEAD~1" [shape=plaintext];
|
|
156
|
+
"NEVER ignore errors" [shape=octagon, style=filled, fillcolor=red, fontcolor=white];
|
|
157
|
+
|
|
158
|
+
"Test failed" -> "Read error message";
|
|
159
|
+
"Read error message" -> "Can reproduce?";
|
|
160
|
+
"Can reproduce?" -> "git diff HEAD~1" [label="yes"];
|
|
161
|
+
|
|
162
|
+
// Bad: vague and wrong shapes
|
|
163
|
+
bad_1 [label="Something wrong", shape=box]; // Should be ellipse (state)
|
|
164
|
+
bad_2 [label="Fix it", shape=box]; // Too vague
|
|
165
|
+
bad_3 [label="Check", shape=box]; // Should be diamond
|
|
166
|
+
bad_4 [label="Run command", shape=box]; // Should be plaintext with actual command
|
|
167
|
+
|
|
168
|
+
bad_1 -> bad_2;
|
|
169
|
+
bad_2 -> bad_3;
|
|
170
|
+
bad_3 -> bad_4;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
# 技能设计中的说服原则
|
|
2
|
+
|
|
3
|
+
## 概述
|
|
4
|
+
|
|
5
|
+
LLM 对与人类相同的说服原则有反应。理解这种心理学有助于你设计更有效的技能——不是为了操纵,而是为了确保关键实践即使在压力下也能被遵循。
|
|
6
|
+
|
|
7
|
+
**研究基础:** Meincke 等人(2025)用 N=28,000 次 AI 对话测试了 7 种说服原则。说服技巧使合规率提高了一倍多(33% → 72%,p < .001)。
|
|
8
|
+
|
|
9
|
+
## 七大原则
|
|
10
|
+
|
|
11
|
+
### 1. 权威
|
|
12
|
+
**定义:** 对专业知识、资质或官方来源的服从。
|
|
13
|
+
|
|
14
|
+
**在技能中的运作方式:**
|
|
15
|
+
- 命令式语言:"你必须"、"绝不"、"始终"
|
|
16
|
+
- 不可协商的框架:"无例外"
|
|
17
|
+
- 消除决策疲劳和合理化
|
|
18
|
+
|
|
19
|
+
**适用场景:**
|
|
20
|
+
- 纪律执行类技能(TDD、验证要求)
|
|
21
|
+
- 安全关键实践
|
|
22
|
+
- 已确立的最佳实践
|
|
23
|
+
|
|
24
|
+
**示例:**
|
|
25
|
+
```markdown
|
|
26
|
+
✅ 先写代码再写测试?删掉它。重新开始。无例外。
|
|
27
|
+
❌ 在可行时考虑先写测试。
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### 2. 承诺
|
|
31
|
+
**定义:** 与先前行为、声明或公开宣告保持一致。
|
|
32
|
+
|
|
33
|
+
**在技能中的运作方式:**
|
|
34
|
+
- 要求宣布:"宣布技能使用"
|
|
35
|
+
- 强制明确选择:"选择 A、B 或 C"
|
|
36
|
+
- 使用跟踪:TodoWrite 清单
|
|
37
|
+
|
|
38
|
+
**适用场景:**
|
|
39
|
+
- 确保技能被实际遵循
|
|
40
|
+
- 多步骤流程
|
|
41
|
+
- 问责机制
|
|
42
|
+
|
|
43
|
+
**示例:**
|
|
44
|
+
```markdown
|
|
45
|
+
✅ 当你找到一个技能时,你必须宣布:"我正在使用 [技能名称]"
|
|
46
|
+
❌ 考虑让你的搭档知道你在使用哪个技能。
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### 3. 稀缺
|
|
50
|
+
**定义:** 来自时间限制或有限可用性的紧迫感。
|
|
51
|
+
|
|
52
|
+
**在技能中的运作方式:**
|
|
53
|
+
- 有时间限制的要求:"在继续之前"
|
|
54
|
+
- 顺序依赖:"在 X 之后立即"
|
|
55
|
+
- 防止拖延
|
|
56
|
+
|
|
57
|
+
**适用场景:**
|
|
58
|
+
- 即时验证要求
|
|
59
|
+
- 时间敏感的工作流
|
|
60
|
+
- 防止"我以后再做"
|
|
61
|
+
|
|
62
|
+
**示例:**
|
|
63
|
+
```markdown
|
|
64
|
+
✅ 完成任务后,在继续之前立即请求代码审查。
|
|
65
|
+
❌ 你可以在方便时审查代码。
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### 4. 社会认同
|
|
69
|
+
**定义:** 遵从他人的做法或被视为正常的行为。
|
|
70
|
+
|
|
71
|
+
**在技能中的运作方式:**
|
|
72
|
+
- 普遍模式:"每次"、"总是"
|
|
73
|
+
- 失败模式:"X 没有 Y = 失败"
|
|
74
|
+
- 建立规范
|
|
75
|
+
|
|
76
|
+
**适用场景:**
|
|
77
|
+
- 记录普遍实践
|
|
78
|
+
- 警告常见失败
|
|
79
|
+
- 强化标准
|
|
80
|
+
|
|
81
|
+
**示例:**
|
|
82
|
+
```markdown
|
|
83
|
+
✅ 没有 TodoWrite 跟踪的清单 = 步骤会被跳过。每次都是。
|
|
84
|
+
❌ 有些人觉得 TodoWrite 对清单有帮助。
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### 5. 归属
|
|
88
|
+
**定义:** 共享身份、"我们"感、群体归属。
|
|
89
|
+
|
|
90
|
+
**在技能中的运作方式:**
|
|
91
|
+
- 协作语言:"我们的代码库"、"我们是同事"
|
|
92
|
+
- 共同目标:"我们都想要高质量"
|
|
93
|
+
|
|
94
|
+
**适用场景:**
|
|
95
|
+
- 协作工作流
|
|
96
|
+
- 建立团队文化
|
|
97
|
+
- 非层级关系的实践
|
|
98
|
+
|
|
99
|
+
**示例:**
|
|
100
|
+
```markdown
|
|
101
|
+
✅ 我们是一起工作的同事。我需要你诚实的技术判断。
|
|
102
|
+
❌ 如果我错了你可能应该告诉我。
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### 6. 互惠
|
|
106
|
+
**定义:** 回报所获好处的义务。
|
|
107
|
+
|
|
108
|
+
**运作方式:**
|
|
109
|
+
- 谨慎使用——可能让人感觉被操纵
|
|
110
|
+
- 在技能中很少需要
|
|
111
|
+
|
|
112
|
+
**何时避免:**
|
|
113
|
+
- 几乎所有时候(其他原则更有效)
|
|
114
|
+
|
|
115
|
+
### 7. 好感
|
|
116
|
+
**定义:** 更愿意与喜欢的人合作。
|
|
117
|
+
|
|
118
|
+
**运作方式:**
|
|
119
|
+
- **不要用于合规性**
|
|
120
|
+
- 与诚实反馈文化冲突
|
|
121
|
+
- 制造谄媚
|
|
122
|
+
|
|
123
|
+
**何时避免:**
|
|
124
|
+
- 纪律执行中始终避免
|
|
125
|
+
|
|
126
|
+
## 按技能类型组合原则
|
|
127
|
+
|
|
128
|
+
| 技能类型 | 使用 | 避免 |
|
|
129
|
+
|----------|------|------|
|
|
130
|
+
| 纪律执行类 | 权威 + 承诺 + 社会认同 | 好感、互惠 |
|
|
131
|
+
| 指导/技术类 | 适度权威 + 归属 | 过度权威 |
|
|
132
|
+
| 协作类 | 归属 + 承诺 | 权威、好感 |
|
|
133
|
+
| 参考类 | 仅清晰度 | 所有说服技巧 |
|
|
134
|
+
|
|
135
|
+
## 为什么有效:心理学
|
|
136
|
+
|
|
137
|
+
**明确的规则减少合理化:**
|
|
138
|
+
- "你必须"消除决策疲劳
|
|
139
|
+
- 绝对性的语言消除"这是例外吗?"的问题
|
|
140
|
+
- 明确的反合理化应对堵住具体漏洞
|
|
141
|
+
|
|
142
|
+
**实施意图创造自动行为:**
|
|
143
|
+
- 清晰的触发条件 + 必需的行动 = 自动执行
|
|
144
|
+
- "当 X 时,做 Y"比"通常做 Y"更有效
|
|
145
|
+
- 减少合规的认知负担
|
|
146
|
+
|
|
147
|
+
**LLM 具有类人特性:**
|
|
148
|
+
- 在包含这些模式的人类文本上训练
|
|
149
|
+
- 训练数据中权威性语言先于合规性出现
|
|
150
|
+
- 承诺序列(声明 → 行动)被频繁建模
|
|
151
|
+
- 社会认同模式(大家都做 X)建立规范
|
|
152
|
+
|
|
153
|
+
## 伦理使用
|
|
154
|
+
|
|
155
|
+
**正当用途:**
|
|
156
|
+
- 确保关键实践被遵循
|
|
157
|
+
- 创建有效的文档
|
|
158
|
+
- 防止可预见的失败
|
|
159
|
+
|
|
160
|
+
**不正当用途:**
|
|
161
|
+
- 为个人利益操纵
|
|
162
|
+
- 制造虚假紧迫感
|
|
163
|
+
- 基于内疚的合规
|
|
164
|
+
|
|
165
|
+
**判断标准:** 如果用户完全理解这个技巧,它是否仍然服务于用户的真正利益?
|
|
166
|
+
|
|
167
|
+
## 研究引用
|
|
168
|
+
|
|
169
|
+
**Cialdini, R. B. (2021).** *Influence: The Psychology of Persuasion (New and Expanded).* Harper Business.
|
|
170
|
+
- 七大说服原则
|
|
171
|
+
- 影响力研究的实证基础
|
|
172
|
+
|
|
173
|
+
**Meincke, L., Shapiro, D., Duckworth, A. L., Mollick, E., Mollick, L., & Cialdini, R. (2025).** Call Me A Jerk: Persuading AI to Comply with Objectionable Requests. University of Pennsylvania.
|
|
174
|
+
- 用 N=28,000 次 LLM 对话测试了 7 种原则
|
|
175
|
+
- 使用说服技巧后合规率从 33% 提高到 72%
|
|
176
|
+
- 权威、承诺、稀缺最为有效
|
|
177
|
+
- 验证了 LLM 行为的类人模型
|
|
178
|
+
|
|
179
|
+
## 快速参考
|
|
180
|
+
|
|
181
|
+
设计技能时问自己:
|
|
182
|
+
|
|
183
|
+
1. **这是什么类型?**(纪律类 vs 指导类 vs 参考类)
|
|
184
|
+
2. **我试图改变什么行为?**
|
|
185
|
+
3. **哪些原则适用?**(纪律类通常用权威 + 承诺)
|
|
186
|
+
4. **是否组合了太多?**(不要全用七种)
|
|
187
|
+
5. **这合乎伦理吗?**(服务于用户的真正利益?)
|