pi-skill-search 0.1.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 (299) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/LICENSE +21 -0
  3. package/README.md +97 -0
  4. package/index.ts +163 -0
  5. package/package.json +48 -0
  6. package/skills/adaptyv/SKILL.md +92 -0
  7. package/skills/add-community-extension/SKILL.md +85 -0
  8. package/skills/aeon/SKILL.md +111 -0
  9. package/skills/ai-slop-cleaner/SKILL.md +118 -0
  10. package/skills/anndata/SKILL.md +83 -0
  11. package/skills/arboreto/SKILL.md +107 -0
  12. package/skills/ask/SKILL.md +55 -0
  13. package/skills/astropy/SKILL.md +30 -0
  14. package/skills/async-worker-recovery/SKILL.md +44 -0
  15. package/skills/autopilot/SKILL.md +63 -0
  16. package/skills/autoresearch/SKILL.md +64 -0
  17. package/skills/autoskill/SKILL.md +116 -0
  18. package/skills/babysit/SKILL.md +43 -0
  19. package/skills/benchling-integration/SKILL.md +106 -0
  20. package/skills/bgpt-paper-search/SKILL.md +67 -0
  21. package/skills/biopython/SKILL.md +29 -0
  22. package/skills/bioservices/SKILL.md +96 -0
  23. package/skills/brainstorming/SKILL.md +104 -0
  24. package/skills/cancel/SKILL.md +85 -0
  25. package/skills/ccg/SKILL.md +87 -0
  26. package/skills/celery-pipeline/SKILL.md +30 -0
  27. package/skills/cellxgene-census/SKILL.md +104 -0
  28. package/skills/child-pi-spawning/SKILL.md +85 -0
  29. package/skills/cirq/SKILL.md +113 -0
  30. package/skills/citation-management/SKILL.md +91 -0
  31. package/skills/clinical-decision-support/SKILL.md +117 -0
  32. package/skills/clinical-reports/SKILL.md +118 -0
  33. package/skills/clinical-trial/SKILL.md +28 -0
  34. package/skills/cobrapy/SKILL.md +116 -0
  35. package/skills/configure-notifications/SKILL.md +85 -0
  36. package/skills/consciousness-council/SKILL.md +120 -0
  37. package/skills/context-artifact-hygiene/SKILL.md +85 -0
  38. package/skills/context-mode-ops/SKILL.md +87 -0
  39. package/skills/dask/SKILL.md +85 -0
  40. package/skills/database-lookup/SKILL.md +118 -0
  41. package/skills/datamol/SKILL.md +108 -0
  42. package/skills/debug/SKILL.md +32 -0
  43. package/skills/deep-dive/SKILL.md +114 -0
  44. package/skills/deep-interview/SKILL.md +90 -0
  45. package/skills/deepchem/SKILL.md +117 -0
  46. package/skills/deepinit/SKILL.md +100 -0
  47. package/skills/deeptools/SKILL.md +118 -0
  48. package/skills/delegation-patterns/SKILL.md +56 -0
  49. package/skills/depmap/SKILL.md +94 -0
  50. package/skills/dhdna-profiler/SKILL.md +86 -0
  51. package/skills/diffdock/SKILL.md +101 -0
  52. package/skills/dispatching-parallel-agents/SKILL.md +119 -0
  53. package/skills/dnanexus-integration/SKILL.md +118 -0
  54. package/skills/do/SKILL.md +48 -0
  55. package/skills/docker-sandbox/SKILL.md +29 -0
  56. package/skills/docx/SKILL.md +119 -0
  57. package/skills/esm/SKILL.md +116 -0
  58. package/skills/etetoolkit/SKILL.md +103 -0
  59. package/skills/event-log-tracing/SKILL.md +85 -0
  60. package/skills/exa-search/SKILL.md +72 -0
  61. package/skills/executing-plans/SKILL.md +69 -0
  62. package/skills/exploratory-data-analysis/SKILL.md +118 -0
  63. package/skills/external-context/SKILL.md +80 -0
  64. package/skills/fastapi/SKILL.md +30 -0
  65. package/skills/finishing-a-development-branch/SKILL.md +106 -0
  66. package/skills/flowio/SKILL.md +114 -0
  67. package/skills/fluidsim/SKILL.md +108 -0
  68. package/skills/generate-image/SKILL.md +108 -0
  69. package/skills/geniml/SKILL.md +117 -0
  70. package/skills/geomaster/SKILL.md +109 -0
  71. package/skills/geopandas/SKILL.md +114 -0
  72. package/skills/get-available-resources/SKILL.md +100 -0
  73. package/skills/gget/SKILL.md +111 -0
  74. package/skills/ginkgo-cloud-lab/SKILL.md +52 -0
  75. package/skills/git-master/SKILL.md +85 -0
  76. package/skills/glycoengineering/SKILL.md +104 -0
  77. package/skills/gtars/SKILL.md +104 -0
  78. package/skills/hackernews-frontpage/SKILL.md +46 -0
  79. package/skills/histolab/SKILL.md +98 -0
  80. package/skills/how-it-works/SKILL.md +25 -0
  81. package/skills/hud/SKILL.md +86 -0
  82. package/skills/hugging-science/SKILL.md +93 -0
  83. package/skills/huggingface/SKILL.md +30 -0
  84. package/skills/hypogenic/SKILL.md +107 -0
  85. package/skills/hypothesis-generation/SKILL.md +118 -0
  86. package/skills/imaging-data-commons/SKILL.md +119 -0
  87. package/skills/infographics/SKILL.md +102 -0
  88. package/skills/iso-13485-certification/SKILL.md +114 -0
  89. package/skills/knowledge-agent/SKILL.md +83 -0
  90. package/skills/labarchive-integration/SKILL.md +98 -0
  91. package/skills/lamindb/SKILL.md +119 -0
  92. package/skills/landsat/SKILL.md +29 -0
  93. package/skills/latchbio-integration/SKILL.md +118 -0
  94. package/skills/latex-posters/SKILL.md +112 -0
  95. package/skills/learn-codebase/SKILL.md +24 -0
  96. package/skills/learner/SKILL.md +118 -0
  97. package/skills/literature-review/SKILL.md +118 -0
  98. package/skills/live-agent-lifecycle/SKILL.md +85 -0
  99. package/skills/mailbox-interactive/SKILL.md +85 -0
  100. package/skills/make-plan/SKILL.md +59 -0
  101. package/skills/markdown-mermaid-writing/SKILL.md +118 -0
  102. package/skills/market-research-reports/SKILL.md +119 -0
  103. package/skills/markitdown/SKILL.md +111 -0
  104. package/skills/markitdown-docs/SKILL.md +28 -0
  105. package/skills/matchms/SKILL.md +91 -0
  106. package/skills/matlab/SKILL.md +118 -0
  107. package/skills/matplotlib/SKILL.md +30 -0
  108. package/skills/mcp-setup/SKILL.md +84 -0
  109. package/skills/medchem/SKILL.md +109 -0
  110. package/skills/mem-search/SKILL.md +96 -0
  111. package/skills/modal/SKILL.md +104 -0
  112. package/skills/model-routing-context/SKILL.md +85 -0
  113. package/skills/molecular-dynamics/SKILL.md +116 -0
  114. package/skills/molfeat/SKILL.md +110 -0
  115. package/skills/multi-perspective-review/SKILL.md +85 -0
  116. package/skills/networkx/SKILL.md +111 -0
  117. package/skills/neurokit2/SKILL.md +114 -0
  118. package/skills/neuropixels-analysis/SKILL.md +112 -0
  119. package/skills/nilearn/SKILL.md +29 -0
  120. package/skills/observability-reliability/SKILL.md +43 -0
  121. package/skills/omc-doctor/SKILL.md +86 -0
  122. package/skills/omc-reference/SKILL.md +119 -0
  123. package/skills/omc-setup/SKILL.md +82 -0
  124. package/skills/omc-teams/SKILL.md +81 -0
  125. package/skills/omero-integration/SKILL.md +111 -0
  126. package/skills/open-notebook/SKILL.md +100 -0
  127. package/skills/openephys/SKILL.md +28 -0
  128. package/skills/opentrons-integration/SKILL.md +110 -0
  129. package/skills/optimize-for-gpu/SKILL.md +119 -0
  130. package/skills/orchestration/SKILL.md +85 -0
  131. package/skills/ownership-session-security/SKILL.md +43 -0
  132. package/skills/paper-lookup/SKILL.md +119 -0
  133. package/skills/paperzilla/SKILL.md +114 -0
  134. package/skills/parallel-web/SKILL.md +64 -0
  135. package/skills/pathfinder/SKILL.md +114 -0
  136. package/skills/pathml/SKILL.md +98 -0
  137. package/skills/pdf/SKILL.md +113 -0
  138. package/skills/peer-review/SKILL.md +119 -0
  139. package/skills/pennylane/SKILL.md +119 -0
  140. package/skills/phylogenetics/SKILL.md +102 -0
  141. package/skills/pi-extension-lifecycle/SKILL.md +41 -0
  142. package/skills/plan/SKILL.md +66 -0
  143. package/skills/polars/SKILL.md +114 -0
  144. package/skills/polars-bio/SKILL.md +84 -0
  145. package/skills/pptx/SKILL.md +118 -0
  146. package/skills/pptx-posters/SKILL.md +112 -0
  147. package/skills/primekg/SKILL.md +97 -0
  148. package/skills/project-session-manager/SKILL.md +85 -0
  149. package/skills/protocolsio-integration/SKILL.md +119 -0
  150. package/skills/pubmed-search/SKILL.md +29 -0
  151. package/skills/pufferlib/SKILL.md +103 -0
  152. package/skills/pydeseq2/SKILL.md +106 -0
  153. package/skills/pydicom/SKILL.md +115 -0
  154. package/skills/pyhealth/SKILL.md +117 -0
  155. package/skills/pylabrobot/SKILL.md +100 -0
  156. package/skills/pymatgen/SKILL.md +28 -0
  157. package/skills/pymc/SKILL.md +108 -0
  158. package/skills/pymoo/SKILL.md +90 -0
  159. package/skills/pyopenms/SKILL.md +119 -0
  160. package/skills/pysam/SKILL.md +118 -0
  161. package/skills/pyspark/SKILL.md +30 -0
  162. package/skills/pytdc/SKILL.md +102 -0
  163. package/skills/pytorch/SKILL.md +31 -0
  164. package/skills/pytorch-lightning/SKILL.md +119 -0
  165. package/skills/pyzotero/SKILL.md +104 -0
  166. package/skills/qiskit/SKILL.md +119 -0
  167. package/skills/qutip/SKILL.md +111 -0
  168. package/skills/ralph/SKILL.md +23 -0
  169. package/skills/ralplan/SKILL.md +105 -0
  170. package/skills/rdflib/SKILL.md +29 -0
  171. package/skills/rdkit/SKILL.md +30 -0
  172. package/skills/read-only-explorer/SKILL.md +85 -0
  173. package/skills/receiving-code-review/SKILL.md +103 -0
  174. package/skills/release/SKILL.md +117 -0
  175. package/skills/remember/SKILL.md +39 -0
  176. package/skills/requesting-code-review/SKILL.md +85 -0
  177. package/skills/requirements-to-task-packet/SKILL.md +65 -0
  178. package/skills/research-grants/SKILL.md +118 -0
  179. package/skills/research-lookup/SKILL.md +117 -0
  180. package/skills/research-reproducibility/SKILL.md +28 -0
  181. package/skills/resource-discovery-config/SKILL.md +43 -0
  182. package/skills/rowan/SKILL.md +100 -0
  183. package/skills/runtime-state-reader/SKILL.md +46 -0
  184. package/skills/safe-bash/SKILL.md +85 -0
  185. package/skills/scanpy/SKILL.md +32 -0
  186. package/skills/scholar-evaluation/SKILL.md +115 -0
  187. package/skills/scientific-brainstorming/SKILL.md +118 -0
  188. package/skills/scientific-critical-thinking/SKILL.md +119 -0
  189. package/skills/scientific-schematics/SKILL.md +116 -0
  190. package/skills/scientific-slides/SKILL.md +117 -0
  191. package/skills/scientific-visualization/SKILL.md +109 -0
  192. package/skills/scientific-writing/SKILL.md +119 -0
  193. package/skills/scikit-bio/SKILL.md +92 -0
  194. package/skills/scikit-learn/SKILL.md +99 -0
  195. package/skills/scikit-survival/SKILL.md +110 -0
  196. package/skills/sciomc/SKILL.md +86 -0
  197. package/skills/scvelo/SKILL.md +106 -0
  198. package/skills/scvi-tools/SKILL.md +114 -0
  199. package/skills/seaborn/SKILL.md +97 -0
  200. package/skills/secure-agent-orchestration-review/SKILL.md +47 -0
  201. package/skills/self-improve/SKILL.md +119 -0
  202. package/skills/semantic-compression/SKILL.md +62 -0
  203. package/skills/setup/SKILL.md +42 -0
  204. package/skills/shap/SKILL.md +103 -0
  205. package/skills/simpy/SKILL.md +116 -0
  206. package/skills/skill/SKILL.md +117 -0
  207. package/skills/skill-search/SKILL.md +67 -0
  208. package/skills/skillify/SKILL.md +46 -0
  209. package/skills/smart-explore/SKILL.md +94 -0
  210. package/skills/sqlite-pandas/SKILL.md +30 -0
  211. package/skills/stable-baselines3/SKILL.md +86 -0
  212. package/skills/state-mutation-locking/SKILL.md +44 -0
  213. package/skills/statistical-analysis/SKILL.md +108 -0
  214. package/skills/statsmodels/SKILL.md +29 -0
  215. package/skills/subagent-driven-development/SKILL.md +89 -0
  216. package/skills/sympy/SKILL.md +115 -0
  217. package/skills/system-prompts/SKILL.md +116 -0
  218. package/skills/systematic-debugging/SKILL.md +119 -0
  219. package/skills/team/SKILL.md +85 -0
  220. package/skills/test-driven-development/SKILL.md +84 -0
  221. package/skills/tiledbvcf/SKILL.md +119 -0
  222. package/skills/timeline-report/SKILL.md +85 -0
  223. package/skills/timesfm-forecasting/SKILL.md +112 -0
  224. package/skills/torch-geometric/SKILL.md +118 -0
  225. package/skills/torchdrug/SKILL.md +118 -0
  226. package/skills/trace/SKILL.md +118 -0
  227. package/skills/transformers/SKILL.md +110 -0
  228. package/skills/treatment-plans/SKILL.md +119 -0
  229. package/skills/ui-render-performance/SKILL.md +41 -0
  230. package/skills/ultragoal/SKILL.md +63 -0
  231. package/skills/ultraqa/SKILL.md +85 -0
  232. package/skills/ultrawork/SKILL.md +20 -0
  233. package/skills/umap-learn/SKILL.md +119 -0
  234. package/skills/usfiscaldata/SKILL.md +118 -0
  235. package/skills/using-git-worktrees/SKILL.md +112 -0
  236. package/skills/using-superpowers/SKILL.md +85 -0
  237. package/skills/using-vetc/SKILL.md +92 -0
  238. package/skills/vaex/SKILL.md +111 -0
  239. package/skills/venue-templates/SKILL.md +113 -0
  240. package/skills/verification-before-completion/SKILL.md +88 -0
  241. package/skills/verification-before-done/SKILL.md +68 -0
  242. package/skills/verify/SKILL.md +33 -0
  243. package/skills/version-bump/SKILL.md +54 -0
  244. package/skills/vetc-analyze-ba/SKILL.md +117 -0
  245. package/skills/vetc-analyze-codebase/SKILL.md +118 -0
  246. package/skills/vetc-api-design/SKILL.md +103 -0
  247. package/skills/vetc-brainstorming/SKILL.md +116 -0
  248. package/skills/vetc-change-proposal/SKILL.md +111 -0
  249. package/skills/vetc-cicd/SKILL.md +113 -0
  250. package/skills/vetc-continuous-learning/SKILL.md +115 -0
  251. package/skills/vetc-deep-interview/SKILL.md +103 -0
  252. package/skills/vetc-docgen/SKILL.md +108 -0
  253. package/skills/vetc-frontend-patterns/SKILL.md +99 -0
  254. package/skills/vetc-iterative-retrieval/SKILL.md +110 -0
  255. package/skills/vetc-java-patterns/SKILL.md +113 -0
  256. package/skills/vetc-meta-skill-creator/SKILL.md +99 -0
  257. package/skills/vetc-oracle-patterns/SKILL.md +109 -0
  258. package/skills/vetc-performance-testing/SKILL.md +104 -0
  259. package/skills/vetc-pr-response/SKILL.md +106 -0
  260. package/skills/vetc-ralph/SKILL.md +108 -0
  261. package/skills/vetc-ralplan/SKILL.md +116 -0
  262. package/skills/vetc-receiving-review/SKILL.md +106 -0
  263. package/skills/vetc-reconcile-patterns/SKILL.md +117 -0
  264. package/skills/vetc-refactoring/SKILL.md +96 -0
  265. package/skills/vetc-runbook/SKILL.md +118 -0
  266. package/skills/vetc-sast/SKILL.md +118 -0
  267. package/skills/vetc-sdlc/SKILL.md +97 -0
  268. package/skills/vetc-security/SKILL.md +117 -0
  269. package/skills/vetc-spec-driven/SKILL.md +111 -0
  270. package/skills/vetc-spec-quality/SKILL.md +117 -0
  271. package/skills/vetc-systematic-debugging/SKILL.md +74 -0
  272. package/skills/vetc-tdd/SKILL.md +96 -0
  273. package/skills/vetc-thinking-pm/SKILL.md +110 -0
  274. package/skills/vetc-ui-visual-qa/SKILL.md +117 -0
  275. package/skills/vetc-verify/SKILL.md +101 -0
  276. package/skills/visual-verdict/SKILL.md +59 -0
  277. package/skills/what-if-oracle/SKILL.md +87 -0
  278. package/skills/widget-rendering/SKILL.md +85 -0
  279. package/skills/wiki/SKILL.md +69 -0
  280. package/skills/workspace-isolation/SKILL.md +85 -0
  281. package/skills/worktree-isolation/SKILL.md +85 -0
  282. package/skills/wowerpoint/SKILL.md +101 -0
  283. package/skills/writer-memory/SKILL.md +82 -0
  284. package/skills/writing-plans/SKILL.md +115 -0
  285. package/skills/writing-skills/SKILL.md +115 -0
  286. package/skills/xgboost/SKILL.md +29 -0
  287. package/skills/xgboost-ts/SKILL.md +28 -0
  288. package/skills/xlsx/SKILL.md +111 -0
  289. package/skills/zarr-python/SKILL.md +101 -0
  290. package/src/categories.ts +383 -0
  291. package/src/format.ts +104 -0
  292. package/src/indexer.ts +101 -0
  293. package/src/proactive.ts +51 -0
  294. package/src/scanner.ts +85 -0
  295. package/src/search.ts +89 -0
  296. package/src/strip.ts +29 -0
  297. package/src/synonyms.ts +83 -0
  298. package/src/text.ts +118 -0
  299. package/src/types.ts +64 -0
