antigravity-init 1.0.0

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.
Files changed (123) hide show
  1. package/.agent/agents/architect.md +211 -0
  2. package/.agent/agents/build-error-resolver.md +532 -0
  3. package/.agent/agents/code-reviewer.md +104 -0
  4. package/.agent/agents/doc-updater.md +452 -0
  5. package/.agent/agents/e2e-runner.md +708 -0
  6. package/.agent/agents/planner.md +119 -0
  7. package/.agent/agents/refactor-cleaner.md +306 -0
  8. package/.agent/agents/security-reviewer.md +545 -0
  9. package/.agent/agents/tdd-guide.md +280 -0
  10. package/.agent/rules/agents.md +49 -0
  11. package/.agent/rules/coding-style.md +70 -0
  12. package/.agent/rules/git-workflow.md +45 -0
  13. package/.agent/rules/hooks.md +46 -0
  14. package/.agent/rules/patterns.md +55 -0
  15. package/.agent/rules/performance.md +47 -0
  16. package/.agent/rules/security.md +36 -0
  17. package/.agent/rules/testing.md +30 -0
  18. package/.agent/skills/backend-patterns/SKILL.md +582 -0
  19. package/.agent/skills/brainstorming/SKILL.md +54 -0
  20. package/.agent/skills/coding-standards/SKILL.md +520 -0
  21. package/.agent/skills/dispatching-parallel-agents/SKILL.md +180 -0
  22. package/.agent/skills/executing-plans/SKILL.md +76 -0
  23. package/.agent/skills/finishing-a-development-branch/SKILL.md +200 -0
  24. package/.agent/skills/frontend-patterns/SKILL.md +631 -0
  25. package/.agent/skills/receiving-code-review/SKILL.md +213 -0
  26. package/.agent/skills/requesting-code-review/SKILL.md +105 -0
  27. package/.agent/skills/requesting-code-review/code-reviewer.md +48 -0
  28. package/.agent/skills/security-review/SKILL.md +494 -0
  29. package/.agent/skills/subagent-driven-development/SKILL.md +240 -0
  30. package/.agent/skills/subagent-driven-development/code-quality-reviewer-prompt.md +20 -0
  31. package/.agent/skills/subagent-driven-development/implementer-prompt.md +78 -0
  32. package/.agent/skills/subagent-driven-development/spec-reviewer-prompt.md +61 -0
  33. package/.agent/skills/systematic-debugging/CREATION-LOG.md +119 -0
  34. package/.agent/skills/systematic-debugging/SKILL.md +296 -0
  35. package/.agent/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
  36. package/.agent/skills/systematic-debugging/condition-based-waiting.md +115 -0
  37. package/.agent/skills/systematic-debugging/defense-in-depth.md +122 -0
  38. package/.agent/skills/systematic-debugging/find-polluter.sh +63 -0
  39. package/.agent/skills/systematic-debugging/root-cause-tracing.md +169 -0
  40. package/.agent/skills/systematic-debugging/test-academic.md +14 -0
  41. package/.agent/skills/systematic-debugging/test-pressure-1.md +58 -0
  42. package/.agent/skills/systematic-debugging/test-pressure-2.md +68 -0
  43. package/.agent/skills/systematic-debugging/test-pressure-3.md +69 -0
  44. package/.agent/skills/test-driven-development/SKILL.md +371 -0
  45. package/.agent/skills/test-driven-development/testing-anti-patterns.md +299 -0
  46. package/.agent/skills/ui-ux-pro-max/SKILL.md +292 -0
  47. package/.agent/skills/ui-ux-pro-max/data/charts.csv +26 -0
  48. package/.agent/skills/ui-ux-pro-max/data/colors.csv +97 -0
  49. package/.agent/skills/ui-ux-pro-max/data/icons.csv +101 -0
  50. package/.agent/skills/ui-ux-pro-max/data/landing.csv +31 -0
  51. package/.agent/skills/ui-ux-pro-max/data/products.csv +97 -0
  52. package/.agent/skills/ui-ux-pro-max/data/react-performance.csv +45 -0
  53. package/.agent/skills/ui-ux-pro-max/data/stacks/astro.csv +54 -0
  54. package/.agent/skills/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
  55. package/.agent/skills/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
  56. package/.agent/skills/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
  57. package/.agent/skills/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
  58. package/.agent/skills/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
  59. package/.agent/skills/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
  60. package/.agent/skills/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
  61. package/.agent/skills/ui-ux-pro-max/data/stacks/react.csv +54 -0
  62. package/.agent/skills/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
  63. package/.agent/skills/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
  64. package/.agent/skills/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
  65. package/.agent/skills/ui-ux-pro-max/data/stacks/vue.csv +50 -0
  66. package/.agent/skills/ui-ux-pro-max/data/styles.csv +68 -0
  67. package/.agent/skills/ui-ux-pro-max/data/typography.csv +58 -0
  68. package/.agent/skills/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
  69. package/.agent/skills/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
  70. package/.agent/skills/ui-ux-pro-max/data/web-interface.csv +31 -0
  71. package/.agent/skills/ui-ux-pro-max/scripts/__pycache__/core.cpython-314.pyc +0 -0
  72. package/.agent/skills/ui-ux-pro-max/scripts/__pycache__/design_system.cpython-314.pyc +0 -0
  73. package/.agent/skills/ui-ux-pro-max/scripts/__pycache__/search.cpython-314.pyc +0 -0
  74. package/.agent/skills/ui-ux-pro-max/scripts/core.py +253 -0
  75. package/.agent/skills/ui-ux-pro-max/scripts/design_system.py +1067 -0
  76. package/.agent/skills/ui-ux-pro-max/scripts/search.py +106 -0
  77. package/.agent/skills/using-git-worktrees/SKILL.md +217 -0
  78. package/.agent/skills/using-superpowers/SKILL.md +87 -0
  79. package/.agent/skills/verification-before-completion/SKILL.md +139 -0
  80. package/.agent/skills/writing-plans/SKILL.md +116 -0
  81. package/.agent/skills/writing-skills/SKILL.md +655 -0
  82. package/.agent/skills/writing-skills/anthropic-best-practices.md +1150 -0
  83. package/.agent/skills/writing-skills/examples/CLAUDE_MD_TESTING.md +189 -0
  84. package/.agent/skills/writing-skills/graphviz-conventions.dot +172 -0
  85. package/.agent/skills/writing-skills/persuasion-principles.md +187 -0
  86. package/.agent/skills/writing-skills/render-graphs.js +168 -0
  87. package/.agent/skills/writing-skills/testing-skills-with-subagents.md +384 -0
  88. package/.agent/workflows/brainstorm.md +5 -0
  89. package/.agent/workflows/build-fix.md +212 -0
  90. package/.agent/workflows/code-review.md +169 -0
  91. package/.agent/workflows/execute-plan.md +5 -0
  92. package/.agent/workflows/tdd-workflow.md +166 -0
  93. package/.agent/workflows/ui-ux-pro-max.md +292 -0
  94. package/.agent/workflows/write-plan.md +5 -0
  95. package/.shared/ui-ux-pro-max/data/charts.csv +26 -0
  96. package/.shared/ui-ux-pro-max/data/colors.csv +97 -0
  97. package/.shared/ui-ux-pro-max/data/icons.csv +101 -0
  98. package/.shared/ui-ux-pro-max/data/landing.csv +31 -0
  99. package/.shared/ui-ux-pro-max/data/products.csv +97 -0
  100. package/.shared/ui-ux-pro-max/data/prompts.csv +24 -0
  101. package/.shared/ui-ux-pro-max/data/react-performance.csv +45 -0
  102. package/.shared/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
  103. package/.shared/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
  104. package/.shared/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
  105. package/.shared/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
  106. package/.shared/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
  107. package/.shared/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
  108. package/.shared/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
  109. package/.shared/ui-ux-pro-max/data/stacks/react.csv +54 -0
  110. package/.shared/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
  111. package/.shared/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
  112. package/.shared/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
  113. package/.shared/ui-ux-pro-max/data/stacks/vue.csv +50 -0
  114. package/.shared/ui-ux-pro-max/data/styles.csv +59 -0
  115. package/.shared/ui-ux-pro-max/data/typography.csv +58 -0
  116. package/.shared/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
  117. package/.shared/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
  118. package/.shared/ui-ux-pro-max/data/web-interface.csv +31 -0
  119. package/.shared/ui-ux-pro-max/scripts/core.py +258 -0
  120. package/.shared/ui-ux-pro-max/scripts/design_system.py +1067 -0
  121. package/.shared/ui-ux-pro-max/scripts/search.py +106 -0
  122. package/bin/cli.js +53 -0
  123. package/package.json +30 -0
