@pikaa-ai/pikaa 0.3.23 → 0.3.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (191) hide show
  1. package/assets/brand/orbit-logo-option4-whale.jpg +0 -0
  2. package/assets/brand/orbit-logo.jpg +0 -0
  3. package/assets/brand/orbit-logo.png +0 -0
  4. package/assets/brand/orbit-logo.svg +3 -0
  5. package/dist/cli.js +337 -162
  6. package/dist/index.js +1 -2
  7. package/package.json +1 -2
  8. package/skills/adaptyv/SKILL.md +0 -240
  9. package/skills/aeon/SKILL.md +0 -402
  10. package/skills/analytical-method-validation/SKILL.md +0 -299
  11. package/skills/anndata/SKILL.md +0 -431
  12. package/skills/arbor/SKILL.md +0 -152
  13. package/skills/arboreto/SKILL.md +0 -267
  14. package/skills/astropy/SKILL.md +0 -353
  15. package/skills/autoskill/SKILL.md +0 -233
  16. package/skills/benchling-integration/SKILL.md +0 -229
  17. package/skills/bgpt-paper-search/SKILL.md +0 -75
  18. package/skills/bids/SKILL.md +0 -237
  19. package/skills/biopython/SKILL.md +0 -472
  20. package/skills/bioservices/SKILL.md +0 -399
  21. package/skills/bulk-rnaseq/SKILL.md +0 -198
  22. package/skills/cellxgene-census/SKILL.md +0 -283
  23. package/skills/cirq/SKILL.md +0 -370
  24. package/skills/citation-management/SKILL.md +0 -329
  25. package/skills/clinical-decision-support/SKILL.md +0 -238
  26. package/skills/clinical-decision-support/references/README.md +0 -62
  27. package/skills/clinical-reports/SKILL.md +0 -248
  28. package/skills/clinical-reports/references/README.md +0 -34
  29. package/skills/cobrapy/SKILL.md +0 -496
  30. package/skills/consciousness-council/SKILL.md +0 -151
  31. package/skills/dask/SKILL.md +0 -482
  32. package/skills/database-lookup/SKILL.md +0 -386
  33. package/skills/datamol/SKILL.md +0 -200
  34. package/skills/deepchem/SKILL.md +0 -244
  35. package/skills/deepspot-m/SKILL.md +0 -175
  36. package/skills/deeptools/SKILL.md +0 -412
  37. package/skills/depmap/SKILL.md +0 -301
  38. package/skills/dhdna-profiler/SKILL.md +0 -184
  39. package/skills/diffdock/SKILL.md +0 -488
  40. package/skills/dnanexus-integration/SKILL.md +0 -325
  41. package/skills/docx/SKILL.md +0 -99
  42. package/skills/esm/SKILL.md +0 -334
  43. package/skills/etetoolkit/SKILL.md +0 -327
  44. package/skills/exa-search/SKILL.md +0 -102
  45. package/skills/executing-plans/SKILL.md +0 -14
  46. package/skills/experimental-design/SKILL.md +0 -234
  47. package/skills/exploratory-data-analysis/SKILL.md +0 -280
  48. package/skills/flowio/SKILL.md +0 -310
  49. package/skills/fluidsim/SKILL.md +0 -279
  50. package/skills/frontend-design/SKILL.md +0 -100
  51. package/skills/generate-image/SKILL.md +0 -304
  52. package/skills/geniml/SKILL.md +0 -310
  53. package/skills/genomic-coordinates/SKILL.md +0 -189
  54. package/skills/genomic-intelligence/SKILL.md +0 -243
  55. package/skills/geomaster/README.md +0 -105
  56. package/skills/geomaster/SKILL.md +0 -366
  57. package/skills/geopandas/SKILL.md +0 -250
  58. package/skills/get-available-resources/SKILL.md +0 -260
  59. package/skills/gget/SKILL.md +0 -153
  60. package/skills/ginkgo-cloud-lab/SKILL.md +0 -106
  61. package/skills/glycoengineering/SKILL.md +0 -339
  62. package/skills/gtars/SKILL.md +0 -282
  63. package/skills/guardian-rails/SKILL.md +0 -54
  64. package/skills/histolab/SKILL.md +0 -243
  65. package/skills/hugging-science/SKILL.md +0 -132
  66. package/skills/hypogenic/SKILL.md +0 -290
  67. package/skills/hypothesis-generation/SKILL.md +0 -264
  68. package/skills/imaging-data-commons/SKILL.md +0 -496
  69. package/skills/infographics/SKILL.md +0 -315
  70. package/skills/iso-standards-readiness/SKILL.md +0 -352
  71. package/skills/lab-hardware-cad/SKILL.md +0 -372
  72. package/skills/labarchive-integration/SKILL.md +0 -216
  73. package/skills/lamindb/SKILL.md +0 -408
  74. package/skills/latchbio-integration/SKILL.md +0 -227
  75. package/skills/latex-posters/SKILL.md +0 -369
  76. package/skills/latex-posters/references/README.md +0 -439
  77. package/skills/liteparse/SKILL.md +0 -295
  78. package/skills/literature-review/SKILL.md +0 -263
  79. package/skills/markdown-mermaid-writing/SKILL.md +0 -322
  80. package/skills/market-research-reports/SKILL.md +0 -337
  81. package/skills/markitdown/SKILL.md +0 -264
  82. package/skills/matchms/SKILL.md +0 -276
  83. package/skills/matlab/SKILL.md +0 -274
  84. package/skills/matplotlib/SKILL.md +0 -378
  85. package/skills/medchem/SKILL.md +0 -321
  86. package/skills/modal/SKILL.md +0 -468
  87. package/skills/molecular-dynamics/SKILL.md +0 -458
  88. package/skills/molfeat/SKILL.md +0 -348
  89. package/skills/ncats-arax/SKILL.md +0 -178
  90. package/skills/networkx/SKILL.md +0 -440
  91. package/skills/neurokit2/SKILL.md +0 -323
  92. package/skills/neuropixels-analysis/SKILL.md +0 -412
  93. package/skills/nextflow/SKILL.md +0 -195
  94. package/skills/omero-integration/SKILL.md +0 -222
  95. package/skills/onekgpd/SKILL.md +0 -371
  96. package/skills/ontology-term-resolution/SKILL.md +0 -147
  97. package/skills/open-notebook/SKILL.md +0 -297
  98. package/skills/openpiv/SKILL.md +0 -469
  99. package/skills/opentrons-integration/SKILL.md +0 -322
  100. package/skills/optimize-for-gpu/SKILL.md +0 -176
  101. package/skills/owasp-top10/SKILL.md +0 -48
  102. package/skills/pacsomatic/LICENSE +0 -21
  103. package/skills/pacsomatic/SKILL.md +0 -150
  104. package/skills/paper-lookup/SKILL.md +0 -263
  105. package/skills/paperclip/SKILL.md +0 -413
  106. package/skills/paperzilla/SKILL.md +0 -159
  107. package/skills/parallel-web/SKILL.md +0 -128
  108. package/skills/pathml/SKILL.md +0 -222
  109. package/skills/pathogen-variant-surveillance/SKILL.md +0 -208
  110. package/skills/pathway-enrichment/SKILL.md +0 -194
  111. package/skills/pdf/SKILL.md +0 -322
  112. package/skills/peer-review/SKILL.md +0 -288
  113. package/skills/penetration-testing/SKILL.md +0 -31
  114. package/skills/pennylane/SKILL.md +0 -240
  115. package/skills/phylogenetics/SKILL.md +0 -409
  116. package/skills/pi-agent/SKILL.md +0 -83
  117. package/skills/pkpd-modeling/SKILL.md +0 -381
  118. package/skills/polars/SKILL.md +0 -393
  119. package/skills/polars-bio/SKILL.md +0 -379
  120. package/skills/ponytail/SKILL.md +0 -31
  121. package/skills/ponytail-audit/SKILL.md +0 -18
  122. package/skills/pptx/SKILL.md +0 -246
  123. package/skills/pptx-posters/SKILL.md +0 -258
  124. package/skills/primekg/SKILL.md +0 -99
  125. package/skills/protocolsio-integration/SKILL.md +0 -236
  126. package/skills/pufferlib/SKILL.md +0 -328
  127. package/skills/pydeseq2/SKILL.md +0 -369
  128. package/skills/pydicom/SKILL.md +0 -381
  129. package/skills/pyhealth/SKILL.md +0 -124
  130. package/skills/pylabrobot/SKILL.md +0 -216
  131. package/skills/pymatgen/SKILL.md +0 -404
  132. package/skills/pymc/SKILL.md +0 -310
  133. package/skills/pymoo/SKILL.md +0 -276
  134. package/skills/pyopenms/SKILL.md +0 -179
  135. package/skills/pysam/SKILL.md +0 -330
  136. package/skills/pytdc/SKILL.md +0 -297
  137. package/skills/pytorch-lightning/SKILL.md +0 -191
  138. package/skills/pyzotero/SKILL.md +0 -137
  139. package/skills/qiskit/SKILL.md +0 -259
  140. package/skills/qutip/SKILL.md +0 -317
  141. package/skills/rdkit/SKILL.md +0 -94
  142. package/skills/relsa-severity-assessment/SKILL.md +0 -354
  143. package/skills/research-grants/SKILL.md +0 -296
  144. package/skills/research-grants/references/README.md +0 -287
  145. package/skills/research-lookup/README.md +0 -106
  146. package/skills/research-lookup/SKILL.md +0 -338
  147. package/skills/rowan/SKILL.md +0 -398
  148. package/skills/scanpy/SKILL.md +0 -303
  149. package/skills/scholar-evaluation/SKILL.md +0 -296
  150. package/skills/scientific-brainstorming/SKILL.md +0 -282
  151. package/skills/scientific-critical-thinking/SKILL.md +0 -180
  152. package/skills/scientific-schematics/SKILL.md +0 -370
  153. package/skills/scientific-slides/SKILL.md +0 -379
  154. package/skills/scientific-visualization/SKILL.md +0 -285
  155. package/skills/scientific-writing/SKILL.md +0 -356
  156. package/skills/scikit-bio/SKILL.md +0 -470
  157. package/skills/scikit-learn/SKILL.md +0 -324
  158. package/skills/scikit-survival/SKILL.md +0 -313
  159. package/skills/scvelo/SKILL.md +0 -328
  160. package/skills/scvi-tools/SKILL.md +0 -201
  161. package/skills/seaborn/SKILL.md +0 -254
  162. package/skills/security-auditor/SKILL.md +0 -37
  163. package/skills/shap/SKILL.md +0 -282
  164. package/skills/simpy/SKILL.md +0 -283
  165. package/skills/stable-baselines3/SKILL.md +0 -325
  166. package/skills/statistical-analysis/SKILL.md +0 -446
  167. package/skills/statistical-power/SKILL.md +0 -200
  168. package/skills/statsmodels/SKILL.md +0 -238
  169. package/skills/sympy/SKILL.md +0 -354
  170. package/skills/systematic-debugging/SKILL.md +0 -35
  171. package/skills/tamarind/SKILL.md +0 -285
  172. package/skills/tdd/SKILL.md +0 -26
  173. package/skills/tiledbvcf/SKILL.md +0 -456
  174. package/skills/timesfm-forecasting/SKILL.md +0 -408
  175. package/skills/timesfm-forecasting/examples/global-temperature/README.md +0 -178
  176. package/skills/torch-geometric/SKILL.md +0 -458
  177. package/skills/torchdrug/SKILL.md +0 -241
  178. package/skills/transformers/SKILL.md +0 -195
  179. package/skills/treatment-plans/SKILL.md +0 -174
  180. package/skills/treatment-plans/references/README.md +0 -19
  181. package/skills/umap-learn/SKILL.md +0 -488
  182. package/skills/uncertainty-and-units/SKILL.md +0 -384
  183. package/skills/usfiscaldata/SKILL.md +0 -171
  184. package/skills/vaex/SKILL.md +0 -204
  185. package/skills/venue-templates/SKILL.md +0 -269
  186. package/skills/verification-before-completion/SKILL.md +0 -22
  187. package/skills/waypoint-bio/SKILL.md +0 -273
  188. package/skills/what-if-oracle/SKILL.md +0 -184
  189. package/skills/writing-plans/SKILL.md +0 -15
  190. package/skills/xlsx/SKILL.md +0 -110
  191. package/skills/zarr-python/SKILL.md +0 -241