@@ -0,0 +1,116 @@
1
+ ---
2
+ name: autoskill
3
+ description: Observe the user's screen via screenpipe, detect repeated research workflows, match them against existing scientific-agent-skills, and draft new skills (or composition recipes that chain existing ones) for the patterns not yet covered. Use when the user asks to analyze their recent work and propose skills based on what they actually do. Requires the screenpipe daemon (https://github.com/screenpipe/screenpipe) running locally on port 3030 — the skill has no other data source and will refuse to run if screenpipe is unreachable. All detection runs locally; only redacted cluster summaries reach the LLM.
4
+ ---
5
+
6
+ # autoskill
7
+
8
+ > **Requires a running [screenpipe](https://github.com/screenpipe/screenpipe) daemon.** This skill has no alternate data source — it reads exclusively from the local screenpipe HTTP API (default `http://localhost:3030`). If the daemon isn't running, `run()` raises `ScreenpipeUnreachable` with install instructions.
9
+
10
+ > **Network access & environment variables.** This skill makes authenticated HTTP requests to (a) the user's local screenpipe daemon on loopback, and (b) the user-configured LLM backend — one of `http://localhost:1234/v1` (LM Studio, default), `https://api.anthropic.com` (opt-in Claude), or a user-supplied BYOK Foundry gateway. The skill reads three environment variables — `SCREENPIPE_TOKEN`, `ANTHROPIC_API_KEY`, `FOUNDRY_API_KEY` — and uses each only to authenticate to the single endpoint its name implies. No other network destinations, no telemetry, no data egress to any third party.
11
+
12
+ ## Overview
13
+
14
+ Turn the user's own workflow history — captured passively by the local [screenpipe](https://github.com/screenpipe/screenpipe) daemon — into new skills. This skill is on-demand: the user invokes it with a time window, it queries screenpipe's local HTTP API, clusters repeated workflow patterns, compares each pattern against the existing skills in this repo, and produces a staged folder of proposals the user can review, edit, and promote.
15
+
16
+ ## When to Use This Skill
17
+
18
+ Invoke this skill when the user asks to:
19
+ - "Analyze my last 4 hours / day / week and propose new skills."
20
+ - "Look at what I've been doing and tell me what's not covered yet."
21
+ - "Draft a skill from my recent workflow."
22
+ - "Find composition recipes for workflows I repeat."
23
+
24
+ Do **not** invoke it for one-off questions about screenpipe itself, for real-time screen queries, or without an explicit user request — the skill analyzes sensitive local content and must stay explicitly user-triggered.
25
+
26
+ ## Privacy Posture
27
+
28
+ - **Screenpipe handles app/window filtering at capture time.** Install a starter deny-list by copying `(see docs)` into the user's screenpipe config. Sensitive apps (password managers, messaging, banking) are never OCR'd in the first place.
29
+ - **Raw OCR never leaves the machine.** `scripts/fetch_window.py` pulls data over localhost HTTP. `scripts/cluster.py` reduces the timeline to app/duration/title summaries. `scripts/redact.py` strips emails, API keys, bearer tokens, and phone numbers as defense-in-depth before any cluster summary reaches the LLM.
30
+ - **LLM backend defaults to `local`.** The recommended setup is [LM Studio](https://lmstudio.ai/) running `Gemma-4-31B-it` — strong reasoning at a size that fits on most workstation GPUs, and no data ever leaves your machine. Cloud backends (`claude`, `foundry`) are opt-in and documented in `config.yaml` for users who explicitly want them. Detection and embeddings always run locally regardless of backend choice.
31
+ - **Dry-run mode** (`--plan`) prints the exact timeline that will be analyzed before any LLM call.
32
+ - **TLS for localhost** (optional, for corporate policy): see `(see docs)` for the Caddy pattern.
33
+
34
+ ## Prerequisites
35
+
36
+ ### 1. Screenpipe daemon
37
+
38
+ Either install the official release or build from source. Either way the daemon binds HTTP on `localhost:3030` by default.
39
+
40
+ **From source** (recommended if you want the CLI daemon without the desktop GUI):
41
+
42
+ ```bash
43
+ git clone --depth 1 https://github.com/mediar-ai/screenpipe.git
44
+ cd screenpipe
45
+ cargo build -p screenpipe-engine --release
46
+ # System deps (macOS): cmake + full Xcode.app (not just Command Line Tools).
47
+ # # if xcodebuild plug-ins error: sudo xcodebuild -runFirstLaunch
48
+ ./target/release/screenpipe doctor # confirm permissions + ffmpeg
49
+ ./target/release/screenpipe record --disable-audio --use-pii-removal
50
+ ```
51
+
52
+ First run will prompt for macOS Screen Recording permission. Grant it and relaunch.
53
+
54
+ ### 2. Screenpipe API token
55
+
56
+ The local API now requires bearer auth. Retrieve your token and export it:
57
+
58
+ ```bash
59
+ export SCREENPIPE_TOKEN=$(screenpipe auth token)
60
+ ```
61
+
62
+ (Or set `screenpipe.token` directly in `config.yaml` — env var is preferred since it keeps secrets out of version control.)
63
+
64
+ ### 3. Python environment
65
+
66
+ Via `pipenv` from the repo root:
67
+
68
+ ```bash
69
+ pipenv install httpx pyyaml sentence-transformers
70
+ ```
71
+
72
+ The embedding model (`sentence-transformers/all-MiniLM-L6-v2`, ~80 MB) downloads on first run.
73
+
74
+ ### 4. Local LLM (default path) — LM Studio
75
+
76
+ - Install [LM Studio](https://lmstudio.ai/).
77
+ - Download `Gemma-4-31B-it` (or another strong reasoning model; adjust `local.model` in `config.yaml`).
78
+ - Load it via the CLI for headless use (no GUI required):
79
+
80
+ ```bash
81
+ lms load gemma-4-31b-it --context-length 131072 --gpu max -y
82
+ lms status # confirm server running on :1234
83
+ ```
84
+
85
+ ### 5. Cloud LLM backends (optional, opt-in)
86
+
87
+ Only if you explicitly opt out of local:
88
+ - `claude`: set `ANTHROPIC_API_KEY`, flip `backend: claude` in `config.yaml`.
89
+ - `foundry`: set `FOUNDRY_API_KEY`, flip `backend: foundry`, set `foundry.endpoint` to your corporate gateway URL.
90
+
91
+ ## Architecture
92
+
93
+ ```
94
+ screenpipe daemon (user-installed)
95
+ │ HTTP on localhost:3030
96
+
97
+ scripts/fetch_window.py → normalized timeline events
98
+ scripts/redact.py → regex scrub (defense-in-depth)
99
+ scripts/cluster.py → sessions + clusters (local only)
100
+ scripts/match_skills.py → top-k vs existing 135 skills (local embeddings)
101
+ scripts/synthesize.py → LLM judge: reuse / compose / novel
102
+
103
+
104
+ ~/.autoskill/proposed/<timestamp>/ (default; override with --out)
105
+ ├── report.md
106
+
107
+ ## Workflow
108
+
109
+ The skill ships a unified CLI at `scripts/autoskill.py` with three subcommands:
110
+
111
+ ```bash
112
+ python scripts/autoskill.py doctor --config config.yaml --skills-dir ../
113
+ python scripts/autoskill.py run --start ... --end ... --config config.yaml
114
+ python scripts/autoskill.py promote --proposed ~/.autoskill/proposed/<ts> --skills-dir ../ --name <skill>
115
+
116
+
@@ -0,0 +1,43 @@
1
+ ---
2
+ name: babysit
3
+ description: Watch a pull request or review cycle until it is ready to merge. Use when asked to babysit, monitor, or keep checking PR comments, reviews, and CI until all actionable issues are resolved.
4
+ ---
5
+
6
+ # Babysit PR
7
+
8
+ Stay with the PR until it is actually clean. Do not stop after one check pass if comments or review threads are still unresolved.
9
+
10
+ ## Workflow
11
+
12
+ 1. Identify the PR number, branch, and base branch.
13
+ 2. Confirm the PR is not draft and inspect mergeability, checks, review decision, comments, and review threads.
14
+ 3. Watch pending checks until they finish. Poll at a practical interval, usually 30-60 seconds unless the user asks for a different cadence.
15
+ 4. Read new comments and unresolved review threads. Treat bot summaries as useful, but verify actionable findings against the code.
16
+ 5. Fix real issues in focused commits, run relevant tests/builds, push, and return to step 2.
17
+ 6. Resolve stale review threads only after verifying the code or generated artifact now addresses the comment.
18
+ 7. Stop only when checks are passing or intentionally skipped, review decision is acceptable, no actionable comments remain, and no unresolved review threads remain.
19
+
20
+ ## GitHub CLI Checks
21
+
22
+ Use `gh pr view` for the coarse status:
23
+
24
+ ```bash
25
+ gh pr view <number> --json \
26
+ number,state,isDraft,mergeable,mergeStateStatus,reviewDecision,headRefOid,statusCheckRollup,url
27
+ ```
28
+
29
+ Resolve the repository owner/name before using GraphQL:
30
+
31
+ ```bash
32
+ repo_json=$(gh repo view --json owner,name)
33
+ owner=$(jq -r '.owner.login // .owner.name' <<<"$repo_json")
34
+ repo=$(jq -r '.name' <<<"$repo_json")
35
+
36
+ ## Operating Rules
37
+
38
+ - Keep the watcher running while long checks are pending.
39
+ - If a generated file is part of the distribution, verify the source and generated artifact agree before resolving comments.
40
+ - If a bot reports an issue against stale code, confirm whether the thread is outdated or addressed in the latest head.
41
+ - Before final reporting, do one fresh sweep of PR status, unresolved threads, recent comments, and local `git status`.
42
+ - Report concrete evidence: latest commit SHA, check names and results, unresolved thread count, tests run, and any dirty local files left untouched.
43
+ ```
@@ -0,0 +1,106 @@
1
+ ---
2
+ name: benchling-integration
3
+ description: Benchling R&D platform integration. Access registry (DNA, proteins), inventory, ELN entries, workflows via API, build Benchling Apps, query Data Warehouse, for lab data management automation.
4
+ ---
5
+
6
+ # Benchling Integration
7
+
8
+ ## Overview
9
+
10
+ Benchling is a cloud platform for life sciences R&D. Access registry entities (DNA, proteins), inventory, electronic lab notebooks, and workflows programmatically via Python SDK and REST API.
11
+
12
+ ## When to Use This Skill
13
+
14
+ This skill should be used when:
15
+ - Working with Benchling's Python SDK or REST API
16
+ - Managing biological sequences (DNA, RNA, proteins) and registry entities
17
+ - Automating inventory operations (samples, containers, locations, transfers)
18
+ - Creating or querying electronic lab notebook entries
19
+ - Building workflow automations or Benchling Apps
20
+ - Syncing data between Benchling and external systems
21
+ - Querying the Benchling Data Warehouse for analytics
22
+ - Setting up event-driven integrations with AWS EventBridge
23
+
24
+ ## Core Capabilities
25
+
26
+ ### 1. Authentication & Setup
27
+
28
+ **Python SDK Installation:**
29
+ ```python
30
+ # Stable release
31
+ uv pip install benchling-sdk
32
+ # or with Poetry
33
+ poetry add benchling-sdk
34
+ ```
35
+
36
+ **Authentication Methods:**
37
+
38
+ API Key Authentication (recommended for scripts):
39
+ ```python
40
+ from benchling_sdk.benchling import Benchling
41
+ from benchling_sdk.auth.api_key_auth import ApiKeyAuth
42
+
43
+ benchling = Benchling(
44
+ url="https://your-tenant.benchling.com",
45
+ auth_method=ApiKeyAuth("your_api_key")
46
+ )
47
+
48
+ ### 2. Registry & Entity Management
49
+
50
+ Registry entities include DNA sequences, RNA sequences, AA sequences, custom entities, and mixtures. The SDK provides typed classes for creating and managing these entities.
51
+
52
+ **Creating DNA Sequences:**
53
+ ```python
54
+ from benchling_sdk.models import DnaSequenceCreate
55
+
56
+ sequence = benchling.dna_sequences.create(
57
+ DnaSequenceCreate(
58
+ name="My Plasmid",
59
+ bases="ATCGATCG",
60
+ is_circular=True,
61
+ folder_id="fld_abc123",
62
+ schema_id="ts_abc123", # optional
63
+
64
+ # List all DNA sequences (returns a generator)
65
+ sequences = benchling.dna_sequences.list()
66
+ for page in sequences:
67
+ for seq in page:
68
+ print(f"{seq.name} ({seq.id})")
69
+
70
+ # Check total count
71
+ total = sequences.estimated_count()
72
+ ```
73
+
74
+ **Key Operations:**
75
+ - Create: `benchling.<entity_type>.create()`
76
+ - Read: `benchling.<entity_type>.get(id)` or `.list()`
77
+ - Update: `benchling.<entity_type>.update(id, update_object)`
78
+ - Archive: `benchling.<entity_type>.archive(id)`
79
+
80
+ Entity types: `dna_sequences`, `rna_sequences`, `aa_sequences`, `custom_entities`, `mixtures`
81
+
82
+ For comprehensive SDK reference and advanced patterns, refer to `(see docs)`.
83
+
84
+ ### 3. Inventory Management
85
+
86
+ Manage physical samples, containers, boxes, and locations within the Benchling inventory system.
87
+
88
+ **Creating Containers:**
89
+ ```python
90
+ from benchling_sdk.models import ContainerCreate
91
+
92
+ container = benchling.containers.create(
93
+ ContainerCreate(
94
+ name="Sample Tube 001",
95
+ schema_id="cont_schema_abc123",
96
+ parent_storage_id="box_abc123", # optional
97
+ fields=benchling.models.fields({"concentration": "100 ng/μL"})
98
+ )
99
+
100
+ # Transfer a container to a new location
101
+ transfer = benchling.containers.transfer(
102
+ container_id="cont_abc123",
103
+ destination_id="box_xyz789"
104
+ )
105
+
106
+
@@ -0,0 +1,67 @@
1
+ ---
2
+ name: bgpt-paper-search
3
+ description: Search scientific papers and retrieve structured experimental data extracted from full-text studies via the BGPT MCP server. Returns 25+ fields per paper including methods, results, sample sizes, quality scores, and conclusions. Use for literature reviews, evidence synthesis, and finding experimental details not available in abstracts alone.
4
+ ---
5
+
6
+ # BGPT Paper Search
7
+
8
+ ## Overview
9
+
10
+ BGPT is a remote MCP server that searches a curated database of scientific papers built from raw experimental data extracted from full-text studies. Unlike traditional literature databases that return titles and abstracts, BGPT returns structured data from the actual paper content — methods, quantitative results, sample sizes, quality assessments, and 25+ metadata fields per paper.
11
+
12
+ ## When to Use This Skill
13
+
14
+ Use this skill when:
15
+ - Searching for scientific papers with specific experimental details
16
+ - Conducting systematic or scoping literature reviews
17
+ - Finding quantitative results, sample sizes, or effect sizes across studies
18
+ - Comparing methodologies used in different studies
19
+ - Looking for papers with quality scores or evidence grading
20
+ - Needing structured data from full-text papers (not just abstracts)
21
+ - Building evidence tables for meta-analyses or clinical guidelines
22
+
23
+ ### Claude Desktop / Claude Code
24
+
25
+ Add to your MCP configuration:
26
+
27
+ ```json
28
+ {
29
+ "mcpServers": {
30
+ "bgpt": {
31
+ "command": "npx",
32
+ "args": ["mcp-remote", "https://bgpt.pro/mcp/sse"]
33
+ }
34
+ }
35
+ }
36
+ ```
37
+
38
+ ### npm (alternative)
39
+
40
+ ```bash
41
+ npx bgpt-mcp
42
+ ```
43
+
44
+ ## Usage
45
+
46
+ Once configured, use the `search_papers` tool provided by the BGPT MCP server:
47
+
48
+ ```
49
+ Search for papers about: "CRISPR gene editing efficiency in human cells"
50
+ ```
51
+
52
+ The server returns structured results including:
53
+ - **Title, authors, journal, year, DOI**
54
+ - **Methods**: Experimental techniques, models, protocols
55
+ - **Results**: Key findings with quantitative data
56
+ - **Sample sizes**: Number of subjects/samples
57
+ - **Quality scores**: Study quality assessments
58
+ - **Conclusions**: Author conclusions and implications
59
+
60
+ ## Pricing
61
+
62
+ - **Free tier**: 50 searches per network, no API key required
63
+ - **Paid**: $0.01 per result with an API key from [bgpt.pro/mcp](https://bgpt.pro/mcp)
64
+
65
+
66
+
67
+
@@ -0,0 +1,29 @@
1
+ ---
2
+ name: biopython
3
+ description: Computational biology and bioinformatics toolkit. Use when working with DNA/RNA/protein sequences, BLAST searches, PDB structures, phylogenetic trees, or GenBank records. Trigger on imports of Bio, Bio.Seq, Bio.Blast, Bio.PDB, or mentions of sequence alignment, genome, protein structure, phylogeny.
4
+ ---
5
+ # biopython
6
+
7
+ Use this skill for computational biology and bioinformatics.
8
+
9
+ ## Core patterns
10
+
11
+ - **Sequences**: `Seq('ATCG')` → `.complement()`, `.translate()`, `.reverse_complement()`.
12
+ - **BLAST**: `NCBIWWW.qblast('blastn', 'nt', sequence)` for remote BLAST.
13
+ - **PDB**: `PDBParser().get_structure('1a8o', '1a8o.pdb')` for 3D structure analysis.
14
+ - **Phylogeny**: `Phylo.read('tree.nwk', 'newick')` for tree visualization.
15
+ - **GenBank**: `SeqIO.parse('genome.gb', 'genbank')` for annotation parsing.
16
+
17
+ ## Rules
18
+
19
+ - Always use `SeqIO` for file I/O — don't parse FASTA/GenBank manually.
20
+ - Handle ambiguous bases (`N`, `R`, `Y`) explicitly in sequence operations.
21
+ - For BLAST, respect NCBI rate limits — add delays between queries.
22
+
23
+ ## Anti-patterns
24
+
25
+ - Don't compare sequences as strings — use `seq1 == seq2` which handles case.
26
+ - Don't parse XML BLAST results manually — use `NCBIXML.parse()`.
27
+ - Don't store full genome sequences in memory — iterate with `SeqIO.parse()`.
28
+
29
+
@@ -0,0 +1,96 @@
1
+ ---
2
+ name: bioservices
3
+ description: Unified Python interface to 40+ bioinformatics services. Use when querying multiple databases (UniProt, KEGG, ChEMBL, Reactome) in a single workflow with consistent API. Best for cross-database analysis, ID mapping across services. For quick single-database lookups use gget; for sequence/file manipulation use biopython.
4
+ ---
5
+
6
+ # BioServices
7
+
8
+ ## Overview
9
+
10
+ BioServices is a Python package providing programmatic access to approximately 40 bioinformatics web services and databases. Retrieve biological data, perform cross-database queries, map identifiers, analyze sequences, and integrate multiple biological resources in Python workflows. The package handles both REST and SOAP/WSDL protocols transparently.
11
+
12
+ ## When to Use This Skill
13
+
14
+ This skill should be used when:
15
+ - Retrieving protein sequences, annotations, or structures from UniProt, PDB, Pfam
16
+ - Analyzing metabolic pathways and gene functions via KEGG or Reactome
17
+ - Searching compound databases (ChEBI, ChEMBL, PubChem) for chemical information
18
+ - Converting identifiers between different biological databases (KEGG↔UniProt, compound IDs)
19
+ - Running sequence similarity searches (BLAST, MUSCLE alignment)
20
+ - Querying gene ontology terms (QuickGO, GO annotations)
21
+ - Accessing protein-protein interaction data (PSICQUIC, IntactComplex)
22
+ - Mining genomic data (BioMart, ArrayExpress, ENA)
23
+ - Integrating data from multiple bioinformatics resources in a single workflow
24
+
25
+ ## Core Capabilities
26
+
27
+ ### 1. Protein Analysis
28
+
29
+ Retrieve protein information, sequences, and functional annotations:
30
+
31
+ ```python
32
+ from bioservices import UniProt
33
+
34
+ u = UniProt(verbose=False)
35
+
36
+ # Search for protein by name
37
+ results = u.search("ZAP70_HUMAN", frmt="tab", columns="id,genes,organism")
38
+
39
+ # Retrieve FASTA sequence
40
+ sequence = u.retrieve("P43403", "fasta")
41
+
42
+ # Map identifiers between databases
43
+ kegg_ids = u.mapping(fr="UniProtKB_AC-ID", to="KEGG", query="P43403")
44
+ ```
45
+
46
+ **Key methods:**
47
+ - `search()`: Query UniProt with flexible search terms
48
+ - `retrieve()`: Get protein entries in various formats (FASTA, XML, tab)
49
+ - `mapping()`: Convert identifiers between databases
50
+
51
+ Reference: `(see docs)` for complete UniProt API details.
52
+
53
+ ### 2. Pathway Discovery and Analysis
54
+
55
+ Access KEGG pathway information for genes and organisms:
56
+
57
+ ```python
58
+ from bioservices import KEGG
59
+
60
+ k = KEGG()
61
+ k.organism = "hsa" # Set to human
62
+
63
+ # Search for organisms
64
+ k.lookfor_organism("droso") # Find Drosophila species
65
+
66
+ # Find pathways by name
67
+ k.lookfor_pathway("B cell") # Returns matching pathway IDs
68
+
69
+ # Get pathways containing specific genes
70
+ pathways = k.get_pathway_by_gene("7535", "hsa") # ZAP70 gene
71
+
72
+ # Retrieve and parse pathway data
73
+ data = k.get("hsa04660")
74
+ parsed = k.parse(data)
75
+
76
+ # Extract pathway interactions
77
+ interactions = k.parse_kgml_pathway("hsa04660")
78
+ relations = interactions['relations'] # Protein-protein interactions
79
+
80
+ ### 3. Compound Database Searches
81
+
82
+ Search and cross-reference compounds across multiple databases:
83
+
84
+ ```python
85
+ from bioservices import KEGG, UniChem
86
+
87
+ k = KEGG()
88
+
89
+ # Search compounds by name
90
+ results = k.find("compound", "Geldanamycin") # Returns cpd:C11222
91
+
92
+ # Cross-reference KEGG → ChEMBL using UniChem
93
+ u = UniChem()
94
+ chembl_id = u.get_compound_id_from_kegg("C11222") # Returns CHEMBL278315
95
+
96
+
@@ -0,0 +1,104 @@
1
+ ---
2
+ name: brainstorming
3
+ description: "You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation."
4
+ ---
5
+
6
+ # Brainstorming Ideas Into Designs
7
+
8
+ Help turn ideas into fully formed designs and specs through natural collaborative dialogue.
9
+
10
+ Start by understanding the current project context, then ask questions one at a time to refine the idea. Once you understand what you're building, present the design and get user approval.
11
+
12
+
13
+
14
+ ## Anti-Pattern: "This Is Too Simple To Need A Design"
15
+
16
+ Every project goes through this process. A todo list, a single-function utility, a config change — all of them. "Simple" projects are where unexamined assumptions cause the most wasted work. The design can be short (a few sentences for truly simple projects), but you MUST present it and get approval.
17
+
18
+ ## Checklist
19
+
20
+ You MUST create a task for each of these items and complete them in order:
21
+
22
+ 1. **Explore project context** — check files, docs, recent commits
23
+ 2. **Offer visual companion** (if topic will involve visual questions) — this is its own message, not combined with a clarifying question. See the Visual Companion section below.
24
+ 3. **Ask clarifying questions** — one at a time, understand purpose/constraints/success criteria
25
+ 4. **Propose 2-3 approaches** — with trade-offs and your recommendation
26
+ 5. **Present design** — in sections scaled to their complexity, get user approval after each section
27
+ 6. **Write design doc** — save to `docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md` and commit
28
+ 7. **Spec self-review** — quick inline check for placeholders, contradictions, ambiguity, scope (see below)
29
+ 8. **User reviews written spec** — ask user to review the spec file before proceeding
30
+ 9. **Transition to implementation** — invoke writing-plans skill to create implementation plan
31
+
32
+ ## Process Flow
33
+
34
+ ```dot
35
+ digraph brainstorming {
36
+ "Explore project context" [shape=box];
37
+ "Visual questions ahead?" [shape=diamond];
38
+ "Offer Visual Companion\n(own message, no other content)" [shape=box];
39
+ "Ask clarifying questions" [shape=box];
40
+ "Propose 2-3 approaches" [shape=box];
41
+ "Present design sections" [shape=box];
42
+ "User approves design?" [shape=diamond];
43
+ "Write design doc" [shape=box];
44
+ "Spec self-review\n(fix inline)" [shape=box];
45
+ "User reviews spec?" [shape=diamond];
46
+ "Invoke writing-plans skill" [shape=doublecircle];
47
+
48
+ ## The Process
49
+
50
+ **Understanding the idea:**
51
+
52
+ - Check out the current project state first (files, docs, recent commits)
53
+ - Before asking detailed questions, assess scope: if the request describes multiple independent subsystems (e.g., "build a platform with chat, file storage, billing, and analytics"), flag this immediately. Don't spend questions refining details of a project that needs to be decomposed first.
54
+ - If the project is too large for a single spec, help the user decompose into sub-projects: what are the independent pieces, how do they relate, what order should they be built? Then brainstorm the first sub-project through the normal design flow. Each sub-project gets its own spec → plan → implementation cycle.
55
+ - For appropriately-scoped projects, ask questions one at a time to refine the idea
56
+ - Prefer multiple choice questions when possible, but open-ended is fine too
57
+ - Only one question per message - if a topic needs more exploration, break it into multiple questions
58
+ - Focus on understanding: purpose, constraints, success criteria
59
+
60
+ **Exploring approaches:**
61
+
62
+ - Propose 2-3 different approaches with trade-offs
63
+
64
+ ## After the Design
65
+
66
+ **Documentation:**
67
+
68
+ - Write the validated design (spec) to `docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md`
69
+ - (User preferences for spec location override this default)
70
+ - Use elements-of-style:writing-clearly-and-concisely skill if available
71
+ - Commit the design document to git
72
+
73
+ **Spec Self-Review:**
74
+ After writing the spec document, look at it with fresh eyes:
75
+
76
+ 1. **Placeholder scan:** Any "TBD", "TODO", incomplete sections, or vague requirements? Fix them.
77
+ 2. **Internal consistency:** Do any sections contradict each other? Does the architecture match the feature descriptions?
78
+ 3. **Scope check:** Is this focused enough for a single implementation plan, or does it need decomposition?
79
+
80
+ ## Key Principles
81
+
82
+ - **One question at a time** - Don't overwhelm with multiple questions
83
+ - **Multiple choice preferred** - Easier to answer than open-ended when possible
84
+ - **YAGNI ruthlessly** - Remove unnecessary features from all designs
85
+ - **Explore alternatives** - Always propose 2-3 approaches before settling
86
+ - **Incremental validation** - Present design, get approval before moving on
87
+ - **Be flexible** - Go back and clarify when something doesn't make sense
88
+
89
+ ## Visual Companion
90
+
91
+ A browser-based companion for showing mockups, diagrams, and visual options during brainstorming. Available as a tool — not a mode. Accepting the companion means it's available for questions that benefit from visual treatment; it does NOT mean every question goes through the browser.
92
+
93
+ **Offering the companion:** When you anticipate that upcoming questions will involve visual content (mockups, layouts, diagrams), offer it once for consent:
94
+ > "Some of what we're working on might be easier to explain if I can show it to you in a web browser. I can put together mockups, diagrams, comparisons, and other visuals as we go. This feature is still new and can be token-intensive. Want to try it? (Requires opening a local URL)"
95
+
96
+ **This offer MUST be its own message.** Do not combine it with clarifying questions, context summaries, or any other content. The message should contain ONLY the offer above and nothing else. Wait for the user's response before continuing. If they decline, proceed with text-only brainstorming.
97
+
98
+ **Per-question decision:** Even after the user accepts, decide FOR EACH QUESTION whether to use the browser or the terminal. The test: **would the user understand this better by seeing it than reading it?**
99
+
100
+ - **Use the browser** for content that IS visual — mockups, wireframes, layout comparisons, architecture diagrams, side-by-side visual designs
101
+ - **Use the terminal** for content that is text — requirements questions, conceptual choices, tradeoff lists, A/B/C/D text options, scope decisions
102
+
103
+ A question about a UI topic is not automatically a visual question. "What does personality mean in this context?" is a conceptual question — use the terminal. "Which wizard layout works better?" is a visual question — use the browser.
104
+ ```
@@ -0,0 +1,85 @@
1
+ ---
2
+ name: cancel
3
+ description: Cancel any active OMC mode (autopilot, ralph, ultrawork, ultraqa, swarm, ultrapilot, pipeline, team)
4
+ ---
5
+
6
+ # Cancel Skill
7
+
8
+ Intelligent cancellation that detects and cancels the active OMC mode.
9
+
10
+ **The cancel skill is the standard way to complete and exit any OMC mode.**
11
+ When the stop hook detects work is complete, it instructs the LLM to invoke
12
+ this skill for proper state cleanup. If cancel fails or is interrupted,
13
+ retry with `--force` flag, or wait for the 2-hour staleness timeout as
14
+ a last resort.
15
+
16
+ ## What It Does
17
+
18
+ Automatically detects which mode is active and cancels it:
19
+ - **Autopilot**: Stops workflow, preserves progress for resume
20
+ - **Ralph**: Stops persistence loop, clears linked ultrawork if applicable
21
+ - **Ultrawork**: Stops parallel execution (standalone or linked)
22
+ - **UltraQA**: Stops QA cycling workflow
23
+ - **Swarm**: Stops coordinated agent swarm, releases claimed tasks
24
+ - **Ultrapilot**: Stops parallel autopilot workers
25
+ - **Pipeline**: Stops sequential agent pipeline
26
+ - **Team**: Sends shutdown_request to all teammates, waits for responses, calls TeamDelete, clears linked ralph if present
27
+ - **Team+Ralph (linked)**: Cancels team first (graceful shutdown), then clears ralph state. Cancelling ralph when linked also cancels team first.
28
+
29
+ ## Usage
30
+
31
+ ```
32
+ cancel
33
+ ```
34
+
35
+ Or say: "cancelomc", "stopomc"
36
+
37
+ ## Critical: Deferred Tool Handling
38
+
39
+ The state management tools (`state_clear`, `state_read`, `state_write`, `state_list_active`,
40
+ `state_get_status`) may be registered as **deferred tools** by Claude Code. Before calling
41
+ any state tool, you MUST first load all of them via `ToolSearch`:
42
+
43
+ ```
44
+ ToolSearch(query="select:mcp__plugin_oh-my-claudecode_t__state_clear,mcp__plugin_oh-my-claudecode_t__state_read,mcp__plugin_oh-my-claudecode_t__state_write,mcp__plugin_oh-my-claudecode_t__state_list_active,mcp__plugin_oh-my-claudecode_t__state_get_status")
45
+ ```
46
+
47
+ If `state_clear` is unavailable or fails, use this **bash fallback** as an **emergency
48
+ escape from the stop hook loop**. This is NOT a full replacement for the cancel flow —
49
+ it only removes state files to unblock the session. Linked modes (e.g. ralph→ultrawork,
50
+ autopilot→ralph/ultraqa) must be cleared separately by running the fallback once per mode.
51
+
52
+ Replace `MODE` with the specific mode (e.g. `ralplan`, `ralph`, `ultrawork`, `ultraqa`).
53
+
54
+ **WARNING:** Do NOT use this fallback for `autopilot` or `omc-teams`. Autopilot requires
55
+ `state_write(active=false)` to preserve resume data. omc-teams requires tmux session
56
+ cleanup that cannot be done via file deletion alone.
57
+
58
+ ```bash
59
+ # Fallback: direct file removal when state_clear MCP tool is unavailable
60
+ SESSION_ID="${CLAUDE_SESSION_ID:-${CLAUDECODE_SESSION_ID:-}}"
61
+ REPO_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || { d="$PWD"; while [ "$d" != "/" ] && [ ! -d "$d/.omc" ]; do d="$(dirname "$d")"; done; echo "$d"; })"
62
+
63
+ # Cross-platform SHA-256 (macOS: shasum, Linux: sha256sum)
64
+ sha256portable() { printf '%s' "$1" | (sha256sum 2>/dev/null || shasum -a 256) | cut -c1-16; }
65
+
66
+ # Resolve state directory (supports OMC_STATE_DIR centralized storage)
67
+ if [ -n "${OMC_STATE_DIR:-}" ]; then
68
+ # Mirror getProjectIdentifier() from worktree-paths.ts
69
+ SOURCE="$(git remote get-url origin 2>/dev/null || echo "$REPO_ROOT")"
70
+ HASH="$(sha256portable "$SOURCE")"
71
+ DIR_NAME="$(basename "$REPO_ROOT" | sed 's/[^a-zA-Z0-9_-]/_/g')"
72
+ OMC_STATE="$OMC_STATE_DIR/${DIR_NAME}-${HASH}/state"
73
+ [ ! -d "$OMC_STATE" ] && { echo "ERROR: State dir not found at $OMC_STATE" >&2; exit 1; }
74
+ elif [ "$REPO_ROOT" != "/" ] && [ -d "$REPO_ROOT/.omc" ]; then
75
+ OMC_STATE="$REPO_ROOT/.omc/state"
76
+ else
77
+ echo "ERROR: Could not locate .omc state directory" >&2
78
+ exit 1
79
+ fi
80
+ MODE="ralplan" # <-- replace with the target mode
81
+
82
+ # Clear session-scoped state for the specific mode
83
+ if [ -n "$SESSION_ID" ] && [ -d "$OMC_STATE/sessions/$SESSION_ID" ]; then
84
+ rm -f "$OMC_STATE/sessions/$SESSION_ID/${MODE}-state.json"
85
+ ```