@rfxlamia/skillkit 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 (225) hide show
  1. package/README.md +16 -0
  2. package/agents/creative-copywriter.md +212 -0
  3. package/agents/dario-amodei.md +135 -0
  4. package/agents/doc-simplifier.md +63 -0
  5. package/agents/kotlin-pro.md +433 -0
  6. package/agents/red-team.md +136 -0
  7. package/agents/sam-altman.md +121 -0
  8. package/agents/seo-manager.md +184 -0
  9. package/bin/skillkit.js +3 -0
  10. package/package.json +35 -0
  11. package/skills/adversarial-review/SKILL.md +219 -0
  12. package/skills/baby-education/SKILL.md +260 -0
  13. package/skills/baby-education/references/advanced-techniques.md +323 -0
  14. package/skills/baby-education/references/transformations.md +345 -0
  15. package/skills/been-there-done-that/SKILL.md +455 -0
  16. package/skills/been-there-done-that/references/analysis-patterns.md +162 -0
  17. package/skills/been-there-done-that/references/git-commands.md +132 -0
  18. package/skills/been-there-done-that/references/tree-insertion-logic.md +145 -0
  19. package/skills/coolhunter/SKILL.md +270 -0
  20. package/skills/coolhunter/assets/elicitation-methods.csv +51 -0
  21. package/skills/coolhunter/knowledge/elicitation-methods.md +312 -0
  22. package/skills/coolhunter/references/workflow-execution.md +238 -0
  23. package/skills/coolhunter/workflow-plan-coolhunter.md +232 -0
  24. package/skills/creative-copywriting/SKILL.md +324 -0
  25. package/skills/creative-copywriting/databases/README.md +60 -0
  26. package/skills/creative-copywriting/databases/carousel-structures.csv +16 -0
  27. package/skills/creative-copywriting/databases/emotional-arcs.csv +11 -0
  28. package/skills/creative-copywriting/databases/hook-formulas.csv +51 -0
  29. package/skills/creative-copywriting/databases/power-words.csv +201 -0
  30. package/skills/creative-copywriting/databases/psychological-triggers.csv +21 -0
  31. package/skills/creative-copywriting/databases/read-more-patterns.csv +26 -0
  32. package/skills/creative-copywriting/databases/swipe-triggers.csv +31 -0
  33. package/skills/creative-copywriting/references/carousel-psychology.md +223 -0
  34. package/skills/creative-copywriting/references/hook-anatomy.md +169 -0
  35. package/skills/creative-copywriting/references/power-word-science.md +134 -0
  36. package/skills/creative-copywriting/references/storytelling-frameworks.md +157 -0
  37. package/skills/diverse-content-gen/SKILL.md +201 -0
  38. package/skills/diverse-content-gen/references/advanced-techniques.md +320 -0
  39. package/skills/diverse-content-gen/references/research-findings.md +379 -0
  40. package/skills/diverse-content-gen/references/task-workflows.md +241 -0
  41. package/skills/diverse-content-gen/references/tool-integration.md +419 -0
  42. package/skills/diverse-content-gen/references/troubleshooting.md +426 -0
  43. package/skills/diverse-content-gen/references/vs-core-technique.md +240 -0
  44. package/skills/framework-critical-thinking/SKILL.md +220 -0
  45. package/skills/framework-critical-thinking/references/bias_detector.md +375 -0
  46. package/skills/framework-critical-thinking/references/fallback_handler.md +239 -0
  47. package/skills/framework-critical-thinking/references/memory_curator.md +161 -0
  48. package/skills/framework-critical-thinking/references/metacognitive_monitor.md +297 -0
  49. package/skills/framework-critical-thinking/references/producer_critic_orchestrator.md +333 -0
  50. package/skills/framework-critical-thinking/references/reasoning_router.md +235 -0
  51. package/skills/framework-critical-thinking/references/reasoning_validator.md +97 -0
  52. package/skills/framework-critical-thinking/references/reflection_trigger.md +78 -0
  53. package/skills/framework-critical-thinking/references/self_verification.md +388 -0
  54. package/skills/framework-critical-thinking/references/uncertainty_quantifier.md +207 -0
  55. package/skills/framework-initiative/SKILL.md +231 -0
  56. package/skills/framework-initiative/references/examples.md +150 -0
  57. package/skills/framework-initiative/references/impact-analysis.md +157 -0
  58. package/skills/framework-initiative/references/intent-patterns.md +145 -0
  59. package/skills/framework-initiative/references/star-framework.md +165 -0
  60. package/skills/humanize-docs/SKILL.md +203 -0
  61. package/skills/humanize-docs/references/advanced-techniques.md +13 -0
  62. package/skills/humanize-docs/references/core-transformations.md +368 -0
  63. package/skills/humanize-docs/references/detection-patterns.md +400 -0
  64. package/skills/humanize-docs/references/examples-gallery.md +374 -0
  65. package/skills/imagine/SKILL.md +190 -0
  66. package/skills/imagine/references/artstyle-corporate-memphis.md +625 -0
  67. package/skills/imagine/references/artstyle-crewdson-hyperrealism.md +295 -0
  68. package/skills/imagine/references/artstyle-iphone-social-media.md +426 -0
  69. package/skills/imagine/references/artstyle-sciencesaru.md +276 -0
  70. package/skills/pre-deploy-checklist/README.md +26 -0
  71. package/skills/pre-deploy-checklist/SKILL.md +153 -0
  72. package/skills/pre-deploy-checklist/references/checklist-categories.md +174 -0
  73. package/skills/pre-deploy-checklist/references/domain-prompts.md +216 -0
  74. package/skills/prompt-engineering/SKILL.md +209 -0
  75. package/skills/prompt-engineering/references/advanced-combinations.md +444 -0
  76. package/skills/prompt-engineering/references/chain-of-thought.md +140 -0
  77. package/skills/prompt-engineering/references/decision_matrix.md +220 -0
  78. package/skills/prompt-engineering/references/few-shot.md +346 -0
  79. package/skills/prompt-engineering/references/json-format.md +270 -0
  80. package/skills/prompt-engineering/references/natural-language.md +420 -0
  81. package/skills/prompt-engineering/references/pitfalls.md +365 -0
  82. package/skills/prompt-engineering/references/prompt-chaining.md +498 -0
  83. package/skills/prompt-engineering/references/react.md +108 -0
  84. package/skills/prompt-engineering/references/self-consistency.md +322 -0
  85. package/skills/prompt-engineering/references/tree-of-thoughts.md +386 -0
  86. package/skills/prompt-engineering/references/xml-format.md +220 -0
  87. package/skills/prompt-engineering/references/yaml-format.md +488 -0
  88. package/skills/prompt-engineering/references/zero-shot.md +74 -0
  89. package/skills/quick-spec/SKILL.md +280 -0
  90. package/skills/quick-spec/assets/tech-spec-template.md +74 -0
  91. package/skills/quick-spec/references/step-01-understand.md +189 -0
  92. package/skills/quick-spec/references/step-02-investigate.md +144 -0
  93. package/skills/quick-spec/references/step-03-generate.md +128 -0
  94. package/skills/quick-spec/references/step-04-review.md +173 -0
  95. package/skills/quick-spec/tests/test_scenarios.md +83 -0
  96. package/skills/quick-spec/tests/test_skill.py +136 -0
  97. package/skills/readme-expert/SKILL.md +538 -0
  98. package/skills/readme-expert/knowledge/INDEX.md +192 -0
  99. package/skills/readme-expert/knowledge/application/quality-standards.md +470 -0
  100. package/skills/readme-expert/knowledge/application/script-executor.md +604 -0
  101. package/skills/readme-expert/knowledge/application/template-library.md +822 -0
  102. package/skills/readme-expert/knowledge/foundation/codebase-scanner.md +361 -0
  103. package/skills/readme-expert/knowledge/foundation/validation-checklist.md +481 -0
  104. package/skills/red-teaming/SKILL.md +321 -0
  105. package/skills/red-teaming/references/ai-llm-redteam.md +517 -0
  106. package/skills/red-teaming/references/attack-techniques.md +410 -0
  107. package/skills/red-teaming/references/cybersecurity-redteam.md +383 -0
  108. package/skills/red-teaming/references/tools-frameworks.md +446 -0
  109. package/skills/releasing/.skillkit-mode +1 -0
  110. package/skills/releasing/SKILL.md +225 -0
  111. package/skills/releasing/references/version-detection.md +108 -0
  112. package/skills/screenwriter/SKILL.md +273 -0
  113. package/skills/screenwriter/references/advanced-techniques.md +216 -0
  114. package/skills/screenwriter/references/pipeline-integration.md +266 -0
  115. package/skills/skillkit/.claude-plugin/plugin.json +27 -0
  116. package/skills/skillkit/CHANGELOG.md +484 -0
  117. package/skills/skillkit/SKILL.md +511 -0
  118. package/skills/skillkit/commands/skillkit.md +6 -0
  119. package/skills/skillkit/commands/validate-plan.md +6 -0
  120. package/skills/skillkit/commands/verify.md +6 -0
  121. package/skills/skillkit/knowledge/INDEX.md +352 -0
  122. package/skills/skillkit/knowledge/application/09-case-studies.md +257 -0
  123. package/skills/skillkit/knowledge/application/10-technical-architecture.md +324 -0
  124. package/skills/skillkit/knowledge/application/11-adoption-strategy.md +267 -0
  125. package/skills/skillkit/knowledge/application/12-testing-and-validation.md +276 -0
  126. package/skills/skillkit/knowledge/application/13-competitive-landscape.md +198 -0
  127. package/skills/skillkit/knowledge/foundation/01-why-skills-exist.md +246 -0
  128. package/skills/skillkit/knowledge/foundation/02-skills-vs-subagents-comparison.md +312 -0
  129. package/skills/skillkit/knowledge/foundation/03-skills-vs-subagents-decision-tree.md +346 -0
  130. package/skills/skillkit/knowledge/foundation/04-hybrid-patterns.md +308 -0
  131. package/skills/skillkit/knowledge/foundation/05-token-economics.md +275 -0
  132. package/skills/skillkit/knowledge/foundation/06-platform-constraints.md +237 -0
  133. package/skills/skillkit/knowledge/foundation/07-security-concerns.md +322 -0
  134. package/skills/skillkit/knowledge/foundation/08-when-not-to-use-skills.md +270 -0
  135. package/skills/skillkit/knowledge/plugin-guide.md +614 -0
  136. package/skills/skillkit/knowledge/tools/14-validation-tools-guide.md +150 -0
  137. package/skills/skillkit/knowledge/tools/15-cost-tools-guide.md +157 -0
  138. package/skills/skillkit/knowledge/tools/16-security-tools-guide.md +122 -0
  139. package/skills/skillkit/knowledge/tools/17-pattern-tools-guide.md +161 -0
  140. package/skills/skillkit/knowledge/tools/18-decision-helper-guide.md +243 -0
  141. package/skills/skillkit/knowledge/tools/19-test-generator-guide.md +275 -0
  142. package/skills/skillkit/knowledge/tools/20-split-skill-guide.md +149 -0
  143. package/skills/skillkit/knowledge/tools/21-quality-scorer-guide.md +226 -0
  144. package/skills/skillkit/knowledge/tools/22-migration-helper-guide.md +356 -0
  145. package/skills/skillkit/knowledge/tools/23-subagent-creation-guide.md +448 -0
  146. package/skills/skillkit/knowledge/tools/24-behavioral-testing-guide.md +122 -0
  147. package/skills/skillkit/references/proposal-generation.md +982 -0
  148. package/skills/skillkit/references/rationalization-catalog.md +75 -0
  149. package/skills/skillkit/references/research-methodology.md +661 -0
  150. package/skills/skillkit/references/section-2-full-creation-workflow.md +452 -0
  151. package/skills/skillkit/references/section-3-validation-workflow-existing-skill.md +63 -0
  152. package/skills/skillkit/references/section-4-decision-workflow-skills-vs-subagents.md +64 -0
  153. package/skills/skillkit/references/section-5-migration-workflow-doc-to-skill.md +58 -0
  154. package/skills/skillkit/references/section-6-subagent-creation-workflow.md +499 -0
  155. package/skills/skillkit/references/section-7-knowledge-reference-map.md +72 -0
  156. package/skills/skillkit/scripts/decision_helper.py +799 -0
  157. package/skills/skillkit/scripts/init_skill.py +400 -0
  158. package/skills/skillkit/scripts/init_subagent.py +231 -0
  159. package/skills/skillkit/scripts/migration_helper.py +669 -0
  160. package/skills/skillkit/scripts/package_skill.py +211 -0
  161. package/skills/skillkit/scripts/pattern_detector.py +381 -0
  162. package/skills/skillkit/scripts/pattern_detector_new.py +382 -0
  163. package/skills/skillkit/scripts/pressure_tester.py +157 -0
  164. package/skills/skillkit/scripts/quality_scorer.py +999 -0
  165. package/skills/skillkit/scripts/quick_validate.py +100 -0
  166. package/skills/skillkit/scripts/security_scanner.py +474 -0
  167. package/skills/skillkit/scripts/split_skill.py +540 -0
  168. package/skills/skillkit/scripts/test_generator.py +695 -0
  169. package/skills/skillkit/scripts/token_estimator.py +493 -0
  170. package/skills/skillkit/scripts/utils/__init__.py +49 -0
  171. package/skills/skillkit/scripts/utils/budget_tracker.py +388 -0
  172. package/skills/skillkit/scripts/utils/output_formatter.py +263 -0
  173. package/skills/skillkit/scripts/utils/reference_validator.py +401 -0
  174. package/skills/skillkit/scripts/validate_skill.py +594 -0
  175. package/skills/skillkit/tests/test_behavioral.py +39 -0
  176. package/skills/skillkit/tests/test_scenarios.md +83 -0
  177. package/skills/skillkit/tests/test_skill.py +136 -0
  178. package/skills/social-media-seo/SKILL.md +278 -0
  179. package/skills/social-media-seo/databases/caption-styles.csv +31 -0
  180. package/skills/social-media-seo/databases/engagement-tactics.csv +16 -0
  181. package/skills/social-media-seo/databases/hashtag-strategies.csv +21 -0
  182. package/skills/social-media-seo/databases/hook-formulas.csv +26 -0
  183. package/skills/social-media-seo/databases/keyword-clusters.csv +11 -0
  184. package/skills/social-media-seo/databases/thread-structures.csv +26 -0
  185. package/skills/social-media-seo/databases/viral-patterns.csv +21 -0
  186. package/skills/social-media-seo/references/analytics-guide.md +321 -0
  187. package/skills/social-media-seo/references/instagram-seo.md +235 -0
  188. package/skills/social-media-seo/references/threads-seo.md +305 -0
  189. package/skills/social-media-seo/references/x-twitter-seo.md +337 -0
  190. package/skills/social-media-seo/scripts/query_database.py +191 -0
  191. package/skills/storyteller/SKILL.md +241 -0
  192. package/skills/storyteller/references/transformation-methodology.md +293 -0
  193. package/skills/storyteller/references/visual-vocabulary.md +177 -0
  194. package/skills/thread-pro/SKILL.md +162 -0
  195. package/skills/thread-pro/anti-ai-patterns.md +120 -0
  196. package/skills/thread-pro/hook-formulas.md +138 -0
  197. package/skills/thread-pro/references/anti-ai-patterns.md +120 -0
  198. package/skills/thread-pro/references/hook-formulas.md +138 -0
  199. package/skills/thread-pro/references/thread-structures.md +240 -0
  200. package/skills/thread-pro/references/voice-injection.md +130 -0
  201. package/skills/thread-pro/thread-structures.md +240 -0
  202. package/skills/thread-pro/voice-injection.md +130 -0
  203. package/skills/tinkering/SKILL.md +251 -0
  204. package/skills/tinkering/references/graduation-checklist.md +100 -0
  205. package/skills/validate-plan/.skillkit-mode +1 -0
  206. package/skills/validate-plan/SKILL.md +406 -0
  207. package/skills/validate-plan/references/dry-principles.md +251 -0
  208. package/skills/validate-plan/references/gap-analysis-guide.md +320 -0
  209. package/skills/validate-plan/references/tdd-patterns.md +413 -0
  210. package/skills/validate-plan/references/yagni-checklist.md +330 -0
  211. package/skills/verify-before-ship/.skillkit-mode +1 -0
  212. package/skills/verify-before-ship/SKILL.md +116 -0
  213. package/skills/verify-before-ship/references/anti-rationalization.md +212 -0
  214. package/skills/verify-before-ship/references/verification-gates.md +305 -0
  215. package/skills-manifest.json +217 -0
  216. package/src/banner.js +10 -0
  217. package/src/cli.js +30 -0
  218. package/src/install.js +53 -0
  219. package/src/install.test.js +40 -0
  220. package/src/picker.js +74 -0
  221. package/src/picker.test.js +21 -0
  222. package/src/scope.js +57 -0
  223. package/src/scope.test.js +19 -0
  224. package/src/update.js +34 -0
  225. package/src/update.test.js +24 -0
