Agent skill

Lab Inventory Predictor

by aipoch in aipoch/medical-research-skills

Predict depletion time of critical lab reagents based on historical usage frequency, and automatically generate purchase alerts when stock falls below safety thresholds.

MITAuto-check passed

Install Lab Inventory Predictor

skills CLI
$ npx skills add aipoch/medical-research-skills --skill lab-inventory-predictor -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install aipoch/medical-research-skills lab-inventory-predictor --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/aipoch/medical-research-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/scientific-skills/Other/lab-inventory-predictor .claude/skills/lab-inventory-predictor && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
lab-inventory-predictor
GitHub stars
2k
Token cost
~2.2k tokens
SKILL.md length
871 words
Files
4 (incl. scripts)
Skills in repo
578
Repo updated
First seen
Licence
MIT

At a glance

Predict depletion time of critical lab reagents based on historical usage frequency, and automatically generate purchase alerts when stock falls below safety thresholds.

  • Works in 5 steps: Validate input — confirm the request is… → Confirm the user objective, required… → Use the packaged script path or the… → …
  • SKILL.md covers Input Validation, Quick Check, Prerequisites and When to Use, plus 9 more sections
  • Runs Python scripts from its folder; calls python, pyenv and conda

What it does

Lab Inventory Predictor is an agent skill from aipoch/medical-research-skills. Predict depletion time of critical lab reagents based on historical usage frequency, and automatically generate purchase alerts when stock falls below safety thresholds.

Its SKILL.md is about 2.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including scripts (for example `lab-inventory-predictor_audit_result_v4.json` and `scripts/main.py`).

It works with Python. The repository describes itself as: Hundreds of agent skills for medical research, including protocol design, data analysis, evidence insights, and academic writing. The licence is MIT.

Example prompts

  • “/lab-inventory-predictor”

Requirements

  • Python 3

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Validate input — confirm the request is within scope before any processing.
  2. Confirm the user objective, required inputs, and non-negotiable constraints before doing detailed work.
  3. Use the packaged script path or the documented reasoning path with only the inputs that are actually available.
  4. Return a structured result that separates assumptions, deliverables, risks, and unresolved items.
  5. If execution fails or inputs are incomplete, switch to the fallback path and state exactly what blocked full completion.

What it can do on your machine

Read from SKILL.md and the folder at commit 686e09d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python
    • pyenv
    • conda

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Lab Inventory Predictor loads about 2.2k tokens when it runs. Until then it costs about 48 tokens; SKILL.md has 871 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~48
When it runs · the whole SKILL.md, loaded when a task matches
~2.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from aipoch/medical-research-skills at commit 686e09d, republished under its MIT licence (© aipoch). 871 words, ~2,158 tokens.

Download SKILL.mdSave it as .claude/skills/lab-inventory-predictor/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
lab-inventory-predictor
description
Predict depletion time of critical lab reagents based on historical usage frequency, and automatically generate purchase alerts when stock falls below safety thresholds.
license
MIT
author
AIPOCH

Source: https://github.com/aipoch/medical-research-skills

Lab Inventory Predictor

Predicts reagent depletion time by analyzing historical usage frequency, and automatically generates reminders when purchases are needed.

Input Validation

This skill accepts: lab reagent inventory data (stock levels, usage records) for the purpose of predicting depletion dates and generating purchase alerts.

If the user's request does not involve lab reagent inventory management or depletion prediction — for example, asking to analyze experimental results, manage equipment, or perform general data analysis — do not proceed with the workflow. Instead respond:

"lab-inventory-predictor is designed to predict reagent depletion and generate purchase alerts based on usage history. Your request appears to be outside this scope. Please provide reagent inventory data, or use a more appropriate tool for your task."

Do not continue the workflow when the request is out of scope, missing the required --action parameter, or would require unsupported assumptions. For missing inputs, state exactly which fields are missing.

Quick Check

bash
python -m py_compile scripts/main.py
python scripts/main.py --help
python scripts/main.py --action status

