mindforge-cc 11.5.1 → 11.7.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 (214) hide show
  1. package/.agent/mindforge/skill-tdd.md +53 -0
  2. package/.agent/mindforge/skills-index.md +118 -0
  3. package/.agent/mindforge/systematic-debug.md +60 -0
  4. package/.agent/mindforge/wf-catalog.md +37 -0
  5. package/.agent/mindforge/wf-code-audit.md +31 -0
  6. package/.agent/mindforge/wf-competitive-analysis.md +31 -0
  7. package/.agent/mindforge/wf-deep-research.md +32 -0
  8. package/.agent/mindforge/wf-feature-planner.md +31 -0
  9. package/.agent/mindforge/wf-incident-response.md +31 -0
  10. package/.agent/mindforge/wf-onboard-codebase.md +31 -0
  11. package/.agent/mindforge/wf-perf-optimize.md +31 -0
  12. package/.agent/mindforge/wf-pr-review.md +31 -0
  13. package/.agent/mindforge/wf-refactor-plan.md +31 -0
  14. package/.agent/mindforge/wf-release-prep.md +31 -0
  15. package/.agent/mindforge/wf-tdd-sprint.md +31 -0
  16. package/.agent/mindforge/wf-tech-evaluation.md +31 -0
  17. package/.agent/skills/1password-skill/SKILL.md +156 -0
  18. package/.agent/skills/1password-skill/references/cli-examples.md +31 -0
  19. package/.agent/skills/1password-skill/references/get-started.md +21 -0
  20. package/.agent/skills/article-illustrator/SKILL.md +199 -0
  21. package/.agent/skills/article-illustrator/references/prompt-construction.md +426 -0
  22. package/.agent/skills/article-illustrator/references/style-presets.md +80 -0
  23. package/.agent/skills/article-illustrator/references/styles.md +224 -0
  24. package/.agent/skills/article-illustrator/references/usage.md +50 -0
  25. package/.agent/skills/article-illustrator/references/workflow.md +332 -0
  26. package/.agent/skills/arxiv/SKILL.md +275 -0
  27. package/.agent/skills/blogwatcher/SKILL.md +130 -0
  28. package/.agent/skills/code-wiki/SKILL.md +438 -0
  29. package/.agent/skills/code-wiki/templates/README.md +31 -0
  30. package/.agent/skills/code-wiki/templates/architecture.md +30 -0
  31. package/.agent/skills/code-wiki/templates/getting-started.md +47 -0
  32. package/.agent/skills/code-wiki/templates/module.md +38 -0
  33. package/.agent/skills/codebase-inspection/SKILL.md +109 -0
  34. package/.agent/skills/comic-creator/SKILL.md +240 -0
  35. package/.agent/skills/comic-creator/references/analysis-framework.md +176 -0
  36. package/.agent/skills/comic-creator/references/auto-selection.md +71 -0
  37. package/.agent/skills/comic-creator/references/base-prompt.md +98 -0
  38. package/.agent/skills/comic-creator/references/character-template.md +180 -0
  39. package/.agent/skills/comic-creator/references/ohmsha-guide.md +85 -0
  40. package/.agent/skills/comic-creator/references/partial-workflows.md +106 -0
  41. package/.agent/skills/comic-creator/references/storyboard-template.md +143 -0
  42. package/.agent/skills/comic-creator/references/workflow.md +401 -0
  43. package/.agent/skills/concept-diagrams/SKILL.md +355 -0
  44. package/.agent/skills/concept-diagrams/references/dashboard-patterns.md +43 -0
  45. package/.agent/skills/concept-diagrams/references/infrastructure-patterns.md +144 -0
  46. package/.agent/skills/concept-diagrams/references/physical-shape-cookbook.md +42 -0
  47. package/.agent/skills/creative-ideation/SKILL.md +144 -0
  48. package/.agent/skills/creative-ideation/references/full-prompt-library.md +110 -0
  49. package/.agent/skills/devops-cli/SKILL.md +149 -0
  50. package/.agent/skills/devops-cli/references/app-discovery.md +112 -0
  51. package/.agent/skills/devops-cli/references/authentication.md +59 -0
  52. package/.agent/skills/devops-cli/references/cli-reference.md +104 -0
  53. package/.agent/skills/devops-cli/references/running-apps.md +171 -0
  54. package/.agent/skills/devops-watchers/SKILL.md +103 -0
  55. package/.agent/skills/docker-management/SKILL.md +273 -0
  56. package/.agent/skills/domain-intel/SKILL.md +96 -0
  57. package/.agent/skills/duckduckgo-search/SKILL.md +230 -0
  58. package/.agent/skills/github-auth/SKILL.md +240 -0
  59. package/.agent/skills/github-code-review/SKILL.md +474 -0
  60. package/.agent/skills/github-code-review/references/review-output-template.md +74 -0
  61. package/.agent/skills/github-issues/SKILL.md +363 -0
  62. package/.agent/skills/github-issues/templates/bug-report.md +35 -0
  63. package/.agent/skills/github-issues/templates/feature-request.md +31 -0
  64. package/.agent/skills/github-pr-workflow/SKILL.md +360 -0
  65. package/.agent/skills/github-pr-workflow/references/ci-troubleshooting.md +183 -0
  66. package/.agent/skills/github-pr-workflow/references/conventional-commits.md +71 -0
  67. package/.agent/skills/github-pr-workflow/templates/pr-body-bugfix.md +35 -0
  68. package/.agent/skills/github-pr-workflow/templates/pr-body-feature.md +33 -0
  69. package/.agent/skills/github-repo-management/SKILL.md +509 -0
  70. package/.agent/skills/github-repo-management/references/github-api-cheatsheet.md +161 -0
  71. package/.agent/skills/godmode/SKILL.md +396 -0
  72. package/.agent/skills/godmode/references/jailbreak-templates.md +128 -0
  73. package/.agent/skills/godmode/references/refusal-detection.md +142 -0
  74. package/.agent/skills/hyperframes/SKILL.md +182 -0
  75. package/.agent/skills/hyperframes/references/cli.md +185 -0
  76. package/.agent/skills/hyperframes/references/composition.md +129 -0
  77. package/.agent/skills/hyperframes/references/features.md +289 -0
  78. package/.agent/skills/hyperframes/references/gsap.md +136 -0
  79. package/.agent/skills/hyperframes/references/troubleshooting.md +137 -0
  80. package/.agent/skills/hyperframes/references/website-to-video.md +145 -0
  81. package/.agent/skills/jupyter-live-kernel/SKILL.md +160 -0
  82. package/.agent/skills/kanban-orchestrator/SKILL.md +209 -0
  83. package/.agent/skills/kanban-worker/SKILL.md +188 -0
  84. package/.agent/skills/llm-wiki/SKILL.md +499 -0
  85. package/.agent/skills/meme-generation/SKILL.md +122 -0
  86. package/.agent/skills/node-inspect-debugger/SKILL.md +312 -0
  87. package/.agent/skills/obsidian/SKILL.md +60 -0
  88. package/.agent/skills/osint-investigation/SKILL.md +269 -0
  89. package/.agent/skills/osint-investigation/templates/source-template.md +59 -0
  90. package/.agent/skills/oss-forensics/SKILL.md +422 -0
  91. package/.agent/skills/oss-forensics/references/evidence-types.md +89 -0
  92. package/.agent/skills/oss-forensics/references/github-archive-guide.md +184 -0
  93. package/.agent/skills/oss-forensics/references/investigation-templates.md +131 -0
  94. package/.agent/skills/oss-forensics/references/recovery-techniques.md +164 -0
  95. package/.agent/skills/oss-forensics/templates/forensic-report.md +151 -0
  96. package/.agent/skills/oss-forensics/templates/malicious-package-report.md +43 -0
  97. package/.agent/skills/parallel-cli/SKILL.md +384 -0
  98. package/.agent/skills/pinggy-tunnel/SKILL.md +302 -0
  99. package/.agent/skills/pixel-art/SKILL.md +209 -0
  100. package/.agent/skills/pixel-art/references/palettes.md +49 -0
  101. package/.agent/skills/plan/SKILL.md +331 -0
  102. package/.agent/skills/polymarket/SKILL.md +75 -0
  103. package/.agent/skills/polymarket/references/api-endpoints.md +220 -0
  104. package/.agent/skills/python-debugpy/SKILL.md +368 -0
  105. package/.agent/skills/requesting-code-review/SKILL.md +273 -0
  106. package/.agent/skills/research-paper-writing/SKILL.md +2367 -0
  107. package/.agent/skills/research-paper-writing/references/autoreason-methodology.md +394 -0
  108. package/.agent/skills/research-paper-writing/references/checklists.md +434 -0
  109. package/.agent/skills/research-paper-writing/references/citation-workflow.md +563 -0
  110. package/.agent/skills/research-paper-writing/references/experiment-patterns.md +728 -0
  111. package/.agent/skills/research-paper-writing/references/human-evaluation.md +476 -0
  112. package/.agent/skills/research-paper-writing/references/paper-types.md +481 -0
  113. package/.agent/skills/research-paper-writing/references/reviewer-guidelines.md +433 -0
  114. package/.agent/skills/research-paper-writing/references/sources.md +191 -0
  115. package/.agent/skills/research-paper-writing/references/writing-guide.md +474 -0
  116. package/.agent/skills/research-paper-writing/templates/README.md +251 -0
  117. package/.agent/skills/rest-graphql-debug/SKILL.md +507 -0
  118. package/.agent/skills/s6-container-supervision/SKILL.md +171 -0
  119. package/.agent/skills/scrapling/SKILL.md +328 -0
  120. package/.agent/skills/sherlock/SKILL.md +186 -0
  121. package/.agent/skills/simplify-code/SKILL.md +168 -0
  122. package/.agent/skills/skill-authoring/SKILL.md +158 -0
  123. package/.agent/skills/spike/SKILL.md +190 -0
  124. package/.agent/skills/subagent-driven-development/SKILL.md +345 -0
  125. package/.agent/skills/subagent-driven-development/references/context-budget-discipline.md +53 -0
  126. package/.agent/skills/subagent-driven-development/references/gates-taxonomy.md +93 -0
  127. package/.agent/skills/systematic-debugging/SKILL.md +360 -0
  128. package/.agent/skills/test-driven-development/SKILL.md +336 -0
  129. package/.agent/skills/video-orchestrator/SKILL.md +194 -0
  130. package/.agent/skills/video-orchestrator/references/examples.md +227 -0
  131. package/.agent/skills/video-orchestrator/references/intake.md +166 -0
  132. package/.agent/skills/video-orchestrator/references/kanban-setup.md +278 -0
  133. package/.agent/skills/video-orchestrator/references/monitoring.md +180 -0
  134. package/.agent/skills/video-orchestrator/references/role-archetypes.md +298 -0
  135. package/.agent/skills/video-orchestrator/references/tool-matrix.md +317 -0
  136. package/.agent/skills/web-pentest/SKILL.md +332 -0
  137. package/.agent/skills/web-pentest/references/bypass-techniques.md +133 -0
  138. package/.agent/skills/web-pentest/references/exploitation-techniques.md +204 -0
  139. package/.agent/skills/web-pentest/references/scope-enforcement.md +110 -0
  140. package/.agent/skills/web-pentest/references/vuln-taxonomy.md +81 -0
  141. package/.agent/skills/web-pentest/templates/authorization.md +69 -0
  142. package/.agent/skills/web-pentest/templates/pentest-report.md +178 -0
  143. package/.claude/commands/mindforge/skill-tdd.md +53 -0
  144. package/.claude/commands/mindforge/skills-index.md +118 -0
  145. package/.claude/commands/mindforge/systematic-debug.md +60 -0
  146. package/.claude/commands/mindforge/wf-catalog.md +37 -0
  147. package/.claude/commands/mindforge/wf-code-audit.md +31 -0
  148. package/.claude/commands/mindforge/wf-competitive-analysis.md +31 -0
  149. package/.claude/commands/mindforge/wf-deep-research.md +32 -0
  150. package/.claude/commands/mindforge/wf-feature-planner.md +31 -0
  151. package/.claude/commands/mindforge/wf-incident-response.md +31 -0
  152. package/.claude/commands/mindforge/wf-onboard-codebase.md +31 -0
  153. package/.claude/commands/mindforge/wf-perf-optimize.md +31 -0
  154. package/.claude/commands/mindforge/wf-pr-review.md +31 -0
  155. package/.claude/commands/mindforge/wf-refactor-plan.md +31 -0
  156. package/.claude/commands/mindforge/wf-release-prep.md +31 -0
  157. package/.claude/commands/mindforge/wf-tdd-sprint.md +31 -0
  158. package/.claude/commands/mindforge/wf-tech-evaluation.md +31 -0
  159. package/.mindforge/config.json +2 -2
  160. package/.mindforge/dynamic-workflows/REGISTRY.md +65 -0
  161. package/.mindforge/dynamic-workflows/index.json +171 -0
  162. package/.mindforge/dynamic-workflows/scripts/code-audit.js +103 -0
  163. package/.mindforge/dynamic-workflows/scripts/competitive-analysis.js +85 -0
  164. package/.mindforge/dynamic-workflows/scripts/deep-research.js +151 -0
  165. package/.mindforge/dynamic-workflows/scripts/feature-planner.js +104 -0
  166. package/.mindforge/dynamic-workflows/scripts/incident-response.js +106 -0
  167. package/.mindforge/dynamic-workflows/scripts/onboard-codebase.js +102 -0
  168. package/.mindforge/dynamic-workflows/scripts/perf-optimize.js +128 -0
  169. package/.mindforge/dynamic-workflows/scripts/pr-review.js +87 -0
  170. package/.mindforge/dynamic-workflows/scripts/refactor-plan.js +121 -0
  171. package/.mindforge/dynamic-workflows/scripts/release-prep.js +102 -0
  172. package/.mindforge/dynamic-workflows/scripts/tdd-sprint.js +103 -0
  173. package/.mindforge/dynamic-workflows/scripts/tech-evaluation.js +72 -0
  174. package/.mindforge/memory/sync-manifest.json +1 -1
  175. package/.mindforge/skills/arxiv/SKILL.md +294 -0
  176. package/.mindforge/skills/blogwatcher/SKILL.md +147 -0
  177. package/.mindforge/skills/code-wiki/SKILL.md +457 -0
  178. package/.mindforge/skills/codebase-inspection/SKILL.md +126 -0
  179. package/.mindforge/skills/concept-diagrams/SKILL.md +373 -0
  180. package/.mindforge/skills/creative-ideation/SKILL.md +162 -0
  181. package/.mindforge/skills/domain-intel/SKILL.md +116 -0
  182. package/.mindforge/skills/duckduckgo-search/SKILL.md +249 -0
  183. package/.mindforge/skills/github-code-review/SKILL.md +493 -0
  184. package/.mindforge/skills/github-issues/SKILL.md +382 -0
  185. package/.mindforge/skills/github-pr-workflow/SKILL.md +379 -0
  186. package/.mindforge/skills/jupyter-live-kernel/SKILL.md +179 -0
  187. package/.mindforge/skills/kanban-orchestrator/SKILL.md +227 -0
  188. package/.mindforge/skills/kanban-worker/SKILL.md +206 -0
  189. package/.mindforge/skills/meme-generation/SKILL.md +141 -0
  190. package/.mindforge/skills/obsidian/SKILL.md +80 -0
  191. package/.mindforge/skills/osint-investigation/SKILL.md +288 -0
  192. package/.mindforge/skills/oss-forensics/SKILL.md +421 -0
  193. package/.mindforge/skills/pixel-art/SKILL.md +228 -0
  194. package/.mindforge/skills/plan/SKILL.md +350 -0
  195. package/.mindforge/skills/requesting-code-review/SKILL.md +292 -0
  196. package/.mindforge/skills/research-paper-writing/SKILL.md +2384 -0
  197. package/.mindforge/skills/scrapling/SKILL.md +345 -0
  198. package/.mindforge/skills/sherlock/SKILL.md +203 -0
  199. package/.mindforge/skills/simplify-code/SKILL.md +187 -0
  200. package/.mindforge/skills/spike/SKILL.md +209 -0
  201. package/.mindforge/skills/subagent-driven-development/SKILL.md +364 -0
  202. package/.mindforge/skills/systematic-debugging/SKILL.md +379 -0
  203. package/.mindforge/skills/test-driven-development/SKILL.md +355 -0
  204. package/.mindforge/skills/web-pentest/SKILL.md +327 -0
  205. package/CHANGELOG.md +71 -0
  206. package/MINDFORGE.md +2 -2
  207. package/README.md +72 -3
  208. package/RELEASENOTES.md +109 -0
  209. package/bin/installer-core.js +6 -2
  210. package/bin/mindforge-cli.js +7 -0
  211. package/bin/workflows/workflow-runner.js +110 -0
  212. package/docs/commands-reference.md +25 -0
  213. package/docs/getting-started.md +42 -5
  214. package/package.json +2 -1