@@ -0,0 +1,345 @@
1
+ # Transformation Examples: Before & After
2
+
3
+ > **Safety Note:** This file contains intentionally insecure code examples for educational purposes only. Examples marked with ❌ demonstrate bad practices that should NOT be used in production. All passwords, API keys, and secrets shown are fictional examples used to teach security concepts.
4
+
5
+ ## Example 1: Explaining Docker
6
+
7
+ ### ❌ Before (Technical-first)
8
+
9
+ "Docker is a containerization platform that uses OS-level virtualization to deliver software in packages called containers. Containers are isolated from one another and bundle their own software, libraries and configuration files, sharing the host OS kernel. This makes them more lightweight than traditional VMs."
10
+
11
+ **Problems:**
12
+ - Jargon overload (containerization, OS-level virtualization, kernel)
13
+ - No concrete reference point
14
+ - Abstract concepts without context
15
+
16
+ ### ✅ After (Baby Education Style)
17
+
18
+ "Imagine shipping physical products:
19
+
20
+ **Without Docker (old way):**
21
+ You send a recipe to someone. They need to:
22
+ - Buy the exact ingredients you used
23
+ - Install the same cooking equipment
24
+ - Hope their kitchen setup matches yours
25
+ Result: 'It works on my machine' problem
26
+
27
+ **With Docker (new way):**
28
+ You send a fully-equipped food truck with:
29
+ - All ingredients already inside
30
+ - All cooking equipment installed
31
+ - Everything configured exactly as you set it up
32
+ Result: It works the same everywhere
33
+
34
+ That 'food truck' is a Docker container - a package with your code + everything it needs to run. The 'parking lot' where food trucks can operate is your computer (or server).
35
+
36
+ Technical terms:
37
+ - Container = food truck (isolated environment with everything inside)
38
+ - Image = blueprint for building the food truck
39
+ - Docker = the system that manages all the food trucks"
40
+
41
+ ---
42
+
43
+ ## Example 2: Explaining API Rate Limiting
44
+
45
+ ### ❌ Before (Technical-first)
46
+
47
+ "Rate limiting is implemented to prevent API abuse and ensure fair usage. The server tracks requests per client using tokens or sliding window algorithms, returning 429 Too Many Requests when the threshold is exceeded."
48
+
49
+ **Problems:**
50
+ - No context for WHY it exists
51
+ - Technical implementation details before concept
52
+ - Assumes knowledge of HTTP status codes
53
+
54
+ ### ✅ After (Baby Education Style)
55
+
56
+ "You know how buffets have rules like 'one plate at a time'?
57
+
58
+ API rate limiting is the same concept:
59
+
60
+ **The Problem Without Limits:**
61
+ Imagine if one person could take 1000 plates simultaneously at a buffet. Nobody else gets food. The kitchen can't keep up. The buffet shuts down.
62
+
63
+ **The Solution (Rate Limiting):**
64
+ 'You can get 100 items per hour, max 10 items per minute'
65
+
66
+ In API terms:
67
+ - You (client) request data from the buffet (API server)
68
+ - The server says 'Sure, but only 1000 requests per hour'
69
+ - If you exceed this, server says 'Slow down' (error code 429)
70
+
71
+ Why this matters for your code:
72
+ ```javascript
73
+ // Bad: Rapid-fire requests (will get blocked)
74
+ for (let i = 0; i < 10000; i++) {
75
+ fetch('/api/data');
76
+ }
77
+
78
+ // Good: Respect the limits with delays
79
+ async function fetchWithDelay() {
80
+ for (let i = 0; i < 10000; i++) {
81
+ await fetch('/api/data');
82
+ await sleep(100); // Wait 100ms between requests
83
+ }
84
+ }
85
+ ```
86
+
87
+ Real-world analogy: It's like waiting in line at a coffee shop instead of screaming your order 50 times at the barista."
88
+
89
+ ---
90
+
91
+ ## Example 3: Debugging `undefined is not a function`
92
+
93
+ ### ❌ Before (Technical-first)
94
+
95
+ "This error occurs when you attempt to invoke a method on an undefined reference. Common causes include typos in method names, calling methods on objects that don't support them, or scope issues with 'this' binding."
96
+
97
+ **Problems:**
98
+ - Doesn't help beginner locate the actual issue
99
+ - Technical jargon (invoke, reference, scope, binding)
100
+ - No actionable debugging steps
101
+
102
+ ### ✅ After (Baby Education Style)
103
+
104
+ **Error:** `TypeError: undefined is not a function`
105
+
106
+ **Translation:**
107
+ Your code tried to call something as if it were a function, but it's actually `undefined` (doesn't exist).
108
+
109
+ **Analogy:**
110
+ It's like yelling "Hey Siri!" to a lamp. You're treating the lamp like it can respond, but it's not a smart device - it doesn't have that function.
111
+
112
+ **Common Causes:**
113
+
114
+ **1. Typo in function name**
115
+ ```javascript
116
+ // You wrote:
117
+ myArray.pus(item); // ❌ typo: 'pus' doesn't exist
118
+
119
+ // Should be:
120
+ myArray.push(item); // ✅
121
+ ```
122
+
123
+ **2. Function doesn't exist yet**
124
+ ```javascript
125
+ // Function is defined AFTER you call it:
126
+ greet(); // ❌ undefined at this point
127
+ function greet() { console.log("hi"); }
128
+
129
+ // Move definition before call:
130
+ function greet() { console.log("hi"); }
131
+ greet(); // ✅
132
+ ```
133
+
134
+ **3. Wrong object type**
135
+ ```javascript
136
+ let num = 42;
137
+ num.toUpperCase(); // ❌ numbers don't have toUpperCase
138
+ // (that's a string method)
139
+
140
+ let text = "42";
141
+ text.toUpperCase(); // ✅ works for strings
142
+ ```
143
+
144
+ **How to Debug:**
145
+ 1. Look at the line number in the error
146
+ 2. Find what you're trying to call (ends with `()`)
147
+ 3. Add `console.log()` before that line to check if it exists:
148
+ ```javascript
149
+ console.log(typeof myFunction); // Should show "function"
150
+ myFunction(); // If it shows "undefined", that's your problem
151
+ ```
152
+
153
+ **Prevention:**
154
+ Use your editor's autocomplete - if the function doesn't appear in autocomplete suggestions, it probably doesn't exist or has a typo."
155
+
156
+ ---
157
+
158
+ ## Example 4: Explaining `git merge` vs `git rebase`
159
+
160
+ ### ❌ Before (Technical-first)
161
+
162
+ "Merge creates a merge commit that joins two branches, preserving history. Rebase rewrites commit history by replaying commits from one branch onto another, resulting in a linear history but altering commit SHAs."
163
+
164
+ **Problems:**
165
+ - Assumes understanding of "commit history" and "SHAs"
166
+ - Doesn't explain when to use each
167
+ - No visual component
168
+
169
+ ### ✅ After (Baby Education Style)
170
+
171
+ **The Scenario:**
172
+ You and your friend are both editing the same story.
173
+
174
+ **git merge (keep both story paths):**
175
+ ```
176
+ Your version: Friend's version:
177
+ Chapter 1 Chapter 1
178
+ Chapter 2 Chapter 2 (different)
179
+ Chapter 3 Chapter 3
180
+
181
+ After merge:
182
+ Chapter 1
183
+ Chapter 2 (yours)
184
+ Chapter 2 (friend's) ← merge point noted
185
+ Chapter 3
186
+ ```
187
+
188
+ Like taking both versions and saying "here's where we combined our work."
189
+
190
+ **git rebase (make one continuous story):**
191
+ ```
192
+ Rewrite history so it looks like your friend went first:
193
+ Chapter 1
194
+ Chapter 2 (friend's)
195
+ Chapter 2 (yours, but rewritten as if friend's didn't exist when you wrote it)
196
+ Chapter 3
197
+ ```
198
+
199
+ Like editing your chapters to fit perfectly after your friend's, as if you wrote them sequentially.
200
+
201
+ **When to use:**
202
+
203
+ Use **merge** when:
204
+ - Working on shared/public branches
205
+ - You want to preserve exact history of who did what when
206
+ - Multiple people touching the same code
207
+
208
+ Use **rebase** when:
209
+ - Cleaning up your own local branch before sharing
210
+ - You want a clean, linear story
211
+ - You haven't pushed the branch yet
212
+
213
+ **Golden Rule:**
214
+ Never rebase public branches (it's like editing published chapters - confuses everyone who already read them)
215
+
216
+ **Commands:**
217
+ ```bash
218
+ # Merge (safe for public branches)
219
+ git checkout main
220
+ git merge feature-branch
221
+
222
+ # Rebase (only for your local unpublished work)
223
+ git checkout feature-branch
224
+ git rebase main
225
+ ```
226
+
227
+ ---
228
+
229
+ ## Example 5: Understanding Environment Variables
230
+
231
+ ### ❌ Before (Technical-first)
232
+
233
+ "Environment variables are dynamic-named values stored in the operating system that affect running processes. They provide configuration data to applications without hardcoding values in source code."
234
+
235
+ **Problems:**
236
+ - Abstract definition
237
+ - Doesn't explain the security/practical benefit
238
+ - No clear "why" or "when"
239
+
240
+ ### ✅ After (Baby Education Style)
241
+
242
+ **Analogy:**
243
+ Environment variables are like sticky notes you put on your computer that your code can read.
244
+
245
+ **Why This Matters:**
246
+
247
+ Imagine you write code like this:
248
+ ```javascript
249
+ const password = "mySecretPassword123"; // ❌ BAD IDEA
250
+ ```
251
+
252
+ **Problems:**
253
+ 1. Anyone who sees your code sees your password
254
+ 2. If you share code on GitHub, password is public
255
+ 3. Different computers (dev, production) need different passwords
256
+
257
+ **Solution: Environment Variables**
258
+
259
+ Instead, create a secret sticky note (`.env` file):
260
+ ```
261
+ DATABASE_PASSWORD=mySecretPassword123
262
+ API_KEY=abc123xyz
263
+ ```
264
+
265
+ Your code reads the sticky note:
266
+ ```javascript
267
+ const password = process.env.DATABASE_PASSWORD; // ✅ Safe
268
+ ```
269
+
270
+ **Benefits:**
271
+ 1. ✅ Code doesn't contain secrets
272
+ 2. ✅ Each computer can have different sticky notes
273
+ 3. ✅ You can share code without sharing passwords
274
+
275
+ **Real-World Flow:**
276
+
277
+ On your computer:
278
+ - Create `.env` file with your dev database password
279
+ - Add `.env` to `.gitignore` (so it never uploads to GitHub)
280
+ - Code reads from `.env`
281
+
282
+ On production server:
283
+ - Different `.env` file with production database password
284
+ - Same code, different config - works everywhere
285
+
286
+ **Common Mistake:**
287
+ ```javascript
288
+ // ❌ Accidentally committing secrets
289
+ git add .env // DON'T DO THIS
290
+
291
+ // ✅ Ignore secrets file
292
+ echo ".env" >> .gitignore
293
+ git add .gitignore
294
+ ```
295
+
296
+ Think of it like this: Your code is a recipe that says "add the secret sauce." The `.env` file is where you write down what that secret sauce is - and everyone can have their own recipe for it."
297
+
298
+ ---
299
+
300
+ ## Common Mistake Patterns & Corrections
301
+
302
+ ### Mistake 1: Using Passive Voice
303
+
304
+ ❌ "The function should be called after initialization"
305
+ ✅ "Call the function after you initialize"
306
+
307
+ ### Mistake 2: Unexplained Acronyms
308
+
309
+ ❌ "Configure the CORS policy"
310
+ ✅ "Configure CORS (Cross-Origin Resource Sharing) - the security rule that controls which websites can access your API"
311
+
312
+ ### Mistake 3: Assuming Knowledge
313
+
314
+ ❌ "Just use a reducer"
315
+ ✅ "Use a reducer - a function that takes current state and an action, then returns new state. Think of it like a calculator: you input current number + operation, it outputs the result."
316
+
317
+ ### Mistake 4: No Context for "Why"
318
+
319
+ ❌ "Always use strict mode"
320
+ ✅ "Use strict mode - it's like spell-check for JavaScript. It catches common mistakes like using variables before declaring them."
321
+
322
+ ### Mistake 5: Multiple Concepts at Once
323
+
324
+ ❌ "This async function returns a promise that resolves with the fetched data after the API call completes"
325
+
326
+ ✅ (Break into steps)
327
+ "This function talks to an API.
328
+ Since talking to APIs takes time (like sending a letter), it's 'async' - it doesn't block your code while waiting.
329
+ It returns a Promise - think of it as a 'I'll get back to you' note.
330
+ When the API finally responds, the Promise 'resolves' with the data."
331
+
332
+ ---
333
+
334
+ ## Quick Transformation Checklist
335
+
336
+ When converting technical explanations:
337
+
338
+ 1. ✅ Start with "Imagine..." or "You know how..."
339
+ 2. ✅ Use everyday analogies before technical terms
340
+ 3. ✅ Show concrete examples with comments
341
+ 4. ✅ Explain the "why" before the "how"
342
+ 5. ✅ Use "you" and "we" instead of "one must"
343
+ 6. ✅ Break complex sentences into simple steps
344
+ 7. ✅ Add context for jargon you can't avoid
345
+ 8. ✅ Celebrate small wins ("See? Not so scary!")