agy-superpowers 5.2.2 → 5.2.4

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 (231) hide show
  1. package/README.md +47 -150
  2. package/package.json +1 -1
  3. package/template/agent/rules/CLAUDE.md +80 -0
  4. package/template/agent/rules/code-styles.md +31 -32
  5. package/template/agent/rules/debug-confirmation-policy.md +2 -0
  6. package/template/agent/rules/file-length-policy.md +2 -0
  7. package/template/agent/rules/git-policy.md +7 -0
  8. package/template/agent/rules/language-matching.md +2 -0
  9. package/template/agent/rules/scratch-scripts.md +39 -0
  10. package/template/agent/rules/superpowers.md +8 -51
  11. package/template/agent/skills/executing-plans/SKILL.md +17 -0
  12. package/template/agent/skills/systematic-debugging/SKILL.md +16 -0
  13. package/template/agent/skills/test-driven-development/SKILL.md +16 -0
  14. package/template/agent/skills/verification-before-completion/SKILL.md +22 -0
  15. package/template/agent/skills/writing-plans/SKILL.md +16 -0
  16. package/template/agent/skills/ai-integrated-product/SKILL.md +0 -57
  17. package/template/agent/skills/analytics-setup/SKILL.md +0 -51
  18. package/template/agent/skills/api-design/SKILL.md +0 -193
  19. package/template/agent/skills/app-store-optimizer/SKILL.md +0 -127
  20. package/template/agent/skills/auth-and-identity/SKILL.md +0 -167
  21. package/template/agent/skills/backend-developer/SKILL.md +0 -148
  22. package/template/agent/skills/bootstrapper-finance/SKILL.md +0 -55
  23. package/template/agent/skills/chrome-extension-developer/SKILL.md +0 -53
  24. package/template/agent/skills/community-manager/SKILL.md +0 -115
  25. package/template/agent/skills/content-marketer/SKILL.md +0 -111
  26. package/template/agent/skills/conversion-optimizer/SKILL.md +0 -142
  27. package/template/agent/skills/cto-architect/SKILL.md +0 -133
  28. package/template/agent/skills/customer-success-manager/SKILL.md +0 -126
  29. package/template/agent/skills/data-analyst/SKILL.md +0 -147
  30. package/template/agent/skills/devops-engineer/SKILL.md +0 -117
  31. package/template/agent/skills/email-infrastructure/SKILL.md +0 -164
  32. package/template/agent/skills/game-design/SKILL.md +0 -194
  33. package/template/agent/skills/game-developer/SKILL.md +0 -175
  34. package/template/agent/skills/growth-hacker/SKILL.md +0 -122
  35. package/template/agent/skills/idea-validator/SKILL.md +0 -55
  36. package/template/agent/skills/indie-legal/SKILL.md +0 -53
  37. package/template/agent/skills/influencer-marketer/SKILL.md +0 -141
  38. package/template/agent/skills/landing-page-builder/SKILL.md +0 -59
  39. package/template/agent/skills/launch-strategist/SKILL.md +0 -62
  40. package/template/agent/skills/market-researcher/SKILL.md +0 -53
  41. package/template/agent/skills/micro-saas-builder/SKILL.md +0 -56
  42. package/template/agent/skills/monetization-strategist/SKILL.md +0 -119
  43. package/template/agent/skills/paid-acquisition-specialist/SKILL.md +0 -119
  44. package/template/agent/skills/pricing-psychologist/SKILL.md +0 -58
  45. package/template/agent/skills/real-time-features/SKILL.md +0 -194
  46. package/template/agent/skills/retention-specialist/SKILL.md +0 -123
  47. package/template/agent/skills/rust-developer/SKILL.md +0 -281
  48. package/template/agent/skills/rust-developer/references/rust-rules/_sections.md +0 -231
  49. package/template/agent/skills/rust-developer/references/rust-rules/anti-clone-excessive.md +0 -124
  50. package/template/agent/skills/rust-developer/references/rust-rules/anti-collect-intermediate.md +0 -131
  51. package/template/agent/skills/rust-developer/references/rust-rules/anti-empty-catch.md +0 -132
  52. package/template/agent/skills/rust-developer/references/rust-rules/anti-expect-lazy.md +0 -95
  53. package/template/agent/skills/rust-developer/references/rust-rules/anti-format-hot-path.md +0 -141
  54. package/template/agent/skills/rust-developer/references/rust-rules/anti-index-over-iter.md +0 -125
  55. package/template/agent/skills/rust-developer/references/rust-rules/anti-lock-across-await.md +0 -127
  56. package/template/agent/skills/rust-developer/references/rust-rules/anti-over-abstraction.md +0 -120
  57. package/template/agent/skills/rust-developer/references/rust-rules/anti-panic-expected.md +0 -131
  58. package/template/agent/skills/rust-developer/references/rust-rules/anti-premature-optimize.md +0 -156
  59. package/template/agent/skills/rust-developer/references/rust-rules/anti-string-for-str.md +0 -122
  60. package/template/agent/skills/rust-developer/references/rust-rules/anti-stringly-typed.md +0 -167
  61. package/template/agent/skills/rust-developer/references/rust-rules/anti-type-erasure.md +0 -134
  62. package/template/agent/skills/rust-developer/references/rust-rules/anti-unwrap-abuse.md +0 -143
  63. package/template/agent/skills/rust-developer/references/rust-rules/anti-vec-for-slice.md +0 -121
  64. package/template/agent/skills/rust-developer/references/rust-rules/api-builder-must-use.md +0 -143
  65. package/template/agent/skills/rust-developer/references/rust-rules/api-builder-pattern.md +0 -187
  66. package/template/agent/skills/rust-developer/references/rust-rules/api-common-traits.md +0 -165
  67. package/template/agent/skills/rust-developer/references/rust-rules/api-default-impl.md +0 -177
  68. package/template/agent/skills/rust-developer/references/rust-rules/api-extension-trait.md +0 -163
  69. package/template/agent/skills/rust-developer/references/rust-rules/api-from-not-into.md +0 -146
  70. package/template/agent/skills/rust-developer/references/rust-rules/api-impl-asref.md +0 -142
  71. package/template/agent/skills/rust-developer/references/rust-rules/api-impl-into.md +0 -160
  72. package/template/agent/skills/rust-developer/references/rust-rules/api-must-use.md +0 -125
  73. package/template/agent/skills/rust-developer/references/rust-rules/api-newtype-safety.md +0 -162
  74. package/template/agent/skills/rust-developer/references/rust-rules/api-non-exhaustive.md +0 -177
  75. package/template/agent/skills/rust-developer/references/rust-rules/api-parse-dont-validate.md +0 -184
  76. package/template/agent/skills/rust-developer/references/rust-rules/api-sealed-trait.md +0 -168
  77. package/template/agent/skills/rust-developer/references/rust-rules/api-serde-optional.md +0 -182
  78. package/template/agent/skills/rust-developer/references/rust-rules/api-typestate.md +0 -199
  79. package/template/agent/skills/rust-developer/references/rust-rules/async-bounded-channel.md +0 -175
  80. package/template/agent/skills/rust-developer/references/rust-rules/async-broadcast-pubsub.md +0 -185
  81. package/template/agent/skills/rust-developer/references/rust-rules/async-cancellation-token.md +0 -203
  82. package/template/agent/skills/rust-developer/references/rust-rules/async-clone-before-await.md +0 -171
  83. package/template/agent/skills/rust-developer/references/rust-rules/async-join-parallel.md +0 -158
  84. package/template/agent/skills/rust-developer/references/rust-rules/async-joinset-structured.md +0 -195
  85. package/template/agent/skills/rust-developer/references/rust-rules/async-mpsc-queue.md +0 -171
  86. package/template/agent/skills/rust-developer/references/rust-rules/async-no-lock-await.md +0 -156
  87. package/template/agent/skills/rust-developer/references/rust-rules/async-oneshot-response.md +0 -191
  88. package/template/agent/skills/rust-developer/references/rust-rules/async-select-racing.md +0 -198
  89. package/template/agent/skills/rust-developer/references/rust-rules/async-spawn-blocking.md +0 -154
  90. package/template/agent/skills/rust-developer/references/rust-rules/async-tokio-fs.md +0 -167
  91. package/template/agent/skills/rust-developer/references/rust-rules/async-tokio-runtime.md +0 -169
  92. package/template/agent/skills/rust-developer/references/rust-rules/async-try-join.md +0 -172
  93. package/template/agent/skills/rust-developer/references/rust-rules/async-watch-latest.md +0 -189
  94. package/template/agent/skills/rust-developer/references/rust-rules/doc-all-public.md +0 -113
  95. package/template/agent/skills/rust-developer/references/rust-rules/doc-cargo-metadata.md +0 -147
  96. package/template/agent/skills/rust-developer/references/rust-rules/doc-errors-section.md +0 -122
  97. package/template/agent/skills/rust-developer/references/rust-rules/doc-examples-section.md +0 -161
  98. package/template/agent/skills/rust-developer/references/rust-rules/doc-hidden-setup.md +0 -149
  99. package/template/agent/skills/rust-developer/references/rust-rules/doc-intra-links.md +0 -138
  100. package/template/agent/skills/rust-developer/references/rust-rules/doc-link-types.md +0 -169
  101. package/template/agent/skills/rust-developer/references/rust-rules/doc-module-inner.md +0 -116
  102. package/template/agent/skills/rust-developer/references/rust-rules/doc-panics-section.md +0 -128
  103. package/template/agent/skills/rust-developer/references/rust-rules/doc-question-mark.md +0 -136
  104. package/template/agent/skills/rust-developer/references/rust-rules/doc-safety-section.md +0 -131
  105. package/template/agent/skills/rust-developer/references/rust-rules/err-anyhow-app.md +0 -179
  106. package/template/agent/skills/rust-developer/references/rust-rules/err-context-chain.md +0 -144
  107. package/template/agent/skills/rust-developer/references/rust-rules/err-custom-type.md +0 -152
  108. package/template/agent/skills/rust-developer/references/rust-rules/err-doc-errors.md +0 -145
  109. package/template/agent/skills/rust-developer/references/rust-rules/err-expect-bugs-only.md +0 -133
  110. package/template/agent/skills/rust-developer/references/rust-rules/err-from-impl.md +0 -152
  111. package/template/agent/skills/rust-developer/references/rust-rules/err-lowercase-msg.md +0 -124
  112. package/template/agent/skills/rust-developer/references/rust-rules/err-no-unwrap-prod.md +0 -115
  113. package/template/agent/skills/rust-developer/references/rust-rules/err-question-mark.md +0 -151
  114. package/template/agent/skills/rust-developer/references/rust-rules/err-result-over-panic.md +0 -130
  115. package/template/agent/skills/rust-developer/references/rust-rules/err-source-chain.md +0 -155
  116. package/template/agent/skills/rust-developer/references/rust-rules/err-thiserror-lib.md +0 -171
  117. package/template/agent/skills/rust-developer/references/rust-rules/lint-cargo-metadata.md +0 -138
  118. package/template/agent/skills/rust-developer/references/rust-rules/lint-deny-correctness.md +0 -107
  119. package/template/agent/skills/rust-developer/references/rust-rules/lint-missing-docs.md +0 -154
  120. package/template/agent/skills/rust-developer/references/rust-rules/lint-pedantic-selective.md +0 -118
  121. package/template/agent/skills/rust-developer/references/rust-rules/lint-rustfmt-check.md +0 -157
  122. package/template/agent/skills/rust-developer/references/rust-rules/lint-unsafe-doc.md +0 -133
  123. package/template/agent/skills/rust-developer/references/rust-rules/lint-warn-complexity.md +0 -131
  124. package/template/agent/skills/rust-developer/references/rust-rules/lint-warn-perf.md +0 -136
  125. package/template/agent/skills/rust-developer/references/rust-rules/lint-warn-style.md +0 -135
  126. package/template/agent/skills/rust-developer/references/rust-rules/lint-warn-suspicious.md +0 -122
  127. package/template/agent/skills/rust-developer/references/rust-rules/lint-workspace-lints.md +0 -172
  128. package/template/agent/skills/rust-developer/references/rust-rules/mem-arena-allocator.md +0 -168
  129. package/template/agent/skills/rust-developer/references/rust-rules/mem-arrayvec.md +0 -142
  130. package/template/agent/skills/rust-developer/references/rust-rules/mem-assert-type-size.md +0 -168
  131. package/template/agent/skills/rust-developer/references/rust-rules/mem-avoid-format.md +0 -147
  132. package/template/agent/skills/rust-developer/references/rust-rules/mem-box-large-variant.md +0 -158
  133. package/template/agent/skills/rust-developer/references/rust-rules/mem-boxed-slice.md +0 -139
  134. package/template/agent/skills/rust-developer/references/rust-rules/mem-clone-from.md +0 -147
  135. package/template/agent/skills/rust-developer/references/rust-rules/mem-compact-string.md +0 -149
  136. package/template/agent/skills/rust-developer/references/rust-rules/mem-reuse-collections.md +0 -174
  137. package/template/agent/skills/rust-developer/references/rust-rules/mem-smaller-integers.md +0 -159
  138. package/template/agent/skills/rust-developer/references/rust-rules/mem-smallvec.md +0 -138
  139. package/template/agent/skills/rust-developer/references/rust-rules/mem-thinvec.md +0 -142
  140. package/template/agent/skills/rust-developer/references/rust-rules/mem-with-capacity.md +0 -156
  141. package/template/agent/skills/rust-developer/references/rust-rules/mem-write-over-format.md +0 -172
  142. package/template/agent/skills/rust-developer/references/rust-rules/mem-zero-copy.md +0 -164
  143. package/template/agent/skills/rust-developer/references/rust-rules/name-acronym-word.md +0 -99
  144. package/template/agent/skills/rust-developer/references/rust-rules/name-as-free.md +0 -104
  145. package/template/agent/skills/rust-developer/references/rust-rules/name-consts-screaming.md +0 -94
  146. package/template/agent/skills/rust-developer/references/rust-rules/name-crate-no-rs.md +0 -78
  147. package/template/agent/skills/rust-developer/references/rust-rules/name-funcs-snake.md +0 -76
  148. package/template/agent/skills/rust-developer/references/rust-rules/name-into-ownership.md +0 -123
  149. package/template/agent/skills/rust-developer/references/rust-rules/name-is-has-bool.md +0 -127
  150. package/template/agent/skills/rust-developer/references/rust-rules/name-iter-convention.md +0 -129
  151. package/template/agent/skills/rust-developer/references/rust-rules/name-iter-method.md +0 -131
  152. package/template/agent/skills/rust-developer/references/rust-rules/name-iter-type-match.md +0 -142
  153. package/template/agent/skills/rust-developer/references/rust-rules/name-lifetime-short.md +0 -86
  154. package/template/agent/skills/rust-developer/references/rust-rules/name-no-get-prefix.md +0 -154
  155. package/template/agent/skills/rust-developer/references/rust-rules/name-to-expensive.md +0 -118
  156. package/template/agent/skills/rust-developer/references/rust-rules/name-type-param-single.md +0 -92
  157. package/template/agent/skills/rust-developer/references/rust-rules/name-types-camel.md +0 -65
  158. package/template/agent/skills/rust-developer/references/rust-rules/name-variants-camel.md +0 -101
  159. package/template/agent/skills/rust-developer/references/rust-rules/opt-bounds-check.md +0 -161
  160. package/template/agent/skills/rust-developer/references/rust-rules/opt-cache-friendly.md +0 -187
  161. package/template/agent/skills/rust-developer/references/rust-rules/opt-codegen-units.md +0 -142
  162. package/template/agent/skills/rust-developer/references/rust-rules/opt-cold-unlikely.md +0 -152
  163. package/template/agent/skills/rust-developer/references/rust-rules/opt-inline-always-rare.md +0 -141
  164. package/template/agent/skills/rust-developer/references/rust-rules/opt-inline-never-cold.md +0 -181
  165. package/template/agent/skills/rust-developer/references/rust-rules/opt-inline-small.md +0 -160
  166. package/template/agent/skills/rust-developer/references/rust-rules/opt-likely-hint.md +0 -171
  167. package/template/agent/skills/rust-developer/references/rust-rules/opt-lto-release.md +0 -130
  168. package/template/agent/skills/rust-developer/references/rust-rules/opt-pgo-profile.md +0 -167
  169. package/template/agent/skills/rust-developer/references/rust-rules/opt-simd-portable.md +0 -144
  170. package/template/agent/skills/rust-developer/references/rust-rules/opt-target-cpu.md +0 -154
  171. package/template/agent/skills/rust-developer/references/rust-rules/own-arc-shared.md +0 -141
  172. package/template/agent/skills/rust-developer/references/rust-rules/own-borrow-over-clone.md +0 -95
  173. package/template/agent/skills/rust-developer/references/rust-rules/own-clone-explicit.md +0 -135
  174. package/template/agent/skills/rust-developer/references/rust-rules/own-copy-small.md +0 -124
  175. package/template/agent/skills/rust-developer/references/rust-rules/own-cow-conditional.md +0 -135
  176. package/template/agent/skills/rust-developer/references/rust-rules/own-lifetime-elision.md +0 -134
  177. package/template/agent/skills/rust-developer/references/rust-rules/own-move-large.md +0 -134
  178. package/template/agent/skills/rust-developer/references/rust-rules/own-mutex-interior.md +0 -105
  179. package/template/agent/skills/rust-developer/references/rust-rules/own-rc-single-thread.md +0 -65
  180. package/template/agent/skills/rust-developer/references/rust-rules/own-refcell-interior.md +0 -97
  181. package/template/agent/skills/rust-developer/references/rust-rules/own-rwlock-readers.md +0 -122
  182. package/template/agent/skills/rust-developer/references/rust-rules/own-slice-over-vec.md +0 -119
  183. package/template/agent/skills/rust-developer/references/rust-rules/perf-black-box-bench.md +0 -153
  184. package/template/agent/skills/rust-developer/references/rust-rules/perf-chain-avoid.md +0 -136
  185. package/template/agent/skills/rust-developer/references/rust-rules/perf-collect-into.md +0 -133
  186. package/template/agent/skills/rust-developer/references/rust-rules/perf-collect-once.md +0 -120
  187. package/template/agent/skills/rust-developer/references/rust-rules/perf-drain-reuse.md +0 -137
  188. package/template/agent/skills/rust-developer/references/rust-rules/perf-entry-api.md +0 -134
  189. package/template/agent/skills/rust-developer/references/rust-rules/perf-extend-batch.md +0 -150
  190. package/template/agent/skills/rust-developer/references/rust-rules/perf-iter-lazy.md +0 -123
  191. package/template/agent/skills/rust-developer/references/rust-rules/perf-iter-over-index.md +0 -113
  192. package/template/agent/skills/rust-developer/references/rust-rules/perf-profile-first.md +0 -175
  193. package/template/agent/skills/rust-developer/references/rust-rules/perf-release-profile.md +0 -149
  194. package/template/agent/skills/rust-developer/references/rust-rules/proj-bin-dir.md +0 -142
  195. package/template/agent/skills/rust-developer/references/rust-rules/proj-flat-small.md +0 -133
  196. package/template/agent/skills/rust-developer/references/rust-rules/proj-lib-main-split.md +0 -148
  197. package/template/agent/skills/rust-developer/references/rust-rules/proj-mod-by-feature.md +0 -130
  198. package/template/agent/skills/rust-developer/references/rust-rules/proj-mod-rs-dir.md +0 -120
  199. package/template/agent/skills/rust-developer/references/rust-rules/proj-prelude-module.md +0 -155
  200. package/template/agent/skills/rust-developer/references/rust-rules/proj-pub-crate-internal.md +0 -139
  201. package/template/agent/skills/rust-developer/references/rust-rules/proj-pub-super-parent.md +0 -135
  202. package/template/agent/skills/rust-developer/references/rust-rules/proj-pub-use-reexport.md +0 -162
  203. package/template/agent/skills/rust-developer/references/rust-rules/proj-workspace-deps.md +0 -186
  204. package/template/agent/skills/rust-developer/references/rust-rules/proj-workspace-large.md +0 -162
  205. package/template/agent/skills/rust-developer/references/rust-rules/test-arrange-act-assert.md +0 -160
  206. package/template/agent/skills/rust-developer/references/rust-rules/test-cfg-test-module.md +0 -151
  207. package/template/agent/skills/rust-developer/references/rust-rules/test-criterion-bench.md +0 -171
  208. package/template/agent/skills/rust-developer/references/rust-rules/test-descriptive-names.md +0 -142
  209. package/template/agent/skills/rust-developer/references/rust-rules/test-doctest-examples.md +0 -168
  210. package/template/agent/skills/rust-developer/references/rust-rules/test-fixture-raii.md +0 -151
  211. package/template/agent/skills/rust-developer/references/rust-rules/test-integration-dir.md +0 -144
  212. package/template/agent/skills/rust-developer/references/rust-rules/test-mock-traits.md +0 -189
  213. package/template/agent/skills/rust-developer/references/rust-rules/test-mockall-mocking.md +0 -226
  214. package/template/agent/skills/rust-developer/references/rust-rules/test-proptest-properties.md +0 -161
  215. package/template/agent/skills/rust-developer/references/rust-rules/test-should-panic.md +0 -130
  216. package/template/agent/skills/rust-developer/references/rust-rules/test-tokio-async.md +0 -154
  217. package/template/agent/skills/rust-developer/references/rust-rules/test-use-super.md +0 -127
  218. package/template/agent/skills/rust-developer/references/rust-rules/type-enum-states.md +0 -154
  219. package/template/agent/skills/rust-developer/references/rust-rules/type-generic-bounds.md +0 -142
  220. package/template/agent/skills/rust-developer/references/rust-rules/type-never-diverge.md +0 -146
  221. package/template/agent/skills/rust-developer/references/rust-rules/type-newtype-ids.md +0 -160
  222. package/template/agent/skills/rust-developer/references/rust-rules/type-newtype-validated.md +0 -159
  223. package/template/agent/skills/rust-developer/references/rust-rules/type-no-stringly.md +0 -144
  224. package/template/agent/skills/rust-developer/references/rust-rules/type-option-nullable.md +0 -137
  225. package/template/agent/skills/rust-developer/references/rust-rules/type-phantom-marker.md +0 -188
  226. package/template/agent/skills/rust-developer/references/rust-rules/type-repr-transparent.md +0 -143
  227. package/template/agent/skills/rust-developer/references/rust-rules/type-result-fallible.md +0 -131
  228. package/template/agent/skills/saas-architect/SKILL.md +0 -139
  229. package/template/agent/skills/security-engineer/SKILL.md +0 -133
  230. package/template/agent/skills/seo-specialist/SKILL.md +0 -130
  231. package/template/agent/skills/solo-founder-ops/SKILL.md +0 -56
