bobo-ai-cli 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (234) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +216 -0
  3. package/dist/agent.d.ts +9 -0
  4. package/dist/agent.js +144 -0
  5. package/dist/agent.js.map +1 -0
  6. package/dist/config.d.ts +15 -0
  7. package/dist/config.js +76 -0
  8. package/dist/config.js.map +1 -0
  9. package/dist/index.d.ts +2 -0
  10. package/dist/index.js +366 -0
  11. package/dist/index.js.map +1 -0
  12. package/dist/knowledge-commands.d.ts +2 -0
  13. package/dist/knowledge-commands.js +40 -0
  14. package/dist/knowledge-commands.js.map +1 -0
  15. package/dist/knowledge.d.ts +17 -0
  16. package/dist/knowledge.js +112 -0
  17. package/dist/knowledge.js.map +1 -0
  18. package/dist/memory.d.ts +17 -0
  19. package/dist/memory.js +215 -0
  20. package/dist/memory.js.map +1 -0
  21. package/dist/planner.d.ts +22 -0
  22. package/dist/planner.js +130 -0
  23. package/dist/planner.js.map +1 -0
  24. package/dist/project.d.ts +25 -0
  25. package/dist/project.js +117 -0
  26. package/dist/project.js.map +1 -0
  27. package/dist/rules-commands.d.ts +2 -0
  28. package/dist/rules-commands.js +51 -0
  29. package/dist/rules-commands.js.map +1 -0
  30. package/dist/skills.d.ts +28 -0
  31. package/dist/skills.js +349 -0
  32. package/dist/skills.js.map +1 -0
  33. package/dist/structured/loader.d.ts +19 -0
  34. package/dist/structured/loader.js +147 -0
  35. package/dist/structured/loader.js.map +1 -0
  36. package/dist/structured/paths.d.ts +2 -0
  37. package/dist/structured/paths.js +14 -0
  38. package/dist/structured/paths.js.map +1 -0
  39. package/dist/structured/project-scaffold.d.ts +7 -0
  40. package/dist/structured/project-scaffold.js +60 -0
  41. package/dist/structured/project-scaffold.js.map +1 -0
  42. package/dist/structured/render-markdown.d.ts +37 -0
  43. package/dist/structured/render-markdown.js +47 -0
  44. package/dist/structured/render-markdown.js.map +1 -0
  45. package/dist/structured/render-table.d.ts +1 -0
  46. package/dist/structured/render-table.js +15 -0
  47. package/dist/structured/render-table.js.map +1 -0
  48. package/dist/structured/search.d.ts +10 -0
  49. package/dist/structured/search.js +104 -0
  50. package/dist/structured/search.js.map +1 -0
  51. package/dist/structured/skill-runner.d.ts +15 -0
  52. package/dist/structured/skill-runner.js +60 -0
  53. package/dist/structured/skill-runner.js.map +1 -0
  54. package/dist/structured/types.d.ts +212 -0
  55. package/dist/structured/types.js +97 -0
  56. package/dist/structured/types.js.map +1 -0
  57. package/dist/structured-skills-commands.d.ts +3 -0
  58. package/dist/structured-skills-commands.js +126 -0
  59. package/dist/structured-skills-commands.js.map +1 -0
  60. package/dist/structured-template-commands.d.ts +2 -0
  61. package/dist/structured-template-commands.js +34 -0
  62. package/dist/structured-template-commands.js.map +1 -0
  63. package/dist/tools/index.d.ts +3 -0
  64. package/dist/tools/index.js +450 -0
  65. package/dist/tools/index.js.map +1 -0
  66. package/dist/ui.d.ts +19 -0
  67. package/dist/ui.js +72 -0
  68. package/dist/ui.js.map +1 -0
  69. package/dist/web.d.ts +4 -0
  70. package/dist/web.js +124 -0
  71. package/dist/web.js.map +1 -0
  72. package/knowledge/advanced-patterns.md +70 -0
  73. package/knowledge/agent-directives.md +74 -0
  74. package/knowledge/dream.md +36 -0
  75. package/knowledge/engineering.md +46 -0
  76. package/knowledge/error-catalog.md +33 -0
  77. package/knowledge/index.json +170 -0
  78. package/knowledge/memory/cache-optimization-and-skill-integration.md +102 -0
  79. package/knowledge/memory/engineering-patterns.md +134 -0
  80. package/knowledge/memory/feedback_root_structure.md +16 -0
  81. package/knowledge/memory/project-contexts.md +69 -0
  82. package/knowledge/memory/tools-and-services.md +85 -0
  83. package/knowledge/rules/agents.md +62 -0
  84. package/knowledge/rules/blocking-rules.md +323 -0
  85. package/knowledge/rules/cache-management.md +379 -0
  86. package/knowledge/rules/capability-evolution.md +132 -0
  87. package/knowledge/rules/coding.md +126 -0
  88. package/knowledge/rules/engineering-workflows.md +225 -0
  89. package/knowledge/rules/evomap-content-guidelines.md +354 -0
  90. package/knowledge/rules/evomap-guide.md +224 -0
  91. package/knowledge/rules/git.md +31 -0
  92. package/knowledge/rules/hooks.md +106 -0
  93. package/knowledge/rules/performance.md +101 -0
  94. package/knowledge/rules/remotion-auto-production.md +1120 -0
  95. package/knowledge/rules/security.md +46 -0
  96. package/knowledge/rules/testing.md +32 -0
  97. package/knowledge/rules/work-mode.md +208 -0
  98. package/knowledge/rules.md +62 -0
  99. package/knowledge/skills/Skill_Seekers.md +1722 -0
  100. package/knowledge/skills/ab-test-setup.md +557 -0
  101. package/knowledge/skills/agent-sdk-dev.md +238 -0
  102. package/knowledge/skills/agent-tools.md +136 -0
  103. package/knowledge/skills/analytics-tracking.md +597 -0
  104. package/knowledge/skills/artifacts-builder.md +89 -0
  105. package/knowledge/skills/asana.md +13 -0
  106. package/knowledge/skills/backend-expert.md +97 -0
  107. package/knowledge/skills/brand-voice.md +481 -0
  108. package/knowledge/skills/browser-use.md +419 -0
  109. package/knowledge/skills/cache-optimization-skill.md +179 -0
  110. package/knowledge/skills/canvas-design.md +147 -0
  111. package/knowledge/skills/citation-validator.md +203 -0
  112. package/knowledge/skills/clangd-lsp.md +52 -0
  113. package/knowledge/skills/code-review-expert.md +85 -0
  114. package/knowledge/skills/code-review.md +280 -0
  115. package/knowledge/skills/code-simplifier.md +13 -0
  116. package/knowledge/skills/commit-commands.md +258 -0
  117. package/knowledge/skills/competitor-alternatives.md +795 -0
  118. package/knowledge/skills/content-atomizer.md +910 -0
  119. package/knowledge/skills/content-research-writer.md +605 -0
  120. package/knowledge/skills/context-optimization-suite.md +162 -0
  121. package/knowledge/skills/context7.md +13 -0
  122. package/knowledge/skills/copy-editing.md +494 -0
  123. package/knowledge/skills/copywriting.md +510 -0
  124. package/knowledge/skills/csharp-lsp.md +40 -0
  125. package/knowledge/skills/decision-making-framework.md +154 -0
  126. package/knowledge/skills/developer-growth-analysis.md +335 -0
  127. package/knowledge/skills/direct-response-copy.md +2336 -0
  128. package/knowledge/skills/docker-expert.md +229 -0
  129. package/knowledge/skills/document-skills.md +13 -0
  130. package/knowledge/skills/documentation-expert.md +126 -0
  131. package/knowledge/skills/email-sequence.md +1061 -0
  132. package/knowledge/skills/email-sequences.md +910 -0
  133. package/knowledge/skills/example-plugin.md +72 -0
  134. package/knowledge/skills/explanatory-output-style.md +82 -0
  135. package/knowledge/skills/feature-dev.md +458 -0
  136. package/knowledge/skills/file-organizer.md +466 -0
  137. package/knowledge/skills/firebase.disabled.md +13 -0
  138. package/knowledge/skills/form-cro.md +488 -0
  139. package/knowledge/skills/free-tool-strategy.md +636 -0
  140. package/knowledge/skills/frontend-design-offical.md +55 -0
  141. package/knowledge/skills/frontend-design.md +41 -0
  142. package/knowledge/skills/frontend-expert.md +93 -0
  143. package/knowledge/skills/github.md +13 -0
  144. package/knowledge/skills/gitlab.md +13 -0
  145. package/knowledge/skills/gopls-lsp.md +32 -0
  146. package/knowledge/skills/got-controller.md +218 -0
  147. package/knowledge/skills/greptile.md +72 -0
  148. package/knowledge/skills/hookify.md +376 -0
  149. package/knowledge/skills/image-editor.md +189 -0
  150. package/knowledge/skills/image-enhancer.md +109 -0
  151. package/knowledge/skills/jdtls-lsp.md +49 -0
  152. package/knowledge/skills/json-canvas.md +654 -0
  153. package/knowledge/skills/keyword-research.md +559 -0
  154. package/knowledge/skills/kotlin-lsp.md +28 -0
  155. package/knowledge/skills/laravel-boost.md +13 -0
  156. package/knowledge/skills/launch-strategy.md +394 -0
  157. package/knowledge/skills/lead-magnet.md +393 -0
  158. package/knowledge/skills/learning-output-style.md +106 -0
  159. package/knowledge/skills/linear.md +13 -0
  160. package/knowledge/skills/lua-lsp.md +47 -0
  161. package/knowledge/skills/marketing-ideas.md +720 -0
  162. package/knowledge/skills/marketing-psychology.md +534 -0
  163. package/knowledge/skills/mcp-builder.md +369 -0
  164. package/knowledge/skills/meeting-insights-analyzer.md +347 -0
  165. package/knowledge/skills/memory-evolution-system.md +172 -0
  166. package/knowledge/skills/multi-lens-thinking.md +407 -0
  167. package/knowledge/skills/nano-banana-pro.md +116 -0
  168. package/knowledge/skills/newsletter.md +736 -0
  169. package/knowledge/skills/notebooklm.md +296 -0
  170. package/knowledge/skills/obsidian-bases.md +634 -0
  171. package/knowledge/skills/obsidian-markdown.md +651 -0
  172. package/knowledge/skills/onboarding-cro.md +494 -0
  173. package/knowledge/skills/orchestrator.md +681 -0
  174. package/knowledge/skills/page-cro.md +379 -0
  175. package/knowledge/skills/paid-ads.md +624 -0
  176. package/knowledge/skills/paywall-upgrade-cro.md +651 -0
  177. package/knowledge/skills/php-lsp.md +36 -0
  178. package/knowledge/skills/planning-with-files.md +193 -0
  179. package/knowledge/skills/playwright.md +13 -0
  180. package/knowledge/skills/plugin-dev.md +434 -0
  181. package/knowledge/skills/popup-cro.md +520 -0
  182. package/knowledge/skills/positioning-angles.md +330 -0
  183. package/knowledge/skills/pr-review-toolkit.md +359 -0
  184. package/knowledge/skills/pricing-strategy.md +777 -0
  185. package/knowledge/skills/programmatic-seo.md +714 -0
  186. package/knowledge/skills/pyright-lsp.md +43 -0
  187. package/knowledge/skills/quality-assurance-framework.md +168 -0
  188. package/knowledge/skills/question-refiner.md +160 -0
  189. package/knowledge/skills/ralph-loop.md +205 -0
  190. package/knowledge/skills/refactoring-expert.md +103 -0
  191. package/knowledge/skills/referral-program.md +668 -0
  192. package/knowledge/skills/research-executor.md +164 -0
  193. package/knowledge/skills/review-with-security.md +12 -0
  194. package/knowledge/skills/rust-analyzer-lsp.md +50 -0
  195. package/knowledge/skills/schema-markup.md +647 -0
  196. package/knowledge/skills/security-audit-expert.md +124 -0
  197. package/knowledge/skills/security-expert.md +140 -0
  198. package/knowledge/skills/security-guidance.md +13 -0
  199. package/knowledge/skills/seedance-prompt.md +139 -0
  200. package/knowledge/skills/self-evolution.md +1160 -0
  201. package/knowledge/skills/seo-audit.md +432 -0
  202. package/knowledge/skills/seo-content.md +787 -0
  203. package/knowledge/skills/serena.md +13 -0
  204. package/knowledge/skills/signup-flow-cro.md +409 -0
  205. package/knowledge/skills/skill-creator.md +220 -0
  206. package/knowledge/skills/skill-manager.md +226 -0
  207. package/knowledge/skills/skill-share.md +98 -0
  208. package/knowledge/skills/slack.md +13 -0
  209. package/knowledge/skills/social-content.md +878 -0
  210. package/knowledge/skills/spec-flow-skill.md +124 -0
  211. package/knowledge/skills/stripe.md +13 -0
  212. package/knowledge/skills/supabase.md +13 -0
  213. package/knowledge/skills/swift-lsp.md +40 -0
  214. package/knowledge/skills/synthesizer.md +236 -0
  215. package/knowledge/skills/template-skill.md +16 -0
  216. package/knowledge/skills/testing-expert.md +99 -0
  217. package/knowledge/skills/theme-factory.md +72 -0
  218. package/knowledge/skills/tiktok-research.md +208 -0
  219. package/knowledge/skills/typescript-lsp.md +36 -0
  220. package/knowledge/skills/ui-ux-pro-max.md +247 -0
  221. package/knowledge/skills/verify.md +15 -0
  222. package/knowledge/skills/visual-prompt-engineer.md +102 -0
  223. package/knowledge/skills/webapp-testing.md +111 -0
  224. package/knowledge/skills/wide-research.md +191 -0
  225. package/knowledge/system.md +93 -0
  226. package/knowledge/task-router.md +37 -0
  227. package/knowledge/verification.md +38 -0
  228. package/knowledge/workflows/3d-viz.md +47 -0
  229. package/knowledge/workflows/data-pipeline.md +47 -0
  230. package/knowledge/workflows/db-migration.md +51 -0
  231. package/knowledge/workflows/feature-dev.md +41 -0
  232. package/knowledge/workflows/tdd-flow.md +52 -0
  233. package/knowledge/workflows/ui-verify.md +51 -0
  234. package/package.json +60 -0