Prerequisites

  • Python 3.8+ is strictly required (uses dataclasses module). On Python 3.6 the script will fail at import with ModuleNotFoundError. Upgrade with pyenv install 3.8 or conda create -n lab python=3.8.
  • The script should include a version guard: if sys.version_info < (3, 8): sys.exit('Error: Python 3.8+ required') before the dataclasses import.
  • No external dependencies (uses only standard library)
text
pip install -r requirements.txt

When to Use

  • Predict when lab reagents will run out based on historical consumption data
  • Generate purchase alerts before reagents deplete below safety thresholds
  • Track stock levels and usage history for multiple reagents
  • Generate inventory reports in text, JSON, or CSV format

Workflow

  1. Validate input — confirm the request is within scope before any processing.
  2. Confirm the user objective, required inputs, and non-negotiable constraints before doing detailed work.
  3. Use the packaged script path or the documented reasoning path with only the inputs that are actually available.
  4. Return a structured result that separates assumptions, deliverables, risks, and unresolved items.
  5. If execution fails or inputs are incomplete, switch to the fallback path and state exactly what blocked full completion.

Core Capabilities

  1. Inventory Tracking — Record current reagent stock levels
  2. Usage Frequency Analysis — Calculate consumption rate based on experiment records
  3. Depletion Prediction — Predict reagent depletion date based on consumption rate
  4. Purchase Alerts — Generate alerts before reagents are about to deplete
  5. Safety Stock Alerts — Alert when inventory falls below safety threshold

Usage

Command Line
text
# View all reagent status
python scripts/main.py --action status

# Add or update reagent information
python scripts/main.py --action add-reagent \
  --name "PBS Buffer" \
  --current-stock 500 \
  --unit "ml" \
  --safety-days 7

# Record experiment consumption
python scripts/main.py --action record-usage \
  --name "PBS Buffer" \
  --amount 50 \
  --experiment "Cell Culture Experiment #2024-001"

# Get purchase alerts
python scripts/main.py --action alerts

# Generate prediction report
python scripts/main.py --action report
Python API
python
from skills.lab_inventory_predictor import InventoryPredictor

predictor = InventoryPredictor("/path/to/inventory.json")
predictor.add_reagent(name="PBS Buffer", current_stock=500, unit="ml", safety_days=7, lead_time_days=3)
predictor.record_usage("PBS Buffer", 50, "Experiment #001")
prediction = predictor.predict_depletion("PBS Buffer")
print(f"Predicted depletion time: {prediction['depletion_date']}")
alerts = predictor.get_alerts()

Parameters

Global Parameters
ParameterTypeDefaultRequiredDescription
--actionstring-YesAction: status, add-reagent, record-usage, alerts, report
--data-filestring~/.openclaw/workspace/data/lab-inventory.jsonNoPath to inventory data file (must be within workspace; ../ paths rejected)
add-reagent Action
ParameterTypeDefaultRequiredDescription
--namestring-YesReagent name
--current-stockfloat-YesCurrent stock quantity
--unitstring-YesUnit of measurement (ml, mg, etc.)
--safety-daysint7NoSafety buffer days
--lead-time-daysint3NoExpected delivery time
--safety-stockfloat-NoSafety stock threshold
record-usage Action
ParameterTypeDefaultRequiredDescription
--namestring-YesReagent name
--amountfloat-YesAmount consumed
--experimentstring-NoExperiment identifier
report Action
ParameterTypeDefaultRequiredDescription
--output, -ostringstdoutNoOutput file path
--formatstringtextNoOutput format (text, json, csv)

Prediction Algorithm

Consumption Rate
daily_consumption = Σ(usage_amount) / days_span
Depletion Date
days_until_depletion = current_stock / daily_consumption
depletion_date = today + days_until_depletion
Show full SKILL.md (351 more words)Show less
Purchase Alert Trigger Conditions
  1. Time-based: When days_until_depletion <= safety_days + lead_time_days
  2. Stock-based: When current_stock <= safety_stock
Confidence Warning

When a reagent has fewer than 3 usage records, the prediction is flagged as LOW_CONFIDENCE. The output will include:

"Warning: Only [N] usage records available for [reagent]. Prediction reliability is low — collect more usage data before relying on this estimate."

