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,113 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pdf
|
|
3
|
+
description: Use this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# PDF Processing Guide
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
This guide covers essential PDF processing operations using Python libraries and command-line tools. For advanced features, JavaScript libraries, and detailed examples, see reference.md. If you need to fill out a PDF form, read forms.md and follow its instructions.
|
|
11
|
+
|
|
12
|
+
## Quick Start
|
|
13
|
+
|
|
14
|
+
```python
|
|
15
|
+
from pypdf import PdfReader, PdfWriter
|
|
16
|
+
|
|
17
|
+
# Read a PDF
|
|
18
|
+
reader = PdfReader("document.pdf")
|
|
19
|
+
print(f"Pages: {len(reader.pages)}")
|
|
20
|
+
|
|
21
|
+
# Extract text
|
|
22
|
+
text = ""
|
|
23
|
+
for page in reader.pages:
|
|
24
|
+
text += page.extract_text()
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Python Libraries
|
|
28
|
+
|
|
29
|
+
### pypdf - Basic Operations
|
|
30
|
+
|
|
31
|
+
#### Merge PDFs
|
|
32
|
+
```python
|
|
33
|
+
from pypdf import PdfWriter, PdfReader
|
|
34
|
+
|
|
35
|
+
writer = PdfWriter()
|
|
36
|
+
for pdf_file in ["doc1.pdf", "doc2.pdf", "doc3.pdf"]:
|
|
37
|
+
reader = PdfReader(pdf_file)
|
|
38
|
+
for page in reader.pages:
|
|
39
|
+
writer.add_page(page)
|
|
40
|
+
|
|
41
|
+
with open("merged.pdf", "wb") as output:
|
|
42
|
+
writer.write(output)
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### pdfplumber - Text and Table Extraction
|
|
46
|
+
|
|
47
|
+
#### Extract Text with Layout
|
|
48
|
+
```python
|
|
49
|
+
import pdfplumber
|
|
50
|
+
|
|
51
|
+
with pdfplumber.open("document.pdf") as pdf:
|
|
52
|
+
for page in pdf.pages:
|
|
53
|
+
text = page.extract_text()
|
|
54
|
+
print(text)
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
#### Extract Tables
|
|
58
|
+
```python
|
|
59
|
+
with pdfplumber.open("document.pdf") as pdf:
|
|
60
|
+
|
|
61
|
+
# Combine all tables
|
|
62
|
+
if all_tables:
|
|
63
|
+
combined_df = pd.concat(all_tables, ignore_index=True)
|
|
64
|
+
combined_df.to_excel("extracted_tables.xlsx", index=False)
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### reportlab - Create PDFs
|
|
68
|
+
|
|
69
|
+
#### Basic PDF Creation
|
|
70
|
+
```python
|
|
71
|
+
from reportlab.lib.pagesizes import letter
|
|
72
|
+
from reportlab.pdfgen import canvas
|
|
73
|
+
|
|
74
|
+
c = canvas.Canvas("hello.pdf", pagesize=letter)
|
|
75
|
+
width, height = letter
|
|
76
|
+
|
|
77
|
+
# Add text
|
|
78
|
+
c.drawString(100, height - 100, "Hello World!")
|
|
79
|
+
c.drawString(100, height - 120, "This is a PDF created with reportlab")
|
|
80
|
+
|
|
81
|
+
# Add a line
|
|
82
|
+
c.line(100, height - 140, 400, height - 140)
|
|
83
|
+
|
|
84
|
+
# Save
|
|
85
|
+
c.save()
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
#### Create PDF with Multiple Pages
|
|
89
|
+
```python
|
|
90
|
+
from reportlab.lib.pagesizes import letter
|
|
91
|
+
from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, PageBreak
|
|
92
|
+
from reportlab.lib.styles import getSampleStyleSheet
|
|
93
|
+
|
|
94
|
+
doc = SimpleDocTemplate("report.pdf", pagesize=letter)
|
|
95
|
+
styles = getSampleStyleSheet()
|
|
96
|
+
story = []
|
|
97
|
+
|
|
98
|
+
# Add content
|
|
99
|
+
title = Paragraph("Report Title", styles['Title'])
|
|
100
|
+
story.append(title)
|
|
101
|
+
story.append(Spacer(1, 12))
|
|
102
|
+
|
|
103
|
+
body = Paragraph("This is the body of the report. " * 20, styles['Normal'])
|
|
104
|
+
story.append(body)
|
|
105
|
+
story.append(PageBreak())
|
|
106
|
+
|
|
107
|
+
# Page 2
|
|
108
|
+
story.append(Paragraph("Page 2", styles['Heading1']))
|
|
109
|
+
story.append(Paragraph("Content for page 2", styles['Normal']))
|
|
110
|
+
|
|
111
|
+
# Build PDF
|
|
112
|
+
doc.build(story)
|
|
113
|
+
```
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: peer-review
|
|
3
|
+
description: Structured manuscript/grant review with checklist-based evaluation. Use when writing formal peer reviews with specific criteria methodology assessment, statistical validity, reporting standards compliance (CONSORT/STROBE), and constructive feedback. Best for actual review writing, manuscript revision. For evaluating claims/evidence quality use scientific-critical-thinking; for quantitative scoring frameworks use scholar-evaluation.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Scientific Critical Evaluation and Peer Review
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
Peer review is a systematic process for evaluating scientific manuscripts. Assess methodology, statistics, design, reproducibility, ethics, and reporting standards. Apply this skill for manuscript and grant review across disciplines with constructive, rigorous evaluation.
|
|
11
|
+
|
|
12
|
+
## When to Use This Skill
|
|
13
|
+
|
|
14
|
+
This skill should be used when:
|
|
15
|
+
- Conducting peer review of scientific manuscripts for journals
|
|
16
|
+
- Evaluating grant proposals and research applications
|
|
17
|
+
- Assessing methodology and experimental design rigor
|
|
18
|
+
- Reviewing statistical analyses and reporting standards
|
|
19
|
+
- Evaluating reproducibility and data availability
|
|
20
|
+
- Checking compliance with reporting guidelines (CONSORT, STROBE, PRISMA)
|
|
21
|
+
- Providing constructive feedback on scientific writing
|
|
22
|
+
|
|
23
|
+
## Visual Enhancement with Scientific Schematics
|
|
24
|
+
|
|
25
|
+
**When creating documents with this skill, always consider adding scientific diagrams and schematics to enhance visual communication.**
|
|
26
|
+
|
|
27
|
+
If your document does not already contain schematics or diagrams:
|
|
28
|
+
- Use the **scientific-schematics** skill to generate AI-powered publication-quality diagrams
|
|
29
|
+
- Simply describe your desired diagram in natural language
|
|
30
|
+
- Nano Banana Pro will automatically generate, review, and refine the schematic
|
|
31
|
+
|
|
32
|
+
**For new documents:** Scientific schematics should be generated by default to visually represent key concepts, workflows, architectures, or relationships described in the text.
|
|
33
|
+
|
|
34
|
+
**How to generate schematics:**
|
|
35
|
+
```bash
|
|
36
|
+
python scripts/generate_schematic.py "your diagram description" -o figures/output.png
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Peer Review Workflow
|
|
40
|
+
|
|
41
|
+
Conduct peer review systematically through the following stages, adapting depth and focus based on the manuscript type and discipline.
|
|
42
|
+
|
|
43
|
+
### Stage 1: Initial Assessment
|
|
44
|
+
|
|
45
|
+
Begin with a high-level evaluation to determine the manuscript's scope, novelty, and overall quality.
|
|
46
|
+
|
|
47
|
+
**Key Questions:**
|
|
48
|
+
- What is the central research question or hypothesis?
|
|
49
|
+
- What are the main findings and conclusions?
|
|
50
|
+
- Is the work scientifically sound and significant?
|
|
51
|
+
- Is the work appropriate for the intended venue?
|
|
52
|
+
- Are there any immediate major flaws that would preclude publication?
|
|
53
|
+
|
|
54
|
+
**Output:** Brief summary (2-3 sentences) capturing the manuscript's essence and initial impression.
|
|
55
|
+
|
|
56
|
+
### Stage 2: Detailed Section-by-Section Review
|
|
57
|
+
|
|
58
|
+
Conduct a thorough evaluation of each manuscript section, documenting specific concerns and strengths.
|
|
59
|
+
|
|
60
|
+
#### Abstract and Title
|
|
61
|
+
- **Accuracy:** Does the abstract accurately reflect the study's content and conclusions?
|
|
62
|
+
- **Clarity:** Is the title specific, accurate, and informative?
|
|
63
|
+
- **Completeness:** Are key findings and methods summarized appropriately?
|
|
64
|
+
- **Accessibility:** Is the abstract comprehensible to a broad scientific audience?
|
|
65
|
+
|
|
66
|
+
#### Introduction
|
|
67
|
+
- **Context:** Is the background information adequate and current?
|
|
68
|
+
- **Rationale:** Is the research question clearly motivated and justified?
|
|
69
|
+
- **Novelty:** Is the work's originality and significance clearly articulated?
|
|
70
|
+
- **Literature:** Are relevant prior studies appropriately cited?
|
|
71
|
+
|
|
72
|
+
### Stage 3: Methodological and Statistical Rigor
|
|
73
|
+
|
|
74
|
+
Evaluate the technical quality and rigor of the research with particular attention to common pitfalls.
|
|
75
|
+
|
|
76
|
+
**Statistical Assessment:**
|
|
77
|
+
- Are statistical assumptions met (normality, independence, homoscedasticity)?
|
|
78
|
+
- Are effect sizes reported alongside p-values?
|
|
79
|
+
- Is multiple testing correction applied appropriately?
|
|
80
|
+
- Are confidence intervals provided?
|
|
81
|
+
- Is sample size justified with power analysis?
|
|
82
|
+
- Are parametric vs. non-parametric tests chosen appropriately?
|
|
83
|
+
- Are missing data handled properly?
|
|
84
|
+
- Are exploratory vs. confirmatory analyses distinguished?
|
|
85
|
+
|
|
86
|
+
**Experimental Design:**
|
|
87
|
+
|
|
88
|
+
### Stage 4: Reproducibility and Transparency
|
|
89
|
+
|
|
90
|
+
Assess whether the research meets modern standards for reproducibility and open science.
|
|
91
|
+
|
|
92
|
+
**Data Availability:**
|
|
93
|
+
- Are raw data deposited in appropriate repositories?
|
|
94
|
+
- Are accession numbers provided for public databases?
|
|
95
|
+
- Are data sharing restrictions justified (e.g., patient privacy)?
|
|
96
|
+
- Are data formats standard and accessible?
|
|
97
|
+
|
|
98
|
+
**Code and Materials:**
|
|
99
|
+
- Is analysis code made available (GitHub, Zenodo, etc.)?
|
|
100
|
+
- Are unique materials available or described sufficiently for recreation?
|
|
101
|
+
- Are protocols detailed in sufficient depth?
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
### Stage 5: Figure and Data Presentation
|
|
105
|
+
|
|
106
|
+
Evaluate the quality, clarity, and integrity of data visualization.
|
|
107
|
+
|
|
108
|
+
**Quality Checks:**
|
|
109
|
+
- Are figures high resolution and clearly labeled?
|
|
110
|
+
- Are axes properly labeled with units?
|
|
111
|
+
- Are error bars defined (SD, SEM, CI)?
|
|
112
|
+
- Are statistical significance indicators explained?
|
|
113
|
+
- Are color schemes appropriate and accessible (colorblind-friendly)?
|
|
114
|
+
- Are scale bars included for images?
|
|
115
|
+
- Is data visualization appropriate for the data type?
|
|
116
|
+
|
|
117
|
+
**Integrity Checks:**
|
|
118
|
+
|
|
119
|
+
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pennylane
|
|
3
|
+
description: Hardware-agnostic quantum ML framework with automatic differentiation. Use when training quantum circuits via gradients, building hybrid quantum-classical models, or needing device portability across IBM/Google/Rigetti/IonQ. Best for variational algorithms (VQE, QAOA), quantum neural networks, and integration with PyTorch/JAX/TensorFlow. For hardware-specific optimizations use qiskit (IBM) or cirq (Google); for open quantum systems use qutip.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# PennyLane
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
PennyLane is a quantum computing library that enables training quantum computers like neural networks. It provides automatic differentiation of quantum circuits, device-independent programming, and seamless integration with classical machine learning frameworks.
|
|
11
|
+
|
|
12
|
+
# IBM Quantum
|
|
13
|
+
uv pip install pennylane-qiskit
|
|
14
|
+
|
|
15
|
+
# Amazon Braket
|
|
16
|
+
uv pip install amazon-braket-pennylane-plugin
|
|
17
|
+
|
|
18
|
+
# Google Cirq
|
|
19
|
+
uv pip install pennylane-cirq
|
|
20
|
+
|
|
21
|
+
# Rigetti Forest
|
|
22
|
+
uv pip install pennylane-rigetti
|
|
23
|
+
|
|
24
|
+
# IonQ
|
|
25
|
+
uv pip install pennylane-ionq
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Quick Start
|
|
29
|
+
|
|
30
|
+
Build a quantum circuit and optimize its parameters:
|
|
31
|
+
|
|
32
|
+
```python
|
|
33
|
+
import pennylane as qml
|
|
34
|
+
from pennylane import numpy as np
|
|
35
|
+
|
|
36
|
+
# Create device
|
|
37
|
+
dev = qml.device('default.qubit', wires=2)
|
|
38
|
+
|
|
39
|
+
# Define quantum circuit
|
|
40
|
+
@qml.qnode(dev)
|
|
41
|
+
def circuit(params):
|
|
42
|
+
qml.RX(params[0], wires=0)
|
|
43
|
+
qml.RY(params[1], wires=1)
|
|
44
|
+
qml.CNOT(wires=[0, 1])
|
|
45
|
+
return qml.expval(qml.PauliZ(0))
|
|
46
|
+
|
|
47
|
+
# Optimize parameters
|
|
48
|
+
opt = qml.GradientDescentOptimizer(stepsize=0.1)
|
|
49
|
+
params = np.array([0.1, 0.2], requires_grad=True)
|
|
50
|
+
|
|
51
|
+
for i in range(100):
|
|
52
|
+
params = opt.step(circuit, params)
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Core Capabilities
|
|
56
|
+
|
|
57
|
+
### 1. Quantum Circuit Construction
|
|
58
|
+
|
|
59
|
+
Build circuits with gates, measurements, and state preparation. See `(see docs)` for:
|
|
60
|
+
- Single and multi-qubit gates
|
|
61
|
+
- Controlled operations and conditional logic
|
|
62
|
+
- Mid-circuit measurements and adaptive circuits
|
|
63
|
+
- Various measurement types (expectation, probability, samples)
|
|
64
|
+
- Circuit inspection and debugging
|
|
65
|
+
|
|
66
|
+
### 2. Quantum Machine Learning
|
|
67
|
+
|
|
68
|
+
Create hybrid quantum-classical models. See `(see docs)` for:
|
|
69
|
+
- Integration with PyTorch, JAX, TensorFlow
|
|
70
|
+
- Quantum neural networks and variational classifiers
|
|
71
|
+
- Data encoding strategies (angle, amplitude, basis, IQP)
|
|
72
|
+
- Training hybrid models with backpropagation
|
|
73
|
+
- Transfer learning with quantum circuits
|
|
74
|
+
|
|
75
|
+
### 3. Quantum Chemistry
|
|
76
|
+
|
|
77
|
+
Simulate molecules and compute ground state energies. See `(see docs)` for:
|
|
78
|
+
- Molecular Hamiltonian generation
|
|
79
|
+
- Variational Quantum Eigensolver (VQE)
|
|
80
|
+
- UCCSD ansatz for chemistry
|
|
81
|
+
- Geometry optimization and dissociation curves
|
|
82
|
+
- Molecular property calculations
|
|
83
|
+
|
|
84
|
+
### 4. Device Management
|
|
85
|
+
|
|
86
|
+
Execute on simulators or quantum hardware. See `(see docs)` for:
|
|
87
|
+
- Built-in simulators (default.qubit, lightning.qubit, default.mixed)
|
|
88
|
+
- Hardware plugins (IBM, Amazon Braket, Google, Rigetti, IonQ)
|
|
89
|
+
- Device selection and configuration
|
|
90
|
+
- Performance optimization and caching
|
|
91
|
+
- GPU acceleration and JIT compilation
|
|
92
|
+
|
|
93
|
+
### 5. Optimization
|
|
94
|
+
|
|
95
|
+
Train quantum circuits with various optimizers. See `(see docs)` for:
|
|
96
|
+
- Built-in optimizers (Adam, gradient descent, momentum, RMSProp)
|
|
97
|
+
- Gradient computation methods (backprop, parameter-shift, adjoint)
|
|
98
|
+
- Variational algorithms (VQE, QAOA)
|
|
99
|
+
- Training strategies (learning rate schedules, mini-batches)
|
|
100
|
+
- Handling barren plateaus and local minima
|
|
101
|
+
|
|
102
|
+
### 6. Advanced Features
|
|
103
|
+
|
|
104
|
+
Leverage templates, transforms, and compilation. See `(see docs)` for:
|
|
105
|
+
- Circuit templates and layers
|
|
106
|
+
- Transforms and circuit optimization
|
|
107
|
+
- Pulse-level programming
|
|
108
|
+
- Catalyst JIT compilation
|
|
109
|
+
- Noise models and error mitigation
|
|
110
|
+
- Resource estimation
|
|
111
|
+
|
|
112
|
+
## Common Workflows
|
|
113
|
+
|
|
114
|
+
### Train a Variational Classifier
|
|
115
|
+
|
|
116
|
+
```python
|
|
117
|
+
# 1. Define ansatz
|
|
118
|
+
|
|
119
|
+
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: phylogenetics
|
|
3
|
+
description: Build and analyze phylogenetic trees using MAFFT (multiple alignment), IQ-TREE 2 (maximum likelihood), and FastTree (fast NJ/ML). Visualize with ETE3 or FigTree. For evolutionary analysis, microbial genomics, viral phylodynamics, protein family analysis, and molecular clock studies.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Phylogenetics
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
Phylogenetic analysis reconstructs the evolutionary history of biological sequences (genes, proteins, genomes) by inferring the branching pattern of descent. This skill covers the standard pipeline:
|
|
11
|
+
|
|
12
|
+
1. **MAFFT** — Multiple sequence alignment
|
|
13
|
+
2. **IQ-TREE 2** — Maximum likelihood tree inference with model selection
|
|
14
|
+
3. **FastTree** — Fast approximate maximum likelihood (for large datasets)
|
|
15
|
+
4. **ETE3** — Python library for tree manipulation and visualization
|
|
16
|
+
|
|
17
|
+
**Installation:**
|
|
18
|
+
```bash
|
|
19
|
+
# Conda (recommended for CLI tools)
|
|
20
|
+
conda install -c bioconda mafft iqtree fasttree
|
|
21
|
+
pip install ete3
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## When to Use This Skill
|
|
25
|
+
|
|
26
|
+
Use phylogenetics when:
|
|
27
|
+
|
|
28
|
+
- **Evolutionary relationships**: Which organism/gene is most closely related to my sequence?
|
|
29
|
+
- **Viral phylodynamics**: Trace outbreak spread and estimate transmission dates
|
|
30
|
+
- **Protein family analysis**: Infer evolutionary relationships within a gene family
|
|
31
|
+
- **Horizontal gene transfer detection**: Identify genes with discordant species/gene trees
|
|
32
|
+
- **Ancestral sequence reconstruction**: Infer ancestral protein sequences
|
|
33
|
+
- **Molecular clock analysis**: Estimate divergence dates using temporal sampling
|
|
34
|
+
- **GWAS companion**: Place variants in evolutionary context (e.g., SARS-CoV-2 variants)
|
|
35
|
+
- **Microbiology**: Species phylogeny from 16S rRNA or core genome phylogeny
|
|
36
|
+
|
|
37
|
+
## Standard Workflow
|
|
38
|
+
|
|
39
|
+
### 1. Multiple Sequence Alignment with MAFFT
|
|
40
|
+
|
|
41
|
+
```python
|
|
42
|
+
import subprocess
|
|
43
|
+
import os
|
|
44
|
+
|
|
45
|
+
def run_mafft(input_fasta: str, output_fasta: str, method: str = "auto",
|
|
46
|
+
n_threads: int = 4) -> str:
|
|
47
|
+
"""
|
|
48
|
+
Align sequences with MAFFT.
|
|
49
|
+
|
|
50
|
+
Args:
|
|
51
|
+
input_fasta: Path to unaligned FASTA file
|
|
52
|
+
output_fasta: Path for aligned output
|
|
53
|
+
method: 'auto' (auto-select), 'einsi' (accurate), 'linsi' (accurate, slow),
|
|
54
|
+
|
|
55
|
+
# MAFFT method selection guide:
|
|
56
|
+
# Few sequences (<200), accurate: linsi or einsi
|
|
57
|
+
# Many sequences (<1000), moderate: fftnsi
|
|
58
|
+
# Large datasets (>1000): fftns or auto
|
|
59
|
+
# Ultra-fast (>10000): mafft --retree 1
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### 2. Trim Alignment (Optional but Recommended)
|
|
63
|
+
|
|
64
|
+
```python
|
|
65
|
+
def trim_alignment_trimal(aligned_fasta: str, output_fasta: str,
|
|
66
|
+
method: str = "automated1") -> str:
|
|
67
|
+
"""
|
|
68
|
+
Trim poorly aligned columns with TrimAl.
|
|
69
|
+
|
|
70
|
+
Methods:
|
|
71
|
+
- 'automated1': Automatic heuristic (recommended)
|
|
72
|
+
- 'gappyout': Remove gappy columns
|
|
73
|
+
- 'strict': Strict gap threshold
|
|
74
|
+
"""
|
|
75
|
+
cmd = ["trimal", f"-{method}", "-in", aligned_fasta, "-out", output_fasta, "-fasta"]
|
|
76
|
+
result = subprocess.run(cmd, capture_output=True, text=True)
|
|
77
|
+
|
|
78
|
+
### 3. IQ-TREE 2 — Maximum Likelihood Tree
|
|
79
|
+
|
|
80
|
+
```python
|
|
81
|
+
def run_iqtree(aligned_fasta: str, output_prefix: str,
|
|
82
|
+
model: str = "TEST", bootstrap: int = 1000,
|
|
83
|
+
n_threads: int = 4, extra_args: list = None) -> dict:
|
|
84
|
+
"""
|
|
85
|
+
Build a maximum likelihood tree with IQ-TREE 2.
|
|
86
|
+
|
|
87
|
+
Args:
|
|
88
|
+
aligned_fasta: Aligned FASTA file
|
|
89
|
+
output_prefix: Prefix for output files
|
|
90
|
+
model: 'TEST' for automatic model selection, or specify (e.g., 'GTR+G' for DNA,
|
|
91
|
+
'LG+G4' for proteins, 'JTT+G' for proteins)
|
|
92
|
+
bootstrap: Number of ultrafast bootstrap replicates (1000 recommended)
|
|
93
|
+
|
|
94
|
+
# IQ-TREE model selection guide:
|
|
95
|
+
# DNA: TEST → GTR+G, HKY+G, TrN+G
|
|
96
|
+
# Protein: TEST → LG+G4, WAG+G, JTT+G, Q.pfam+G
|
|
97
|
+
# Codon: TEST → MG+F3X4
|
|
98
|
+
|
|
99
|
+
# For temporal (molecular clock) analysis, add:
|
|
100
|
+
# extra_args = ["--date", "dates.txt", "--clock-test", "--date-CI", "95"]
|
|
101
|
+
|
|
102
|
+
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pi-extension-lifecycle
|
|
3
|
+
description: Pi extension lifecycle and registration patterns. Use when adding or reviewing extension tools, commands, resources, providers, event handlers, session hooks, or context-sensitive Pi API usage.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
# pi-extension-lifecycle
|
|
8
|
+
|
|
9
|
+
Use this skill when working on Pi extension registration or lifecycle behavior.
|
|
10
|
+
|
|
11
|
+
## Source patterns distilled
|
|
12
|
+
|
|
13
|
+
- Pi core: `source/pi-mono/packages/coding-agent/src/core/extensions/types.ts`, `loader.ts`, `runner.ts`
|
|
14
|
+
- Pi examples: `source/pi-mono/packages/coding-agent/examples/extensions/`
|
|
15
|
+
- pi-crew extension entry: `src/extension/register.ts`, `src/extension/registration/*.ts`
|
|
16
|
+
|
|
17
|
+
## Rules
|
|
18
|
+
|
|
19
|
+
- Register tools, commands, shortcuts, widgets, providers, and event handlers from the extension factory or lifecycle callbacks.
|
|
20
|
+
- Tool definitions should use a TypeBox schema and an `execute(toolCallId, params, signal, onUpdate, ctx)` handler.
|
|
21
|
+
- Use fresh `ExtensionContext`/`ExtensionCommandContext` after session replacement (`newSession`, `fork`, `switchSession`, `reload`). Do not retain old context references for later work.
|
|
22
|
+
- For session-scoped work, derive session identity from `ctx.sessionManager.getSessionId()` and pass it into pi-crew `TeamContext`.
|
|
23
|
+
- Prefer small registration modules under `src/extension/registration/`; keep `index.ts` minimal.
|
|
24
|
+
- Clean up intervals, event subscriptions, child processes, and watchers on session switch/shutdown.
|
|
25
|
+
- Wrap optional Pi API hooks in compatibility checks/try-catch when supporting older Pi versions.
|
|
26
|
+
|
|
27
|
+
## Anti-patterns
|
|
28
|
+
|
|
29
|
+
- Do not use stale context objects after session switch.
|
|
30
|
+
- Do not register duplicate tool/command names and assume override behavior.
|
|
31
|
+
- Do not perform blocking filesystem or network work inside extension render callbacks.
|
|
32
|
+
- Do not add hardcoded global keybindings without config or collision review.
|
|
33
|
+
|
|
34
|
+
## Verification
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
cd pi-crew
|
|
38
|
+
npx tsc --noEmit
|
|
39
|
+
npm test
|
|
40
|
+
```
|
|
41
|
+
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: plan
|
|
3
|
+
description: Strategic planning with optional interview workflow
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
- User wants autonomous end-to-end execution -- use `autopilot` instead
|
|
7
|
+
- User wants to start coding immediately with a clear task -- use `ralph` or delegate to executor
|
|
8
|
+
- User asks a simple question that can be answered directly -- just answer it
|
|
9
|
+
- Task is a single focused fix with obvious scope -- use an execution skill instead of running it from this planning module
|
|
10
|
+
|
|
11
|
+
Jumping into code without understanding requirements leads to rework, scope creep, and missed edge cases. Plan provides structured requirements gathering, expert analysis, and quality-gated plans so that execution starts from a solid foundation. The consensus mode adds multi-perspective validation for high-stakes projects.
|
|
12
|
+
|
|
13
|
+
- Auto-detect interview vs direct mode based on request specificity
|
|
14
|
+
- Ask one question at a time during interviews -- never batch multiple questions
|
|
15
|
+
- Gather codebase facts via `explore` agent before asking the user about them
|
|
16
|
+
- Plans must meet quality standards: 80%+ claims cite file/line, 90%+ criteria are testable
|
|
17
|
+
- Consensus mode runs fully automated by default; add `--interactive` to enable user prompts at draft review and final approval steps
|
|
18
|
+
- Consensus mode uses RALPLAN-DR short mode by default; switch to deliberate mode with `--deliberate` or when the request explicitly signals high risk (auth/security, data migration, destructive/irreversible changes, production incident, compliance/PII, public API breakage)
|
|
19
|
+
- **Planning/execution boundary:** planning modes inspect context and produce plans/specs/proposals only. They MUST mark artifacts as `pending approval` unless the user has explicitly opted into execution in the current turn or via the structured approval UI. Before explicit execution approval, planning modes MUST NOT run mutation-oriented shell commands, edit source files, commit, push, open PRs, invoke execution skills, or delegate implementation tasks.
|
|
20
|
+
|
|
21
|
+
### Mode Selection
|
|
22
|
+
|
|
23
|
+
| Mode | Trigger | Behavior |
|
|
24
|
+
|------|---------|----------|
|
|
25
|
+
| Interview | Default for broad requests | Interactive requirements gathering |
|
|
26
|
+
| Direct | `--direct`, or detailed request | Skip interview, generate plan directly |
|
|
27
|
+
| Consensus | `--consensus`, "ralplan" | Planner -> Architect -> Critic loop until agreement with RALPLAN-DR structured deliberation (short by default, `--deliberate` for high-risk); add `--interactive` for user prompts at draft and approval steps |
|
|
28
|
+
| Review | `--review`, "review this plan" | Critic evaluation of existing plan |
|
|
29
|
+
|
|
30
|
+
### Interview Mode (broad/vague requests)
|
|
31
|
+
|
|
32
|
+
1. **Classify the request**: Broad (vague verbs, no specific files, touches 3+ areas) triggers interview mode
|
|
33
|
+
2. **Ask one focused question** using `AskUserQuestion` for preferences, scope, and constraints
|
|
34
|
+
3. **Gather codebase facts first**: Before asking "what patterns does your code use?", spawn an `explore` agent to find out, then ask informed follow-up questions
|
|
35
|
+
4. **Build on answers**: Each question builds on the previous answer
|
|
36
|
+
5. **Consult Analyst** (Opus) for hidden requirements, edge cases, and risks
|
|
37
|
+
6. **Create plan** when the user signals readiness: "create the plan", "I'm ready", "make it a work plan"
|
|
38
|
+
|
|
39
|
+
### Direct Mode (detailed requests)
|
|
40
|
+
|
|
41
|
+
1. **Quick Analysis**: Optional brief Analyst consultation
|
|
42
|
+
2. **Create plan**: Generate comprehensive work plan immediately
|
|
43
|
+
3. **Review** (optional): Critic review if requested
|
|
44
|
+
|
|
45
|
+
### Consensus Mode (`--consensus` / "ralplan")
|
|
46
|
+
|
|
47
|
+
**RALPLAN-DR modes**: **Short** (default, bounded structure) and **Deliberate** (for `--deliberate` or explicit high-risk requests). Both modes keep the same Planner -> Architect -> Critic sequence and the same `AskUserQuestion` gates.
|
|
48
|
+
|
|
49
|
+
**Provider overrides (supported when the provider CLI is installed):**
|
|
50
|
+
- `--architect codex` — replace the Claude Architect pass with `omc ask codex --agent-prompt architect "..."` for implementation-heavy architecture review
|
|
51
|
+
- `--critic codex` — replace the Claude Critic pass with `omc ask codex --agent-prompt critic "..."` for an external review pass before execution
|
|
52
|
+
- If the requested provider is unavailable, briefly note that and continue with the default Claude Architect/Critic step for that stage
|
|
53
|
+
|
|
54
|
+
**State lifecycle**: The persistent-mode stop hook uses `ralplan-state.json` to enforce continuation during the consensus loop. The skill **MUST** manage this state:
|
|
55
|
+
- **On entry**: Call `state_write(mode="ralplan", active=true, session_id=<current_session_id>)` before step 1
|
|
56
|
+
- **On handoff to execution** (approval → ralph/team): Call `state_write(mode="ralplan", active=false, session_id=<current_session_id>)`. Do NOT use `state_clear` here — `state_clear` writes a 30-second cancel signal that disables stop-hook enforcement for ALL modes, leaving the newly launched execution mode unprotected.
|
|
57
|
+
- **On true terminal exit** (rejection, non-interactive plan output, error/abort): Call `state_clear(mode="ralplan", session_id=<current_session_id>)` — no execution mode follows, so the cancel signal window is harmless.
|
|
58
|
+
- Do NOT clear during intermediate steps like Critic approval or max-iteration presentation, as the user may still select "Request changes".
|
|
59
|
+
|
|
60
|
+
Without cleanup, the stop hook blocks all subsequent stops with `[RALPLAN - CONSENSUS PLANNING]` reinforcement messages even after the consensus workflow has finished. Always pass `session_id` to avoid clearing other concurrent sessions' state.
|
|
61
|
+
|
|
62
|
+
1. **Planner** creates initial plan and a compact **RALPLAN-DR summary** before any Architect review. The summary **MUST** include:
|
|
63
|
+
- **Principles** (3-5)
|
|
64
|
+
- **Decision Drivers** (top 3)
|
|
65
|
+
|
|
66
|
+
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: polars
|
|
3
|
+
description: Fast in-memory DataFrame library for datasets that fit in RAM. Use when pandas is too slow but data still fits in memory. Lazy evaluation, parallel execution, Apache Arrow backend. Best for 1-100GB datasets, ETL pipelines, faster pandas replacement. For larger-than-RAM data use dask or vaex.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Polars
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
Polars is a lightning-fast DataFrame library for Python and Rust built on Apache Arrow. Work with Polars' expression-based API, lazy evaluation framework, and high-performance data manipulation capabilities for efficient data processing, pandas migration, and data pipeline optimization.
|
|
11
|
+
|
|
12
|
+
## Quick Start
|
|
13
|
+
|
|
14
|
+
### Installation and Basic Usage
|
|
15
|
+
|
|
16
|
+
Install Polars:
|
|
17
|
+
```python
|
|
18
|
+
uv pip install polars
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Basic DataFrame creation and operations:
|
|
22
|
+
```python
|
|
23
|
+
import polars as pl
|
|
24
|
+
|
|
25
|
+
# Create DataFrame
|
|
26
|
+
df = pl.DataFrame({
|
|
27
|
+
"name": ["Alice", "Bob", "Charlie"],
|
|
28
|
+
"age": [25, 30, 35],
|
|
29
|
+
"city": ["NY", "LA", "SF"]
|
|
30
|
+
})
|
|
31
|
+
|
|
32
|
+
# Select columns
|
|
33
|
+
df.select("name", "age")
|
|
34
|
+
|
|
35
|
+
# Filter rows
|
|
36
|
+
df.filter(pl.col("age") > 25)
|
|
37
|
+
|
|
38
|
+
# Add computed columns
|
|
39
|
+
df.with_columns(
|
|
40
|
+
age_plus_10=pl.col("age") + 10
|
|
41
|
+
)
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Core Concepts
|
|
45
|
+
|
|
46
|
+
### Expressions
|
|
47
|
+
|
|
48
|
+
Expressions are the fundamental building blocks of Polars operations. They describe transformations on data and can be composed, reused, and optimized.
|
|
49
|
+
|
|
50
|
+
**Key principles:**
|
|
51
|
+
- Use `pl.col("column_name")` to reference columns
|
|
52
|
+
- Chain methods to build complex transformations
|
|
53
|
+
- Expressions are lazy and only execute within contexts (select, with_columns, filter, group_by)
|
|
54
|
+
|
|
55
|
+
**Example:**
|
|
56
|
+
```python
|
|
57
|
+
# Expression-based computation
|
|
58
|
+
df.select(
|
|
59
|
+
pl.col("name"),
|
|
60
|
+
(pl.col("age") * 12).alias("age_in_months")
|
|
61
|
+
)
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Lazy vs Eager Evaluation
|
|
65
|
+
|
|
66
|
+
**Eager (DataFrame):** Operations execute immediately
|
|
67
|
+
```python
|
|
68
|
+
df = pl.read_csv("file.csv") # Reads immediately
|
|
69
|
+
result = df.filter(pl.col("age") > 25) # Executes immediately
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
**Lazy (LazyFrame):** Operations build a query plan, optimized before execution
|
|
73
|
+
```python
|
|
74
|
+
lf = pl.scan_csv("file.csv") # Doesn't read yet
|
|
75
|
+
result = lf.filter(pl.col("age") > 25).select("name", "age")
|
|
76
|
+
df = result.collect() # Now executes optimized query
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
## Common Operations
|
|
81
|
+
|
|
82
|
+
### Select
|
|
83
|
+
Select and manipulate columns:
|
|
84
|
+
```python
|
|
85
|
+
# Select specific columns
|
|
86
|
+
df.select("name", "age")
|
|
87
|
+
|
|
88
|
+
# Select with expressions
|
|
89
|
+
df.select(
|
|
90
|
+
pl.col("name"),
|
|
91
|
+
(pl.col("age") * 2).alias("double_age")
|
|
92
|
+
)
|
|
93
|
+
|
|
94
|
+
# Select all columns matching a pattern
|
|
95
|
+
df.select(pl.col("^.*_id$"))
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Filter
|
|
99
|
+
Filter rows by conditions:
|
|
100
|
+
```python
|
|
101
|
+
# Single condition
|
|
102
|
+
df.filter(pl.col("age") > 25)
|
|
103
|
+
|
|
104
|
+
# Multiple conditions (cleaner than using &)
|
|
105
|
+
df.filter(
|
|
106
|
+
pl.col("age") > 25,
|
|
107
|
+
pl.col("city") == "NY"
|
|
108
|
+
)
|
|
109
|
+
|
|
110
|
+
# Complex conditions
|
|
111
|
+
df.filter(
|
|
112
|
+
(pl.col("age") > 25) | (pl.col("city") == "LA")
|
|
113
|
+
)
|
|
114
|
+
```
|