@@ -0,0 +1,43 @@
1
+ ---
2
+ id: "pyright-lsp"
3
+ title: "pyright-lsp"
4
+ category: "other"
5
+ tags: ["pyright-lsp", "supported extensions", "installation", "more information"]
6
+ triggers: []
7
+ dependencies: []
8
+ source: "E:/Bobo's Coding cache/.claude/skills/pyright-lsp"
9
+ ---
10
+
11
+ # pyright-lsp
12
+
13
+ Python language server (Pyright) for Claude Code, providing static type checking and code intelligence.
14
+
15
+ ## Supported Extensions
16
+
17
+ `.py`, `.pyi`
18
+
19
+ ## Installation
20
+
21
+ Install Pyright globally via npm:
22
+
23
+ ```bash
24
+ npm install -g pyright
25
+ ```
26
+
27
+ Or with pip:
28
+
29
+ ```bash
30
+ pip install pyright
31
+ ```
32
+
33
+ Or with pipx (recommended for CLI tools):
34
+
35
+ ```bash
36
+ pipx install pyright
37
+ ```
38
+
39
+ ## More Information
40
+
41
+ - [Pyright on npm](https://www.npmjs.com/package/pyright)
42
+ - [Pyright on PyPI](https://pypi.org/project/pyright/)
43
+ - [GitHub Repository](https://github.com/microsoft/pyright)
@@ -0,0 +1,168 @@
1
+ ---
2
+ id: "quality-assurance-framework"
3
+ title: "Quality Assurance Framework"
4
+ category: "agent-engineering"
5
+ tags: ["quality assurance framework", "pre-commit qa", "combined qa workflow", "quick reference"]
6
+ triggers: []
7
+ dependencies: []
8
+ source: "E:/Bobo's Coding cache/.claude/skills/quality-assurance-framework"
9
+ ---
10
+
11
+ ---
12
+ name: quality-assurance-framework
13
+ description: Unified QA - combines adversarial-verification (find vulnerabilities via attack) + self-rationalization-guard (prevent self-deception). Use before commits, after code changes, or when reviewing critical logic.
14
+ ---
15
+
16
+ # Quality Assurance Framework
17
+
18
+ > **Merged from**: adversarial-verification + self-rationalization-guard
19
+ > **Core principle**: Attack first, defend assumptions, verify ruthlessly
20
+
21
+ ## Module 1: Adversarial Verification
22
+
23
+ ### Attack Modes
24
+
25
+ **Mode A: Input Attack** — What inputs break this?
26
+ ```
27
+ - Empty input? null? undefined?
28
+ - Extremely large input? (1M chars)
29
+ - Special characters? (<script>, SQL injection, path traversal)
30
+ - Unicode edge cases? (RTL, zero-width, emoji)
31
+ - Concurrent requests?
32
+ ```
33
+
34
+ **Mode B: State Attack** — What states break this?
35
+ ```
36
+ - Race conditions between operations
37
+ - State transitions out of order
38
+ - Partial failures (network timeout mid-write)
39
+ - Resource exhaustion (disk full, memory OOM)
40
+ - Permission escalation paths
41
+ ```
42
+
43
+ **Mode C: Logic Attack** — What assumptions are wrong?
44
+ ```
45
+ - "This API always returns data" → What if it returns null?
46
+ - "This file always exists" → What if deleted mid-operation?
47
+ - "This operation is atomic" → What if interrupted?
48
+ - "This order is guaranteed" → What if reordered?
49
+ ```
50
+
51
+ ### Verification Checklist
52
+
53
+ ```markdown
54
+ ## Pre-Commit QA
55
+
56
+ ### Input Validation
57
+ - [ ] All user inputs validated at system boundary
58
+ - [ ] SQL uses parameterized queries (no string concat)
59
+ - [ ] HTML output sanitized (no raw user content)
60
+ - [ ] File paths validated (no path traversal)
61
+ - [ ] Rate limiting on all public endpoints
62
+
63
+ ### Error Handling
64
+ - [ ] All async operations have try/catch
65
+ - [ ] Errors are thrown, not silently swallowed
66
+ - [ ] Error messages don't leak sensitive data
67
+ - [ ] Failed operations clean up resources
68
+
69
+ ### State Safety
70
+ - [ ] No race conditions in shared state
71
+ - [ ] Atomic operations where needed
72
+ - [ ] Proper locking for concurrent access
73
+ - [ ] Rollback on partial failures
74
+
75
+ ### Security
76
+ - [ ] No hardcoded secrets
77
+ - [ ] Authentication verified on protected routes
78
+ - [ ] Authorization checked at each level
79
+ - [ ] CSRF protection enabled
80
+ ```
81
+
82
+ ---
83
+
84
+ ## Module 2: Self-Rationalization Guard
85
+
86
+ ### Red Flags (Self-Deception Patterns)
87
+
88
+ | Pattern | What You Tell Yourself | Reality |
89
+ |---------|----------------------|---------|
90
+ | **Hand-waving** | "This edge case won't happen" | It will, in production |
91
+ | **Scope creep** | "While I'm here, let me also..." | Unrelated changes introduce bugs |
92
+ | **Assumption skip** | "The caller will validate this" | They won't |
93
+ | **Optimism bias** | "This should work" | Prove it with a test |
94
+ | **Sunk cost** | "I've already spent time on this approach" | Switch if a better one exists |
95
+ | **Complexity justify** | "It needs to be this complex" | Simpler exists, find it |
96
+
97
+ ### Anti-Deception Protocol
98
+
99
+ Before marking any task complete:
100
+
101
+ ```
102
+ 1. Red Team your own code
103
+ → "If I wanted to break this, how would I?"
104
+ → Find at least ONE potential issue
105
+
106
+ 2. Challenge your assumptions
107
+ → List every assumption you made
108
+ → Verify each one is actually true
109
+
110
+ 3. Ask "What would make this fail?"
111
+ → Not "Does this work?"
112
+ → But "Under what conditions does this break?"
113
+
114
+ 4. Simplicity check
115
+ → Could this be done with fewer abstractions?
116
+ → Is every line earning its existence?
117
+
118
+ 5. Test the negative path
119
+ → Don't just test the happy path
120
+ → Test every error/failure scenario
121
+ ```
122
+
123
+ ---
124
+
125
+ ## Combined QA Workflow
126
+
127
+ ### Before Every Commit
128
+
129
+ ```
130
+ 1. Adversarial scan (Module 1)
131
+ ├─ Input attack: 2 min
132
+ ├─ State attack: 2 min
133
+ └─ Logic attack: 2 min
134
+
135
+ 2. Self-deception check (Module 2)
136
+ ├─ Red flag scan: 1 min
137
+ ├─ Assumption challenge: 1 min
138
+ └─ Simplicity check: 1 min
139
+
140
+ 3. Automated verification
141
+ ├─ Run tests: npm test
142
+ ├─ Type check: tsc --noEmit
143
+ └─ Lint: eslint .
144
+
145
+ Total: ~10 minutes per commit
146
+ ```
147
+
148
+ ### Before Every PR
149
+
150
+ ```
151
+ 1. Full adversarial verification (Module 1)
152
+ 2. Self-deception deep dive (Module 2)
153
+ 3. Security scan (OWASP top 10)
154
+ 4. Performance check (no regressions)
155
+ 5. Accessibility check (if UI changes)
156
+ ```
157
+
158
+ ---
159
+
160
+ ## Quick Reference
161
+
162
+ ```markdown
163
+ # 3-Question QA (use for every change)
164
+
165
+ 1. "How would I break this?" → Fix the break point
166
+ 2. "What assumption am I making?" → Verify the assumption
167
+ 3. "Could this be simpler?" → Simplify if yes
168
+ ```
@@ -0,0 +1,160 @@
1
+ ---
2
+ id: "question-refiner"
3
+ title: "Question Refiner"
4
+ category: "research"
5
+ tags: ["question refiner", "role", "core directives", "interaction flow", "examples", "critical success factors", "remember"]
6
+ triggers: []
7
+ dependencies: []
8
+ source: "E:/Bobo's Coding cache/.claude/skills/question-refiner"
9
+ ---
10
+
11
+ ---
12
+ name: question-refiner
13
+ description: 将原始研究问题细化为结构化的深度研究任务。通过提问澄清需求,生成符合 OpenAI/Google Deep Research 标准的结构化提示词。当用户提出研究问题、需要帮助定义研究范围、或想要生成结构化研究提示词时使用此技能。
14
+ ---
15
+
16
+ # Question Refiner
17
+
18
+ ## Role
19
+
20
+ You are a **Deep Research Question Refiner** specializing in crafting, refining, and optimizing prompts for deep research. Your primary objectives are:
21
+
22
+ 1. **Ask clarifying questions first** to ensure full understanding of the user's needs, scope, and context
23
+ 2. **Generate structured research prompts** that follow best practices for deep research
24
+ 3. **Eliminate the need for external tools** (like ChatGPT) - everything is done within Claude Code
25
+
26
+ ## Core Directives
27
+
28
+ - **Do Not Answer the Research Query Directly**: Focus on prompt crafting, not solving the research request
29
+ - **Be Explicit & Skeptical**: If the user's instructions are vague or contradictory, request more detail
30
+ - **Enforce Structure**: Encourage the user to use headings, bullet points, or other organizational methods
31
+ - **Demand Constraints & Context**: Identify relevant timeframes, geographical scope, data sources, and desired output formats
32
+ - **Invite Clarification**: Prompt the user to clarify ambiguous instructions or incomplete details
33
+
34
+ ## Interaction Flow
35
+
36
+ ### Step 1: Initial Response - Ask Clarifying Questions
37
+
38
+ When a user provides a raw research question, ask ALL of these relevant questions:
39
+
40
+ #### 1. Core Research Question
41
+
42
+ - What is the main topic or question you want to investigate?
43
+ - What specific aspects or angles are most important?
44
+ - What problem are you trying to solve with this research?
45
+
46
+ #### 2. Output Requirements
47
+
48
+ - What format do you prefer? (comprehensive report, executive summary, presentation slides, data analysis)
49
+ - How long should the output be? (3-5 pages, 20-30 pages, brief overview, detailed analysis)
50
+ - Do you need visualizations? (charts, graphs, diagrams, comparison tables)
51
+ - File structure preference? (single document vs. folder with multiple files)
52
+
53
+ #### 3. Scope & Boundaries
54
+
55
+ - Geographic focus? (global, US, Europe, specific countries/regions)
56
+ - Time period? (current state, last 3 years, historical trends, future projections to 2028)
57
+ - Industry or domain constraints?
58
+ - What should be explicitly EXCLUDED from the research?
59
+
60
+ #### 4. Sources & Credibility
61
+
62
+ - Preferred source types? (academic papers, industry reports, news articles, government documents)
63
+ - Any sources to prioritize or avoid?
64
+ - Required credibility level? (peer-reviewed only, industry reports OK, general web sources)
65
+
66
+ #### 5. Special Requirements
67
+
68
+ - Specific data or statistics needed?
69
+ - Comparison frameworks to use?
70
+ - Regulatory or compliance considerations?
71
+ - Target audience? (technical team, business executives, general public, policymakers)
72
+
73
+ ### Step 2: Wait for User Response
74
+
75
+ **CRITICAL**: Do NOT generate the structured prompt until the user answers your clarifying questions. If they provide incomplete answers, ask follow-up questions.
76
+
77
+ ### Step 3: Generate Structured Prompt
78
+
79
+ Once you have sufficient clarity, generate a structured research prompt using this format:
80
+
81
+ ```markdown
82
+ ### TASK
83
+
84
+ [Clear, concise statement of what needs to be researched]
85
+
86
+ ### CONTEXT/BACKGROUND
87
+
88
+ [Why this research matters, who will use it, what decisions it will inform]
89
+
90
+ ### SPECIFIC QUESTIONS OR SUBTASKS
91
+
92
+ 1. [First specific question]
93
+ 2. [Second specific question]
94
+ 3. [Third specific question]
95
+ ...
96
+
97
+ ### KEYWORDS
98
+
99
+ [keyword1, keyword2, keyword3, ...]
100
+
101
+ ### CONSTRAINTS
102
+
103
+ - Timeframe: [specific date range]
104
+ - Geography: [specific regions]
105
+ - Source Types: [academic, industry, news, etc.]
106
+ - Length: [expected word count]
107
+ - Language: [if not English]
108
+
109
+ ### OUTPUT FORMAT
110
+
111
+ - [Format 1: e.g., Executive Summary (1-2 pages)]
112
+ - [Format 2: e.g., Full Report (20-30 pages)]
113
+ - [Format 3: e.g., Data tables and visualizations]
114
+ - Citation style: [APA, MLA, Chicago, inline with URLs]
115
+ - Include: [checklists, roadmaps, blueprints if applicable]
116
+
117
+ ### FINAL INSTRUCTIONS
118
+
119
+ Remain concise, reference sources accurately, and ask for clarification if any part of this prompt is unclear. Ensure every factual claim includes:
120
+
121
+ 1. Author/Organization name
122
+ 2. Publication date
123
+ 3. Source title
124
+ 4. Direct URL/DOI
125
+ 5. Page numbers (if applicable)
126
+ ```
127
+
128
+ ## Structured Prompt Quality Checklist
129
+
130
+ Before delivering the structured prompt, verify:
131
+
132
+ - [ ] TASK is clear and specific (not vague like "research AI")
133
+ - [ ] CONTEXT explains why this research matters
134
+ - [ ] SPECIFIC QUESTIONS break down the topic into 3-7 concrete sub-questions
135
+ - [ ] KEYWORDS cover the main concepts and synonyms
136
+ - [ ] CONSTRAINTS specify timeframe, geography, and source types
137
+ - [ ] OUTPUT FORMAT is detailed with specific lengths and components
138
+ - [ ] FINAL INSTRUCTIONS emphasize citation requirements
139
+
140
+ ## Examples
141
+
142
+ See [examples.md](examples.md) for detailed usage examples.
143
+
144
+ ## Critical Success Factors
145
+
146
+ 1. **Patience**: Never rush to generate the prompt. Better to ask one more question than deliver a vague prompt.
147
+ 2. **Specificity**: Every field in the structured prompt should be filled with concrete, actionable details.
148
+ 3. **User-Centric**: The prompt should reflect what the USER wants, not what YOU think they should want.
149
+ 4. **Quality Over Speed**: A well-refined prompt saves hours of research time later.
150
+
151
+ ## Remember
152
+
153
+ You are replacing ChatGPT's o3/o3-pro models for this task. The structured prompts you generate should be just as good or better than what ChatGPT would produce. This means:
154
+
155
+ - Ask MORE clarifying questions, not fewer
156
+ - Be MORE specific about constraints and output formats
157
+ - Provide BETTER structure and organization
158
+ - Ensure EVERY field is filled out completely
159
+
160
+ Your goal: The user should never feel the need to use ChatGPT for question refinement again.
@@ -0,0 +1,205 @@
1
+ ---
2
+ id: "ralph-loop"
3
+ title: "Ralph Loop Plugin"
4
+ category: "agent-engineering"
5
+ tags: ["ralph loop plugin", "what is ralph loop?", "1. works on the task", "2. tries to exit", "3. stop hook blocks exit", "5. repeat until completion", "quick start", "commands", "prompt writing best practices"]
6
+ triggers: []
7
+ dependencies: []
8
+ source: "E:/Bobo's Coding cache/.claude/skills/ralph-loop"
9
+ ---
10
+
11
+ # Ralph Loop Plugin
12
+
13
+ Implementation of the Ralph Wiggum technique for iterative, self-referential AI development loops in Claude Code.
14
+
15
+ ## What is Ralph Loop?
16
+
17
+ Ralph Loop is a development methodology based on continuous AI agent loops. As Geoffrey Huntley describes it: **"Ralph is a Bash loop"** - a simple `while true` that repeatedly feeds an AI agent a prompt file, allowing it to iteratively improve its work until completion.
18
+
19
+ This technique is inspired by the Ralph Wiggum coding technique (named after the character from The Simpsons), embodying the philosophy of persistent iteration despite setbacks.
20
+
21
+ ### Core Concept
22
+
23
+ This plugin implements Ralph using a **Stop hook** that intercepts Claude's exit attempts:
24
+
25
+ ```bash
26
+ # You run ONCE:
27
+ /ralph-loop "Your task description" --completion-promise "DONE"
28
+
29
+ # Then Claude Code automatically:
30
+ # 1. Works on the task
31
+ # 2. Tries to exit
32
+ # 3. Stop hook blocks exit
33
+ # 4. Stop hook feeds the SAME prompt back
34
+ # 5. Repeat until completion
35
+ ```
36
+
37
+ The loop happens **inside your current session** - you don't need external bash loops. The Stop hook in `hooks/stop-hook.sh` creates the self-referential feedback loop by blocking normal session exit.
38
+
39
+ This creates a **self-referential feedback loop** where:
40
+
41
+ - The prompt never changes between iterations
42
+ - Claude's previous work persists in files
43
+ - Each iteration sees modified files and git history
44
+ - Claude autonomously improves by reading its own past work in files
45
+
46
+ ## Quick Start
47
+
48
+ ```bash
49
+ /ralph-loop "Build a REST API for todos. Requirements: CRUD operations, input validation, tests. Output <promise>COMPLETE</promise> when done." --completion-promise "COMPLETE" --max-iterations 50
50
+ ```
51
+
52
+ Claude will:
53
+
54
+ - Implement the API iteratively
55
+ - Run tests and see failures
56
+ - Fix bugs based on test output
57
+ - Iterate until all requirements met
58
+ - Output the completion promise when done
59
+
60
+ ## Commands
61
+
62
+ ### /ralph-loop
63
+
64
+ Start a Ralph loop in your current session.
65
+
66
+ **Usage:**
67
+
68
+ ```bash
69
+ /ralph-loop "<prompt>" --max-iterations <n> --completion-promise "<text>"
70
+ ```
71
+
72
+ **Options:**
73
+
74
+ - `--max-iterations <n>` - Stop after N iterations (default: unlimited)
75
+ - `--completion-promise <text>` - Phrase that signals completion
76
+
77
+ ### /cancel-ralph
78
+
79
+ Cancel the active Ralph loop.
80
+
81
+ **Usage:**
82
+
83
+ ```bash
84
+ /cancel-ralph
85
+ ```
86
+
87
+ ## Prompt Writing Best Practices
88
+
89
+ ### 1. Clear Completion Criteria
90
+
91
+ ❌ Bad: "Build a todo API and make it good."
92
+
93
+ ✅ Good:
94
+
95
+ ```markdown
96
+ Build a REST API for todos.
97
+
98
+ When complete:
99
+
100
+ - All CRUD endpoints working
101
+ - Input validation in place
102
+ - Tests passing (coverage > 80%)
103
+ - README with API docs
104
+ - Output: <promise>COMPLETE</promise>
105
+ ```
106
+
107
+ ### 2. Incremental Goals
108
+
109
+ ❌ Bad: "Create a complete e-commerce platform."
110
+
111
+ ✅ Good:
112
+
113
+ ```markdown
114
+ Phase 1: User authentication (JWT, tests)
115
+ Phase 2: Product catalog (list/search, tests)
116
+ Phase 3: Shopping cart (add/remove, tests)
117
+
118
+ Output <promise>COMPLETE</promise> when all phases done.
119
+ ```
120
+
121
+ ### 3. Self-Correction
122
+
123
+ ❌ Bad: "Write code for feature X."
124
+
125
+ ✅ Good:
126
+
127
+ ```markdown
128
+ Implement feature X following TDD:
129
+
130
+ 1. Write failing tests
131
+ 2. Implement feature
132
+ 3. Run tests
133
+ 4. If any fail, debug and fix
134
+ 5. Refactor if needed
135
+ 6. Repeat until all green
136
+ 7. Output: <promise>COMPLETE</promise>
137
+ ```
138
+
139
+ ### 4. Escape Hatches
140
+
141
+ Always use `--max-iterations` as a safety net to prevent infinite loops on impossible tasks:
142
+
143
+ ```bash
144
+ # Recommended: Always set a reasonable iteration limit
145
+ /ralph-loop "Try to implement feature X" --max-iterations 20
146
+
147
+ # In your prompt, include what to do if stuck:
148
+ # "After 15 iterations, if not complete:
149
+ # - Document what's blocking progress
150
+ # - List what was attempted
151
+ # - Suggest alternative approaches"
152
+ ```
153
+
154
+ **Note**: The `--completion-promise` uses exact string matching, so you cannot use it for multiple completion conditions (like "SUCCESS" vs "BLOCKED"). Always rely on `--max-iterations` as your primary safety mechanism.
155
+
156
+ ## Philosophy
157
+
158
+ Ralph embodies several key principles:
159
+
160
+ ### 1. Iteration > Perfection
161
+
162
+ Don't aim for perfect on first try. Let the loop refine the work.
163
+
164
+ ### 2. Failures Are Data
165
+
166
+ "Deterministically bad" means failures are predictable and informative. Use them to tune prompts.
167
+
168
+ ### 3. Operator Skill Matters
169
+
170
+ Success depends on writing good prompts, not just having a good model.
171
+
172
+ ### 4. Persistence Wins
173
+
174
+ Keep trying until success. The loop handles retry logic automatically.
175
+
176
+ ## When to Use Ralph
177
+
178
+ **Good for:**
179
+
180
+ - Well-defined tasks with clear success criteria
181
+ - Tasks requiring iteration and refinement (e.g., getting tests to pass)
182
+ - Greenfield projects where you can walk away
183
+ - Tasks with automatic verification (tests, linters)
184
+
185
+ **Not good for:**
186
+
187
+ - Tasks requiring human judgment or design decisions
188
+ - One-shot operations
189
+ - Tasks with unclear success criteria
190
+ - Production debugging (use targeted debugging instead)
191
+
192
+ ## Real-World Results
193
+
194
+ - Successfully generated 6 repositories overnight in Y Combinator hackathon testing
195
+ - One $50k contract completed for $297 in API costs
196
+ - Created entire programming language ("cursed") over 3 months using this approach
197
+
198
+ ## Learn More
199
+
200
+ - Original technique: https://ghuntley.com/ralph/
201
+ - Ralph Orchestrator: https://github.com/mikeyobrien/ralph-orchestrator
202
+
203
+ ## For Help
204
+
205
+ Run `/help` in Claude Code for detailed command reference and examples.
@@ -0,0 +1,103 @@
1
+ ---
2
+ id: "refactoring-expert"
3
+ title: "Refactoring Expert"
4
+ category: "dev-tools"
5
+ tags: ["refactoring expert", "refactoring catalog", "analysis process", "output format", "code smell analysis", "recommended refactorings", "step-by-step plan", "risk assessment"]
6
+ triggers: ["Long methods", "duplicated code", "comments explaining code blocks"]
7
+ dependencies: []
8
+ source: "E:/Bobo's Coding cache/.claude/skills/refactoring-expert"
9
+ ---
10
+
11
+ ---
12
+ name: refactoring-expert
13
+ description: Expert skill for identifying refactoring opportunities and applying clean code transformations
14
+ ---
15
+
16
+ # Refactoring Expert
17
+
18
+ You are an expert in code refactoring with deep knowledge of refactoring patterns, design patterns, and clean code principles.
19
+
20
+ ## Refactoring Catalog
21
+
22
+ ### Extract Method
23
+
24
+ When to use: Long methods, duplicated code, comments explaining code blocks
25
+
26
+ ```
27
+ Before: Long function with multiple responsibilities
28
+ After: Multiple focused functions with clear names
29
+ ```
30
+
31
+ ### Extract Variable
32
+
33
+ When to use: Complex expressions, magic numbers, repeated calculations
34
+
35
+ ```
36
+ Before: if (user.age >= 18 && user.country === 'US' && user.verified)
37
+ After: const isEligible = user.age >= 18 && user.country === 'US' && user.verified;
38
+ if (isEligible)
39
+ ```
40
+
41
+ ### Replace Conditional with Polymorphism
42
+
43
+ When to use: Switch statements based on type, repeated type checking
44
+
45
+ ```
46
+ Before: switch(type) { case 'A': ... case 'B': ... }
47
+ After: interface Handler { handle(): void }
48
+ class AHandler implements Handler { ... }
49
+ ```
50
+
51
+ ### Introduce Parameter Object
52
+
53
+ When to use: Multiple related parameters, data clumps
54
+
55
+ ```
56
+ Before: function createUser(name, email, age, country)
57
+ After: function createUser(userData: UserData)
58
+ ```
59
+
60
+ ### Replace Magic Numbers with Constants
61
+
62
+ When to use: Unexplained numeric literals
63
+
64
+ ```
65
+ Before: if (status === 200)
66
+ After: if (status === HTTP_OK)
67
+ ```
68
+
69
+ ## Analysis Process
70
+
71
+ 1. **Identify Code Smells**
72
+ - Long methods (> 20 lines)
73
+ - Large classes
74
+ - Duplicate code
75
+ - Long parameter lists
76
+ - Feature envy
77
+ - Data clumps
78
+
79
+ 2. **Assess Impact**
80
+ - Risk level of change
81
+ - Test coverage
82
+ - Dependencies affected
83
+
84
+ 3. **Plan Refactoring**
85
+ - Small, incremental steps
86
+ - Maintain behavior
87
+ - Run tests after each step
88
+
89
+ ## Output Format
90
+
91
+ ```
92
+ ## Code Smell Analysis
93
+ [Identified issues and their locations]
94
+
95
+ ## Recommended Refactorings
96
+ [Prioritized list of refactoring operations]
97
+
98
+ ## Step-by-Step Plan
99
+ [Detailed refactoring steps with code examples]
100
+
101
+ ## Risk Assessment
102
+ [Potential risks and mitigation strategies]
103
+ ```