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.
- package/CHANGELOG.md +20 -0
- package/LICENSE +21 -0
- package/README.md +97 -0
- package/index.ts +163 -0
- package/package.json +48 -0
- package/skills/adaptyv/SKILL.md +92 -0
- package/skills/add-community-extension/SKILL.md +85 -0
- package/skills/aeon/SKILL.md +111 -0
- package/skills/ai-slop-cleaner/SKILL.md +118 -0
- package/skills/anndata/SKILL.md +83 -0
- package/skills/arboreto/SKILL.md +107 -0
- package/skills/ask/SKILL.md +55 -0
- package/skills/astropy/SKILL.md +30 -0
- package/skills/async-worker-recovery/SKILL.md +44 -0
- package/skills/autopilot/SKILL.md +63 -0
- package/skills/autoresearch/SKILL.md +64 -0
- package/skills/autoskill/SKILL.md +116 -0
- package/skills/babysit/SKILL.md +43 -0
- package/skills/benchling-integration/SKILL.md +106 -0
- package/skills/bgpt-paper-search/SKILL.md +67 -0
- package/skills/biopython/SKILL.md +29 -0
- package/skills/bioservices/SKILL.md +96 -0
- package/skills/brainstorming/SKILL.md +104 -0
- package/skills/cancel/SKILL.md +85 -0
- package/skills/ccg/SKILL.md +87 -0
- package/skills/celery-pipeline/SKILL.md +30 -0
- package/skills/cellxgene-census/SKILL.md +104 -0
- package/skills/child-pi-spawning/SKILL.md +85 -0
- package/skills/cirq/SKILL.md +113 -0
- package/skills/citation-management/SKILL.md +91 -0
- package/skills/clinical-decision-support/SKILL.md +117 -0
- package/skills/clinical-reports/SKILL.md +118 -0
- package/skills/clinical-trial/SKILL.md +28 -0
- package/skills/cobrapy/SKILL.md +116 -0
- package/skills/configure-notifications/SKILL.md +85 -0
- package/skills/consciousness-council/SKILL.md +120 -0
- package/skills/context-artifact-hygiene/SKILL.md +85 -0
- package/skills/context-mode-ops/SKILL.md +87 -0
- package/skills/dask/SKILL.md +85 -0
- package/skills/database-lookup/SKILL.md +118 -0
- package/skills/datamol/SKILL.md +108 -0
- package/skills/debug/SKILL.md +32 -0
- package/skills/deep-dive/SKILL.md +114 -0
- package/skills/deep-interview/SKILL.md +90 -0
- package/skills/deepchem/SKILL.md +117 -0
- package/skills/deepinit/SKILL.md +100 -0
- package/skills/deeptools/SKILL.md +118 -0
- package/skills/delegation-patterns/SKILL.md +56 -0
- package/skills/depmap/SKILL.md +94 -0
- package/skills/dhdna-profiler/SKILL.md +86 -0
- package/skills/diffdock/SKILL.md +101 -0
- package/skills/dispatching-parallel-agents/SKILL.md +119 -0
- package/skills/dnanexus-integration/SKILL.md +118 -0
- package/skills/do/SKILL.md +48 -0
- package/skills/docker-sandbox/SKILL.md +29 -0
- package/skills/docx/SKILL.md +119 -0
- package/skills/esm/SKILL.md +116 -0
- package/skills/etetoolkit/SKILL.md +103 -0
- package/skills/event-log-tracing/SKILL.md +85 -0
- package/skills/exa-search/SKILL.md +72 -0
- package/skills/executing-plans/SKILL.md +69 -0
- package/skills/exploratory-data-analysis/SKILL.md +118 -0
- package/skills/external-context/SKILL.md +80 -0
- package/skills/fastapi/SKILL.md +30 -0
- package/skills/finishing-a-development-branch/SKILL.md +106 -0
- package/skills/flowio/SKILL.md +114 -0
- package/skills/fluidsim/SKILL.md +108 -0
- package/skills/generate-image/SKILL.md +108 -0
- package/skills/geniml/SKILL.md +117 -0
- package/skills/geomaster/SKILL.md +109 -0
- package/skills/geopandas/SKILL.md +114 -0
- package/skills/get-available-resources/SKILL.md +100 -0
- package/skills/gget/SKILL.md +111 -0
- package/skills/ginkgo-cloud-lab/SKILL.md +52 -0
- package/skills/git-master/SKILL.md +85 -0
- package/skills/glycoengineering/SKILL.md +104 -0
- package/skills/gtars/SKILL.md +104 -0
- package/skills/hackernews-frontpage/SKILL.md +46 -0
- package/skills/histolab/SKILL.md +98 -0
- package/skills/how-it-works/SKILL.md +25 -0
- package/skills/hud/SKILL.md +86 -0
- package/skills/hugging-science/SKILL.md +93 -0
- package/skills/huggingface/SKILL.md +30 -0
- package/skills/hypogenic/SKILL.md +107 -0
- package/skills/hypothesis-generation/SKILL.md +118 -0
- package/skills/imaging-data-commons/SKILL.md +119 -0
- package/skills/infographics/SKILL.md +102 -0
- package/skills/iso-13485-certification/SKILL.md +114 -0
- package/skills/knowledge-agent/SKILL.md +83 -0
- package/skills/labarchive-integration/SKILL.md +98 -0
- package/skills/lamindb/SKILL.md +119 -0
- package/skills/landsat/SKILL.md +29 -0
- package/skills/latchbio-integration/SKILL.md +118 -0
- package/skills/latex-posters/SKILL.md +112 -0
- package/skills/learn-codebase/SKILL.md +24 -0
- package/skills/learner/SKILL.md +118 -0
- package/skills/literature-review/SKILL.md +118 -0
- package/skills/live-agent-lifecycle/SKILL.md +85 -0
- package/skills/mailbox-interactive/SKILL.md +85 -0
- package/skills/make-plan/SKILL.md +59 -0
- package/skills/markdown-mermaid-writing/SKILL.md +118 -0
- package/skills/market-research-reports/SKILL.md +119 -0
- package/skills/markitdown/SKILL.md +111 -0
- package/skills/markitdown-docs/SKILL.md +28 -0
- package/skills/matchms/SKILL.md +91 -0
- package/skills/matlab/SKILL.md +118 -0
- package/skills/matplotlib/SKILL.md +30 -0
- package/skills/mcp-setup/SKILL.md +84 -0
- package/skills/medchem/SKILL.md +109 -0
- package/skills/mem-search/SKILL.md +96 -0
- package/skills/modal/SKILL.md +104 -0
- package/skills/model-routing-context/SKILL.md +85 -0
- package/skills/molecular-dynamics/SKILL.md +116 -0
- package/skills/molfeat/SKILL.md +110 -0
- package/skills/multi-perspective-review/SKILL.md +85 -0
- package/skills/networkx/SKILL.md +111 -0
- package/skills/neurokit2/SKILL.md +114 -0
- package/skills/neuropixels-analysis/SKILL.md +112 -0
- package/skills/nilearn/SKILL.md +29 -0
- package/skills/observability-reliability/SKILL.md +43 -0
- package/skills/omc-doctor/SKILL.md +86 -0
- package/skills/omc-reference/SKILL.md +119 -0
- package/skills/omc-setup/SKILL.md +82 -0
- package/skills/omc-teams/SKILL.md +81 -0
- package/skills/omero-integration/SKILL.md +111 -0
- package/skills/open-notebook/SKILL.md +100 -0
- package/skills/openephys/SKILL.md +28 -0
- package/skills/opentrons-integration/SKILL.md +110 -0
- package/skills/optimize-for-gpu/SKILL.md +119 -0
- package/skills/orchestration/SKILL.md +85 -0
- package/skills/ownership-session-security/SKILL.md +43 -0
- package/skills/paper-lookup/SKILL.md +119 -0
- package/skills/paperzilla/SKILL.md +114 -0
- package/skills/parallel-web/SKILL.md +64 -0
- package/skills/pathfinder/SKILL.md +114 -0
- package/skills/pathml/SKILL.md +98 -0
- package/skills/pdf/SKILL.md +113 -0
- package/skills/peer-review/SKILL.md +119 -0
- package/skills/pennylane/SKILL.md +119 -0
- package/skills/phylogenetics/SKILL.md +102 -0
- package/skills/pi-extension-lifecycle/SKILL.md +41 -0
- package/skills/plan/SKILL.md +66 -0
- package/skills/polars/SKILL.md +114 -0
- package/skills/polars-bio/SKILL.md +84 -0
- package/skills/pptx/SKILL.md +118 -0
- package/skills/pptx-posters/SKILL.md +112 -0
- package/skills/primekg/SKILL.md +97 -0
- package/skills/project-session-manager/SKILL.md +85 -0
- package/skills/protocolsio-integration/SKILL.md +119 -0
- package/skills/pubmed-search/SKILL.md +29 -0
- package/skills/pufferlib/SKILL.md +103 -0
- package/skills/pydeseq2/SKILL.md +106 -0
- package/skills/pydicom/SKILL.md +115 -0
- package/skills/pyhealth/SKILL.md +117 -0
- package/skills/pylabrobot/SKILL.md +100 -0
- package/skills/pymatgen/SKILL.md +28 -0
- package/skills/pymc/SKILL.md +108 -0
- package/skills/pymoo/SKILL.md +90 -0
- package/skills/pyopenms/SKILL.md +119 -0
- package/skills/pysam/SKILL.md +118 -0
- package/skills/pyspark/SKILL.md +30 -0
- package/skills/pytdc/SKILL.md +102 -0
- package/skills/pytorch/SKILL.md +31 -0
- package/skills/pytorch-lightning/SKILL.md +119 -0
- package/skills/pyzotero/SKILL.md +104 -0
- package/skills/qiskit/SKILL.md +119 -0
- package/skills/qutip/SKILL.md +111 -0
- package/skills/ralph/SKILL.md +23 -0
- package/skills/ralplan/SKILL.md +105 -0
- package/skills/rdflib/SKILL.md +29 -0
- package/skills/rdkit/SKILL.md +30 -0
- package/skills/read-only-explorer/SKILL.md +85 -0
- package/skills/receiving-code-review/SKILL.md +103 -0
- package/skills/release/SKILL.md +117 -0
- package/skills/remember/SKILL.md +39 -0
- package/skills/requesting-code-review/SKILL.md +85 -0
- package/skills/requirements-to-task-packet/SKILL.md +65 -0
- package/skills/research-grants/SKILL.md +118 -0
- package/skills/research-lookup/SKILL.md +117 -0
- package/skills/research-reproducibility/SKILL.md +28 -0
- package/skills/resource-discovery-config/SKILL.md +43 -0
- package/skills/rowan/SKILL.md +100 -0
- package/skills/runtime-state-reader/SKILL.md +46 -0
- package/skills/safe-bash/SKILL.md +85 -0
- package/skills/scanpy/SKILL.md +32 -0
- package/skills/scholar-evaluation/SKILL.md +115 -0
- package/skills/scientific-brainstorming/SKILL.md +118 -0
- package/skills/scientific-critical-thinking/SKILL.md +119 -0
- package/skills/scientific-schematics/SKILL.md +116 -0
- package/skills/scientific-slides/SKILL.md +117 -0
- package/skills/scientific-visualization/SKILL.md +109 -0
- package/skills/scientific-writing/SKILL.md +119 -0
- package/skills/scikit-bio/SKILL.md +92 -0
- package/skills/scikit-learn/SKILL.md +99 -0
- package/skills/scikit-survival/SKILL.md +110 -0
- package/skills/sciomc/SKILL.md +86 -0
- package/skills/scvelo/SKILL.md +106 -0
- package/skills/scvi-tools/SKILL.md +114 -0
- package/skills/seaborn/SKILL.md +97 -0
- package/skills/secure-agent-orchestration-review/SKILL.md +47 -0
- package/skills/self-improve/SKILL.md +119 -0
- package/skills/semantic-compression/SKILL.md +62 -0
- package/skills/setup/SKILL.md +42 -0
- package/skills/shap/SKILL.md +103 -0
- package/skills/simpy/SKILL.md +116 -0
- package/skills/skill/SKILL.md +117 -0
- package/skills/skill-search/SKILL.md +67 -0
- package/skills/skillify/SKILL.md +46 -0
- package/skills/smart-explore/SKILL.md +94 -0
- package/skills/sqlite-pandas/SKILL.md +30 -0
- package/skills/stable-baselines3/SKILL.md +86 -0
- package/skills/state-mutation-locking/SKILL.md +44 -0
- package/skills/statistical-analysis/SKILL.md +108 -0
- package/skills/statsmodels/SKILL.md +29 -0
- package/skills/subagent-driven-development/SKILL.md +89 -0
- package/skills/sympy/SKILL.md +115 -0
- package/skills/system-prompts/SKILL.md +116 -0
- package/skills/systematic-debugging/SKILL.md +119 -0
- package/skills/team/SKILL.md +85 -0
- package/skills/test-driven-development/SKILL.md +84 -0
- package/skills/tiledbvcf/SKILL.md +119 -0
- package/skills/timeline-report/SKILL.md +85 -0
- package/skills/timesfm-forecasting/SKILL.md +112 -0
- package/skills/torch-geometric/SKILL.md +118 -0
- package/skills/torchdrug/SKILL.md +118 -0
- package/skills/trace/SKILL.md +118 -0
- package/skills/transformers/SKILL.md +110 -0
- package/skills/treatment-plans/SKILL.md +119 -0
- package/skills/ui-render-performance/SKILL.md +41 -0
- package/skills/ultragoal/SKILL.md +63 -0
- package/skills/ultraqa/SKILL.md +85 -0
- package/skills/ultrawork/SKILL.md +20 -0
- package/skills/umap-learn/SKILL.md +119 -0
- package/skills/usfiscaldata/SKILL.md +118 -0
- package/skills/using-git-worktrees/SKILL.md +112 -0
- package/skills/using-superpowers/SKILL.md +85 -0
- package/skills/using-vetc/SKILL.md +92 -0
- package/skills/vaex/SKILL.md +111 -0
- package/skills/venue-templates/SKILL.md +113 -0
- package/skills/verification-before-completion/SKILL.md +88 -0
- package/skills/verification-before-done/SKILL.md +68 -0
- package/skills/verify/SKILL.md +33 -0
- package/skills/version-bump/SKILL.md +54 -0
- package/skills/vetc-analyze-ba/SKILL.md +117 -0
- package/skills/vetc-analyze-codebase/SKILL.md +118 -0
- package/skills/vetc-api-design/SKILL.md +103 -0
- package/skills/vetc-brainstorming/SKILL.md +116 -0
- package/skills/vetc-change-proposal/SKILL.md +111 -0
- package/skills/vetc-cicd/SKILL.md +113 -0
- package/skills/vetc-continuous-learning/SKILL.md +115 -0
- package/skills/vetc-deep-interview/SKILL.md +103 -0
- package/skills/vetc-docgen/SKILL.md +108 -0
- package/skills/vetc-frontend-patterns/SKILL.md +99 -0
- package/skills/vetc-iterative-retrieval/SKILL.md +110 -0
- package/skills/vetc-java-patterns/SKILL.md +113 -0
- package/skills/vetc-meta-skill-creator/SKILL.md +99 -0
- package/skills/vetc-oracle-patterns/SKILL.md +109 -0
- package/skills/vetc-performance-testing/SKILL.md +104 -0
- package/skills/vetc-pr-response/SKILL.md +106 -0
- package/skills/vetc-ralph/SKILL.md +108 -0
- package/skills/vetc-ralplan/SKILL.md +116 -0
- package/skills/vetc-receiving-review/SKILL.md +106 -0
- package/skills/vetc-reconcile-patterns/SKILL.md +117 -0
- package/skills/vetc-refactoring/SKILL.md +96 -0
- package/skills/vetc-runbook/SKILL.md +118 -0
- package/skills/vetc-sast/SKILL.md +118 -0
- package/skills/vetc-sdlc/SKILL.md +97 -0
- package/skills/vetc-security/SKILL.md +117 -0
- package/skills/vetc-spec-driven/SKILL.md +111 -0
- package/skills/vetc-spec-quality/SKILL.md +117 -0
- package/skills/vetc-systematic-debugging/SKILL.md +74 -0
- package/skills/vetc-tdd/SKILL.md +96 -0
- package/skills/vetc-thinking-pm/SKILL.md +110 -0
- package/skills/vetc-ui-visual-qa/SKILL.md +117 -0
- package/skills/vetc-verify/SKILL.md +101 -0
- package/skills/visual-verdict/SKILL.md +59 -0
- package/skills/what-if-oracle/SKILL.md +87 -0
- package/skills/widget-rendering/SKILL.md +85 -0
- package/skills/wiki/SKILL.md +69 -0
- package/skills/workspace-isolation/SKILL.md +85 -0
- package/skills/worktree-isolation/SKILL.md +85 -0
- package/skills/wowerpoint/SKILL.md +101 -0
- package/skills/writer-memory/SKILL.md +82 -0
- package/skills/writing-plans/SKILL.md +115 -0
- package/skills/writing-skills/SKILL.md +115 -0
- package/skills/xgboost/SKILL.md +29 -0
- package/skills/xgboost-ts/SKILL.md +28 -0
- package/skills/xlsx/SKILL.md +111 -0
- package/skills/zarr-python/SKILL.md +101 -0
- package/src/categories.ts +383 -0
- package/src/format.ts +104 -0
- package/src/indexer.ts +101 -0
- package/src/proactive.ts +51 -0
- package/src/scanner.ts +85 -0
- package/src/search.ts +89 -0
- package/src/strip.ts +29 -0
- package/src/synonyms.ts +83 -0
- package/src/text.ts +118 -0
- package/src/types.ts +64 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: semantic-compression
|
|
3
|
+
description: Aggressively remove grammatical scaffolding LLMs reconstruct while preserving meaning-carrying content. Output may be fragments. Use when compressing text for prompts, reducing token count, preparing context for LLM input, or making documentation more token-efficient. Applies LLM-aware compression rules that delete predictable grammar while preserving semantics.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Semantic Compression
|
|
7
|
+
|
|
8
|
+
LLMs reconstruct grammar from content words. Remove predictable glue; keep semantic payload. Prefer fragments over sentences.
|
|
9
|
+
|
|
10
|
+
## Aggressive Stance
|
|
11
|
+
|
|
12
|
+
- Output can be noun/verb stacks, list fragments, or label:value phrases.
|
|
13
|
+
- Default to deletion; keep function words only when loss changes meaning.
|
|
14
|
+
- Prefer base verb forms; drop tense/aspect unless timeline is critical.
|
|
15
|
+
|
|
16
|
+
## Deletion Tiers
|
|
17
|
+
|
|
18
|
+
**Tier 1 — Always delete (even if fragments):**
|
|
19
|
+
- Articles: a, an, the
|
|
20
|
+
- Copulas: is, are, was, were, am, be, been, being
|
|
21
|
+
- Expletive subjects: "There is/are...", "It is..."
|
|
22
|
+
- Complementizer: that (as clause marker)
|
|
23
|
+
- Pure intensifiers: very, quite, rather, really, extremely, somewhat
|
|
24
|
+
- Filler phrases: "in order to" → to, "due to the fact that" → because, "in terms of" → delete
|
|
25
|
+
- Infinitive "to" before verbs (unless it prevents noun/verb confusion)
|
|
26
|
+
- Conjunctions when list/contrast obvious: and, or, but
|
|
27
|
+
|
|
28
|
+
**Tier 2 — Delete unless meaning changes:**
|
|
29
|
+
- Auxiliary verbs: have/has/had, do/does/did, will/would (keep if tense/aspect matters)
|
|
30
|
+
- Modal verbs: can/could/may/might/should (keep when obligation/permission/possibility is critical; always keep must/must not)
|
|
31
|
+
|
|
32
|
+
## Always Preserve
|
|
33
|
+
|
|
34
|
+
- Nouns, main verbs, meaning-bearing adjectives/adverbs
|
|
35
|
+
- Numbers, quantifiers: "at least 5", "approximately", "more than"
|
|
36
|
+
- Uncertainty markers: "appears", "seems", "reportedly", "what sounded like"
|
|
37
|
+
- Negation: not, no, never, without, none
|
|
38
|
+
- Temporal markers: dates, frequencies, durations
|
|
39
|
+
- Causality and conditionals: because, therefore, despite, although, if, unless
|
|
40
|
+
- Requirements/permissions: must, required, prohibited, allowed
|
|
41
|
+
- Proper nouns, titles, technical terms
|
|
42
|
+
- Prepositions encoding relationships: from/to (direction), with/without (inclusion), between/among/within (relation), after/before (temporal), by (agent if passive)
|
|
43
|
+
|
|
44
|
+
## Structural Compression
|
|
45
|
+
|
|
46
|
+
- Passive → active when agent known: "was eaten by dog" → "dog ate"
|
|
47
|
+
- Nominalization → verb: "made a decision" → "decided"
|
|
48
|
+
- Drop implied subject when context allows: "System should log errors" → "Log errors"
|
|
49
|
+
- Redundant pairs → single: "each and every" → "every"
|
|
50
|
+
- Clause → modifier: "anomaly that was reported" → "reported anomaly"
|
|
51
|
+
|
|
52
|
+
## Examples
|
|
53
|
+
|
|
54
|
+
| Original | Compressed |
|
|
55
|
+
|----------|------------|
|
|
56
|
+
| The system was designed to efficiently process incoming data from multiple sources | System design: efficient process incoming data, multiple sources |
|
|
57
|
+
| There were at least 20 people who appeared to be waiting | At least 20 people apparent waiting |
|
|
58
|
+
| It is important to note that the medication should not be taken without food | Medication: should not take without food |
|
|
59
|
+
| The researcher made a decision to investigate the anomaly that was reported | Researcher decided: investigate reported anomaly |
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: setup
|
|
3
|
+
description: Use first for install/update routing — sends setup, doctor, or MCP requests to the correct OMC setup flow
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Setup
|
|
7
|
+
|
|
8
|
+
Use `setup` as the unified setup/configuration entrypoint.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
setup # full setup wizard
|
|
14
|
+
setup doctor # installation diagnostics
|
|
15
|
+
setup mcp # MCP server configuration
|
|
16
|
+
setup wizard --local # explicit wizard path
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Routing
|
|
20
|
+
|
|
21
|
+
Process the request by the **first argument only** so install/setup questions land on the right flow immediately:
|
|
22
|
+
|
|
23
|
+
- No argument, `wizard`, `local`, `global`, or `--force` -> route to `omc-setup` with the same remaining args
|
|
24
|
+
- `doctor` -> route to `omc-doctor` with everything after the `doctor` token
|
|
25
|
+
- `mcp` -> route to `mcp-setup` with everything after the `mcp` token
|
|
26
|
+
|
|
27
|
+
Examples:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
setup --local # => omc-setup --local
|
|
31
|
+
setup doctor --json # => omc-doctor --json
|
|
32
|
+
setup mcp github # => mcp-setup github
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Notes
|
|
36
|
+
|
|
37
|
+
- `omc-setup`, `omc-doctor`, and `mcp-setup` remain valid compatibility entrypoints.
|
|
38
|
+
- Prefer `setup` in new documentation and user guidance.
|
|
39
|
+
|
|
40
|
+
Task: {{ARGUMENTS}}
|
|
41
|
+
|
|
42
|
+
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: shap
|
|
3
|
+
description: Model interpretability and explainability using SHAP (SHapley Additive exPlanations). Use this skill when explaining machine learning model predictions, computing feature importance, generating SHAP plots (waterfall, beeswarm, bar, scatter, force, heatmap), debugging models, analyzing model bias or fairness, comparing models, or implementing explainable AI. Works with tree-based models (XGBoost, LightGBM, Random Forest), deep learning (TensorFlow, PyTorch), linear models, and any black-box model.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# SHAP (SHapley Additive exPlanations)
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
SHAP is a unified approach to explain machine learning model outputs using Shapley values from cooperative game theory. This skill provides comprehensive guidance for:
|
|
11
|
+
|
|
12
|
+
- Computing SHAP values for any model type
|
|
13
|
+
- Creating visualizations to understand feature importance
|
|
14
|
+
- Debugging and validating model behavior
|
|
15
|
+
- Analyzing fairness and bias
|
|
16
|
+
- Implementing explainable AI in production
|
|
17
|
+
|
|
18
|
+
SHAP works with all model types: tree-based models (XGBoost, LightGBM, CatBoost, Random Forest), deep learning models (TensorFlow, PyTorch, Keras), linear models, and black-box models.
|
|
19
|
+
|
|
20
|
+
## When to Use This Skill
|
|
21
|
+
|
|
22
|
+
**Trigger this skill when users ask about**:
|
|
23
|
+
- "Explain which features are most important in my model"
|
|
24
|
+
- "Generate SHAP plots" (waterfall, beeswarm, bar, scatter, force, heatmap, etc.)
|
|
25
|
+
- "Why did my model make this prediction?"
|
|
26
|
+
- "Calculate SHAP values for my model"
|
|
27
|
+
- "Visualize feature importance using SHAP"
|
|
28
|
+
- "Debug my model's behavior" or "validate my model"
|
|
29
|
+
- "Check my model for bias" or "analyze fairness"
|
|
30
|
+
- "Compare feature importance across models"
|
|
31
|
+
- "Implement explainable AI" or "add explanations to my model"
|
|
32
|
+
- "Understand feature interactions"
|
|
33
|
+
- "Create model interpretation dashboard"
|
|
34
|
+
|
|
35
|
+
## Quick Start Guide
|
|
36
|
+
|
|
37
|
+
### Step 1: Select the Right Explainer
|
|
38
|
+
|
|
39
|
+
**Decision Tree**:
|
|
40
|
+
|
|
41
|
+
1. **Tree-based model?** (XGBoost, LightGBM, CatBoost, Random Forest, Gradient Boosting)
|
|
42
|
+
- Use `shap.TreeExplainer` (fast, exact)
|
|
43
|
+
|
|
44
|
+
2. **Deep neural network?** (TensorFlow, PyTorch, Keras, CNNs, RNNs, Transformers)
|
|
45
|
+
- Use `shap.DeepExplainer` or `shap.GradientExplainer`
|
|
46
|
+
|
|
47
|
+
3. **Linear model?** (Linear/Logistic Regression, GLMs)
|
|
48
|
+
- Use `shap.LinearExplainer` (extremely fast)
|
|
49
|
+
|
|
50
|
+
4. **Any other model?** (SVMs, custom functions, black-box models)
|
|
51
|
+
- Use `shap.KernelExplainer` (model-agnostic but slower)
|
|
52
|
+
|
|
53
|
+
### Step 2: Compute SHAP Values
|
|
54
|
+
|
|
55
|
+
```python
|
|
56
|
+
import shap
|
|
57
|
+
|
|
58
|
+
# Example with tree-based model (XGBoost)
|
|
59
|
+
import xgboost as xgb
|
|
60
|
+
|
|
61
|
+
# Train model
|
|
62
|
+
model = xgb.XGBClassifier().fit(X_train, y_train)
|
|
63
|
+
|
|
64
|
+
# Create explainer
|
|
65
|
+
explainer = shap.TreeExplainer(model)
|
|
66
|
+
|
|
67
|
+
# Compute SHAP values
|
|
68
|
+
shap_values = explainer(X_test)
|
|
69
|
+
|
|
70
|
+
# The shap_values object contains:
|
|
71
|
+
# - values: SHAP values (feature attributions)
|
|
72
|
+
# - base_values: Expected model output (baseline)
|
|
73
|
+
# - data: Original feature values
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Step 3: Visualize Results
|
|
77
|
+
|
|
78
|
+
**For Global Understanding** (entire dataset):
|
|
79
|
+
```python
|
|
80
|
+
# Beeswarm plot - shows feature importance with value distributions
|
|
81
|
+
shap.plots.beeswarm(shap_values, max_display=15)
|
|
82
|
+
|
|
83
|
+
# Bar plot - clean summary of feature importance
|
|
84
|
+
shap.plots.bar(shap_values)
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
**For Individual Predictions**:
|
|
88
|
+
```python
|
|
89
|
+
# Waterfall plot - detailed breakdown of single prediction
|
|
90
|
+
shap.plots.waterfall(shap_values[0])
|
|
91
|
+
|
|
92
|
+
# Force plot - additive force visualization
|
|
93
|
+
shap.plots.force(shap_values[0])
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
**For Feature Relationships**:
|
|
97
|
+
```python
|
|
98
|
+
# Scatter plot - feature-prediction relationship
|
|
99
|
+
shap.plots.scatter(shap_values[:, "Feature_Name"])
|
|
100
|
+
|
|
101
|
+
# Colored by another feature to show interactions
|
|
102
|
+
shap.plots.scatter(shap_values[:, "Age"], color=shap_values[:, "Education"])
|
|
103
|
+
```
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: simpy
|
|
3
|
+
description: Process-based discrete-event simulation framework in Python. Use this skill when building simulations of systems with processes, queues, resources, and time-based events such as manufacturing systems, service operations, network traffic, logistics, or any system where entities interact with shared resources over time.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# SimPy - Discrete-Event Simulation
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
SimPy is a process-based discrete-event simulation framework based on standard Python. Use SimPy to model systems where entities (customers, vehicles, packets, etc.) interact with each other and compete for shared resources (servers, machines, bandwidth, etc.) over time.
|
|
11
|
+
|
|
12
|
+
**Core capabilities:**
|
|
13
|
+
- Process modeling using Python generator functions
|
|
14
|
+
- Shared resource management (servers, containers, stores)
|
|
15
|
+
- Event-driven scheduling and synchronization
|
|
16
|
+
- Real-time simulations synchronized with wall-clock time
|
|
17
|
+
- Comprehensive monitoring and data collection
|
|
18
|
+
|
|
19
|
+
## When to Use This Skill
|
|
20
|
+
|
|
21
|
+
Use the SimPy skill when:
|
|
22
|
+
|
|
23
|
+
1. **Modeling discrete-event systems** - Systems where events occur at irregular intervals
|
|
24
|
+
2. **Resource contention** - Entities compete for limited resources (servers, machines, staff)
|
|
25
|
+
3. **Queue analysis** - Studying waiting lines, service times, and throughput
|
|
26
|
+
4. **Process optimization** - Analyzing manufacturing, logistics, or service processes
|
|
27
|
+
5. **Network simulation** - Packet routing, bandwidth allocation, latency analysis
|
|
28
|
+
6. **Capacity planning** - Determining optimal resource levels for desired performance
|
|
29
|
+
7. **System validation** - Testing system behavior before implementation
|
|
30
|
+
|
|
31
|
+
**Not suitable for:**
|
|
32
|
+
- Continuous simulations with fixed time steps (consider SciPy ODE solvers)
|
|
33
|
+
- Independent processes without resource sharing
|
|
34
|
+
- Pure mathematical optimization (consider SciPy optimize)
|
|
35
|
+
|
|
36
|
+
## Quick Start
|
|
37
|
+
|
|
38
|
+
### Basic Simulation Structure
|
|
39
|
+
|
|
40
|
+
```python
|
|
41
|
+
import simpy
|
|
42
|
+
|
|
43
|
+
def process(env, name):
|
|
44
|
+
"""A simple process that waits and prints."""
|
|
45
|
+
print(f'{name} starting at {env.now}')
|
|
46
|
+
yield env.timeout(5)
|
|
47
|
+
print(f'{name} finishing at {env.now}')
|
|
48
|
+
|
|
49
|
+
# Create environment
|
|
50
|
+
env = simpy.Environment()
|
|
51
|
+
|
|
52
|
+
# Start processes
|
|
53
|
+
env.process(process(env, 'Process 1'))
|
|
54
|
+
env.process(process(env, 'Process 2'))
|
|
55
|
+
|
|
56
|
+
# Run simulation
|
|
57
|
+
env.run(until=10)
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Resource Usage Pattern
|
|
61
|
+
|
|
62
|
+
```python
|
|
63
|
+
import simpy
|
|
64
|
+
|
|
65
|
+
def customer(env, name, resource):
|
|
66
|
+
"""Customer requests resource, uses it, then releases."""
|
|
67
|
+
with resource.request() as req:
|
|
68
|
+
yield req # Wait for resource
|
|
69
|
+
print(f'{name} got resource at {env.now}')
|
|
70
|
+
yield env.timeout(3) # Use resource
|
|
71
|
+
print(f'{name} released resource at {env.now}')
|
|
72
|
+
|
|
73
|
+
env = simpy.Environment()
|
|
74
|
+
server = simpy.Resource(env, capacity=1)
|
|
75
|
+
|
|
76
|
+
## Core Concepts
|
|
77
|
+
|
|
78
|
+
### 1. Environment
|
|
79
|
+
|
|
80
|
+
The simulation environment manages time and schedules events.
|
|
81
|
+
|
|
82
|
+
```python
|
|
83
|
+
import simpy
|
|
84
|
+
|
|
85
|
+
# Standard environment (runs as fast as possible)
|
|
86
|
+
env = simpy.Environment(initial_time=0)
|
|
87
|
+
|
|
88
|
+
# Real-time environment (synchronized with wall-clock)
|
|
89
|
+
import simpy.rt
|
|
90
|
+
env_rt = simpy.rt.RealtimeEnvironment(factor=1.0)
|
|
91
|
+
|
|
92
|
+
# Run simulation
|
|
93
|
+
env.run(until=100) # Run until time 100
|
|
94
|
+
env.run() # Run until no events remain
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### 2. Processes
|
|
98
|
+
|
|
99
|
+
Processes are defined using Python generator functions (functions with `yield` statements).
|
|
100
|
+
|
|
101
|
+
```python
|
|
102
|
+
def my_process(env, param1, param2):
|
|
103
|
+
"""Process that yields events to pause execution."""
|
|
104
|
+
print(f'Starting at {env.now}')
|
|
105
|
+
|
|
106
|
+
# Wait for time to pass
|
|
107
|
+
yield env.timeout(5)
|
|
108
|
+
|
|
109
|
+
print(f'Resumed at {env.now}')
|
|
110
|
+
|
|
111
|
+
# Wait for another event
|
|
112
|
+
|
|
113
|
+
# Start the process
|
|
114
|
+
env.process(my_process(env, 'value1', 'value2'))
|
|
115
|
+
|
|
116
|
+
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: skill
|
|
3
|
+
description: Manage local skills - list, add, remove, search, edit, setup wizard
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Skill Management CLI
|
|
7
|
+
|
|
8
|
+
Meta-skill for managing oh-my-claudecode skills via CLI-like commands.
|
|
9
|
+
|
|
10
|
+
## Subcommands
|
|
11
|
+
|
|
12
|
+
### /skill list
|
|
13
|
+
|
|
14
|
+
Show all available skills organized by scope.
|
|
15
|
+
|
|
16
|
+
**Behavior:**
|
|
17
|
+
1. Scan bundled built-in skills in the plugin `skills/` directory (read-only)
|
|
18
|
+
2. Scan user skills at `${CLAUDE_CONFIG_DIR:-~/.claude}/skills/omc-learned/`
|
|
19
|
+
3. Scan project skills at `.omc/skills/`
|
|
20
|
+
4. Parse YAML frontmatter for metadata
|
|
21
|
+
5. Display in organized table format:
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
BUILT-IN SKILLS (bundled with oh-my-claudecode):
|
|
25
|
+
| Name | Description | Scope |
|
|
26
|
+
|-------------------|--------------------------------|----------|
|
|
27
|
+
|
|
28
|
+
### /skill add [name]
|
|
29
|
+
|
|
30
|
+
Interactive wizard for creating a new skill.
|
|
31
|
+
|
|
32
|
+
**Behavior:**
|
|
33
|
+
1. **Ask for skill name** (if not provided in command)
|
|
34
|
+
- Validate: lowercase, hyphens only, no spaces
|
|
35
|
+
2. **Ask for description**
|
|
36
|
+
- Clear, concise one-liner
|
|
37
|
+
3. **Ask for triggers** (comma-separated keywords)
|
|
38
|
+
- Example: "error, fix, debug"
|
|
39
|
+
4. **Ask for argument hint** (optional)
|
|
40
|
+
- Example: "<file> [options]"
|
|
41
|
+
5. **Ask for scope:**
|
|
42
|
+
- `user` → `${CLAUDE_CONFIG_DIR:-~/.claude}/skills/omc-learned//SKILL.md`
|
|
43
|
+
|
|
44
|
+
# Skill
|
|
45
|
+
|
|
46
|
+
## Purpose
|
|
47
|
+
|
|
48
|
+
[Describe what this skill does]
|
|
49
|
+
|
|
50
|
+
## When to Activate
|
|
51
|
+
|
|
52
|
+
[Describe triggers and conditions]
|
|
53
|
+
|
|
54
|
+
## Workflow
|
|
55
|
+
|
|
56
|
+
1. [Step 1]
|
|
57
|
+
2. [Step 2]
|
|
58
|
+
3. [Step 3]
|
|
59
|
+
|
|
60
|
+
## Examples
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
/oh-my-claudecode: example-arg
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Notes
|
|
67
|
+
|
|
68
|
+
[Additional context, edge cases, gotchas]
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
7. **Report success** with file path
|
|
72
|
+
8. **Suggest:** "Edit `/skill edit ` to customize content"
|
|
73
|
+
|
|
74
|
+
**Example:**
|
|
75
|
+
```
|
|
76
|
+
User: /skill add custom-logger
|
|
77
|
+
Assistant: Creating new skill 'custom-logger'...
|
|
78
|
+
|
|
79
|
+
Description: Enhanced logging with structured output
|
|
80
|
+
Triggers (comma-separated): log, logger, logging
|
|
81
|
+
|
|
82
|
+
### /skill remove
|
|
83
|
+
|
|
84
|
+
Remove a skill by name.
|
|
85
|
+
|
|
86
|
+
**Behavior:**
|
|
87
|
+
1. **Search for skill** in both scopes:
|
|
88
|
+
- `${CLAUDE_CONFIG_DIR:-~/.claude}/skills/omc-learned//SKILL.md`
|
|
89
|
+
- `.omc/skills//SKILL.md`
|
|
90
|
+
2. **If found:**
|
|
91
|
+
- Display skill info (name, description, scope)
|
|
92
|
+
- **Ask for confirmation:** "Delete '' skill from <scope>? (yes/no)"
|
|
93
|
+
3. **If confirmed:**
|
|
94
|
+
- Delete entire skill directory (e.g., `${CLAUDE_CONFIG_DIR:-~/.claude}/skills/omc-learned//`)
|
|
95
|
+
- Report: "✓ Removed skill '' from <scope>"
|
|
96
|
+
4. **If not found:**
|
|
97
|
+
|
|
98
|
+
### /skill edit
|
|
99
|
+
|
|
100
|
+
Edit an existing skill interactively.
|
|
101
|
+
|
|
102
|
+
**Behavior:**
|
|
103
|
+
1. **Find skill** by name (search both scopes)
|
|
104
|
+
2. **Read current content** via Read tool
|
|
105
|
+
3. **Display current values:**
|
|
106
|
+
```
|
|
107
|
+
Current skill 'custom-logger':
|
|
108
|
+
- Description: Enhanced logging with structured output
|
|
109
|
+
- Triggers: log, logger, logging
|
|
110
|
+
- Argument hint: <level> [message]
|
|
111
|
+
- Scope: user
|
|
112
|
+
|
|
113
|
+
### /skill search <query>
|
|
114
|
+
|
|
115
|
+
Search skills by content, triggers, name, or description.
|
|
116
|
+
|
|
117
|
+
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: skill-search
|
|
3
|
+
description: On-demand skill discovery tool. Use when you need to find relevant skills for a task instead of scanning all available skills manually. Replaces full skill injection with search-by-keyword.
|
|
4
|
+
---
|
|
5
|
+
# skill-search
|
|
6
|
+
|
|
7
|
+
Use this skill when you need to **find** the right skill for a task from a large collection.
|
|
8
|
+
|
|
9
|
+
## When to use
|
|
10
|
+
|
|
11
|
+
- You see `## Available Skill Domains` in your system prompt — this means `pi-skill-search` is active and skills are indexed.
|
|
12
|
+
- You need a skill for a specific task but don't know its exact name.
|
|
13
|
+
- A user mentions a domain (chemistry, ML, plotting, databases…) and you want matching skills.
|
|
14
|
+
- You're about to work on a task that could benefit from specialized instructions.
|
|
15
|
+
|
|
16
|
+
## How to use
|
|
17
|
+
|
|
18
|
+
### 1. Search for skills
|
|
19
|
+
|
|
20
|
+
Call the `skill-search` tool with a keyword query:
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
skill-search({ query: "molecular docking", limit: 5 })
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
- `query` (required): 1–500 characters. Use **domain keywords**, tool names, or task descriptions.
|
|
27
|
+
- `limit` (optional): 1–20 results, default 5.
|
|
28
|
+
|
|
29
|
+
### 2. Read the full skill
|
|
30
|
+
|
|
31
|
+
Search results return `name`, `description`, and `path`. **Always** use the `read` tool to load the full SKILL.md from the returned path before following its instructions:
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
read({ path: "/path/to/skill/SKILL.md" })
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
When a skill file references relative paths, resolve them against the skill's parent directory.
|
|
38
|
+
|
|
39
|
+
### 3. Follow the skill's instructions
|
|
40
|
+
|
|
41
|
+
After loading SKILL.md, follow its guidance for the current task. Each skill contains domain-specific rules, anti-patterns, and code conventions.
|
|
42
|
+
|
|
43
|
+
## Query tips
|
|
44
|
+
|
|
45
|
+
| Strategy | Example query | When |
|
|
46
|
+
|---|---|---|
|
|
47
|
+
| Domain keyword | `"plotting"`, `"database"`, `"genomics"` | Broad exploration |
|
|
48
|
+
| Tool/library name | `"rdkit"`, `"scanpy"`, `"spark"` | You know the tool |
|
|
49
|
+
| Task description | `"train machine learning model"` | Describe what you want |
|
|
50
|
+
| Category hint | `"chemistry"`, `"visualization"` | Browse a domain |
|
|
51
|
+
|
|
52
|
+
The search engine applies **synonym expansion** automatically (e.g., "ml" → "machine learning", "plot" → "plotting visualization chart graph"). You don't need to guess exact keywords.
|
|
53
|
+
|
|
54
|
+
## How it works
|
|
55
|
+
|
|
56
|
+
1. **At session start**, the extension strips the full `<available_skills>` block and replaces it with a compact category summary (~250 tokens instead of ~23,500 for 137 skills).
|
|
57
|
+
2. **On search**, it scores skills using tokenized query matching against name, description, and category keywords.
|
|
58
|
+
3. **Results** include name, description, score, and file path.
|
|
59
|
+
|
|
60
|
+
## Anti-patterns
|
|
61
|
+
|
|
62
|
+
- **Don't** call `skill-search` on every turn "just in case" — call it when you actually need a skill for the current task.
|
|
63
|
+
- **Don't** skip reading the SKILL.md — the search result description is a summary, not the full instructions.
|
|
64
|
+
- **Don't** assume the category summary lists every skill — it shows domain names and a few examples. Search for specifics.
|
|
65
|
+
- **Don't** use overly specific queries like exact error messages — use domain keywords instead.
|
|
66
|
+
|
|
67
|
+
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: skillify
|
|
3
|
+
description: Turn a repeatable workflow from the current session into a reusable OMC skill draft
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Skillify
|
|
7
|
+
|
|
8
|
+
Use this skill when the current session uncovered a repeatable workflow that should become a reusable OMC skill.
|
|
9
|
+
|
|
10
|
+
> Compatibility: `learner` is a deprecated alias for this skill. Prefer `skillify` in docs, prompts, and new workflows. Internal implementation modules may still use the learner name.
|
|
11
|
+
|
|
12
|
+
## Goal
|
|
13
|
+
Capture a successful multi-step workflow as a concrete skill draft instead of rediscovering it later.
|
|
14
|
+
|
|
15
|
+
## Quality Gate
|
|
16
|
+
Before extracting a skill, all three should be true:
|
|
17
|
+
- "Could someone Google this in 5 minutes?" → No.
|
|
18
|
+
- "Is this specific to this codebase, project, or workflow?" → Yes.
|
|
19
|
+
- "Did this take real debugging, design, or operational effort to discover?" → Yes.
|
|
20
|
+
|
|
21
|
+
Prefer skills that encode decision-making heuristics, constraints, pitfalls, and verification steps. Avoid generic snippets, boilerplate, or library usage examples that belong in normal documentation.
|
|
22
|
+
|
|
23
|
+
## Workflow
|
|
24
|
+
1. Identify the repeatable task the session accomplished.
|
|
25
|
+
2. Extract:
|
|
26
|
+
- inputs
|
|
27
|
+
- ordered steps
|
|
28
|
+
- success criteria
|
|
29
|
+
- constraints / pitfalls
|
|
30
|
+
- verification evidence
|
|
31
|
+
- best target location for the skill
|
|
32
|
+
3. Decide whether the workflow belongs as:
|
|
33
|
+
- a repo built-in skill
|
|
34
|
+
- a user/project learned skill
|
|
35
|
+
- documentation only
|
|
36
|
+
4. When drafting a learned skill file, output a complete skill file that starts with YAML frontmatter.
|
|
37
|
+
- Never emit plain markdown-only skill files.
|
|
38
|
+
|
|
39
|
+
## Rules
|
|
40
|
+
- Only capture workflows that are actually repeatable.
|
|
41
|
+
- Keep the skill practical and scoped.
|
|
42
|
+
- Prefer explicit success criteria over vague prose.
|
|
43
|
+
- If the workflow still has unresolved branching decisions, note them before drafting.
|
|
44
|
+
- Keep `omc-learned` as the storage directory name for compatibility; do not present it as the public invocation name.
|
|
45
|
+
|
|
46
|
+
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: smart-explore
|
|
3
|
+
description: Token-optimized structural code search using tree-sitter AST parsing. Use instead of reading full files when you need to understand code structure, find functions, or explore a codebase efficiently.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Smart Explore
|
|
7
|
+
|
|
8
|
+
Structural code exploration using AST parsing. **This skill overrides your default exploration behavior.** While this skill is active, use smart_search/smart_outline/smart_unfold as your primary tools instead of Read, Grep, and Glob.
|
|
9
|
+
|
|
10
|
+
**Core principle:** Index first, fetch on demand. Give yourself a map of the code before loading implementation details. The question before every file read should be: "do I need to see all of this, or can I get a structural overview first?" The answer is almost always: get the map.
|
|
11
|
+
|
|
12
|
+
## Your Next Tool Call
|
|
13
|
+
|
|
14
|
+
This skill only loads instructions. You must call the MCP tools yourself. Your next action should be one of:
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
smart_search(query="<topic>", path="./src") -- discover files + symbols across a directory
|
|
18
|
+
smart_outline(file_path="<file>") -- structural skeleton of one file
|
|
19
|
+
smart_unfold(file_path="<file>", symbol_name="") -- full source of one symbol
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Do NOT run Grep, Glob, Read, or find to discover files first. `smart_search` walks directories, parses all code files, and returns ranked symbols in one call. It replaces the Glob → Grep → Read discovery cycle.
|
|
23
|
+
|
|
24
|
+
## 3-Layer Workflow
|
|
25
|
+
|
|
26
|
+
### Step 1: Search -- Discover Files and Symbols
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
smart_search(query="shutdown", path="./src", max_results=15)
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
**Returns:** Ranked symbols with signatures, line numbers, match reasons, plus folded file views (~2-6k tokens)
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
-- Matching Symbols --
|
|
36
|
+
function performGracefulShutdown (services/infrastructure/GracefulShutdown.ts:56)
|
|
37
|
+
function httpShutdown (services/infrastructure/HealthMonitor.ts:92)
|
|
38
|
+
method WorkerService.shutdown (services/worker-service.ts:846)
|
|
39
|
+
|
|
40
|
+
-- Folded File Views --
|
|
41
|
+
|
|
42
|
+
### Step 2: Outline -- Get File Structure
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
smart_outline(file_path="services/worker-service.ts")
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
**Returns:** Complete structural skeleton -- all functions, classes, methods, properties, imports (~1-2k tokens per file)
|
|
49
|
+
|
|
50
|
+
**Skip this step** when Step 1's folded file views already provide enough structure. Most useful for files not covered by the search results.
|
|
51
|
+
|
|
52
|
+
**Parameters:**
|
|
53
|
+
|
|
54
|
+
- `file_path` (string, required) -- Path to the file
|
|
55
|
+
|
|
56
|
+
### Step 3: Unfold -- See Implementation
|
|
57
|
+
|
|
58
|
+
Review symbols from Steps 1-2. Pick the ones you need. Unfold only those:
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
smart_unfold(file_path="services/worker-service.ts", symbol_name="shutdown")
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
**Returns:** Full source code of the specified symbol including JSDoc, decorators, and complete implementation (~400-2,100 tokens depending on symbol size). AST node boundaries guarantee completeness regardless of symbol size — unlike Read + agent summarization, which may truncate long methods.
|
|
65
|
+
|
|
66
|
+
**Parameters:**
|
|
67
|
+
|
|
68
|
+
- `file_path` (string, required) -- Path to the file (as returned by search/outline)
|
|
69
|
+
- `symbol_name` (string, required) -- Name of the function/class/method to expand
|
|
70
|
+
|
|
71
|
+
## When to Use Standard Tools Instead
|
|
72
|
+
|
|
73
|
+
Use these only when smart_* tools are the wrong fit:
|
|
74
|
+
|
|
75
|
+
- **Grep:** Exact string/regex search ("find all TODO comments", "where is `ensureWorkerStarted` defined?")
|
|
76
|
+
- **Read:** Small files under ~100 lines, non-code files (JSON, markdown, config)
|
|
77
|
+
- **Glob:** File path patterns ("find all test files")
|
|
78
|
+
- **Explore agent:** When you need synthesized understanding across 6+ files, architecture narratives, or answers to open-ended questions like "how does this entire system work end-to-end?" Smart-explore is a scalpel — it answers "where is this?" and "show me that." It doesn't synthesize cross-file data flows, design decisions, or edge cases across an entire feature.
|
|
79
|
+
|
|
80
|
+
For code files over ~100 lines, prefer smart_outline + smart_unfold over Read.
|
|
81
|
+
|
|
82
|
+
## Workflow Examples
|
|
83
|
+
|
|
84
|
+
**Discover how a feature works (cross-cutting):**
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
1. smart_search(query="shutdown", path="./src")
|
|
88
|
+
-> 14 symbols across 7 files, full picture in one call
|
|
89
|
+
2. smart_unfold(file_path="services/infrastructure/GracefulShutdown.ts", symbol_name="performGracefulShutdown")
|
|
90
|
+
-> See the core implementation
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
**Navigate a large file:**
|
|
94
|
+
```
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sqlite-pandas
|
|
3
|
+
description: Relational database querying and tabular data manipulation. Use when reading/writing SQLite databases with pandas, performing SQL joins, aggregations, window functions, or converting between DataFrames and SQL tables. Trigger on imports of sqlite3, pandas.read_sql, or mentions of database query, SQL, table join, data aggregation.
|
|
4
|
+
---
|
|
5
|
+
# sqlite-pandas
|
|
6
|
+
|
|
7
|
+
Use this skill for database operations with pandas DataFrames.
|
|
8
|
+
|
|
9
|
+
## Core patterns
|
|
10
|
+
|
|
11
|
+
- **Connect**: `conn = sqlite3.connect('data.db')`.
|
|
12
|
+
- **Read**: `pd.read_sql_query("SELECT * FROM table WHERE col > ?", conn, params=[val])`.
|
|
13
|
+
- **Write**: `df.to_sql('table', conn, if_exists='append', index=False)`.
|
|
14
|
+
- **Join**: SQL `JOIN` for multi-table queries; `pd.merge()` for in-memory joins.
|
|
15
|
+
- **Aggregation**: SQL `GROUP BY` + `HAVING` for server-side; `df.groupby().agg()` for client-side.
|
|
16
|
+
|
|
17
|
+
## Rules
|
|
18
|
+
|
|
19
|
+
- Always use parameterized queries (`?` placeholders) — never f-string SQL.
|
|
20
|
+
- Close connections: use `with sqlite3.connect() as conn:` or `conn.close()`.
|
|
21
|
+
- For large tables, use `chunksize` parameter in `pd.read_sql_query()`.
|
|
22
|
+
- Index columns used in WHERE/JOIN: `CREATE INDEX idx_col ON table(col)`.
|
|
23
|
+
|
|
24
|
+
## Anti-patterns
|
|
25
|
+
|
|
26
|
+
- Don't load entire database into memory — filter in SQL first.
|
|
27
|
+
- Don't use `pd.read_sql_query()` without `params` for user input — SQL injection risk.
|
|
28
|
+
- Don't mix datetime formats — SQLite stores dates as text; parse with `parse_dates` parameter.
|
|
29
|
+
|
|
30
|
+
|