@@ -1,288 +0,0 @@
1
- ---
2
- name: peer-review
3
- description: Prepare evidence-bounded, constructive peer-review drafts and structured manuscript assessments. Use for authorized review of scientific manuscripts, protocols, preprints, or research proposals; reporting-guideline selection; claim–evidence checks; methods, statistics, reproducibility, ethics, figure/table, and citation critique; or revision-response planning.
4
- license: MIT
5
- compatibility: Python 3.11+ standard library. Bundled CLIs are deterministic and local-only; they accept bounded JSON, CSV, or Markdown and make no network, model, image, or external-service calls.
6
- metadata:
7
- version: "2.1"
8
- skill-author: K-Dense Inc.
9
- ---
10
-
11
- # Peer Review
12
-
13
- Support an accountable human reviewer with a rigorous, fair, actionable assessment. Treat every unpublished submission and review as confidential.
14
-
15
- ## Mandatory safety boundary
16
-
17
- Before reading or analyzing unpublished content:
18
-
19
- 1. Confirm the user is authorized by the publisher, editor, author, or other material owner.
20
- 2. Check the target venue’s review, confidentiality, co-review, retention, and AI/tool policies.
21
- 3. Record conflicts, competence limits, requested scope, and specialist-review needs.
22
- 4. Default to local-only processing.
23
-
24
- If authorization is unclear, do not inspect or quote the manuscript. Ask for confirmation or use only the bundled local CLIs, whose reports do not echo manuscript text.
25
-
26
- Never:
27
-
28
- - Send unpublished manuscript, supplement, review, or editorial text to an external service without specific publisher/author authorization and venue permission
29
- - Upload confidential content to a public model, search engine, citation service, grammar tool, plagiarism checker, or image service
30
- - Reuse content for training, benchmarking, product improvement, or unrelated research
31
- - Read broad environment state, `.env` files, API keys, or credentials
32
- - Call a network, LLM, or image API from bundled tools
33
- - Invoke another skill or a PDF/image pipeline automatically
34
- - Impersonate an assigned reviewer, editor, journal, funder, or author
35
- - Fabricate manuscript details, review findings, citations, analyses, experiments, reproduction, or an editorial outcome
36
- - Announce a decision that belongs to an editor or panel
37
-
38
- Delete local copies and derivatives when policy requires; otherwise retain only what the controlling policy authorizes. Record deletion or retention without copying confidential content into the record.
39
-
40
- Read `references/ethical_review_practice.md` before handling confidential material.
41
-
42
- ## Human accountability
43
-
44
- Label generated text as a working draft. The accountable human must:
45
-
46
- - Read the complete authorized submission and relevant supplements
47
- - Verify every factual statement, calculation, citation, and manuscript location
48
- - Resolve conflicts and disclose assistance as required
49
- - Rewrite comments in their own expert judgment
50
- - Submit through the authorized channel
51
-
52
- Automated coverage, consistency, or lint results are not peer review and do not establish manuscript merit.
53
-
54
- ## Intake gate
55
-
56
- Copy and complete `assets/review_intake_template.json`, then run:
57
-
58
- ```bash
59
- python3 scripts/validate_review_intake.py completed-intake.json
60
- ```
61
-
62
- Proceed only when status is `READY_FOR_LOCAL_REVIEW`.
63
-
64
- The validator blocks:
65
-
66
- - Undocumented authorization
67
- - Missing human accountability
68
- - Unassessed or unresolved conflicts
69
- - Unknown review model or unchecked venue policy
70
- - Unauthorized AI assistance
71
- - External service use
72
- - Data reuse
73
- - Missing deletion/retention planning
74
-
75
- It validates declarations, not their truth.
76
-
77
- ## Review workflow
78
-
79
- ### 1. Establish scope and available evidence
80
-
81
- Record:
82
-
83
- - Submission type and stage
84
- - Review question and requested focus
85
- - Target venue and review model
86
- - Materials actually available: manuscript, supplements, protocol, registration, analysis plan, data/code statement, prior decision, or response letter
87
- - Competence areas and limits
88
- - Missing material that prevents assessment
89
-
90
- Do not infer absent content. Use “not reported” or “not available for review.”
91
-
92
- ### 2. Orient without deciding
93
-
94
- Create a short neutral map:
95
-
96
- - Research question
97
- - Population or system
98
- - Design and unit
99
- - Intervention, exposure, test, or model
100
- - Comparator/reference
101
- - Outcomes and timing
102
- - Principal claims
103
-
104
- Do not write an acceptance/rejection recommendation. Identify what evidence would be needed to evaluate each claim.
105
-
106
- ### 3. Select reporting guidance
107
-
108
- Copy `assets/study_profile_template.json` and run:
109
-
110
- ```bash
111
- python3 scripts/select_reporting_guidelines.py local-profile.json
112
- ```
113
-
114
- For checklist coverage:
115
-
116
- ```bash
117
- python3 scripts/select_reporting_guidelines.py \
118
- local-profile.json \
119
- --coverage local-coverage.csv
120
- ```
121
-
122
- Use the current base guideline, explanation/elaboration, applicable extensions, and target venue policy. See `references/reporting_standards.md`.
123
-
124
- **Critical distinction:** reporting completeness is not design quality, risk of bias, validity, or merit. Never convert missing items into an automatic score or publication judgment.
125
-
126
- ### 4. Map claims to evidence
127
-
128
- Prioritize central, causal, mechanistic, safety, diagnostic, prediction, and generalization claims.
129
-
130
- For each claim, record:
131
-
132
- - Location and claim ID
133
- - Supporting result, figure, table, analysis, or citation IDs
134
- - Direction, magnitude, population, outcome, timepoint, and uncertainty alignment
135
- - Limitation or alternative explanation
136
- - Bounded requested action
137
-
138
- Run:
139
-
140
- ```bash
141
- python3 scripts/validate_claim_evidence.py local-claim-matrix.csv
142
- ```
143
-
144
- Start from `assets/claim_evidence_matrix_template.csv`. The report emits IDs and counts, not claim text.
145
-
146
- ### 5. Review methods and statistics
147
-
148
- Assess in this order:
149
-
150
- 1. Question and target quantity
151
- 2. Design and unit of inference
152
- 3. Sampling, allocation, controls, masking, and timing
153
- 4. Sample-size or precision rationale
154
- 5. Inclusion, exclusion, attrition, and missingness
155
- 6. Analysis–design alignment and assumptions
156
- 7. Multiplicity and prespecification
157
- 8. Effect estimates, uncertainty, denominators, and harms
158
- 9. Interpretation, causality, and generalizability
159
-
160
- Use `references/common_issues.md` and `references/statistical_reproducibility.md`.
161
-
162
- For a structured local audit:
163
-
164
- ```bash
165
- python3 scripts/audit_statistics_reproducibility.py \
166
- local-statistics-reproducibility.json
167
- ```
168
-
169
- Start from `assets/statistical_reproducibility_template.json`. Request specialist review when a central method exceeds competence; do not hide uncertainty behind a generic critique.
170
-
171
- ### 6. Review reproducibility and transparency
172
-
173
- Check, as applicable:
174
-
175
- - Protocol, registration, amendments, and analysis-plan consistency
176
- - Data provenance, exclusions, transformations, and accession IDs
177
- - Software, package, model, and parameter versions
178
- - Code, environment, seeds, run instructions, and tests
179
- - Data, code, materials, and model availability or justified restrictions
180
- - Domain metadata standards
181
-
182
- Do not claim reproduction unless authorized inputs were actually run with documented commands, environment, and outputs.
183
-
184
- ### 7. Review ethics and integrity
185
-
186
- Check applicable approvals, consent, welfare, privacy, community governance, funding, sponsor role, conflicts, authorship/contribution, registration, biosafety, and dual-use concerns.
187
-
188
- Describe observable evidence and uncertainty. Do not accuse authors or investigate them. Route credible concerns through the confidential editor channel under venue policy.
189
-
190
- ### 8. Review figures, tables, and citations
191
-
192
- For figures and tables, assess:
193
-
194
- - Consistency with text and supplements
195
- - Denominators, units, axes, scales, uncertainty, and legends
196
- - Accessible encoding and sufficient context
197
- - Image acquisition/processing disclosure and source-data policy
198
-
199
- This skill has no image-generation or PDF-conversion workflow. Use only user-authorized local artifacts and tools.
200
-
201
- For Pandoc-style citations such as `[@ref-id]`:
202
-
203
- ```bash
204
- python3 scripts/audit_citations.py local-manuscript.md local-references.csv
205
- ```
206
-
207
- Start from `assets/citation_references_template.csv`. This checks key consistency and identifier format only; it does not verify that a source exists or supports a claim.
208
-
209
- ### 9. Draft actionable comments
210
-
211
- Generate a private scaffold only after intake passes:
212
-
213
- ```bash
214
- python3 scripts/generate_review_scaffold.py \
215
- completed-intake.json \
216
- -o private-review.md
217
- ```
218
-
219
- Every major/minor comment should include:
220
-
221
- - **Location**
222
- - **Observation**
223
- - **Evidence or criterion**
224
- - **Why it matters**
225
- - **Requested action**
226
-
227
- Prioritize:
228
-
229
- - Claim–evidence alignment
230
- - Methods and statistical validity
231
- - Reproducibility and transparency
232
- - Ethics and participant/animal protection
233
- - Reporting needed for appraisal
234
- - Figures, tables, limitations, and citations
235
-
236
- Requests for new work must be necessary to support a central claim and proportionate to scope. Offer narrowing, clarification, sensitivity analysis, correction, or limitation language when that is sufficient.
237
-
238
- ### 10. Keep channels separate
239
-
240
- **Comments to authors** contain the scientific review, strengths, major/minor comments, and limitations.
241
-
242
- **Confidential comments to editor** contain only policy-appropriate conflicts, competence limits, assistance disclosure, specialist requests, or substantiated integrity/process concerns that require a separate route.
243
-
244
- Do not place ordinary criticism only in confidential notes. Do not reveal reviewer identity under an anonymized process.
245
-
246
- ### 11. Lint and finalize
247
-
248
- ```bash
249
- python3 scripts/lint_review.py private-review.md
250
- ```
251
-
252
- The linter checks channel separation, unresolved placeholders, a narrow abusive-language lexicon, role/decision phrases, and required actionability fields. It emits line numbers and rule IDs, not review text. Human tone and scientific review remain mandatory.
253
-
254
- Before handoff:
255
-
256
- - Verify all locations and evidence.
257
- - Remove unsupported or speculative criticism.
258
- - Confirm professional, non-abusive language.
259
- - State review limits and specialist needs.
260
- - Disclose permitted assistance.
261
- - Remove all placeholders.
262
- - Ensure no invented citation, experiment, reanalysis, or outcome.
263
- - Follow the documented deletion/retention rule.
264
-
265
- ## Local tool index
266
-
267
- - `scripts/validate_review_intake.py` — scope, authorization, conflicts, policy, handling
268
- - `scripts/select_reporting_guidelines.py` — dated selector and non-scoring coverage audit
269
- - `scripts/validate_claim_evidence.py` — claim/evidence alignment matrix
270
- - `scripts/audit_statistics_reproducibility.py` — methods/statistics/reproducibility checklist
271
- - `scripts/audit_citations.py` — local citation/reference consistency
272
- - `scripts/generate_review_scaffold.py` — separated private Markdown scaffold
273
- - `scripts/lint_review.py` — tone, channel, and actionability lint
274
-
275
- Full schemas and exit codes: `references/tool_reference.md`.
276
-
277
- ## References and assets
278
-
279
- - `references/ethical_review_practice.md` — COPE/ICMJE duties, confidentiality, AI, channels
280
- - `references/reporting_standards.md` — current major guidelines and verified domain standards
281
- - `references/statistical_reproducibility.md` — methods, statistics, and reproducibility review
282
- - `references/common_issues.md` — contextual issue patterns and constructive responses
283
- - `references/security_validation.md` — baseline remediation and local scan results
284
- - `assets/source_ledger.csv` — authoritative sources verified 2026-07-23
285
- - `assets/reporting_guidelines.json` — local selector catalog
286
- - `assets/review_scaffold_template.md` — private structured draft
287
-
288
- The source ledger is dated. Recheck live primary sources and the target venue policy for a later review, without exposing confidential manuscript text in search queries.
@@ -1,31 +0,0 @@
1
- ---
2
- name: penetration-testing
3
- description: "Defensive Penetration Testing & API Vulnerability Assessment - Threat modeling, endpoint security probing, authentication boundary verification, and defense-in-depth posture validation."
4
- risk: low
5
- source: built-in
6
- ---
7
-
8
- # Defensive Penetration Testing & API Security
9
-
10
- This skill guides defensive assessment of web applications, REST/GraphQL APIs, and distributed microservices.
11
-
12
- ## Assessment Checklist
13
-
14
- ### 1. Authentication & Session Security
15
- - [ ] JWT tokens have valid signature verification and explicit algorithm enforcement (reject `none` algorithm).
16
- - [ ] Refresh tokens are rotated and revoked upon logout.
17
- - [ ] Sensitive cookies use `HttpOnly`, `Secure`, and `SameSite=Strict/Lax` flags.
18
- - [ ] Rate limiting and brute-force protection are enforced on login, registration, and password reset endpoints.
19
-
20
- ### 2. Authorization & Multi-Tenancy (BOLA / IDOR)
21
- - [ ] Users can only access resources belonging to their organization/account (`WHERE user_id = :current_user`).
22
- - [ ] Administrative routes require explicit privilege checks beyond just being logged in.
23
- - [ ] Object IDs cannot be sequentially enumerated or tampered with to access foreign records.
24
-
25
- ### 3. Input Validation & Sanitization
26
- - [ ] All incoming payloads pass strict schema validation (e.g., Zod, Pydantic, Joi).
27
- - [ ] File uploads validate MIME type, file extension, and enforce size limits.
28
- - [ ] File paths from user inputs are sanitized against directory traversal (`../` or null bytes).
29
-
30
- ### 4. Egress & SSRF Protection
31
- - [ ] Outbound webhooks and URL fetchers validate IP addresses and block private/loopback ranges (`127.0.0.1`, `10.0.0.0/8`, `169.254.169.254`).
@@ -1,240 +0,0 @@
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 or JAX. For hardware-specific optimizations use qiskit (IBM) or cirq (Google); for open quantum systems use qutip.
4
- license: Apache-2.0 license
5
- allowed-tools: Read Bash Python
6
- metadata:
7
- version: "1.1"
8
- skill-author: K-Dense Inc.
9
- ---
10
-
11
- # PennyLane
12
-
13
- ## Overview
14
-
15
- 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.
16
-
17
- ## Installation
18
-
19
- PennyLane 0.45.0 requires Python 3.11 or newer. Install using uv with pinned versions for reproducible environments:
20
-
21
- ```bash
22
- uv pip install "pennylane==0.45.0"
23
- ```
24
-
25
- For quantum hardware access, install the plugin matching the target provider. Start from a clean environment when adding or upgrading Qiskit because its dependency graph is strict.
26
-
27
- ```bash
28
- # IBM Quantum
29
- uv pip install "pennylane-qiskit==0.45.0"
30
-
31
- # Amazon Braket
32
- uv pip install "amazon-braket-pennylane-plugin==1.34.1"
33
-
34
- # Google Cirq
35
- uv pip install "pennylane-cirq==0.44.0"
36
-
37
- # Rigetti Forest
38
- uv pip install "pennylane-rigetti==0.40.0"
39
-
40
- # IonQ
41
- uv pip install "pennylane-ionq==0.45.0"
42
-
43
- # High-performance local simulators
44
- uv pip install "pennylane-lightning==0.45.0"
45
-
46
- # Catalyst JIT compilation
47
- uv pip install "pennylane-catalyst==0.15.0"
48
- ```
49
-
50
- ## Quick Start
51
-
52
- Build a quantum circuit and optimize its parameters:
53
-
54
- ```python
55
- import pennylane as qml
56
- from pennylane import numpy as np
57
-
58
- # Create device
59
- dev = qml.device('default.qubit', wires=2)
60
-
61
- # Define quantum circuit
62
- @qml.qnode(dev)
63
- def circuit(params):
64
- qml.RX(params[0], wires=0)
65
- qml.RY(params[1], wires=1)
66
- qml.CNOT(wires=[0, 1])
67
- return qml.expval(qml.PauliZ(0))
68
-
69
- # Optimize parameters
70
- opt = qml.GradientDescentOptimizer(stepsize=0.1)
71
- params = np.array([0.1, 0.2], requires_grad=True)
72
-
73
- for i in range(100):
74
- params = opt.step(circuit, params)
75
- ```
76
-
77
- ## Core Capabilities
78
-
79
- ### 1. Quantum Circuit Construction
80
-
81
- Build circuits with gates, measurements, and state preparation. See `references/quantum_circuits.md` for:
82
- - Single and multi-qubit gates
83
- - Controlled operations and conditional logic
84
- - Mid-circuit measurements and adaptive circuits
85
- - Various measurement types (expectation, probability, samples)
86
- - Circuit inspection and debugging
87
-
88
- ### 2. Quantum Machine Learning
89
-
90
- Create hybrid quantum-classical models. See `references/quantum_ml.md` for:
91
- - Integration with PyTorch and JAX
92
- - Quantum neural networks and variational classifiers
93
- - Data encoding strategies (angle, amplitude, basis, IQP)
94
- - Training hybrid models with backpropagation
95
- - Transfer learning with quantum circuits
96
-
97
- ### 3. Quantum Chemistry
98
-
99
- Simulate molecules and compute ground state energies. See `references/quantum_chemistry.md` for:
100
- - Molecular Hamiltonian generation
101
- - Variational Quantum Eigensolver (VQE)
102
- - UCCSD ansatz for chemistry
103
- - Geometry optimization and dissociation curves
104
- - Molecular property calculations
105
-
106
- ### 4. Device Management
107
-
108
- Execute on simulators or quantum hardware. See `references/devices_backends.md` for:
109
- - Built-in simulators (default.qubit, lightning.qubit, default.mixed)
110
- - Hardware plugins (IBM, Amazon Braket, Google, Rigetti, IonQ)
111
- - Device selection and configuration
112
- - Performance optimization and caching
113
- - GPU acceleration and JIT compilation
114
-
115
- ### 5. Optimization
116
-
117
- Train quantum circuits with various optimizers. See `references/optimization.md` for:
118
- - Built-in optimizers (Adam, gradient descent, momentum, RMSProp)
119
- - Gradient computation methods (backprop, parameter-shift, adjoint)
120
- - Variational algorithms (VQE, QAOA)
121
- - Training strategies (learning rate schedules, mini-batches)
122
- - Handling barren plateaus and local minima
123
-
124
- ### 6. Advanced Features
125
-
126
- Leverage templates, transforms, and compilation. See `references/advanced_features.md` for:
127
- - Circuit templates and layers
128
- - Transforms and circuit optimization
129
- - Pulse-level programming
130
- - Catalyst JIT compilation
131
- - Noise models and error mitigation
132
- - Resource estimation
133
-
134
- ## Common Workflows
135
-
136
- ### Train a Variational Classifier
137
-
138
- ```python
139
- # 1. Define ansatz
140
- @qml.qnode(dev)
141
- def classifier(x, weights):
142
- # Encode data
143
- qml.AngleEmbedding(x, wires=range(4))
144
-
145
- # Variational layers
146
- qml.StronglyEntanglingLayers(weights, wires=range(4))
147
-
148
- return qml.expval(qml.PauliZ(0))
149
-
150
- # 2. Train
151
- opt = qml.AdamOptimizer(stepsize=0.01)
152
- weights = np.random.random((3, 4, 3)) # 3 layers, 4 wires
153
-
154
- for epoch in range(100):
155
- for x, y in zip(X_train, y_train):
156
- weights = opt.step(lambda w: (classifier(x, w) - y)**2, weights)
157
- ```
158
-
159
- ### Run VQE for Molecular Ground State
160
-
161
- ```python
162
- from pennylane import qchem
163
-
164
- # 1. Build Hamiltonian
165
- symbols = ['H', 'H']
166
- geometry = np.array([[0.0, 0.0, -0.66140414], [0.0, 0.0, 0.66140414]])
167
- molecule = qchem.Molecule(symbols, geometry)
168
- H, n_qubits = qchem.molecular_hamiltonian(molecule)
169
- hf_state = qchem.hf_state(electrons=2, orbitals=n_qubits)
170
- singles, doubles = qchem.excitations(electrons=2, orbitals=n_qubits)
171
- s_wires, d_wires = qchem.excitations_to_wires(singles, doubles)
172
-
173
- # 2. Define ansatz
174
- @qml.qnode(dev)
175
- def vqe_circuit(params):
176
- qml.BasisState(hf_state, wires=range(n_qubits))
177
- qml.UCCSD(params, wires=range(n_qubits), s_wires=s_wires, d_wires=d_wires)
178
- return qml.expval(H)
179
-
180
- # 3. Optimize
181
- opt = qml.AdamOptimizer(stepsize=0.1)
182
- params = np.zeros(len(singles) + len(doubles), requires_grad=True)
183
-
184
- for i in range(100):
185
- params, energy = opt.step_and_cost(vqe_circuit, params)
186
- print(f"Step {i}: Energy = {energy:.6f} Ha")
187
- ```
188
-
189
- ### Switch Between Devices
190
-
191
- ```python
192
- # Same circuit, different backends
193
- circuit_def = lambda dev: qml.qnode(dev)(circuit_function)
194
-
195
- # Test on simulator
196
- dev_sim = qml.device('default.qubit', wires=4)
197
- result_sim = circuit_def(dev_sim)(params)
198
-
199
- # Run on quantum hardware
200
- from qiskit_ibm_runtime import QiskitRuntimeService
201
-
202
- service = QiskitRuntimeService()
203
- backend = service.least_busy(operational=True, simulator=False, min_num_qubits=4)
204
- dev_hw = qml.device('qiskit.remote', wires=backend.num_qubits, backend=backend)
205
- result_hw = circuit_def(dev_hw)(params)
206
- ```
207
-
208
- ## Detailed Documentation
209
-
210
- For comprehensive coverage of specific topics, consult the reference files:
211
-
212
- - **Getting started**: `references/getting_started.md` - Installation, basic concepts, first steps
213
- - **Quantum circuits**: `references/quantum_circuits.md` - Gates, measurements, circuit patterns
214
- - **Quantum ML**: `references/quantum_ml.md` - Hybrid models, framework integration, QNNs
215
- - **Quantum chemistry**: `references/quantum_chemistry.md` - VQE, molecular Hamiltonians, chemistry workflows
216
- - **Devices**: `references/devices_backends.md` - Simulators, hardware plugins, device configuration
217
- - **Optimization**: `references/optimization.md` - Optimizers, gradients, variational algorithms
218
- - **Advanced**: `references/advanced_features.md` - Templates, transforms, JIT compilation, noise
219
-
220
- ## Best Practices
221
-
222
- 1. **Start with simulators** - Test on `default.qubit` before deploying to hardware
223
- 2. **Use parameter-shift for hardware** - Backpropagation only works on simulators
224
- 3. **Choose appropriate encodings** - Match data encoding to problem structure
225
- 4. **Initialize carefully** - Use small random values to avoid barren plateaus
226
- 5. **Monitor gradients** - Check for vanishing gradients in deep circuits
227
- 6. **Cache devices** - Reuse device objects to reduce initialization overhead
228
- 7. **Profile circuits** - Use `qml.specs()` to analyze circuit complexity
229
- 8. **Test locally** - Validate on simulators before submitting to hardware
230
- 9. **Use templates** - Leverage built-in templates for common circuit patterns
231
- 10. **Compile when possible** - Use Catalyst JIT for performance-critical code
232
-
233
- ## Resources
234
-
235
- - Official documentation: https://docs.pennylane.ai
236
- - Codebook (tutorials): https://pennylane.ai/codebook
237
- - QML demonstrations: https://pennylane.ai/qml/demonstrations
238
- - Community forum: https://discuss.pennylane.ai
239
- - GitHub: https://github.com/PennyLaneAI/pennylane
240
-