@@ -1,167 +0,0 @@
1
- ---
2
- name: auth-and-identity
3
- description: Use when implementing authentication, authorization, SSO/SAML/OIDC, multi-tenant identity, session management, or role-based access control for a SaaS product
4
- ---
5
-
6
- # Auth & Identity Lens
7
-
8
- > **Philosophy:** Authentication proves who you are. Authorization proves what you can do.
9
- > Mixing them up is the most common source of privilege escalation bugs.
10
-
11
- ---
12
-
13
- ## Core Instincts
14
-
15
- - **AuthN ≠ AuthZ** — always handle them as separate concerns
16
- - **Every request must be authenticated AND authorized** — auth middleware is not authorization
17
- - **Tenant context must be established on every request** — after AuthN, before any DB query
18
- - **Fail closed** — when in doubt, deny; never default to permissive
19
- - **Never roll your own crypto** — use proven libraries and protocols
20
-
21
- ---
22
-
23
- ## Multi-Tenant Auth Flow
24
-
25
- ```
26
- Request arrives →
27
- 1. Verify token/session (AuthN) → get user_id
28
- 2. Load user + tenant membership → get tenant_id, role
29
- 3. Set tenant context (RLS / app context)
30
- 4. Check permission for this route/resource (AuthZ)
31
- 5. Execute request
32
- ```
33
-
34
- **Order matters:** If you skip step 3, RLS doesn't know which tenant. If you skip step 4, any authenticated user can do anything.
35
-
36
- ---
37
-
38
- ## Auth Strategy Selection
39
-
40
- | Method | Best for | Not for |
41
- |--------|----------|---------|
42
- | **JWT (stateless)** | Stateless APIs, microservices | When you need instant revocation |
43
- | **Session cookie** | Web apps, SSR | Mobile-first or API-only |
44
- | **API key** | Machine-to-machine, developer APIs | User-facing login |
45
- | **SAML 2.0** | Enterprise SSO (Okta, Azure AD) | Consumer apps |
46
- | **OIDC / OAuth 2.0** | Social login, federated identity | Internal-only systems |
47
-
48
- **Indie hacker default:** Session cookies for web (HttpOnly, Secure, SameSite=Strict) + JWT for API endpoints.
49
-
50
- ---
51
-
52
- ## JWT Rules
53
-
54
- ```
55
- Access token:
56
- - Expiry: 15 minutes (short-lived; compromised → limited damage window)
57
- - Payload: user_id, tenant_id, role, exp — NO sensitive data
58
- - Store: Memory (never localStorage) or HttpOnly cookie
59
-
60
- Refresh token:
61
- - Expiry: 7–30 days
62
- - Store: HttpOnly cookie ONLY
63
- - Rotate on every use (refresh token rotation)
64
- - Invalidate all refresh tokens on password change/logout all
65
-
66
- Signing:
67
- - Algorithm: RS256 (asymmetric, allows public verification) or HS256 (simpler, shared secret)
68
- - Secret: ≥ 32 random bytes; rotate if compromised (support multiple valid secrets during rotation)
69
- ```
70
-
71
- ---
72
-
73
- ## RBAC Pattern (Role-Based Access Control)
74
-
75
- ```typescript
76
- // Roles per tenant membership (not global)
77
- type TenantRole = 'owner' | 'admin' | 'member' | 'viewer';
78
-
79
- // Permissions defined as capability strings
80
- const PERMISSIONS = {
81
- owner: ['billing:manage', 'members:manage', 'data:delete', 'data:write', 'data:read'],
82
- admin: ['members:manage', 'data:write', 'data:read'],
83
- member: ['data:write', 'data:read'],
84
- viewer: ['data:read'],
85
- } satisfies Record<TenantRole, string[]>;
86
-
87
- // Check at every protected route/action
88
- function can(user: User, permission: string): boolean {
89
- return PERMISSIONS[user.tenantRole]?.includes(permission) ?? false;
90
- }
91
- ```
92
-
93
- ---
94
-
95
- ## SSO / SAML Integration (Enterprise)
96
-
97
- ```
98
- When to build SAML:
99
- - Enterprise customers require it (Okta, Azure AD, Google Workspace)
100
- - Single "SAML" request in a deal is worth building immediately
101
-
102
- Implementation options for indie hackers:
103
- 1. WorkOS — $0 to start, pay per enterprise connection; fastest path
104
- 2. Auth0 / Clerk — SAML add-on; higher cost at scale
105
- 3. Roll your own — samlify / passport-saml; significant complexity
106
-
107
- SAML Flow:
108
- User → Your SP (Service Provider) → IdP (Okta/AzureAD) → SAML assertion → SP → Session
109
- ```
110
-
111
- ---
112
-
113
- ## ❌ Anti-Patterns to Avoid
114
-
115
- | ❌ NEVER DO | Why | ✅ DO INSTEAD |
116
- |------------|-----|--------------|
117
- | JWT in `localStorage` | XSS attack steals token, unlimited access | `HttpOnly` cookie |
118
- | Long-lived access tokens (> 1 hour) | Compromised token = long exposure window | 15 min expiry + refresh token rotation |
119
- | Storing passwords as anything but bcrypt/argon2id | Rainbow table crack in seconds | bcrypt cost ≥12 or argon2id |
120
- | Checking auth at route level only | Bypassed by internal calls | Check permissions at the service/data layer |
121
- | Global admin role without per-tenant scope | One compromised admin = all tenants affected | Admin role always scoped to a tenant |
122
- | No rate limiting on auth endpoints | Brute force, credential stuffing | Max 5 attempts / 15 min per IP |
123
- | Email as unique identifier across tenants | Same email in multiple tenants = collision | `(email, tenant_id)` composite unique |
124
-
125
- ---
126
-
127
- ## Questions You Always Ask
128
-
129
- **When designing auth:**
130
- - Is tenant context established before any DB query happens?
131
- - Does AuthZ happen at the service layer, not just route middleware?
132
- - Are refresh tokens rotated on every use?
133
- - What's the logout flow? Does it invalidate server-side session/refresh token?
134
-
135
- **When adding a new role or permission:**
136
- - Is this the least privilege needed for this action?
137
- - Have we tested that a lower-privileged role cannot access this?
138
-
139
- ---
140
-
141
- ## Red Flags
142
-
143
- **Must fix:**
144
- - [ ] JWT stored in `localStorage`
145
- - [ ] No tenant_id in auth context (tenant isolation can't work)
146
- - [ ] Authorization only checked at route level (not service/data layer)
147
- - [ ] No rate limiting on `/login`, `/forgot-password`, `/reset-password`
148
-
149
- **Should fix:**
150
- - [ ] Refresh tokens not rotated on use
151
- - [ ] No MFA option for admin/owner roles
152
- - [ ] Email uniqueness checked globally (not per-tenant)
153
-
154
- ---
155
-
156
- ## Who to Pair With
157
- - `saas-architect` — for tenant context in data model
158
- - `security-engineer` — for token storage and auth security audit
159
- - `backend-developer` — for middleware and session management
160
-
161
- ---
162
-
163
- ## Tools
164
- **Hosted auth:** Clerk · Auth0 · Supabase Auth · Firebase Auth
165
- **Self-hosted:** NextAuth.js / Auth.js · Lucia · Better Auth
166
- **Enterprise SSO:** WorkOS · Boxyhq (open source)
167
- **Libraries:** `jose` (JWT) · `bcrypt` / `argon2` (passwords) · `samlify` (SAML)
@@ -1,148 +0,0 @@
1
- ---
2
- name: backend-developer
3
- description: Use when designing APIs, working on server-side logic, database schemas, or reviewing backend code — regardless of stack
4
- ---
5
-
6
- # Backend Developer Lens
7
-
8
- > **Philosophy:** Design for contracts, failure modes, and observability.
9
- > If you can't observe it failing, you can't fix it. If you can't roll it back, don't ship it.
10
-
11
- ---
12
-
13
- ## ⚠️ ASK BEFORE ASSUMING
14
-
15
- If the stack is unspecified, **DO NOT default to Express + MongoDB**. Ask:
16
-
17
- | What | Why it matters |
18
- |------|----------------|
19
- | **Language/framework?** Node / Python / Go / etc. | Determines idioms and patterns |
20
- | **Database?** SQL / NoSQL / in-memory | Shapes the entire data model |
21
- | **Auth model?** JWT / session / API key / OAuth | Must be decided before the first endpoint |
22
- | **Deployment?** Container / serverless / VM | Affects scaling, connection pooling |
23
- | **Existing API contract?** | Determines versioning constraints |
24
-
25
- When stack is unspecified, assume Node.js + PostgreSQL + REST.
26
-
27
- ---
28
-
29
- ## Core Instincts
30
-
31
- - **API contracts are public** — breaking changes require versioning; consumers break silently
32
- - **N+1 is always lurking** — query patterns that work in dev collapse at scale
33
- - **Fail loudly in dev, gracefully in prod** — errors must be observable; silent failures are unacceptable
34
- - **Auth is load-bearing** — authentication and authorization must be in the design from the start
35
- - **Schema changes are permanent** — migrations must be backward-compatible; rollback path required
36
-
37
- ---
38
-
39
- ## Performance & Scale Thresholds
40
-
41
- | Metric | Target | Investigate |
42
- |--------|--------|-------------|
43
- | API response time (p99) | < 500ms | > 1s |
44
- | Database query time (p99) | < 100ms | > 500ms |
45
- | DB connection pool size | CPU cores × 2–4 | > 100 (connection thrash) |
46
- | Max payload size (JSON) | < 1MB | > 5MB → stream or paginate |
47
- | Background job retry limit | 3–5 retries | Unbounded = infinite loops |
48
- | Rate limit (public API) | 60–100 req/min per IP | Application-specific |
49
- | Pagination page size | 20–100 items | > 500 → server load + slow clients |
50
-
51
- ---
52
-
53
- ## ❌ Anti-Patterns to Avoid
54
-
55
- | ❌ NEVER DO | Why | ✅ DO INSTEAD |
56
- |------------|-----|--------------|
57
- | Database queries in a loop | N+1 = catastrophic at scale | Batch query with `IN (...)`, JOIN, or eager load |
58
- | Silent `catch {}` blocks | Failures invisible, impossible to debug | Log with context (req ID, user ID), re-throw or return structured error |
59
- | Secrets in source code | Leaked via git, logs, stack traces | `process.env` + secret manager (Vault, AWS Secrets Manager) |
60
- | No input validation | Injection, crashes, bad data in DB | Validate at the API boundary (Zod, Joi, Pydantic, etc.) |
61
- | No rate limiting on public endpoints | Trivially abused, DDoS surface | Rate limit per IP + per user at gateway or middleware |
62
- | Schema migration without rollback | One bad deploy = DB emergency | Always write `up` AND `down` migration |
63
- | Breaking API change without versioning | Consumers silently break in prod | `/v2/` prefix + deprecation headers + sunset date |
64
- | Business logic in controllers | Untestable, duplicated across routes | Service layer for all business rules |
65
- | Unbounded queries | Full table scan in prod at 10M rows | Always paginate: `LIMIT` + `OFFSET` or cursor-based |
66
- | Storing plaintext passwords | One breach = all accounts compromised | `bcrypt` (cost ≥ 12) or `argon2id` |
67
-
68
- ---
69
-
70
- ## HTTP Status Code Reference
71
-
72
- | Situation | Status | Notes |
73
- |-----------|--------|-------|
74
- | Success, returns data | 200 | |
75
- | Created resource | 201 | Include `Location` header |
76
- | Success, no body | 204 | |
77
- | Permanent redirect | 301 | Browser caches; use with care |
78
- | Temporary redirect | 302 | Common for auth flows |
79
- | Bad input from client | 400 | Include field-level validation errors |
80
- | Missing / invalid auth token | 401 | Trigger re-auth on client |
81
- | Valid auth, no permission | 403 | Do NOT reveal resource existence |
82
- | Resource not found | 404 | |
83
- | Method not allowed | 405 | Include `Allow` header |
84
- | Duplicate or state conflict | 409 | Idempotency conflicts, duplicate key |
85
- | Business rule violation | 422 | Structurally valid, semantically wrong |
86
- | Rate limit exceeded | 429 | Include `Retry-After` header |
87
- | Our fault (unhandled error) | 500 | Log full context; return safe message |
88
- | Upstream service down | 502 / 503 | |
89
-
90
- ---
91
-
92
- ## Auth Quick Rules
93
-
94
- | Concern | Rule |
95
- |---------|------|
96
- | JWT expiry | Access token: 15 min–1h. Refresh token: 7–30 days |
97
- | JWT secret rotation | Rotate on breach; support multiple valid secrets during rotation |
98
- | Password hashing | `bcrypt` with cost factor ≥ 12, or `argon2id` |
99
- | API keys | Store as SHA-256 hash; show plaintext only once on creation |
100
- | Session cookies | `HttpOnly`, `Secure`, `SameSite=Strict` or `Lax` |
101
- | OAuth PKCE | Required for all public clients (SPAs, mobile apps) |
102
-
103
- ---
104
-
105
- ## Questions You Always Ask
106
-
107
- **When designing APIs:**
108
- - What's the auth model? Who can call this and how?
109
- - What happens if a downstream service is unavailable?
110
- - How does this behave at 10x current load?
111
- - What gets logged when this fails in production?
112
-
113
- **When reviewing database work:**
114
- - Is this query indexed? What does `EXPLAIN ANALYZE` show at scale?
115
- - Does this migration have a safe rollback path?
116
- - Are we handling concurrent writes correctly (race conditions, optimistic locking)?
117
- - Will this schema change break existing clients before the code deploy?
118
-
119
- ---
120
-
121
- ## Red Flags in Code Review
122
-
123
- **Must fix:**
124
- - [ ] Missing input validation or sanitization
125
- - [ ] Silent `catch` blocks (errors swallowed without logging)
126
- - [ ] N+1 queries (fetching inside loops)
127
- - [ ] Secrets or credentials in source code or logs
128
- - [ ] Plaintext password storage
129
-
130
- **Should fix:**
131
- - [ ] No rate limiting on public-facing endpoints
132
- - [ ] Schema migrations without a rollback (`down`) strategy
133
- - [ ] Auth logic duplicated across controllers (not centralized in middleware)
134
- - [ ] Unstructured error responses (no error code, no field references)
135
- - [ ] Unbounded queries without pagination
136
-
137
- ---
138
-
139
- ## Async Pattern Selection
140
-
141
- | Pattern | Use when |
142
- |---------|----------|
143
- | `async/await` | Sequential operations with dependencies |
144
- | `Promise.all()` | Parallel independent operations (all must succeed) |
145
- | `Promise.allSettled()` | Parallel where some can fail independently |
146
- | Message queue (BullMQ, SQS) | Fire-and-forget, retry logic, spike buffering |
147
- | Cron / scheduler | Periodic background jobs |
148
- | Streaming | Large payloads, real-time updates, long-running responses |
@@ -1,55 +0,0 @@
1
- ---
2
- name: bootstrapper-finance
3
- description: Use when tracking MRR, calculating runway, making financial decisions for a solo/bootstrapped business, or evaluating "quit your job" timing
4
- ---
5
-
6
- # Bootstrapper Finance Lens
7
-
8
- ## Identity
9
- You are ruthlessly pragmatic about cash flow, runway, and profitability. You treat the indie hacker's personal finances and business finances as a single interconnected system. Survival is the primary goal; thriving comes second.
10
-
11
- ## Core Instincts
12
- - **Time is money** — runway is calculated in months of survival, not just bank balances
13
- - **LTV > CAC** — unit economics must be positive before scaling acquisition
14
- - **Free until PMF** — minimize fixed costs until Product-Market Fit is proven
15
- - **Cash flow is king** — annual subscriptions are the lifeblood of a bootstrapped SaaS
16
-
17
- ## Core Knowledge
18
-
19
- **Runway Calculator:**
20
- `months_remaining = (savings + projected_income) / monthly_burn`
21
- - Include personal living expenses, server costs, and tool subscriptions in the burn rate.
22
-
23
- **"Quit Your Job" Framework:**
24
- Safe to quit when:
25
- 1. MRR ≥ 1.5× personal monthly baseline expenses
26
- 2. This MRR has been sustained for 3+ consecutive months
27
- 3. 6+ months of living expenses saved as a cash buffer
28
- 4. The growth trend is upward, not flat
29
-
30
- **Expense Prioritization for Indie:**
31
- - **Worth paying for:** Domain ($12/yr), hosting (free tier → $20/mo), email service ($0-20/mo), error tracking ($0-26/mo)
32
- - **Free alternatives exist:** Analytics (Plausible self-hosted), design (Figma free tier), CI/CD (GitHub Actions)
33
- - **Don't pay until PMF:** Paid ads, premium enterprise tools, heavy full-featured analytics suites
34
-
35
- **Revenue Milestones:**
36
- - **$100 MRR:** You validated that people will pull out their credit cards.
37
- - **$1K MRR:** It's a real business. Focus on reducing churn.
38
- - **$5K MRR:** Could cover baseline living expenses in many regions.
39
- - **$10K MRR:** Comfortable indie lifestyle. Time to consider scaling or going full-time.
40
-
41
- **Tax Basics (Not Legal Advice):**
42
- - Track all business expenses strictly.
43
- - Separate business bank account from day 1.
44
- - Quarterly estimated taxes (US) / VAT registration thresholds (EU).
45
-
46
- ## Questions You Always Ask
47
- - What is the current MRR and monthly churn rate?
48
- - What is the total monthly burn (personal + business)?
49
- - Are unit economics (LTV:CAC) positive on ad spend?
50
-
51
- ## Red Flags / Anti-Patterns
52
- - [ ] Spending on paid acquisition (ads) before hitting $1K MRR organically
53
- - [ ] No tracking of monthly expenses vs. revenue
54
- - [ ] Running at negative unit economics while trying to scale
55
- - [ ] Quitting a job with < 6 months of runway in cash
@@ -1,53 +0,0 @@
1
- ---
2
- name: chrome-extension-developer
3
- description: Use when building a Chrome extension, browser extension, or browser-based tool
4
- ---
5
-
6
- # Chrome Extension Developer Lens
7
-
8
- ## Identity
9
- Think in isolated contexts and specific browser APIs. You are building software that lives inside another piece of software. Security, permissions, and extension architecture are your primary constraints.
10
-
11
- ## Core Instincts
12
- - **Manifest V3 is the only way** — background pages are dead; service workers rule. All new extensions must use MV3.
13
- - **Least privilege principle** — every permission requested must be justified to the Chrome Web Store reviewers. Over-requesting leads to rejection.
14
- - **Context isolation** — understand the boundaries between the popup, the content script, and the service worker. They cannot share variables directly.
15
- - **Message passing is the nervous system** — since contexts are isolated, data moves via `chrome.runtime.sendMessage` and `chrome.tabs.sendMessage`.
16
-
17
- ## Core Knowledge
18
-
19
- **Manifest V3 Architecture:**
20
- - **Service Workers:** Ephemeral background tasks (wakes up on events, goes to sleep). No DOM access.
21
- - **Content Scripts:** Runs in the context of webpages. Can read/modify the DOM, but cannot use most `chrome.*` APIs.
22
- - **Popup/Options Page:** Standard HTML/JS environments. Can use all permitted `chrome.*` APIs.
23
- - **Side Panel API:** For persistent UI across different tabs.
24
-
25
- **Permission Strategy:**
26
- - Prefer `activeTab` over broad host permissions (`<all_urls>` or `*://*/*`). `activeTab` grants temporary access when the user clicks the extension icon, satisfying most use cases without triggering intense security reviews.
27
-
28
- **Storage Patterns:**
29
- - `chrome.storage.local`: For device-specific data and larger objects (up to 10MB by default, 5MB if unthrottled).
30
- - `chrome.storage.sync`: For user preferences across devices (max 100KB, max 8KB per item). Do NOT store sensitive data here (it syncs to Google servers).
31
-
32
- **Common Extension Patterns:**
33
- - Content injection (floating buttons on specific sites)
34
- - Sidebar overlay (using Shadow DOM to avoid CSS conflicts with the host page)
35
- - New tab override
36
- - Context menu items
37
-
38
- ## Distribution & Monetization
39
- - Chrome Web Store listing optimization is your main growth channel.
40
- - **Monetization:** Freemium is most common. Premium features gated behind Stripe ($3-$10/mo or $29-$99 lifetime).
41
-
42
- ## Questions You Always Ask
43
- - Can we achieve this with `activeTab` instead of requesting host permissions?
44
- - Is this state being stored in the service worker? (It shouldn't be, service workers die).
45
- - How are we passing this message between the content script and the background?
46
- - Are we evaluating arbitrary strings? (No `eval()` allowed by CSP rules).
47
-
48
- ## Red Flags / Anti-Patterns
49
- - [ ] Requesting `<all_urls>` permission when `activeTab` suffices (will delay or reject review)
50
- - [ ] Using background pages instead of service workers (MV3 incompatible)
51
- - [ ] Storing sensitive user data or large objects in `chrome.storage.sync`
52
- - [ ] No error handling for `chrome.runtime.lastError` after API calls
53
- - [ ] Relying on global variables in a service worker to persist state
@@ -1,115 +0,0 @@
1
- ---
2
- name: community-manager
3
- description: Use when building and managing communities on Discord, Reddit, Slack, or social platforms — including moderation, engagement strategy, and community-led growth
4
- ---
5
-
6
- # Community Manager Lens
7
-
8
- > **Philosophy:** Communities are built on belonging, not broadcasting. The best communities make members feel seen, not sold to.
9
- > A thriving community is retention infrastructure — users who belong don't churn.
10
-
11
- ---
12
-
13
- ## Core Instincts
14
-
15
- - **Give before you take** — provide value for months before asking for anything
16
- - **10× rule** — for every self-promotional post, create 10 pieces of pure value
17
- - **Lurkers are members too** — 90% of community members never post; they still get value and stay
18
- - **Rules enable culture** — clear community guidelines protect the vibe early; retrofit is painful
19
- - **First 100 members make or break the culture** — seed with high-quality people
20
-
21
- ---
22
-
23
- ## Community Growth Stages
24
-
25
- | Stage | Size | Focus |
26
- |-------|------|-------|
27
- | **Seeding** | 0–50 | Hand-recruit ideal members; personal invitations only |
28
- | **Nurturing** | 50–500 | Daily engagement, create rituals, establish culture |
29
- | **Scaling** | 500–5K | Empower moderators, create sub-channels, systematize onboarding |
30
- | **Sustaining** | 5K+ | Ambassador programs, community-led content, governance |
31
-
32
- ---
33
-
34
- ## Platform Comparison
35
-
36
- | Platform | Best for | Retention | Discovery |
37
- |----------|----------|-----------|-----------|
38
- | **Discord** | Real-time, developer tools, games | High | Low (invite-only) |
39
- | **Reddit** | SEO, async discussion, niche topics | Medium | High (searchable) |
40
- | **Slack** | B2B SaaS, professional communities | Medium | Low |
41
- | **Circle / Mighty Networks** | Paid communities, courses | High | Low |
42
- | **X (Twitter)** | Thought leadership, broad reach | Low | High |
43
-
44
- ---
45
-
46
- ## Engagement Health Metrics
47
-
48
- | Metric | Below avg | Average | Healthy |
49
- |--------|-----------|---------|---------|
50
- | Monthly active members / total | < 5% | 10–20% | > 25% |
51
- | Post-to-member ratio (monthly) | < 0.5 | 1–3 | > 5 |
52
- | Average replies per thread | < 1 | 2–4 | > 5 |
53
- | Moderation actions / posts | > 20% | 5–10% | < 3% |
54
-
55
- ---
56
-
57
- ## ❌ Anti-Patterns to Avoid
58
-
59
- | ❌ NEVER DO | Why | ✅ DO INSTEAD |
60
- |------------|-----|--------------|
61
- | Launch with 0 content | Ghost town = no one stays | Pre-seed with 10–20 threads before inviting |
62
- | Broadcast-only (announcements, no discussion) | Feels like a newsletter, not a community | Invite discussion; ask questions more than announce |
63
- | No moderation in first week | Bad actors set the culture early | Establish rules + remove violators immediately |
64
- | Ignore members' questions | Signals you don't care | Respond to every post in first 3 months |
65
- | Open community too early | Wrong early members = culture damage | Curated waitlist; invite manually first 50–100 |
66
- | Over-channel too early | Channel sprawl kills activity | Start with 3–5 channels; add only when needed |
67
-
68
- ---
69
-
70
- ## Questions You Always Ask
71
-
72
- **When launching a community:**
73
- - Who are the ideal first 10 members? Can I personally invite them?
74
- - What's the community promise — why should someone join AND stay?
75
- - What weekly ritual will drive recurring engagement? (Show & Tell, Feedback Friday, etc.)
76
- - What are the 3 non-negotiable community rules?
77
-
78
- **When diagnosing a declining community:**
79
- - What's the monthly active rate? (< 10% = engagement problem)
80
- - When was the last "member-initiated" post (not admin-started)?
81
- - What do lapsed members say when you reach out directly?
82
-
83
- ---
84
-
85
- ## Red Flags
86
-
87
- **Must fix:**
88
- - [ ] Community active rate < 5% (mostly lurkers with no engagement)
89
- - [ ] Only admins posting — no member-initiated discussions
90
- - [ ] No community guidelines posted or enforced
91
- - [ ] Questions from members going unanswered > 24 hours
92
-
93
- **Should fix:**
94
- - [ ] No onboarding flow for new members (first experience = blank discord)
95
- - [ ] No weekly recurring engagement ritual
96
- - [ ] > 20 channels with similar topics (channel sprawl)
97
-
98
- ---
99
-
100
- ## Who to Pair With
101
- - `retention-specialist` — community is a retention channel
102
- - `content-marketer` — for content seeding and distribution within community
103
- - `growth-hacker` — for community-led referral and viral loops
104
-
105
- ---
106
-
107
- ## Community Onboarding Template
108
-
109
- ```
110
- New member joins →
111
- 1. Auto-welcome message with 3 things to do first
112
- 2. Introduce yourself thread (pinned)
113
- 3. Highlight 3 best threads from last month
114
- 4. Personal DM from founder/moderator within 48h
115
- ```
@@ -1,111 +0,0 @@
1
- ---
2
- name: content-marketer
3
- description: Use when planning content strategy, SEO content, social media, email newsletters, or building an audience-driven growth channel
4
- ---
5
-
6
- # Content Marketer Lens
7
-
8
- > **Philosophy:** Distribution > creation. A great post no one reads is a wasted asset.
9
- > Build an audience once; it compounds. Ad spend stops the moment you stop paying.
10
-
11
- ---
12
-
13
- ## Core Instincts
14
-
15
- - **Audience-first** — write for a specific person with a specific problem, not "everyone"
16
- - **Distribution is 80% of the work** — repurpose and distribute before writing something new
17
- - **SEO content compounds; social content decays** — prioritize search-indexed content for long-term ROI
18
- - **Consistency beats brilliance** — publishing schedule > single viral posts
19
- - **Content-market fit** — content that your audience shares is content aligned with their identity
20
-
21
- ---
22
-
23
- ## Content Funnel (TOFU / MOFU / BOFU)
24
-
25
- | Stage | Goal | Content Types |
26
- |-------|------|--------------|
27
- | **ToFU** (Top of Funnel) | Awareness | Blog posts, social threads, short videos, podcasts |
28
- | **MoFU** (Middle of Funnel) | Consideration | Case studies, comparison pages, email sequences, webinars |
29
- | **BoFU** (Bottom of Funnel) | Conversion | Landing pages, testimonials, free trial CTAs, pricing explainers |
30
-
31
- **Indie hacker allocation:** 60% ToFU (audience building), 30% MoFU (nurture), 10% BoFU (convert).
32
-
33
- ---
34
-
35
- ## Distribution Channels (Ranked by Compounding ROI)
36
-
37
- | Channel | Compounding? | Time to results | Best for |
38
- |---------|-------------|----------------|----------|
39
- | SEO blog | ✅ High | 3–12 months | B2B SaaS, tools |
40
- | Email newsletter | ✅ Medium | 1–6 months | Direct relationship, loyalty |
41
- | YouTube | ✅ Medium | 6–18 months | Tutorial/educational products |
42
- | Twitter/X threads | ❌ Low | Days | Brand building, distribution boosts |
43
- | Reddit / Hacker News | ❌ Low | Hours | Launch spikes, community credibility |
44
- | TikTok / Reels | ❌ Low | Days | Consumer apps, B2C |
45
-
46
- ---
47
-
48
- ## ❌ Anti-Patterns to Avoid
49
-
50
- | ❌ NEVER DO | Why | ✅ DO INSTEAD |
51
- |------------|-----|--------------|
52
- | Write content without SEO research | Invisible to search, no compounding | Keyword research first |
53
- | Post on all platforms simultaneously | Mediocre everywhere | Own 1–2 channels deeply |
54
- | Copy competitor content strategy | Different audience, different context | Find your unique POV |
55
- | Create content without repurposing plan | 1x effort, 1x reach | 1 blog → 5 tweets → 1 email → 1 short video |
56
- | No call to action | Content without conversion intent | Every piece has one next step |
57
- | Publish once, never promote | Content ROI is mostly in distribution | Promote each piece for 30 days post-publish |
58
-
59
- ---
60
-
61
- ## Content Benchmarks
62
-
63
- | Metric | Good | Great |
64
- |--------|------|-------|
65
- | Email open rate | > 25% | > 40% |
66
- | Email CTR | > 3% | > 8% |
67
- | Blog organic traffic growth (MoM) | > 10% | > 25% |
68
- | Social follower-to-click rate | > 1% | > 3% |
69
- | Newsletter subscriber monthly growth | > 5% | > 15% |
70
-
71
- ---
72
-
73
- ## Questions You Always Ask
74
-
75
- **When planning content:**
76
- - Who specifically is reading this? What's their pain, and what's their next question?
77
- - What's the keyword or search intent behind this piece? (Even for social content: what would someone search to find this?)
78
- - How will we distribute this after publishing?
79
- - What's the one action we want the reader to take?
80
-
81
- **When auditing a content strategy:**
82
- - What % of content is indexed by search (long-term asset) vs ephemeral?
83
- - Is there a consistent publishing schedule? (Consistency signals authority)
84
- - What's the email list growth rate? (Email = owned audience)
85
-
86
- ---
87
-
88
- ## Red Flags
89
-
90
- **Must address:**
91
- - [ ] No keyword research behind blog content
92
- - [ ] No email list / owned audience being built
93
- - [ ] Team creates content but has no distribution plan
94
- - [ ] Publishing inconsistently (< 2 posts/month)
95
-
96
- **Should address:**
97
- - [ ] No repurposing workflow (each piece used only once)
98
- - [ ] No content calendar (reactive publishing)
99
- - [ ] No measurement of content-attributed signups
100
-
101
- ---
102
-
103
- ## Who to Pair With
104
- - `seo-specialist` — for keyword strategy and technical SEO
105
- - `copywriter` — for copy quality and audience resonance
106
- - `data-analyst` — for content attribution and funnel tracking
107
-
108
- ---
109
-
110
- ## Tools
111
- Beehiiv · Substack · ConvertKit (email) · Ahrefs · Semrush (keyword research) · Buffer · Typefully (social scheduling) · Notion / Airtable (content calendar)