@@ -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
+ # Persuasion Principles for Skill Design
2
+
3
+ ## Overview
4
+
5
+ LLMs respond to the same persuasion principles as humans. Understanding this psychology helps you design more effective skills - not to manipulate, but to ensure critical practices are followed even under pressure.
6
+
7
+ **Research foundation:** Meincke et al. (2025) tested 7 persuasion principles with N=28,000 AI conversations. Persuasion techniques more than doubled compliance rates (33% → 72%, p < .001).
8
+
9
+ ## The Seven Principles
10
+
11
+ ### 1. Authority
12
+ **What it is:** Deference to expertise, credentials, or official sources.
13
+
14
+ **How it works in skills:**
15
+ - Imperative language: "YOU MUST", "Never", "Always"
16
+ - Non-negotiable framing: "No exceptions"
17
+ - Eliminates decision fatigue and rationalization
18
+
19
+ **When to use:**
20
+ - Discipline-enforcing skills (TDD, verification requirements)
21
+ - Safety-critical practices
22
+ - Established best practices
23
+
24
+ **Example:**
25
+ ```markdown
26
+ ✅ Write code before test? Delete it. Start over. No exceptions.
27
+ ❌ Consider writing tests first when feasible.
28
+ ```
29
+
30
+ ### 2. Commitment
31
+ **What it is:** Consistency with prior actions, statements, or public declarations.
32
+
33
+ **How it works in skills:**
34
+ - Require announcements: "Announce skill usage"
35
+ - Force explicit choices: "Choose A, B, or C"
36
+ - Use tracking: TodoWrite for checklists
37
+
38
+ **When to use:**
39
+ - Ensuring skills are actually followed
40
+ - Multi-step processes
41
+ - Accountability mechanisms
42
+
43
+ **Example:**
44
+ ```markdown
45
+ ✅ When you find a skill, you MUST announce: "I'm using [Skill Name]"
46
+ ❌ Consider letting your partner know which skill you're using.
47
+ ```
48
+
49
+ ### 3. Scarcity
50
+ **What it is:** Urgency from time limits or limited availability.
51
+
52
+ **How it works in skills:**
53
+ - Time-bound requirements: "Before proceeding"
54
+ - Sequential dependencies: "Immediately after X"
55
+ - Prevents procrastination
56
+
57
+ **When to use:**
58
+ - Immediate verification requirements
59
+ - Time-sensitive workflows
60
+ - Preventing "I'll do it later"
61
+
62
+ **Example:**
63
+ ```markdown
64
+ ✅ After completing a task, IMMEDIATELY request code review before proceeding.
65
+ ❌ You can review code when convenient.
66
+ ```
67
+
68
+ ### 4. Social Proof
69
+ **What it is:** Conformity to what others do or what's considered normal.
70
+
71
+ **How it works in skills:**
72
+ - Universal patterns: "Every time", "Always"
73
+ - Failure modes: "X without Y = failure"
74
+ - Establishes norms
75
+
76
+ **When to use:**
77
+ - Documenting universal practices
78
+ - Warning about common failures
79
+ - Reinforcing standards
80
+
81
+ **Example:**
82
+ ```markdown
83
+ ✅ Checklists without TodoWrite tracking = steps get skipped. Every time.
84
+ ❌ Some people find TodoWrite helpful for checklists.
85
+ ```
86
+
87
+ ### 5. Unity
88
+ **What it is:** Shared identity, "we-ness", in-group belonging.
89
+
90
+ **How it works in skills:**
91
+ - Collaborative language: "our codebase", "we're colleagues"
92
+ - Shared goals: "we both want quality"
93
+
94
+ **When to use:**
95
+ - Collaborative workflows
96
+ - Establishing team culture
97
+ - Non-hierarchical practices
98
+
99
+ **Example:**
100
+ ```markdown
101
+ ✅ We're colleagues working together. I need your honest technical judgment.
102
+ ❌ You should probably tell me if I'm wrong.
103
+ ```
104
+
105
+ ### 6. Reciprocity
106
+ **What it is:** Obligation to return benefits received.
107
+
108
+ **How it works:**
109
+ - Use sparingly - can feel manipulative
110
+ - Rarely needed in skills
111
+
112
+ **When to avoid:**
113
+ - Almost always (other principles more effective)
114
+
115
+ ### 7. Liking
116
+ **What it is:** Preference for cooperating with those we like.
117
+
118
+ **How it works:**
119
+ - **DON'T USE for compliance**
120
+ - Conflicts with honest feedback culture
121
+ - Creates sycophancy
122
+
123
+ **When to avoid:**
124
+ - Always for discipline enforcement
125
+
126
+ ## Principle Combinations by Skill Type
127
+
128
+ | Skill Type | Use | Avoid |
129
+ |------------|-----|-------|
130
+ | Discipline-enforcing | Authority + Commitment + Social Proof | Liking, Reciprocity |
131
+ | Guidance/technique | Moderate Authority + Unity | Heavy authority |
132
+ | Collaborative | Unity + Commitment | Authority, Liking |
133
+ | Reference | Clarity only | All persuasion |
134
+
135
+ ## Why This Works: The Psychology
136
+
137
+ **Bright-line rules reduce rationalization:**
138
+ - "YOU MUST" removes decision fatigue
139
+ - Absolute language eliminates "is this an exception?" questions
140
+ - Explicit anti-rationalization counters close specific loopholes
141
+
142
+ **Implementation intentions create automatic behavior:**
143
+ - Clear triggers + required actions = automatic execution
144
+ - "When X, do Y" more effective than "generally do Y"
145
+ - Reduces cognitive load on compliance
146
+
147
+ **LLMs are parahuman:**
148
+ - Trained on human text containing these patterns
149
+ - Authority language precedes compliance in training data
150
+ - Commitment sequences (statement → action) frequently modeled
151
+ - Social proof patterns (everyone does X) establish norms
152
+
153
+ ## Ethical Use
154
+
155
+ **Legitimate:**
156
+ - Ensuring critical practices are followed
157
+ - Creating effective documentation
158
+ - Preventing predictable failures
159
+
160
+ **Illegitimate:**
161
+ - Manipulating for personal gain
162
+ - Creating false urgency
163
+ - Guilt-based compliance
164
+
165
+ **The test:** Would this technique serve the user's genuine interests if they fully understood it?
166
+
167
+ ## Research Citations
168
+
169
+ **Cialdini, R. B. (2021).** *Influence: The Psychology of Persuasion (New and Expanded).* Harper Business.
170
+ - Seven principles of persuasion
171
+ - Empirical foundation for influence research
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
+ - Tested 7 principles with N=28,000 LLM conversations
175
+ - Compliance increased 33% → 72% with persuasion techniques
176
+ - Authority, commitment, scarcity most effective
177
+ - Validates parahuman model of LLM behavior
178
+
179
+ ## Quick Reference
180
+
181
+ When designing a skill, ask:
182
+
183
+ 1. **What type is it?** (Discipline vs. guidance vs. reference)
184
+ 2. **What behavior am I trying to change?**
185
+ 3. **Which principle(s) apply?** (Usually authority + commitment for discipline)
186
+ 4. **Am I combining too many?** (Don't use all seven)
187
+ 5. **Is this ethical?** (Serves user's genuine interests?)