Track lab equipment calibration dates and send maintenance reminders for pipettes, balances, centrifuges, and other instruments. Validates date formats and supports update/delete operations.
Track calibration dates for pipettes, balances, centrifuges and send maintenance reminders.
python -m py_compile scripts/main.py
python -m py_compile scripts/main.py
python scripts/main.py --help
python scripts/main.py --add "Pipette P100" --calibration-date 2024-01-15 --interval 12
| Parameter | Type | Required | Description |
|---|---|---|---|
--add | string | * | Equipment name to add |
--calibration-date | string | * | Last calibration date (YYYY-MM-DD format required) |
--interval | int | * | Calibration interval in months |
--location | string | No | Equipment location |
--update | string | ** | Equipment name to update calibration date |
--delete | string | ** | Equipment name to remove from log |
--check | flag | ** | Check for upcoming maintenance |
--list | flag | ** | List all equipment |
--report | flag | ** | Generate compliance report (JSON) |
* Required when adding or updating equipment ** Alternative operations (mutually exclusive with --add)
Date validation:
--calibration-datemust be in YYYY-MM-DD format. Invalid dates (e.g., 2024-13-45) are rejected at input time with a clear error message. The script validates the date before storing it.
# Add equipment
python scripts/main.py --add "Pipette P100" --calibration-date 2024-01-15 --interval 12
# Add with location
python scripts/main.py --add "Balance XS205" --calibration-date 2024-03-01 --interval 6 --location "Lab 3B"
# Check maintenance status
python scripts/main.py --check
# List all equipment
python scripts/main.py --list
# Update calibration date after servicing
python scripts/main.py --update "Pipette P100" --calibration-date 2025-01-15
# Remove decommissioned equipment
python scripts/main.py --delete "Balance XS205"
# Generate compliance report
python scripts/main.py --report
{
"generated": "2025-01-15",
"equipment": [
{
"name": "Pipette P100",
"location": "Lab 3B",
"last_calibration": "2024-01-15",
"interval_months": 12,
"next_due": "2025-01-15",
"status": "DUE"
}
],
"summary": {
"total": 1,
"overdue": 0,
"due_30_days": 1,
"compliant": 0
}
}
For complex multi-constraint requests, always include these blocks:
This skill accepts requests involving lab equipment calibration tracking, maintenance scheduling, and reminder generation.
If the user's request does not involve equipment maintenance logging — for example, asking to order supplies, write SOPs, or manage personnel schedules — do not proceed with the workflow. Instead respond:
"equipment-maintenance-log is designed to track lab equipment calibration dates and maintenance schedules. Your request appears to be outside this scope. Please provide equipment name and calibration details, or use a more appropriate tool for your task."
Every final response must include:
--add is used without --calibration-date or --interval, report exactly which fields are missing before proceeding.--calibration-date is not in YYYY-MM-DD format, reject with: "Invalid date format. Use YYYY-MM-DD (e.g., 2024-01-15)."--update or --delete references an equipment name not in the log, report "Equipment not found" and list available names.scripts/main.py fails, report the failure point, summarize what still can be completed safely, and provide a manual fallback.