@@ -0,0 +1,122 @@
1
+ ---
2
+ name: meme-generation
3
+ description: Generate real meme images by picking a template and overlaying text with Pillow. Produces actual .png meme files.
4
+ version: 2.0.0
5
+ ---
6
+
7
+ # Meme Generation
8
+
9
+ Generate actual meme images from a topic. Picks a template, writes captions, and renders a real .png file with text overlay.
10
+
11
+ ## When to Use
12
+
13
+ - User asks you to make or generate a meme
14
+ - User wants a meme about a specific topic, situation, or frustration
15
+ - User says "meme this" or similar
16
+
17
+ ## Available Templates
18
+
19
+ The script supports **any of the ~100 popular imgflip templates** by name or ID, plus 10 curated templates with hand-tuned text positioning.
20
+
21
+ ### Curated Templates (custom text placement)
22
+
23
+ | ID | Name | Fields | Best for |
24
+ |----|------|--------|----------|
25
+ | `this-is-fine` | This is Fine | top, bottom | chaos, denial |
26
+ | `drake` | Drake Hotline Bling | reject, approve | rejecting/preferring |
27
+ | `distracted-boyfriend` | Distracted Boyfriend | distraction, current, person | temptation, shifting priorities |
28
+ | `two-buttons` | Two Buttons | left, right, person | impossible choice |
29
+ | `expanding-brain` | Expanding Brain | 4 levels | escalating irony |
30
+ | `change-my-mind` | Change My Mind | statement | hot takes |
31
+ | `woman-yelling-at-cat` | Woman Yelling at Cat | woman, cat | arguments |
32
+ | `one-does-not-simply` | One Does Not Simply | top, bottom | deceptively hard things |
33
+ | `grus-plan` | Gru's Plan | step1-3, realization | plans that backfire |
34
+ | `batman-slapping-robin` | Batman Slapping Robin | robin, batman | shutting down bad ideas |
35
+
36
+ ### Dynamic Templates (from imgflip API)
37
+
38
+ Any template not in the curated list can be used by name or imgflip ID. These get smart default text positioning (top/bottom for 2-field, evenly spaced for 3+). Search with:
39
+ ```bash
40
+ python "$SKILL_DIR/scripts/generate_meme.py" --search "disaster"
41
+ ```
42
+
43
+ ## Procedure
44
+
45
+ ### Mode 1: Classic Template (default)
46
+
47
+ 1. Read the user's topic and identify the core dynamic (chaos, dilemma, preference, irony, etc.)
48
+ 2. Pick the template that best matches. Use the "Best for" column, or search with `--search`.
49
+ 3. Write short captions for each field (8-12 words max per field, shorter is better).
50
+ 4. Find the skill's script directory:
51
+ ```
52
+ SKILL_DIR=$(dirname "$(find ~/.agent/skills -path '*/meme-generation/SKILL.md' 2>/dev/null | head -1)")
53
+ ```
54
+ 5. Run the generator:
55
+ ```bash
56
+ python "$SKILL_DIR/scripts/generate_meme.py" <template_id> /tmp/meme.png "caption 1" "caption 2" ...
57
+ ```
58
+ 6. Return the image with `MEDIA:/tmp/meme.png`
59
+
60
+ ### Mode 2: Custom AI Image (when image_generate is available)
61
+
62
+ Use this when no classic template fits, or when the user wants something original.
63
+
64
+ 1. Write the captions first.
65
+ 2. Use `image_generate` to create a scene that matches the meme concept. Do NOT include any text in the image prompt — text will be added by the script. Describe only the visual scene.
66
+ 3. Find the generated image path from the image_generate result URL. Download it to a local path if needed.
67
+ 4. Run the script with `--image` to overlay text, choosing a mode:
68
+ - **Overlay** (text directly on image, white with black outline):
69
+ ```bash
70
+ python "$SKILL_DIR/scripts/generate_meme.py" --image /path/to/scene.png /tmp/meme.png "top text" "bottom text"
71
+ ```
72
+ - **Bars** (black bars above/below with white text — cleaner, always readable):
73
+ ```bash
74
+ python "$SKILL_DIR/scripts/generate_meme.py" --image /path/to/scene.png --bars /tmp/meme.png "top text" "bottom text"
75
+ ```
76
+ Use `--bars` when the image is busy/detailed and text would be hard to read on top of it.
77
+ 5. **Verify with vision** (if `vision_analyze` is available): Check the result looks good:
78
+ ```
79
+ vision_analyze(image_url="/tmp/meme.png", question="Is the text legible and well-positioned? Does the meme work visually?")
80
+ ```
81
+ If the vision model flags issues (text hard to read, bad placement, etc.), try the other mode (switch between overlay and bars) or regenerate the scene.
82
+ 6. Return the image with `MEDIA:/tmp/meme.png`
83
+
84
+ ## Examples
85
+
86
+ **"debugging production at 2 AM":**
87
+ ```bash
88
+ python generate_meme.py this-is-fine /tmp/meme.png "SERVERS ARE ON FIRE" "This is fine"
89
+ ```
90
+
91
+ **"choosing between sleep and one more episode":**
92
+ ```bash
93
+ python generate_meme.py drake /tmp/meme.png "Getting 8 hours of sleep" "One more episode at 3 AM"
94
+ ```
95
+
96
+ **"the stages of a Monday morning":**
97
+ ```bash
98
+ python generate_meme.py expanding-brain /tmp/meme.png "Setting an alarm" "Setting 5 alarms" "Sleeping through all alarms" "Working from bed"
99
+ ```
100
+
101
+ ## Listing Templates
102
+
103
+ To see all available templates:
104
+ ```bash
105
+ python generate_meme.py --list
106
+ ```
107
+
108
+ ## Pitfalls
109
+
110
+ - Keep captions SHORT. Memes with long text look terrible.
111
+ - Match the number of text arguments to the template's field count.
112
+ - Pick the template that fits the joke structure, not just the topic.
113
+ - Do not generate hateful, abusive, or personally targeted content.
114
+ - The script caches template images in `scripts/.cache/` after first download.
115
+
116
+ ## Verification
117
+
118
+ The output is correct if:
119
+ - A .png file was created at the output path
120
+ - Text is legible (white with black outline) on the template
121
+ - The joke lands — caption matches the template's intended structure
122
+ - File can be delivered via MEDIA: path
@@ -0,0 +1,312 @@
1
+ ---
2
+ name: node-inspect-debugger
3
+ description: "Debug Node.js via --inspect + Chrome DevTools Protocol CLI."
4
+ version: 1.0.0
5
+ ---
6
+
7
+ # Node.js Inspect Debugger
8
+
9
+ ## Overview
10
+
11
+ When `console.log` isn't enough, drive Node's built-in V8 inspector programmatically from the terminal. You get real breakpoints, step in/over/out, call-stack walking, local/closure scope dumps, and arbitrary expression evaluation in the paused frame.
12
+
13
+ Two tools, pick one:
14
+
15
+ - **`node inspect`** — built-in, zero install, CLI REPL. Best for quick poking.
16
+ - **`ndb` / CDP via `chrome-remote-interface`** — scriptable from Node/Python; best when you want to automate many breakpoints, collect state across runs, or debug non-interactively from an agent loop.
17
+
18
+ **Prefer `node inspect` first.** It's always available and the REPL is fast.
19
+
20
+ ## When to Use
21
+
22
+ - A Node test fails and you need to see intermediate state
23
+ - ui-tui crashes or behaves wrong and you want to inspect React/Ink state pre-render
24
+ - tui_gateway child processes (`_SlashWorker`, PTY bridge workers) misbehave
25
+ - You need to inspect a value in a closure that `console.log` can't reach without patching
26
+ - Perf: attach to a running process to capture a CPU profile or heap snapshot
27
+
28
+ **Don't use for:** things `console.log` solves in under a minute. Breakpoint-driven debugging is heavier; use it when the payoff is real.
29
+
30
+ ## Quick Reference: `node inspect` REPL
31
+
32
+ Launch paused on first line:
33
+
34
+ ```bash
35
+ node inspect path/to/script.js
36
+ # or with tsx
37
+ node --inspect-brk $(which tsx) path/to/script.ts
38
+ ```
39
+
40
+ The `debug>` prompt accepts:
41
+
42
+ | Command | Action |
43
+ |---|---|
44
+ | `c` or `cont` | continue |
45
+ | `n` or `next` | step over |
46
+ | `s` or `step` | step into |
47
+ | `o` or `out` | step out |
48
+ | `pause` | pause running code |
49
+ | `sb('file.js', 42)` | set breakpoint at file.js line 42 |
50
+ | `sb(42)` | set breakpoint at line 42 of current file |
51
+ | `sb('functionName')` | break when function is called |
52
+ | `cb('file.js', 42)` | clear breakpoint |
53
+ | `breakpoints` | list all breakpoints |
54
+ | `bt` | backtrace (call stack) |
55
+ | `list(5)` | show 5 lines of source around current position |
56
+ | `watch('expr')` | evaluate expr on every pause |
57
+ | `watchers` | show watched expressions |
58
+ | `repl` | drop into REPL in current scope (Ctrl+C to exit REPL) |
59
+ | `exec expr` | evaluate expression once |
60
+ | `restart` | restart script |
61
+ | `kill` | kill the script |
62
+ | `.exit` | quit debugger |
63
+
64
+ **In the `repl` sub-mode:** type any JS expression, including access to locals/closure variables. `Ctrl+C` exits back to `debug>`.
65
+
66
+ ## Attaching to a Running Process
67
+
68
+ When the process is already running (e.g. a long-lived dev server or the TUI gateway):
69
+
70
+ ```bash
71
+ # 1. Send SIGUSR1 to enable the inspector on an existing process
72
+ kill -SIGUSR1 <pid>
73
+ # Node prints: Debugger listening on ws://127.0.0.1:9229/<uuid>
74
+
75
+ # 2. Attach the debugger CLI
76
+ node inspect -p <pid>
77
+ # or by URL
78
+ node inspect ws://127.0.0.1:9229/<uuid>
79
+ ```
80
+
81
+ To start a process with the inspector from the beginning:
82
+
83
+ ```bash
84
+ node --inspect script.js # listen on 127.0.0.1:9229, keep running
85
+ node --inspect-brk script.js # listen AND pause on first line
86
+ node --inspect=0.0.0.0:9230 script.js # custom host:port
87
+ ```
88
+
89
+ For TypeScript via tsx:
90
+
91
+ ```bash
92
+ node --inspect-brk --import tsx script.ts
93
+ # or older tsx
94
+ node --inspect-brk -r tsx/cjs script.ts
95
+ ```
96
+
97
+ ## Programmatic CDP (scripting from terminal)
98
+
99
+ When you want to automate — set many breakpoints, capture scope state, script a repro — use `chrome-remote-interface`:
100
+
101
+ ```bash
102
+ npm i -g chrome-remote-interface # or project-local
103
+ # Start your target:
104
+ node --inspect-brk=9229 target.js &
105
+ ```
106
+
107
+ Driver script (save as `/tmp/cdp-debug.js`):
108
+
109
+ ```javascript
110
+ const CDP = require('chrome-remote-interface');
111
+
112
+ (async () => {
113
+ const client = await CDP({ port: 9229 });
114
+ const { Debugger, Runtime } = client;
115
+
116
+ Debugger.paused(async ({ callFrames, reason }) => {
117
+ const top = callFrames[0];
118
+ console.log(`PAUSED: ${reason} @ ${top.url}:${top.location.lineNumber + 1}`);
119
+
120
+ // Walk scopes for locals
121
+ for (const scope of top.scopeChain) {
122
+ if (scope.type === 'local' || scope.type === 'closure') {
123
+ const { result } = await Runtime.getProperties({
124
+ objectId: scope.object.objectId,
125
+ ownProperties: true,
126
+ });
127
+ for (const p of result) {
128
+ console.log(` ${scope.type}.${p.name} =`, p.value?.value ?? p.value?.description);
129
+ }
130
+ }
131
+ }
132
+
133
+ // Evaluate an expression in the paused frame
134
+ const { result } = await Debugger.evaluateOnCallFrame({
135
+ callFrameId: top.callFrameId,
136
+ expression: 'typeof state !== "undefined" ? JSON.stringify(state) : "n/a"',
137
+ });
138
+ console.log('state =', result.value ?? result.description);
139
+
140
+ await Debugger.resume();
141
+ });
142
+
143
+ await Runtime.enable();
144
+ await Debugger.enable();
145
+
146
+ // Set a breakpoint by URL regex + line
147
+ await Debugger.setBreakpointByUrl({
148
+ urlRegex: '.*app\\.tsx$',
149
+ lineNumber: 119, // 0-indexed
150
+ columnNumber: 0,
151
+ });
152
+
153
+ await Runtime.runIfWaitingForDebugger();
154
+ })();
155
+ ```
156
+
157
+ Run it:
158
+
159
+ ```bash
160
+ node /tmp/cdp-debug.js
161
+ ```
162
+
163
+ the agent-specific note: `chrome-remote-interface` is NOT in `ui-tui/package.json`. Install it to a throwaway location if you don't want to dirty the project:
164
+
165
+ ```bash
166
+ mkdir -p /tmp/cdp-tools && cd /tmp/cdp-tools && npm i chrome-remote-interface
167
+ NODE_PATH=/tmp/cdp-tools/node_modules node /tmp/cdp-debug.js
168
+ ```
169
+
170
+ ## Debugging the agent ui-tui
171
+
172
+ The TUI is built Ink + tsx. Two common scenarios:
173
+
174
+ ### Debugging a single Ink component under dev
175
+
176
+ `ui-tui/package.json` has `npm run dev` (tsx --watch). Add `--inspect-brk` by running tsx directly:
177
+
178
+ ```bash
179
+ cd /home/bb/
180
+ npm run build # produce dist/ once so transpile isn't needed on first load
181
+ node --inspect-brk dist/entry.js
182
+ # In another terminal:
183
+ node inspect -p <node pid>
184
+ ```
185
+
186
+ Then inside `debug>`:
187
+
188
+ ```
189
+ sb('dist/app.js', 220) # or wherever the suspect render is
190
+ cont
191
+ ```
192
+
193
+ When it pauses, `repl` → inspect `props`, state refs, `useInput` handler values, etc.
194
+
195
+ ### Debugging a running `hermes --tui`
196
+
197
+ The TUI spawns Node from the Python CLI. Easiest path:
198
+
199
+ ```bash
200
+ # 1. Launch TUI
201
+ hermes --tui &
202
+ TUI_PID=$(pgrep -f 'ui-tui/dist/entry' | head -1)
203
+
204
+ # 2. Enable inspector on that Node PID
205
+ kill -SIGUSR1 "$TUI_PID"
206
+
207
+ # 3. Find the WS URL
208
+ curl -s http://127.0.0.1:9229/json/list | jq -r '.[0].webSocketDebuggerUrl'
209
+
210
+ # 4. Attach
211
+ node inspect ws://127.0.0.1:9229/<uuid>
212
+ ```
213
+
214
+ Interacting with the TUI (typing in its window) continues to advance execution; your debugger can pause it on a breakpoint at any `sb(...)`.
215
+
216
+ ### Debugging `_SlashWorker` / PTY child processes
217
+
218
+ Those are Python, not Node — use the `python-debugpy` skill for them. Only Node portions (Ink UI, tui_gateway client, tsx-run tests under `ui-tui/`) use this skill.
219
+
220
+ ## Running Vitest Tests Under the Debugger
221
+
222
+ ```bash
223
+ cd /home/bb/
224
+ # Run a single test file paused on entry
225
+ node --inspect-brk ./node_modules/vitest/vitest.mjs run --no-file-parallelism src/app/foo.test.tsx
226
+ ```
227
+
228
+ In another terminal: `node inspect -p <pid>`, then `sb('src/app/foo.tsx', 42)`, `cont`.
229
+
230
+ Use `--no-file-parallelism` (vitest) or `--runInBand` (jest) so only one worker exists — debugging a pool is painful.
231
+
232
+ ## Heap Snapshots & CPU Profiles (Non-interactive)
233
+
234
+ From the CDP driver above, swap Debugger for `HeapProfiler` / `Profiler`:
235
+
236
+ ```javascript
237
+ // CPU profile for 5 seconds
238
+ await client.Profiler.enable();
239
+ await client.Profiler.start();
240
+ await new Promise(r => setTimeout(r, 5000));
241
+ const { profile } = await client.Profiler.stop();
242
+ require('fs').writeFileSync('/tmp/cpu.cpuprofile', JSON.stringify(profile));
243
+ // Open /tmp/cpu.cpuprofile in Chrome DevTools → Performance tab
244
+ ```
245
+
246
+ ```javascript
247
+ // Heap snapshot
248
+ await client.HeapProfiler.enable();
249
+ const chunks = [];
250
+ client.HeapProfiler.addHeapSnapshotChunk(({ chunk }) => chunks.push(chunk));
251
+ await client.HeapProfiler.takeHeapSnapshot({ reportProgress: false });
252
+ require('fs').writeFileSync('/tmp/heap.heapsnapshot', chunks.join(''));
253
+ ```
254
+
255
+ ## Common Pitfalls
256
+
257
+ 1. **Wrong line numbers in TS source.** Breakpoints hit the emitted JS, not the `.ts`. Either (a) break in the built `dist/*.js`, or (b) enable sourcemaps (`node --enable-source-maps`) and use `sb('src/app.tsx', N)` — but only with CDP clients that follow sourcemaps. `node inspect` CLI does not.
258
+
259
+ 2. **`--inspect` vs `--inspect-brk`.** `--inspect` starts the inspector but doesn't pause; your script races past your first breakpoint if you attach too late. Use `--inspect-brk` when you need to set breakpoints before any code runs.
260
+
261
+ 3. **Port collisions.** Default is `9229`. If multiple Node processes are inspecting, pass `--inspect=0` (random port) and read the actual URL from `/json/list`:
262
+ ```bash
263
+ curl -s http://127.0.0.1:9229/json/list # lists all inspectable targets on the host
264
+ ```
265
+
266
+ 4. **Child processes.** `--inspect` on a parent does NOT inspect its children. Use `NODE_OPTIONS='--inspect-brk' node parent.js` to propagate to every child; be aware they all need unique ports (Node auto-increments when `NODE_OPTIONS='--inspect'` is inherited).
267
+
268
+ 5. **Background kills.** If you `Ctrl+C` out of `node inspect` while the target is paused, the target stays paused. Either `cont` first, or `kill` the target explicitly.
269
+
270
+ 6. **Running `node inspect` through an agent terminal.** It's a PTY-friendly REPL. In the agent, launch it with `terminal(pty=true)` or `background=true` + `process(action='submit', data='...')`. Non-PTY foreground mode will work for one-shot commands but not for interactive stepping.
271
+
272
+ 7. **Security.** `--inspect=0.0.0.0:9229` exposes arbitrary code execution. Always bind to `127.0.0.1` (the default) unless you have an isolated network.
273
+
274
+ ## Verification Checklist
275
+
276
+ After setting up a debug session, verify:
277
+
278
+ - [ ] `curl -s http://127.0.0.1:9229/json/list` returns exactly the target you expect
279
+ - [ ] First breakpoint actually hits (if it doesn't, you likely missed `--inspect-brk` or attached after execution completed)
280
+ - [ ] Source listing at pause shows the right file (mismatch = sourcemap issue, see pitfall 1)
281
+ - [ ] `exec process.pid` in `repl` returns the PID you meant to attach to
282
+
283
+ ## One-Shot Recipes
284
+
285
+ **"Why is this variable undefined at line X?"**
286
+ ```bash
287
+ node --inspect-brk script.js &
288
+ node inspect -p $!
289
+ # debug>
290
+ sb('script.js', X)
291
+ cont
292
+ # paused. Now:
293
+ repl
294
+ > myVariable
295
+ > Object.keys(this)
296
+ ```
297
+
298
+ **"What's the call path into this function?"**
299
+ ```
300
+ debug> sb('suspectFn')
301
+ debug> cont
302
+ # paused on entry
303
+ debug> bt
304
+ ```
305
+
306
+ **"This async chain hangs — where?"**
307
+ ```
308
+ # Start with --inspect (no -brk), let it run to the hang, then:
309
+ debug> pause
310
+ debug> bt
311
+ # Now you see the stuck frame
312
+ ```
@@ -0,0 +1,60 @@
1
+ ---
2
+ name: obsidian
3
+ description: Read, search, create, and edit notes in the Obsidian vault.
4
+ ---
5
+
6
+ # Obsidian Vault
7
+
8
+ Use this skill for filesystem-first Obsidian vault work: reading notes, listing notes, searching note files, creating notes, appending content, and adding wikilinks.
9
+
10
+ ## Vault path
11
+
12
+ Use a known or resolved vault path before calling file tools.
13
+
14
+ The documented vault-path convention is the `OBSIDIAN_VAULT_PATH` environment variable, for example from `${HERMES_HOME:-~/.hermes}/.env`. If it is unset, use `~/Documents/Obsidian Vault`.
15
+
16
+ File tools do not expand shell variables. Do not pass paths containing `$OBSIDIAN_VAULT_PATH` to `read_file`, `write_file`, `patch`, or `search_files`; resolve the vault path first and pass a concrete absolute path. Vault paths may contain spaces, which is another reason to prefer file tools over shell commands.
17
+
18
+ If the vault path is unknown, `terminal` is acceptable for resolving `OBSIDIAN_VAULT_PATH` or checking whether the fallback path exists. Once the path is known, switch back to file tools.
19
+
20
+ ## Read a note
21
+
22
+ Use `read_file` with the resolved absolute path to the note. Prefer this over `cat` because it provides line numbers and pagination.
23
+
24
+ ## List notes
25
+
26
+ Use `search_files` with `target: "files"` and the resolved vault path. Prefer this over `find` or `ls`.
27
+
28
+ - To list all markdown notes, use `pattern: "*.md"` under the vault path.
29
+ - To list a subfolder, search under that subfolder's absolute path.
30
+
31
+ ## Search
32
+
33
+ Use `search_files` for both filename and content searches. Prefer this over `grep`, `find`, or `ls`.
34
+
35
+ - For filenames, use `search_files` with `target: "files"` and a filename `pattern`.
36
+ - For note contents, use `search_files` with `target: "content"`, the content regex as `pattern`, and `file_glob: "*.md"` when you want to restrict matches to markdown notes.
37
+
38
+ ## Create a note
39
+
40
+ Use `write_file` with the resolved absolute path and the full markdown content. Prefer this over shell heredocs or `echo` because it avoids shell quoting issues and returns structured results.
41
+
42
+ ## Append to a note
43
+
44
+ Prefer a native file-tool workflow when it is not awkward:
45
+
46
+ - Read the target note with `read_file`.
47
+ - Use `patch` for an anchored append when there is stable context, such as adding a section after an existing heading or appending before a known trailing block.
48
+ - Use `write_file` when rewriting the whole note is clearer than constructing a fragile patch.
49
+
50
+ For an anchored append with `patch`, replace the anchor with the anchor plus the new content.
51
+
52
+ For a simple append with no stable context, `terminal` is acceptable if it is the clearest safe option.
53
+
54
+ ## Targeted edits
55
+
56
+ Use `patch` for focused note changes when the current content gives you stable context. Prefer this over shell text rewriting.
57
+
58
+ ## Wikilinks
59
+
60
+ Obsidian links notes with `[[Note Name]]` syntax. When creating notes, use these to link related content.