reagent-expiry-alert

$npx mdskill add aipoch/medical-research-skills/reagent-expiry-alert

Scan reagent barcodes and log expiry dates for laboratory inventory.

  • Generates multi-level alerts for reagents approaching expiration.
  • Validates YYYY-MM-DD dates and warns for past expiry dates.
  • Executes Python scripts to process barcode scans and inventory logs.
  • Returns expiration status and warning messages to the agent.

SKILL.md

.github/skills/reagent-expiry-alertView on GitHub ↗
---
name: reagent-expiry-alert
description: Scan reagent barcodes or IDs, log expiration dates, and generate multi-level alerts before reagent expiry to support laboratory inventory management.
license: MIT
author: aipoch
---
> **Source**: [https://github.com/aipoch/medical-research-skills](https://github.com/aipoch/medical-research-skills)
# Reagent Expiry Alert

Scan reagent bottle barcodes or IDs, log expiration dates, and alert before expiry to support safe laboratory inventory management.

## Quick Check

```bash
python -m py_compile scripts/main.py
python scripts/main.py --help
```

## When to Use

- Use this skill when logging a new reagent with its expiry date into the inventory.
- Use this skill when checking for reagents approaching expiration (30/60/90-day alerts).
- Do not use this skill to manage controlled substances, biological hazards requiring special disposal, or reagents subject to regulatory chain-of-custody requirements.

## Workflow

1. Confirm the reagent barcode/ID, expiry date, and action (scan/log or check alerts).
2. Validate that the request is for reagent expiry tracking, not chemical safety assessment or disposal guidance.
3. **Date validation:** If `--expiry` is provided, validate that it is a valid YYYY-MM-DD date. If the date is in the past, emit a warning: "This reagent is already expired as of [date]. It will be logged with an Expired alert status."
4. Log the reagent or run the alert check using the packaged script.
5. Return expiration status, alert level, and reorder recommendations.
6. If inputs are incomplete, state which fields are missing and request only the minimum additional information.

## Usage

```text
# Log a new reagent
python scripts/main.py --scan "REAGENT-001" --name "Tris Buffer" --expiry 2025-12-31 --location "Shelf A"

# Check for upcoming expirations
python scripts/main.py --check-alerts --alert-days 30

# Check with custom alert window
python scripts/main.py --check-alerts --alert-days 60
```

## Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| `--scan` | string | No | — | Reagent barcode or ID |
| `--name` | string | No | — | Reagent name |
| `--expiry` | date | No | — | Expiration date (YYYY-MM-DD) |
| `--location` | string | No | — | Storage location |
| `--quantity` | string | No | — | Quantity on hand |
| `--check-alerts` | flag | No | — | Check for upcoming expirations |
| `--alert-days` | integer | No | 30 | Days before expiry to alert |

## Alert Levels

- 🔴 Expired — reagent past expiry date
- 🟠 Critical — expiring within 30 days
- 🟡 Warning — expiring within 60 days
- 🟢 OK — expiring beyond 60 days

## Output

- Expiration alert report with alert level per reagent
- Inventory summary
- Reorder recommendations for critical/expired items

## Stress-Case Rules

For complex multi-constraint requests, always include these explicit blocks:

1. Assumptions
2. Reagents Checked
3. Alert Report
4. Reorder Recommendations
5. Risks and Manual Checks

## Error Handling

- If required inputs are missing, state exactly which fields are missing and request only the minimum additional information.
- If the task goes outside the documented scope, stop instead of guessing or silently widening the assignment.
- If `scripts/main.py` fails, report the failure point, summarize what still can be completed safely, and provide a manual fallback.
- Do not fabricate expiry dates, inventory counts, or reorder thresholds.

## Input Validation

This skill accepts: reagent barcode/ID and expiry date for logging, or a check-alerts request for inventory review.

If the request does not involve reagent expiry tracking — for example, asking for chemical hazard assessment, waste disposal guidance, or controlled substance management — do not proceed with the workflow. Instead respond:
> "reagent-expiry-alert is designed to log reagent expiry dates and generate alerts before expiration. Your request appears to be outside this scope. Please provide a reagent ID and expiry date, or use a more appropriate tool."

## Response Template

Use the following fixed structure for non-trivial requests:

1. Objective
2. Inputs Received
3. Assumptions
4. Workflow
5. Deliverable
6. Risks and Limits
7. Next Checks

If the request is simple, you may compress the structure, but still keep assumptions and limits explicit when they affect correctness.

More from aipoch/medical-research-skills

SkillDescription
3d-molecule-ray-tracerGenerate photorealistic rendering scripts for PyMOL and UCSF ChimeraX.
abstract-summarizerTransform lengthy academic papers into concise, structured 250-word abstracts.
abstract-trimmerPrecision editing tool that reduces abstract word count through intelligent compression techniques, maintaining scientific rigor while meeting strict journal and conference requirements.
academic-abstract-refinerRefines long medical academic texts into SCI-style unstructured Chinese and English abstracts; use when you need to condense drafts/reports/summaries into bilingual abstracts and generate Summary_Report.md.
academic-cv-generatorGenerate structured academic CVs from free-form Chinese/English text and export to Word (.docx). Use this skill when you are asked to organize, generate, or optimize an academic CV (e.g., publications/projects/awards) into a consistent, formatted document with uniform-colored section headers and optional bilingual output.
academic-highlight-generatorGenerates submission-ready Elsevier/SCI Highlights from manuscript text or extracted PDF/DOCX/TXT content. Use when a user needs 3-5 concise, evidence-grounded highlight bullets for a research paper, review, meta-analysis, case report, or bioinformatics manuscript.
academic-norm-reviewDetects content similarity, verifies standardized citations and abbreviations, and flags potential academic integrity risks; use it before submission, during academic writing QA, or for compliance reviews.
academic-poster-generatorComplete workflow for generating academic research posters from PDF literature; use when you need to extract paper content from PDFs and produce a LaTeX-based poster (beamerposter/tikzposter/baposter) with mandatory figure generation and a final rendered HTML deliverable.
acronym-unpackerIntelligent medical abbreviation disambiguation tool that resolves ambiguous acronyms using clinical context, specialty-specific knowledge, and document-level semantic analysis.
active-comparator-single-soc-faers-safety-comparisonGenerates complete FAERS pharmacovigilance study designs for multi-drug or class-level safety comparison inside one predefined SOC or AE family using active comparators, disproportionality analysis, subgroup characterization, and reviewer-facing evidence control.