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,118 @@
1
+ ---
2
+ name: torch-geometric
3
+ description: "Guide for building Graph Neural Networks with PyTorch Geometric (PyG). Use this skill whenever the user asks about graph neural networks, GNNs, node classification, link prediction, graph classification, message passing networks, heterogeneous graphs, neighbor sampling, or any task involving torch_geometric / PyG. Also trigger when you see imports from torch_geometric, or the user mentions graph convolutions (GCN, GAT, GraphSAGE, GIN), graph data structures, or working with relational/network data. Even if the user just says 'graph learning' or 'geometric deep learning', use this skill."
4
+ ---
5
+
6
+ # PyTorch Geometric (PyG)
7
+
8
+ PyG is the standard library for Graph Neural Networks built on PyTorch. It provides data structures for graphs, 60+ GNN layer implementations, scalable mini-batch training, and support for heterogeneous graphs.
9
+
10
+ Install: `uv add torch_geometric` (or `uv pip install torch_geometric`; requires PyTorch). Optional: `pyg-lib`, `torch-scatter`, `torch-sparse`, `torch-cluster` for accelerated ops.
11
+
12
+ ## Core Concepts
13
+
14
+ ### Graph Data: `Data` and `HeteroData`
15
+
16
+ A graph lives in a `Data` object. The key attributes:
17
+
18
+ ```python
19
+ from torch_geometric.data import Data
20
+
21
+ data = Data(
22
+ x=node_features, # [num_nodes, num_node_features]
23
+ edge_index=edge_index, # [2, num_edges] — COO format, dtype=torch.long
24
+ edge_attr=edge_features, # [num_edges, num_edge_features]
25
+ y=labels, # node-level [num_nodes, *] or graph-level [1, *]
26
+ pos=positions, # [num_nodes, num_dimensions] (for point clouds/spatial)
27
+ )
28
+ ```
29
+
30
+ # If edges are [[src1, dst1], [src2, dst2], ...] — transpose first:
31
+ edge_index = edge_pairs.t().contiguous()
32
+ ```
33
+
34
+ For undirected graphs, include both directions: edge (0,1) needs both `[0,1]` and `[1,0]` in edge_index.
35
+
36
+ For heterogeneous graphs, use `HeteroData` — see the Heterogeneous Graphs section below.
37
+
38
+ ### Datasets
39
+
40
+ PyG bundles many standard datasets that auto-download and preprocess:
41
+
42
+ ```python
43
+ from torch_geometric.datasets import Planetoid, TUDataset
44
+
45
+ # Single-graph node classification (Cora, Citeseer, Pubmed)
46
+ dataset = Planetoid(root='./data', name='Cora')
47
+ data = dataset[0] # single graph with train/val/test masks
48
+
49
+ # Multi-graph classification (ENZYMES, MUTAG, IMDB-BINARY, etc.)
50
+ dataset = TUDataset(root='./data', name='ENZYMES')
51
+ # dataset[0], dataset[1], ... are individual graphs
52
+ ```
53
+
54
+ Common datasets by task:
55
+ - **Node classification**: Planetoid (Cora/Citeseer/Pubmed), OGB (ogbn-arxiv, ogbn-products, ogbn-mag)
56
+ - **Graph classification**: TUDataset (MUTAG, ENZYMES, PROTEINS, IMDB-BINARY), OGB (ogbg-molhiv)
57
+ - **Link prediction**: OGB (ogbl-collab, ogbl-citation2)
58
+ - **Molecular**: QM7, QM9, MoleculeNet
59
+ - **Point cloud/mesh**: ShapeNet, ModelNet10/40, FAUST
60
+
61
+ ### Transforms
62
+
63
+ Transforms preprocess or augment graph data, analogous to torchvision transforms:
64
+
65
+ ```python
66
+ import torch_geometric.transforms as T
67
+
68
+ # Common transforms
69
+ T.NormalizeFeatures() # Row-normalize node features to sum to 1
70
+ T.ToUndirected() # Add reverse edges to make graph undirected
71
+ T.AddSelfLoops() # Add self-loop edges
72
+ T.KNNGraph(k=6) # Build k-NN graph from point cloud positions
73
+ T.RandomJitter(0.01) # Random noise augmentation on positions
74
+ T.Compose([...]) # Chain multiple transforms
75
+
76
+ # Apply as pre_transform (once, saved to disk) or transform (every access)
77
+ dataset = ShapeNet(root='./data', pre_transform=T.KNNGraph(k=6),
78
+ transform=T.RandomJitter(0.01))
79
+ ```
80
+
81
+ ## Building GNN Models
82
+
83
+ ### Quick Start: Using Built-in Layers
84
+
85
+ The fastest way to build a GNN — stack conv layers from `torch_geometric.nn`:
86
+
87
+ ```python
88
+ import torch
89
+ import torch.nn.functional as F
90
+ from torch_geometric.nn import GCNConv
91
+
92
+ class GCN(torch.nn.Module):
93
+ def __init__(self, in_channels, hidden_channels, out_channels):
94
+ super().__init__()
95
+ self.conv1 = GCNConv(in_channels, hidden_channels)
96
+ self.conv2 = GCNConv(hidden_channels, out_channels)
97
+
98
+
99
+ ### Choosing a Conv Layer
100
+
101
+ Pick based on your task and graph structure:
102
+
103
+ | Layer | Best for | Key idea |
104
+ |-------|----------|----------|
105
+ | `GCNConv` | Homogeneous, semi-supervised node classification | Spectral-inspired, degree-normalized aggregation |
106
+ | `GATConv` / `GATv2Conv` | When neighbor importance varies | Attention-weighted messages |
107
+ | `SAGEConv` | Large graphs, inductive settings | Sampling-friendly, learnable aggregation |
108
+ | `GINConv` | Graph classification, maximizing expressiveness | As powerful as WL test |
109
+ | `TransformerConv` | Rich edge features, complex interactions | Multi-head attention with edge features |
110
+ | `EdgeConv` | Point clouds, dynamic graphs | MLP on edge features (x_i, x_j - x_i) |
111
+ | `RGCNConv` | Heterogeneous with many relation types | Relation-specific weight matrices |
112
+ | `HGTConv` | Heterogeneous graphs | Type-specific attention |
113
+
114
+ All conv layers accept `(x, edge_index)` at minimum. Many also accept `edge_attr` for edge features.
115
+
116
+ ### Lazy Initialization
117
+
118
+
@@ -0,0 +1,118 @@
1
+ ---
2
+ name: torchdrug
3
+ description: PyTorch-native graph neural networks for molecules and proteins. Use when building custom GNN architectures for drug discovery, protein modeling, or knowledge graph reasoning. Best for custom model development, protein property prediction, retrosynthesis. For pre-trained models and diverse featurizers use deepchem; for benchmark datasets use pytdc.
4
+ ---
5
+
6
+ # TorchDrug
7
+
8
+ ## Overview
9
+
10
+ TorchDrug is a comprehensive PyTorch-based machine learning toolbox for drug discovery and molecular science. Apply graph neural networks, pre-trained models, and task definitions to molecules, proteins, and biological knowledge graphs, including molecular property prediction, protein modeling, knowledge graph reasoning, molecular generation, retrosynthesis planning, with 40+ curated datasets and 20+ model architectures.
11
+
12
+ ## When to Use This Skill
13
+
14
+ This skill should be used when working with:
15
+
16
+ **Data Types:**
17
+ - SMILES strings or molecular structures
18
+ - Protein sequences or 3D structures (PDB files)
19
+ - Chemical reactions and retrosynthesis
20
+ - Biomedical knowledge graphs
21
+ - Drug discovery datasets
22
+
23
+ **Tasks:**
24
+ - Predicting molecular properties (solubility, toxicity, activity)
25
+ - Protein function or structure prediction
26
+ - Drug-target binding prediction
27
+
28
+ ## Getting Started
29
+
30
+ # Or with optional dependencies
31
+ uv pip install torchdrug[full]
32
+ ```
33
+
34
+ ### Quick Example
35
+
36
+ ```python
37
+ from torchdrug import datasets, models, tasks
38
+ from torch.utils.data import DataLoader
39
+
40
+ # Load molecular dataset
41
+ dataset = datasets.BBBP("~/molecule-datasets/")
42
+ train_set, valid_set, test_set = dataset.split()
43
+
44
+ # Define GNN model
45
+ model = models.GIN(
46
+ input_dim=dataset.node_feature_dim,
47
+ hidden_dims=[256, 256, 256],
48
+ edge_input_dim=dataset.edge_feature_dim,
49
+ batch_norm=True,
50
+ readout="mean"
51
+ )
52
+
53
+ # Create property prediction task
54
+ task = tasks.PropertyPrediction(
55
+ model,
56
+ task=dataset.tasks,
57
+ criterion="bce",
58
+ metric=["auroc", "auprc"]
59
+ )
60
+
61
+ # Train with PyTorch
62
+ optimizer = torch.optim.Adam(task.parameters(), lr=1e-3)
63
+ train_loader = DataLoader(train_set, batch_size=32, shuffle=True)
64
+
65
+ for epoch in range(100):
66
+ for batch in train_loader:
67
+ loss = task(batch)
68
+ optimizer.zero_grad()
69
+ loss.backward()
70
+ optimizer.step()
71
+
72
+ ## Core Capabilities
73
+
74
+ ### 1. Molecular Property Prediction
75
+
76
+ Predict chemical, physical, and biological properties of molecules from structure.
77
+
78
+ **Use Cases:**
79
+ - Drug-likeness and ADMET properties
80
+ - Toxicity screening
81
+ - Quantum chemistry properties
82
+ - Binding affinity prediction
83
+
84
+ **Key Components:**
85
+ - 20+ molecular datasets (BBBP, HIV, Tox21, QM9, etc.)
86
+ - GNN models (GIN, GAT, SchNet)
87
+ - PropertyPrediction and MultipleBinaryClassification tasks
88
+
89
+
90
+ ### 2. Protein Modeling
91
+
92
+ Work with protein sequences, structures, and properties.
93
+
94
+ **Use Cases:**
95
+ - Enzyme function prediction
96
+ - Protein stability and solubility
97
+ - Subcellular localization
98
+ - Protein-protein interactions
99
+ - Structure prediction
100
+
101
+ **Key Components:**
102
+ - 15+ protein datasets (EnzymeCommission, GeneOntology, PDBBind, etc.)
103
+ - Sequence models (ESM, ProteinBERT, ProteinLSTM)
104
+ - Structure models (GearNet, SchNet)
105
+
106
+ ### 3. Knowledge Graph Reasoning
107
+
108
+ Predict missing links and relationships in biological knowledge graphs.
109
+
110
+ **Use Cases:**
111
+ - Drug repurposing
112
+ - Disease mechanism discovery
113
+ - Gene-disease associations
114
+ - Multi-hop biomedical reasoning
115
+
116
+ **Key Components:**
117
+
118
+
@@ -0,0 +1,118 @@
1
+ ---
2
+ name: trace
3
+ description: Evidence-driven tracing lane that orchestrates competing tracer hypotheses in Claude built-in team mode
4
+ ---
5
+
6
+ # Trace Skill
7
+
8
+ Use this skill for ambiguous, causal, evidence-heavy questions where the goal is to explain **why** an observed result happened, not to jump directly into fixing or rewriting code.
9
+
10
+ This is the orchestration layer on top of the built-in `tracer` agent. The goal is to make tracing feel like a reusable OMC operating lane: restate the observation, generate competing explanations, gather evidence in parallel, rank the explanations, and propose the next probe that would collapse uncertainty fastest.
11
+
12
+ ## Good entry cases
13
+
14
+ Use `trace` when the problem is:
15
+
16
+ - ambiguous
17
+ - causal
18
+ - evidence-heavy
19
+ - best answered by exploring competing explanations in parallel
20
+
21
+ Examples:
22
+ - runtime bugs and regressions
23
+ - performance / latency / resource behavior
24
+ - architecture / premortem / postmortem analysis
25
+ - scientific or experimental result tracing
26
+ - config / routing / orchestration behavior explanation
27
+ - “given this output, trace back the likely causes”
28
+
29
+ ## Core tracing contract
30
+
31
+ Always preserve these distinctions:
32
+
33
+ 1. **Observation** -- what was actually observed
34
+ 2. **Hypotheses** -- competing explanations
35
+ 3. **Evidence For** -- what supports each explanation
36
+ 4. **Evidence Against / Gaps** -- what contradicts it or is still missing
37
+ 5. **Current Best Explanation** -- the leading explanation right now
38
+ 6. **Critical Unknown** -- the missing fact keeping the top explanations apart
39
+ 7. **Discriminating Probe** -- the highest-value next step to collapse uncertainty
40
+
41
+ Do **not** collapse into:
42
+ - a generic fix-it coding loop
43
+ - a generic debugger summary
44
+ - a raw dump of worker output
45
+ - fake certainty when evidence is incomplete
46
+
47
+ ## Evidence strength hierarchy
48
+
49
+ Treat evidence as ranked, not flat.
50
+
51
+ From strongest to weakest:
52
+
53
+ 1. **Controlled reproductions / direct experiments / uniquely discriminating artifacts**
54
+ 2. **Primary source artifacts with tight provenance** (trace events, logs, metrics, benchmark outputs, configs, git history, file:line behavior)
55
+ 3. **Multiple independent sources converging on the same explanation**
56
+ 4. **Single-source code-path or behavioral inference**
57
+ 5. **Weak circumstantial clues** (timing, naming, stack order, resemblance to prior bugs)
58
+ 6. **Intuition / analogy / speculation**
59
+
60
+ Explicitly down-rank hypotheses that depend mostly on lower tiers when stronger contradictory evidence exists.
61
+
62
+ ## Strong falsification / disconfirmation rules
63
+
64
+ Every serious `/trace` run must try to falsify its own favorite explanation.
65
+
66
+ For each top hypothesis:
67
+
68
+ - collect evidence **for** it
69
+ - collect evidence **against** it
70
+ - state what distinctive prediction it makes
71
+ - state what observation would be hard to reconcile with it
72
+ - identify the cheapest probe that would discriminate it from the next-best alternative
73
+
74
+ Down-rank a hypothesis when:
75
+
76
+ - direct evidence contradicts it
77
+
78
+ ## Team-mode orchestration shape
79
+
80
+ Use **Claude built-in team mode** for `/trace`.
81
+
82
+ The lead should:
83
+
84
+ 1. Restate the observed result or “why” question precisely
85
+ 2. Extract the tracing target
86
+ 3. Generate multiple deliberately different candidate hypotheses
87
+ 4. Spawn **3 tracer lanes by default** in team mode
88
+ 5. Assign one tracer worker per lane
89
+ 6. Instruct each tracer worker to gather evidence **for** and **against** its lane
90
+ 7. Run a **rebuttal round** between the leading hypothesis and the strongest remaining alternative
91
+ 8. Detect whether the top lanes genuinely differ or actually converge on the same root cause
92
+ 9. Merge findings into a ranked synthesis with an explicit critical unknown and discriminating probe
93
+
94
+ Important: workers should pursue deliberately different explanations, not the same explanation in parallel.
95
+
96
+ ## Default hypothesis lanes for v1
97
+
98
+ Unless the prompt strongly suggests a better partition, use these 3 default lanes:
99
+
100
+ 1. **Code-path / implementation cause**
101
+ 2. **Config / environment / orchestration cause**
102
+ 3. **Measurement / artifact / assumption mismatch cause** — covers verification-method defects, not just system defects. Examples: the verification query reuses a single dimensional key across distinct entities, tenants, streams, or groups; the comparison filter shape does not match the schema grain; or the catalog or column name was assumed portable across runtimes without enumeration. This includes multi-entity premise/key-assumption mismatches.
103
+
104
+ For lane 3, cross-entity discrepancies need a premise audit before escalation: enumerate entity dimensions and check whether a zero-row or mismatch result came from applying one key across multiple entities rather than from a system defect; the result may be a verification-methodology defect.
105
+
106
+ These defaults are intentionally broad so the first slice works across bug, performance, architecture, and experiment tracing.
107
+
108
+ ## Mandatory cross-check lenses
109
+
110
+ After the initial evidence pass, pressure-test the leaders with these lenses when relevant:
111
+
112
+ - **Systems lens** -- queues, retries, backpressure, feedback loops, upstream/downstream dependencies, boundary failures, coordination effects
113
+ - **Premortem lens** -- assume the current best explanation is incomplete or wrong; what failure mode would embarrass the trace later?
114
+ - **Science lens** -- controls, confounders, measurement bias, alternative variables, falsifiable predictions
115
+
116
+ These lenses are not filler. Use them when they can surface a missed explanation, hidden dependency, or weak inference.
117
+
118
+
@@ -0,0 +1,110 @@
1
+ ---
2
+ name: transformers
3
+ description: This skill should be used when working with pre-trained transformer models for natural language processing, computer vision, audio, or multimodal tasks. Use for text generation, classification, question answering, translation, summarization, image classification, object detection, speech recognition, and fine-tuning models on custom datasets.
4
+ ---
5
+
6
+ # Transformers
7
+
8
+ ## Overview
9
+
10
+ The Hugging Face Transformers library provides access to thousands of pre-trained models for tasks across NLP, computer vision, audio, and multimodal domains. Use this skill to load models, perform inference, and fine-tune on custom data.
11
+
12
+ ## Authentication
13
+
14
+ Many models on the Hugging Face Hub require authentication. Set up access:
15
+
16
+ ```python
17
+ from huggingface_hub import login
18
+ login() # Follow prompts to enter token
19
+ ```
20
+
21
+ Or set environment variable:
22
+ ```bash
23
+ export HUGGINGFACE_TOKEN="your_token_here"
24
+ ```
25
+
26
+ Get tokens at: https://huggingface.co/settings/tokens
27
+
28
+ ## Quick Start
29
+
30
+ Use the Pipeline API for fast inference without manual configuration:
31
+
32
+ ```python
33
+ from transformers import pipeline
34
+
35
+ # Text generation
36
+ generator = pipeline("text-generation", model="gpt2")
37
+ result = generator("The future of AI is", max_length=50)
38
+
39
+ # Text classification
40
+ classifier = pipeline("text-classification")
41
+ result = classifier("This movie was excellent!")
42
+
43
+ # Question answering
44
+ qa = pipeline("question-answering")
45
+ result = qa(question="What is AI?", context="AI is artificial intelligence...")
46
+ ```
47
+
48
+ ## Core Capabilities
49
+
50
+ ### 1. Pipelines for Quick Inference
51
+
52
+ Use for simple, optimized inference across many tasks. Supports text generation, classification, NER, question answering, summarization, translation, image classification, object detection, audio classification, and more.
53
+
54
+ **When to use**: Quick prototyping, simple inference tasks, no custom preprocessing needed.
55
+
56
+ See `(see docs)` for comprehensive task coverage and optimization.
57
+
58
+ ### 2. Model Loading and Management
59
+
60
+ Load pre-trained models with fine-grained control over configuration, device placement, and precision.
61
+
62
+ **When to use**: Custom model initialization, advanced device management, model inspection.
63
+
64
+ See `(see docs)` for loading patterns and best practices.
65
+
66
+ ### 3. Text Generation
67
+
68
+ Generate text with LLMs using various decoding strategies (greedy, beam search, sampling) and control parameters (temperature, top-k, top-p).
69
+
70
+ **When to use**: Creative text generation, code generation, conversational AI, text completion.
71
+
72
+ See `(see docs)` for generation strategies and parameters.
73
+
74
+ ### 4. Training and Fine-Tuning
75
+
76
+ Fine-tune pre-trained models on custom datasets using the Trainer API with automatic mixed precision, distributed training, and logging.
77
+
78
+ **When to use**: Task-specific model adaptation, domain adaptation, improving model performance.
79
+
80
+ See `(see docs)` for training workflows and best practices.
81
+
82
+ ### 5. Tokenization
83
+
84
+ Convert text to tokens and token IDs for model input, with padding, truncation, and special token handling.
85
+
86
+ **When to use**: Custom preprocessing pipelines, understanding model inputs, batch processing.
87
+
88
+ See `(see docs)` for tokenization details.
89
+
90
+ ## Common Patterns
91
+
92
+ ### Pattern 1: Simple Inference
93
+ For straightforward tasks, use pipelines:
94
+ ```python
95
+ pipe = pipeline("task-name", model="model-id")
96
+ output = pipe(input_data)
97
+ ```
98
+
99
+ ### Pattern 2: Custom Model Usage
100
+ For advanced control, load model and tokenizer separately:
101
+ ```python
102
+ from transformers import AutoModelForCausalLM, AutoTokenizer
103
+
104
+ tokenizer = AutoTokenizer.from_pretrained("model-id")
105
+ model = AutoModelForCausalLM.from_pretrained("model-id", device_map="auto")
106
+
107
+ inputs = tokenizer("text", return_tensors="pt")
108
+ outputs = model.generate(**inputs, max_new_tokens=100)
109
+ result = tokenizer.decode(outputs[0])
110
+ ```
@@ -0,0 +1,119 @@
1
+ ---
2
+ name: treatment-plans
3
+ description: Generate concise (3-4 page), focused medical treatment plans in LaTeX/PDF format for all clinical specialties. Supports general medical treatment, rehabilitation therapy, mental health care, chronic disease management, perioperative care, and pain management. Includes SMART goal frameworks, evidence-based interventions with minimal text citations, regulatory compliance (HIPAA), and professional formatting. Prioritizes brevity and clinical actionability.
4
+ ---
5
+
6
+ # Treatment Plan Writing
7
+
8
+ ## Overview
9
+
10
+ Treatment plan writing is the systematic documentation of clinical care strategies designed to address patient health conditions through evidence-based interventions, measurable goals, and structured follow-up. This skill provides comprehensive LaTeX templates and validation tools for creating **concise, focused** treatment plans (3-4 pages standard) across all medical specialties with full regulatory compliance.
11
+
12
+ **Critical Principles:**
13
+ 1. **CONCISE & ACTIONABLE**: Treatment plans default to 3-4 pages maximum, focusing only on clinically essential information that impacts care decisions
14
+ 2. **Patient-Centered**: Plans must be evidence-based, measurable, and compliant with healthcare regulations (HIPAA, documentation standards)
15
+ 3. **Minimal Citations**: Use brief in-text citations only when needed to support clinical recommendations; avoid extensive bibliographies
16
+
17
+ Every treatment plan should include clear goals, specific interventions, defined timelines, monitoring parameters, and expected outcomes that align with patient preferences and current clinical guidelines - all presented as efficiently as possible.
18
+
19
+ ## When to Use This Skill
20
+
21
+ This skill should be used when:
22
+ - Creating individualized treatment plans for patient care
23
+ - Documenting therapeutic interventions for chronic disease management
24
+ - Developing rehabilitation programs (physical therapy, occupational therapy, cardiac rehab)
25
+ - Writing mental health and psychiatric treatment plans
26
+ - Planning perioperative and surgical care pathways
27
+ - Establishing pain management protocols
28
+ - Setting patient-centered goals using SMART criteria
29
+ - Coordinating multidisciplinary care across specialties
30
+ - Ensuring regulatory compliance in treatment documentation
31
+ - Generating professional treatment plans for medical records
32
+
33
+ ## Visual Enhancement with Scientific Schematics
34
+
35
+ **⚠️ MANDATORY: Every treatment plan MUST include at least 1 AI-generated figure using the scientific-schematics skill.**
36
+
37
+ This is not optional. Treatment plans benefit greatly from visual elements. Before finalizing any document:
38
+ 1. Generate at minimum ONE schematic or diagram (e.g., treatment pathway flowchart, care coordination diagram, or therapy timeline)
39
+ 2. For complex plans: include decision algorithm flowchart
40
+ 3. For rehabilitation plans: include milestone progression diagram
41
+
42
+ **How to generate figures:**
43
+ - Use the **scientific-schematics** skill to generate AI-powered publication-quality diagrams
44
+ - Simply describe your desired diagram in natural language
45
+ - Nano Banana Pro will automatically generate, review, and refine the schematic
46
+
47
+ **How to generate schematics:**
48
+
49
+ ## Document Format and Best Practices
50
+
51
+ ### Document Length Options
52
+
53
+ Treatment plans come in three format options based on clinical complexity and use case:
54
+
55
+ #### Option 1: One-Page Treatment Plan (PREFERRED for most cases)
56
+
57
+ **When to use**: Straightforward clinical scenarios, standard protocols, busy clinical settings
58
+
59
+ **Format**: Single page containing all essential treatment information in scannable sections
60
+ - No table of contents needed
61
+ - No extensive narratives
62
+ - Focused on actionable items only
63
+ - Similar to precision oncology reports or treatment recommendation cards
64
+
65
+ **Required sections** (all on one page):
66
+
67
+ ### First Page Summary (Foundation Medicine Model)
68
+
69
+ **CRITICAL REQUIREMENT: All treatment plans MUST have a complete executive summary on the first page ONLY, before any table of contents or detailed sections.**
70
+
71
+ Following the Foundation Medicine model for precision medicine reporting and clinical summary documents, treatment plans begin with a one-page executive summary that provides immediate access to key actionable information. This entire summary must fit on the first page.
72
+
73
+ **Required First Page Structure (in order):**
74
+
75
+ 1. **Title and Subtitle**
76
+ - Main title: Treatment plan type (e.g., "Comprehensive Treatment Plan")
77
+ - Subtitle: Specific condition or focus (e.g., "Type 2 Diabetes Mellitus - Young Adult Patient")
78
+
79
+ 2. **Report Information Box** (using `\begin{infobox}` or `\begin{patientinfo}`)
80
+ - Report type/document purpose
81
+ - Date of plan creation
82
+
83
+ ### Concise Documentation
84
+
85
+ **CRITICAL: Treatment plans MUST prioritize brevity and clinical relevance. Default to 3-4 pages maximum unless clinical complexity absolutely demands more detail.**
86
+
87
+ Treatment plans should prioritize **clarity and actionability** over exhaustive detail:
88
+
89
+ - **Focused**: Include only clinically essential information that impacts care decisions
90
+ - **Actionable**: Emphasize what needs to be done, when, and why
91
+ - **Efficient**: Facilitate quick decision-making without sacrificing clinical quality
92
+ - **Target length options**:
93
+ - **1-page format** (preferred for straightforward cases): Quick-reference card with all essential information
94
+ - **3-4 pages standard**: Standard format with first-page summary + supporting details
95
+ - **5-6 pages** (rare): Only for highly complex cases with multiple comorbidities or multidisciplinary interventions
96
+
97
+ **Streamlining Guidelines:**
98
+
99
+ ### Quality Over Quantity
100
+
101
+ The goal is professional, clinically complete documentation that respects clinicians' time while ensuring comprehensive patient care. Every section should add value; remove or condense sections that don't directly inform treatment decisions.
102
+
103
+ ### Citations and Evidence Support
104
+
105
+ **Use minimal, targeted citations to support clinical recommendations:**
106
+
107
+ - **Text Citations Preferred**: Use brief in-text citations (Author Year) or simple references rather than extensive bibliographies unless specifically requested
108
+ - **When to Cite**:
109
+ - Clinical practice guideline recommendations (e.g., "per ADA 2024 guidelines")
110
+ - Specific medication dosing or protocols (e.g., "ACC/AHA recommendations")
111
+ - Novel or controversial interventions requiring evidence support
112
+ - Risk stratification tools or validated assessment scales
113
+ - **When NOT to Cite**:
114
+ - Standard-of-care interventions widely accepted in the field
115
+ - Basic medical facts and routine clinical practices
116
+ - General patient education content
117
+ - **Citation Format**:
118
+
119
+
@@ -0,0 +1,41 @@
1
+ ---
2
+ name: ui-render-performance
3
+ description: Non-blocking Pi TUI render workflow. Use when changing widgets, powerbar/statusbar segments, dashboard panes, overlays, snapshot caches, or live UI refresh behavior.
4
+ ---
5
+
6
+
7
+ # ui-render-performance
8
+
9
+ Use this skill for Pi/pi-crew TUI work.
10
+
11
+ ## Source patterns distilled
12
+
13
+ - Pi TUI is synchronous immediate-mode/string rendering: `source/pi-mono/packages/coding-agent/src/modes/interactive/interactive-mode.ts`
14
+ - Pi extension examples use event-driven state updates, not render-time loading.
15
+ - pi-crew UI: `src/extension/register.ts`, `src/ui/run-dashboard.ts`, `src/ui/run-snapshot-cache.ts`, `src/ui/crew-widget.ts`, `src/ui/powerbar-publisher.ts`, `src/ui/render-scheduler.ts`
16
+
17
+ ## Rules
18
+
19
+ - Treat every `render(width)` and widget/powerbar update as a hot synchronous path.
20
+ - Render from in-memory snapshots only. Preload config, manifests, snapshots, agents, and mailbox counts asynchronously.
21
+ - Use `RenderScheduler.schedule()` to coalesce renders; avoid direct repeated rendering.
22
+ - Prefer `snapshotCache.get(runId)` in render paths. If a sync fallback is unavoidable, classify it as first-load/rare and document why.
23
+ - Keep dashboard panes pure: accept a snapshot/model and format strings; do not call `fs.readFileSync`, `fs.readdirSync`, `fs.statSync`, or network APIs from pane render methods.
24
+ - On session switch, cancel timers and ensure in-flight async preloads cannot update stale session UI.
25
+ - Watch TTL interactions: a preload interval shorter than cache TTL prevents render-time refresh gaps.
26
+
27
+ ## Anti-patterns
28
+
29
+ - Do not call `loadConfig()`, `manifestCache.list()`, or `refreshIfStale()` repeatedly inside `renderTick()` unless backed by preloaded frame data.
30
+ - Do not do large JSON parsing or directory scans inside widget render/update functions.
31
+ - Do not show stale health warnings for completed/cancelled/failed runs.
32
+
33
+ ## Verification
34
+
35
+ ```bash
36
+ cd pi-crew
37
+ npx tsc --noEmit
38
+ node --experimental-strip-types --test test/unit/run-snapshot-cache.test.ts test/unit/crew-widget.test.ts test/unit/powerbar-publisher.test.ts test/unit/run-dashboard.test.ts
39
+ npm test
40
+ ```
41
+