Each LOW_CONFIDENCE prediction must include an inline risk note adjacent to the prediction result, not only in the aggregate Risks section.

Fallback Behavior

If scripts/main.py fails or required inputs are incomplete:

  1. Report the exact failure point and error message.
  2. State what can still be completed (e.g., status check without prediction).
  3. Manual fallback: verify the inventory JSON file exists at the configured path, then re-run with --action status to confirm data integrity.
  4. Do not fabricate execution outcomes or inventory data.

Output Requirements

Every final response must make these items explicit when relevant:

  • Objective or requested deliverable
  • Inputs used and assumptions introduced
  • Workflow or decision path
  • Core result, recommendation, or artifact
  • Constraints, risks, caveats, or validation needs (including LOW_CONFIDENCE flags for sparse data, noted inline per reagent)
  • Unresolved items and next-step 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 --data-file path contains ../ or points outside the workspace, reject with a path traversal warning.
  • If scripts/main.py fails, report the failure point, summarize what still can be completed safely, and provide a manual fallback.
  • Do not fabricate files, citations, data, search results, or execution outcomes.

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 (include LOW_CONFIDENCE flag inline per reagent if fewer than 3 usage records)
  7. Next Checks

For stress/multi-constraint requests, also include:

  • Constraints checklist (compliance, performance, error paths)
  • Unresolved items with explicit blocking reasons

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

© aipoch, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (scripts) in scientific-skills/Other/lab-inventory-predictor of aipoch/medical-research-skills.

  • SKILL.md
  • lab-inventory-predictor_audit_result_v4.json
  • requirements.txt
  • scripts/main.py

Open the folder on GitHubat commit 686e09d

Compare with similar skills

Lab Inventory Predictor next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Lab Inventory Predictor compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Lab Inventory Predictor this skillaipoch/medical-research-skills2k—~2.2kAutomated safety check: PassMIT
MCP Server Builderanthropics/skills180k63 repos~2.3kAutomated safety check: PassApache-2.0
PDF Processinganthropics/skills180k48 repos~2kAutomated safety check: PassProprietary
NotebookLM Research AssistantPleasePrompto/notebooklm-skill7.8k14 repos~2.4kAutomated safety check: NotesMIT
Manim Video Productionbrowser-use/video-use28k6 repos~3kAutomated safety check: PassMIT
Code Review ChecklistshareAI-lab/learn-claude-code78k5 repos~1.1kAutomated safety check: PassMIT

Similar skills

  • MCP Server Builder

    anthropics/skills

    Official

    Guides the design and implementation of Model Context Protocol servers in TypeScript or Python, from tool naming and error messages to evaluation.

    180k GitHub starsUsed in 63 repos~2.3k tokens
    Agent WorkflowsAuto-check passed
  • PDF Processing

    anthropics/skills

    Official

    Handles everyday PDF jobs in Python and on the command line: extract text and tables, merge, split, rotate, watermark, fill forms, encrypt and OCR.

    180k GitHub starsUsed in 48 repos~2k tokens
    Documents & OfficeAuto-check passed
  • NotebookLM Research Assistant

    PleasePrompto/notebooklm-skill

    Lets Claude Code ask questions of your Google NotebookLM notebooks through browser automation and return answers grounded in your uploaded sources.

    7.8k GitHub starsUsed in 14 repos~2.4k tokens
    Knowledge ManagementAuto-check: notes
  • Manim Video Production

    browser-use/video-use

    Produces math and technical explainer videos with Manim Community Edition: concept animations, equation derivations, algorithm walkthroughs and data stories.

    28k GitHub starsUsed in 6 repos~3k tokens
    Media & CreativeAuto-check passed
  • Code Review Checklist

    shareAI-lab/learn-claude-code

    Reviews code against a five-part checklist covering security, correctness, performance, maintainability and testing, and reports findings in a fixed format.

    78k GitHub starsUsed in 5 repos~1.1k tokens
    DevelopmentAuto-check passed
  • PPT Master

    hugohe3/ppt-master

    Generates editable PowerPoint decks, rebuilds slides from images, fills .pptx templates and polishes existing presentations through routed workflows.

    58k GitHub starsUsed in 1 repo~2.5k tokens
    Documents & OfficeAuto-check passed

