Source: https://github.com/aipoch/medical-research-skills
LabArchives Integration
This skill is an Academic Writing workflow built around LabArchives evidence. Its goal is not just API access, but turning authorized ELN material into manuscript-ready writing deliverables.
When to Use
- The user has LabArchives notebook content and needs a Methods draft grounded in recorded procedures.
- The user needs a data availability statement, reproducibility appendix, experiment timeline, or submission support summary based on ELN records.
- The user wants to gather authorized notebook data first, then convert it into academic writing outputs.
- The user needs a deterministic evidence-to-writing workflow instead of freeform summarization.
When Not to Use
- The user asks for unauthorized access to notebooks or other users' data.
- The user wants clinical recommendations, diagnosis, or treatment language.
- The user asks you to fabricate notebook records, timestamps, protocol details, or compliance statements that are not present in the source.
- The user has no authorized export, no notebook metadata, and no textual record to ground the writing output.
Primary Writing Outputs
This skill supports these deliverables:
- Methods Draft
Based on notebook entries, protocols, instrument logs, and sample-processing notes
- Data Availability Statement
Based on notebook identifiers, repository links, export status, and sharing constraints
- Reproducibility Appendix
Based on protocol versions, software environments, parameter logs, and file provenance
- Experiment Timeline Summary
Based on dated entries, milestones, and decision points
- Submission Support Note
Based on notebook scope, audit trail, and documentation completeness
Authorized Input Sources
Use one or more of:
- exported notebook text or JSON
- manually pasted LabArchives entry content
- protocol summaries
- experiment metadata tables
- authorized backup output from bundled scripts
Optional collection step:
scripts/setup_config.py
scripts/notebook_operations.py
scripts/entry_operations.py
Writing Output Contract
Output A: Methods Draft
Must include:
- study material or sample context
- experimental workflow in chronological order
- instrument / assay / software mentions if present in source
- quality-control or versioning note if present in source
- no invented parameter values
Output B: Data Availability Statement
Must include:
- what data are available
- where they are stored or how they can be requested
- any access restrictions
- relationship to LabArchives or downstream repository
Output C: Reproducibility Appendix
Must include:
- protocol version references
- software or pipeline identifiers if present
- provenance or notebook traceability note
- missing-record warning if the audit trail is incomplete
Output D: Experiment Timeline Summary
Must include:
- dated milestone order
- major protocol transitions
- validation / repeat / deviation points if documented
Workflow
1. Validate authorization and source sufficiency
Confirm:
- the requester has authorized access to the notebook data
- the source contains enough grounded information for the requested writing output
If not, stop and use the refusal template in ## Refusal and Recovery Contract.
2. Choose the acquisition path
Use direct source text if already available. Prefer this path for speed.
If data must be collected first, use one of the bundled scripts:
python scripts/setup_config.py
python scripts/notebook_operations.py --help
python scripts/entry_operations.py --help
Use --dry-run where available before live execution.
3. Normalize notebook evidence
Extract only writing-relevant elements:
- dates
- protocol names and versions
- sample or cohort descriptors
- software / pipeline names
- QC notes
- repository / export details
- compliance or sharing constraints
4. Draft the requested academic writing output
Keep the prose:
- factual
- audit-trail grounded
- publication appropriate
- free of operational noise that does not belong in the manuscript deliverable
5. Run the final writing safety pass
Check that:
- every claim maps back to source evidence
- missing evidence is labeled as missing
- no compliance statement is invented
- no unauthorized identifiers are surfaced
Refusal and Recovery Contract
If the workflow cannot proceed safely, respond with:
Cannot generate the requested LabArchives-based writing output yet.
Reason: <missing authorization / insufficient export / incomplete metadata / unsupported request>
Minimum next step:
- <step 1>
- <step 2>
Use this contract for:
- missing notebook authorization
- no usable export or pasted content
- requests to infer missing protocol details
- requests to expose restricted data
Script Usage Notes
The bundled scripts are supporting collection utilities, not the final output themselves.
setup_config.py: create or validate configuration
notebook_operations.py: list notebooks, plan backups, or perform authorized exports
entry_operations.py: inspect entry-level content or upload artifacts when explicitly needed
If a script path fails:
- report the exact command
- report the exact failure
- continue with direct writing only if enough grounded notebook text is already available
Academic Writing Style Rules
- write in neutral, methods-oriented academic prose
- prefer verifiable chronology over interpretive narrative
- do not overclaim documentation quality if the notebook trail is partial
- clearly distinguish
documented, not documented, and not provided
Recommended Templates
Use assets/writing_outputs_template.md as the default skeleton for the four main writing deliverables.
Deterministic Rules
- keep output headings stable
- do not expose raw credentials, tokens, or private notebook identifiers unless the user explicitly needs authorized internal formatting
- if a timestamp or version is missing, say it is not documented
- treat data availability and reproducibility statements as formal manuscript components, not casual notes
Completion Checklist
- Authorization boundary checked
- Source sufficiency checked
- Requested writing deliverable selected explicitly
- All statements grounded in notebook evidence
- Missing evidence labeled rather than invented
1---2name: labarchive-integration3description: Converts LabArchives notebook data, entry metadata, and authorized ELN exports into manuscript-ready academic writing outputs such as Methods sections, data-availability statements, reproducibility appendices, experiment timelines, and submission support notes. Optional bundled scripts can be used to collect or validate source notebook data before writing.4license: MIT5---6> **Source**: [https://github.com/aipoch/medical-research-skills](https://github.com/aipoch/medical-research-skills)78# LabArchives Integration910This skill is an **Academic Writing** workflow built around LabArchives evidence. Its goal is not just API access, but turning authorized ELN material into manuscript-ready writing deliverables.1112## When to Use1314- The user has LabArchives notebook content and needs a **Methods** draft grounded in recorded procedures.15- The user needs a **data availability statement**, **reproducibility appendix**, **experiment timeline**, or **submission support summary** based on ELN records.16- The user wants to gather authorized notebook data first, then convert it into academic writing outputs.17- The user needs a deterministic evidence-to-writing workflow instead of freeform summarization.1819## When Not to Use2021- The user asks for unauthorized access to notebooks or other users' data.22- The user wants clinical recommendations, diagnosis, or treatment language.23- The user asks you to fabricate notebook records, timestamps, protocol details, or compliance statements that are not present in the source.24- The user has no authorized export, no notebook metadata, and no textual record to ground the writing output.2526## Primary Writing Outputs2728This skill supports these deliverables:2930- **Methods Draft**31 Based on notebook entries, protocols, instrument logs, and sample-processing notes32- **Data Availability Statement**33 Based on notebook identifiers, repository links, export status, and sharing constraints34- **Reproducibility Appendix**35 Based on protocol versions, software environments, parameter logs, and file provenance36- **Experiment Timeline Summary**37 Based on dated entries, milestones, and decision points38- **Submission Support Note**39 Based on notebook scope, audit trail, and documentation completeness4041## Authorized Input Sources4243Use one or more of:4445- exported notebook text or JSON46- manually pasted LabArchives entry content47- protocol summaries48- experiment metadata tables49- authorized backup output from bundled scripts5051Optional collection step:5253- `scripts/setup_config.py`54- `scripts/notebook_operations.py`55- `scripts/entry_operations.py`5657## Writing Output Contract5859### Output A: Methods Draft6061Must include:6263- study material or sample context64- experimental workflow in chronological order65- instrument / assay / software mentions if present in source66- quality-control or versioning note if present in source67- no invented parameter values6869### Output B: Data Availability Statement7071Must include:7273- what data are available74- where they are stored or how they can be requested75- any access restrictions76- relationship to LabArchives or downstream repository7778### Output C: Reproducibility Appendix7980Must include:8182- protocol version references83- software or pipeline identifiers if present84- provenance or notebook traceability note85- missing-record warning if the audit trail is incomplete8687### Output D: Experiment Timeline Summary8889Must include:9091- dated milestone order92- major protocol transitions93- validation / repeat / deviation points if documented9495## Workflow9697### 1. Validate authorization and source sufficiency9899Confirm:100101- the requester has authorized access to the notebook data102- the source contains enough grounded information for the requested writing output103104If not, stop and use the refusal template in `## Refusal and Recovery Contract`.105106### 2. Choose the acquisition path107108Use direct source text if already available. Prefer this path for speed.109110If data must be collected first, use one of the bundled scripts:111112```bash113python scripts/setup_config.py114python scripts/notebook_operations.py --help115python scripts/entry_operations.py --help116```117118Use `--dry-run` where available before live execution.119120### 3. Normalize notebook evidence121122Extract only writing-relevant elements:123124- dates125- protocol names and versions126- sample or cohort descriptors127- software / pipeline names128- QC notes129- repository / export details130- compliance or sharing constraints131132### 4. Draft the requested academic writing output133134Keep the prose:135136- factual137- audit-trail grounded138- publication appropriate139- free of operational noise that does not belong in the manuscript deliverable140141### 5. Run the final writing safety pass142143Check that:144145- every claim maps back to source evidence146- missing evidence is labeled as missing147- no compliance statement is invented148- no unauthorized identifiers are surfaced149150## Refusal and Recovery Contract151152If the workflow cannot proceed safely, respond with:153154```text155Cannot generate the requested LabArchives-based writing output yet.156Reason: <missing authorization / insufficient export / incomplete metadata / unsupported request>157Minimum next step:158- <step 1>159- <step 2>160```161162Use this contract for:163164- missing notebook authorization165- no usable export or pasted content166- requests to infer missing protocol details167- requests to expose restricted data168169## Script Usage Notes170171The bundled scripts are **supporting collection utilities**, not the final output themselves.172173- `setup_config.py`: create or validate configuration174- `notebook_operations.py`: list notebooks, plan backups, or perform authorized exports175- `entry_operations.py`: inspect entry-level content or upload artifacts when explicitly needed176177If a script path fails:178179- report the exact command180- report the exact failure181- continue with direct writing only if enough grounded notebook text is already available182183## Academic Writing Style Rules184185- write in neutral, methods-oriented academic prose186- prefer verifiable chronology over interpretive narrative187- do not overclaim documentation quality if the notebook trail is partial188- clearly distinguish `documented`, `not documented`, and `not provided`189190## Recommended Templates191192Use `assets/writing_outputs_template.md` as the default skeleton for the four main writing deliverables.193194## Deterministic Rules195196- keep output headings stable197- do not expose raw credentials, tokens, or private notebook identifiers unless the user explicitly needs authorized internal formatting198- if a timestamp or version is missing, say it is not documented199- treat data availability and reproducibility statements as formal manuscript components, not casual notes200201## Completion Checklist202203- Authorization boundary checked204- Source sufficiency checked205- Requested writing deliverable selected explicitly206- All statements grounded in notebook evidence207- Missing evidence labeled rather than invented