More from aipoch/medical-research-skills

All 578 skills in this repo
  • Academic Poster Generator

    aipoch/medical-research-skills

    Complete 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…

    2k GitHub stars~2.2k tokensUpdated 22 days ago
    Auto-check passed
  • Diagnostic Study Quality Assessment Quadas

    aipoch/medical-research-skills

    Analyzes clinical diagnostic accuracy studies for bias using the QUADAS-2 tool.

    2k GitHub stars~1.4k tokensUpdated 22 days ago
    Auto-check passed
  • Exploratory Data Analysis

    aipoch/medical-research-skills

    Perform comprehensive exploratory data analysis on scientific data files across 200+ file formats.

    2k GitHub stars~3.7k tokensUpdated 22 days ago
    Auto-check passed
  • Iso Certification

    aipoch/medical-research-skills

    A toolkit for preparing ISO 13485:2016 certification documentation for medical device QMS.

    2k GitHub stars~1.8k tokensUpdated 22 days ago
    Auto-check passed
  • Journal Skills

    aipoch/medical-research-skills

    Recommends target journals for manuscript submission by analyzing the paper topic/abstract and the journal distribution of similar PubMed literature; use when users ask for journal…

    2k GitHub stars~1.7k tokensUpdated 22 days ago
    Auto-check passed
  • Latex Posters

    aipoch/medical-research-skills

    Creates academic-poster writing packages for LaTeX using beamerposter, tikzposter, or baposter.

    2k GitHub stars~1.3k tokensUpdated 22 days ago
    Auto-check passed

Works with

Questions about Lab Inventory Predictor

What does Lab Inventory Predictor do?

Predict depletion time of critical lab reagents based on historical usage frequency, and automatically generate purchase alerts when stock falls below safety thresholds. Lab Inventory Predictor is an agent skill from aipoch/medical-research-skills. Predict depletion time of critical lab reagents based on historical usage frequency, and automatically generate purchase alerts when stock falls below safety thresholds.

How do I install Lab Inventory Predictor in Claude Code?

Run `npx skills add aipoch/medical-research-skills --skill lab-inventory-predictor -a claude-code`. Or copy the skill folder (scientific-skills/Other/lab-inventory-predictor in aipoch/medical-research-skills) into .claude/skills/lab-inventory-predictor in your project. Claude Code loads it when a task matches its description.

How do I install Lab Inventory Predictor in Codex?

Run `npx skills add aipoch/medical-research-skills --skill lab-inventory-predictor -a codex`. Or copy the skill folder (scientific-skills/Other/lab-inventory-predictor in aipoch/medical-research-skills) into .agents/skills/lab-inventory-predictor in your project. Codex loads it when a task matches its description.

Can I use Lab Inventory Predictor in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add aipoch/medical-research-skills --skill lab-inventory-predictor -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/lab-inventory-predictor, .gemini/skills/lab-inventory-predictor, .github/skills/lab-inventory-predictor and .opencode/skills/lab-inventory-predictor in your project.

What does Lab Inventory Predictor need to run?

Going by SKILL.md and its folder, Lab Inventory Predictor needs Python for the scripts in its folder and the command-line tools its instructions call (python, pyenv and conda). Our summary lists: Python 3.

Does Lab Inventory Predictor access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Lab Inventory Predictor safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Lab Inventory Predictor use?

Lab Inventory Predictor is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Lab Inventory Predictor use?

About 2.2k tokens (SKILL.md is roughly 8.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Lab Inventory Predictor?

Skills that share tags, products or a category with Lab Inventory Predictor: MCP Server Builder (anthropics/skills, 180k stars), PDF Processing (anthropics/skills, 180k stars), NotebookLM Research Assistant (PleasePrompto/notebooklm-skill, 7.8k stars) and Manim Video Production (browser-use/video-use, 28k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Lab Inventory Predictor?

aipoch (a GitHub organization) maintains it in aipoch/medical-research-skills, which has 1,978 GitHub stars. The repository holds 578 skills in this directory. The repository was last updated on September 17, 2026.

Source: aipoch/medical-research-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.