Chemical Storage Sorter is a development Claude Skill built by AIPOCH. Best for: Lab managers and EHS professionals organize chemical inventories into safe storage groups during setup, audits, or relocations..
Classify laboratory chemicals by hazard group and identify incompatible storage pairs to prevent dangerous reactions compliant with OSHA and NFPA standards.
Organize laboratory chemicals into safe storage groups based on chemical compatibility and hazard classification. Prevents dangerous reactions by identifying incompatible pairs and providing segregation guidelines compliant with OSHA, NFPA, and institutional safety standards.
Key Capabilities:
✅ Use this skill when:
❌ Do NOT use when:
waste-disposal-guide for disposal proceduressafety-data-sheet-reader for detailed chemical informationlab-inventory-tracker for quantity and location trackingRelated Skills:
safety-data-sheet-reader, chemical-structure-converterlab-inventory-tracker, waste-disposal-guideUpstream Skills:
safety-data-sheet-reader: Retrieve chemical properties and hazard classifications from SDSchemical-structure-converter: Identify chemical class from structure or name for accurate categorizationDownstream Skills:
lab-inventory-tracker: Record storage locations after chemicals are sorted and assignedwaste-disposal-guide: Identify disposal requirements for incompatible chemicals that need to be removedequipment-maintenance-log: Track safety cabinet inspections and maintenanceComplete Workflow:
Chemical Inventory → safety-data-sheet-reader → chemical-storage-sorter → lab-inventory-tracker → Safe Storage
Automatically classify chemicals into standard hazard categories based on chemical name, formula, or keywords.
from scripts.main import ChemicalStorageSorter
sorter = ChemicalStorageSorter()
# Classify individual chemicals
chemicals = [
"Hydrochloric acid",
"Sodium hydroxide",
"Hydrogen peroxide 30%",
"Ethanol",
"Sodium chloride"
]
for chem in chemicals:
group = sorter.classify_chemical(chem)
print(f"{chem}: {group}")
# Output:
# Hydrochloric acid: acids
# Sodium hydroxide: bases
# Hydrogen peroxide 30%: oxidizers
# Ethanol: flammables
# Sodium chloride: general
Hazard Groups:
| Group | Examples | Key Hazards | Storage Requirements | |-------|----------|-------------|---------------------| | Acids | HCl, H₂SO₄, HNO₃, acetic acid | Corrosive, reactive | Acid cabinet, secondary containment | | Bases | NaOH, KOH, ammonia, amines | Corrosive, caustic | Base cabinet, separate from acids | | Oxidizers | H₂O₂, KMnO₄, nitrates, hypochlorites | Fire/explosion risk | Cool, dry, away from organics | | Flammables | Ethanol, methanol, acetone, hexane | Fire hazard | Flammable storage cabinet | | Toxics | Cyanides, mercury, arsenic compounds | Poison, bioaccumulation | Locked cabinet, limited access | | General | NaCl, PBS, sucrose, glycerol | Low hazard | General storage |
Classification Keywords:
| Group | Keywords Triggers | |-------|------------------| | Acids | acid, hcl, sulfuric, nitric, acetic, citric, formic | | Bases | hydroxide, naoh, koh, ammonia, amine, carbonate | | Flammables | ethanol, methanol, acetone, ether, hexane, toluene, benzene | | Oxidizers | peroxide, permanganate, hypochlorite, nitrate, chlorate, perchlorate | | Toxics | cyanide, mercury, arsenic, lead, cadmium, thallium |
Best Practices:
Common Issues and Solutions:
Issue: Chemical not recognized
Issue: Misclassification of similar names
Determine if two chemicals can be safely stored together without risk of dangerous reactions.
from scripts.main import ChemicalStorageSorter
sorter = ChemicalStorageSorter()
# Check specific chemical pairs
pairs_to_check = [
("Hydrochloric acid", "Sodium hydroxide"),
("Ethanol", "Hydrogen peroxide"),
("Sodium chloride", "Potassium chloride"),
("Nitric acid", "Acetone")
]
for chem1, chem2 in pairs_to_check:
compatible, message = sorter.check_compatibility(chem1, chem2)
status = "✅ Compatible" if compatible else "❌ INCOMPATIBLE"
print(f"{chem1} + {chem2}: {status}")
if not compatible:
print(f" Warning: {message}")
# Output:
# Hydrochloric acid + Sodium hydroxide: ❌ INCOMPATIBLE
# Warning: INCOMPATIBLE: acids cannot be stored with bases
# Ethanol + Hydrogen peroxide: ❌ INCOMPATIBLE
# Warning: INCOMPATIBLE: flammables cannot be stored with oxidizers
# Sodium chloride + Potassium chloride: ✅ Compatible
# Nitric acid + Acetone: ❌ INCOMPATIBLE
Incompatibility Matrix:
| Chemical Group | Incompatible With | Reaction Risk | |----------------|------------------|---------------| | Acids | Bases, oxidizers, cyanides, sulfides | Violent neutralization, toxic gas generation | | Bases | Acids, oxidizers, halogenated compounds | Heat generation, decomposition | | Oxidizers | Flammables, acids, bases, reducing agents | Fire, explosion, violent reactions | | Flammables | Oxidizers, acids | Fire, combustion enhancement | | Toxics | Acids, oxidizers | Toxic gas release, increased hazard |
Best Practices:
Common Issues and Solutions:
Issue: False positive compatibility
Issue: Ambiguous compatibility
Sort an entire chemical inventory into safe storage groups based on hazard classifications.
from scripts.main import ChemicalStorageSorter
sorter = ChemicalStorageSorter()
# Example lab inventory
inventory = [
"Hydrochloric acid (conc.)",
"Sodium hydroxide pellets",
"Ethanol 95%",
"Acetone",
"Hydrogen peroxide 30%",
"Potassium permanganate",
"Sodium chloride",
"PBS buffer",
"Glycerol",
"Sulfuric acid",
"Ammonium hydroxide",
"Methanol",
"Hexane",
"Mercury(II) chloride"
]
# Sort into storage groups
groups = sorter.sort_chemicals(inventory)
# Display results
for group, chemicals in groups.items():
if chemicals:
print(f"\n{group.upper()} STORAGE:")
for chem in chemicals:
print(f" • {chem}")
Storage Group Output:
ACIDS STORAGE:
• Hydrochloric acid (conc.)
• Sulfuric acid
BASES STORAGE:
• Sodium hydroxide pellets
• Ammonium hydroxide
OXIDIZERS STORAGE:
• Hydrogen peroxide 30%
• Potassium permanganate
FLAMMABLES STORAGE:
• Ethanol 95%
• Acetone
• Methanol
• Hexane
TOXICS STORAGE:
• Mercury(II) chloride
GENERAL STORAGE:
• Sodium chloride
• PBS buffer
• Glycerol
Best Practices:
Common Issues and Solutions:
Issue: Chemical fits multiple categories
Issue: Large inventory processing
Generate a complete storage plan with specific warnings and segregation requirements.
from scripts.main import ChemicalStorageSorter
sorter = ChemicalStorageSorter()
# Generate full storage plan
demo_inventory = [
"HCl (concentrated)",
"NaOH pellets",
"Ethanol",
"Hydrogen peroxide",
"Sodium cyanide",
"PBS",
"Acetone"
]
groups = sorter.sort_chemicals(demo_inventory)
sorter.print_storage_plan(groups)
Sample Output:
============================================================
CHEMICAL STORAGE PLAN
============================================================
ACIDS STORAGE:
----------------------------------------
• HCl (concentrated)
⚠️ Keep away from: bases, oxidizers, cyanides, sulfides
BASES STORAGE:
----------------------------------------
• NaOH pellets
⚠️ Keep away from: acids, oxidizers, halogenated
OXIDIZERS STORAGE:
----------------------------------------
• Hydrogen peroxide
⚠️ Keep away from: flammables, acids, bases, reducing
FLAMMABLES STORAGE:
----------------------------------------
• Ethanol
• Acetone
⚠️ Keep away from: oxidizers, acids
TOXICS STORAGE:
----------------------------------------
• Sodium cyanide
⚠️ Keep away from: acids, oxidizers
GENERAL STORAGE:
----------------------------------------
• PBS
============================================================
Storage Requirements by Group:
| Group | Cabinet Type | Ventilation | Special Requirements | |-------|-------------|-------------|---------------------| | Acids | Acid cabinet | Fume hood access | Secondary containment, corrosion-resistant | | Bases | Base cabinet | Standard | Keep separate from acids (minimum 3 feet) | | Oxidizers | Standard/oxidizer | Cool, dry location | Away from ignition sources | | Flammables | Flammable cabinet | Explosion-proof | Bonding/grounding for dispensing | | Toxics | Locked cabinet | Standard | Access log, limited quantities | | General | Standard shelving | Standard | Standard lab storage |
Best Practices:
Common Issues and Solutions:
Issue: Insufficient storage space
Issue: Chemicals with multiple incompatibilities
Process large chemical inventories from files for comprehensive storage organization.
from scripts.main import ChemicalStorageSorter
import json
def process_inventory_file(file_path: str) -> dict:
"""
Process chemical inventory from text file.
Expected format: One chemical per line
"""
sorter = ChemicalStorageSorter()
# Read inventory
with open(file_path, 'r') as f:
chemicals = [line.strip() for line in f if line.strip()]
# Sort into groups
groups = sorter.sort_chemicals(chemicals)
# Calculate statistics
stats = {
'total_chemicals': len(chemicals),
'groups': {group: len(items) for group, items in groups.items() if items},
'hazardous_chemicals': sum(len(items) for group, items in groups.items()
if group != 'general' and items)
}
# Check for incompatibilities within current storage
incompatibilities = []
all_groups = list(groups.keys())
for i, group1 in enumerate(all_groups):
for group2 in all_groups[i+1:]:
if group2 in sorter.COMPATIBILITY_GROUPS[group1]['incompatible']:
if groups[group1] and groups[group2]:
incompatibilities.append({
'group1': group1,
'chemicals1': groups[group1],
'group2': group2,
'chemicals2': groups[group2]
})
return {
'groups': groups,
'statistics': stats,
'incompatibilities': incompatibilities
}
# Example usage
# results = process_inventory_file('lab_inventory.txt')
# print(json.dumps(results, indent=2))
Input File Format:
# lab_inventory.txt
Hydrochloric acid (37%)
Sodium hydroxide
Ethanol (95%)
Acetone
Hydrogen peroxide (30%)
Potassium permanganate
Sodium chloride
Phosphate buffered saline
Glycerol
Sulfuric acid (conc.)
Best Practices:
Common Issues and Solutions:
Issue: Typos and inconsistent naming
Issue: Concentration variations
Extend the classification system with lab-specific chemicals and custom rules.
from scripts.main import ChemicalStorageSorter
class CustomChemicalSorter(ChemicalStorageSorter):
"""Extended sorter with lab-specific chemicals."""
def __init__(self):
super().__init__()
# Add custom chemicals to groups
self.COMPATIBILITY_GROUPS['acids']['examples'].extend([
'trifluoroacetic acid',
'trichloroacetic acid'
])
self.COMPATIBILITY_GROUPS['flammables']['examples'].extend([
'isopropanol',
'isopropyl alcohol',
'2-propanol'
])
# Add custom keyword mappings
self.custom_keywords = {
'acids': ['tfa', 'tca'],
'flammables': ['ipa', 'propanol']
}
def classify_chemical(self, name):
"""Override with custom keyword checking."""
name_lower = name.lower()
# Check custom keywords first
for group, keywords in self.custom_keywords.items():
if any(kw in name_lower for kw in keywords):
return group
# Fall back to parent classification
return super().classify_chemical(name)
# Use custom sorter
custom_sorter = CustomChemicalSorter()
print(custom_sorter.classify_chemical("TFA")) # Will classify as acid
print(custom_sorter.classify_chemical("IPA")) # Will classify as flammable
Best Practices:
Common Issues and Solutions:
Issue: Custom rules conflict with defaults
Issue: Too many custom chemicals
From chemical inventory to organized storage:
# Step 1: List current chemicals
python scripts/main.py --chemicals "HCl,NaOH,ethanol,acetone,H2O2,PBS"
# Step 2: Check compatibility of specific pair
python scripts/main.py --chemicals "HCl" --check "NaOH"
# Step 3: View storage groups
python scripts/main.py --list-groups
# Step 4: Process full inventory file
python scripts/main.py --chemicals "$(cat inventory.txt | tr '\n' ',')"
Python API Usage:
from scripts.main import ChemicalStorageSorter
def organize_lab_storage(chemical_inventory: list) -> dict:
"""
Complete workflow for organizing laboratory chemical storage.
Returns:
Dictionary with storage groups, warnings, and recommendations
"""
sorter = ChemicalStorageSorter()
# Sort chemicals into groups
groups = sorter.sort_chemicals(chemical_inventory)
# Generate storage plan
print("\n" + "="*60)
print("LABORATORY CHEMICAL STORAGE ORGANIZATION")
print("="*60)
sorter.print_storage_plan(groups)
# Identify potential issues
issues = []
# Check for high-hazard concentrations
hazardous_chemicals = []
for group in ['acids', 'bases', 'oxidizers']:
for chem in groups[group]:
if 'conc' in chem.lower() or 'concentrated' in chem.lower():
hazardous_chemicals.append((chem, group))
if hazardous_chemicals:
issues.append({
'type': 'concentrated_hazard',
'chemicals': hazardous_chemicals,
'recommendation': 'Ensure secondary containment and fume hood access'
})
# Check storage space distribution
total_chemicals = len(chemical_inventory)
general_percentage = len(groups['general']) / total_chemicals * 100
if general_percentage < 50:
issues.append({
'type': 'high_hazard_ratio',
'message': f'Only {general_percentage:.1f}% chemicals are general storage',
'recommendation': 'Review if all hazardous classifications are necessary'
})
# Compile results
results = {
'storage_groups': groups,
'statistics': {
'total_chemicals': total_chemicals,
'hazardous_chemicals': total_chemicals - len(groups['general']),
'general_percentage': general_percentage
},
'issues': issues,
'recommendations': [
'Label all storage cabinets with group names',
'Post incompatibility matrix near storage area',
'Schedule quarterly storage inspections',
'Train all lab members on chemical segregation'
]
}
return results
# Execute workflow
inventory = [
"Hydrochloric acid (conc.)",
"Sulfuric acid",
"Sodium hydroxide",
"Potassium hydroxide",
"Ethanol 95%",
"Methanol",
"Acetone",
"Hydrogen peroxide 30%",
"Nitric acid",
"Sodium chloride",
"PBS",
"Tris buffer",
"EDTA",
"Glycerol"
]
results = organize_lab_storage(inventory)
print("\n" + "="*60)
print("SUMMARY")
print("="*60)
print(f"Total chemicals: {results['statistics']['total_chemicals']}")
print(f"Hazardous: {results['statistics']['hazardous_chemicals']}")
print(f"General storage: {results['statistics']['general_percentage']:.1f}%")
if results['issues']:
print("\n⚠️ Issues identified:")
for issue in results['issues']:
print(f" - {issue['type']}: {issue.get('recommendation', '')}")
print("\n📋 Recommendations:")
for rec in results['recommendations']:
print(f" • {rec}")
Expected Output Files:
storage_organization/
├── storage_plan.txt # Human-readable storage layout
├── chemical_groups.json # Machine-readable group assignments
├── incompatibilities.csv # List of incompatible pairs
└── recommendations.md # Safety recommendations
Scenario: Setting up chemical storage for a new laboratory from scratch.
{
"setup_type": "new_lab",
"space": "2 fume hoods, 3 acid cabinets, 2 flammable cabinets",
"inventory_size": "~200 chemicals expected",
"special_requirements": [
"Cell culture focus - many biological buffers",
"Molecular biology - EtBr, acrylamide",
"Some organic synthesis - various solvents"
],
"compliance": "OSHA, university EHS"
}
Workflow:
Output Example:
New Lab Storage Plan:
CABINET ASSIGNMENTS:
Acid Cabinet #1: 12 acids
Acid Cabinet #2: 8 oxidizers (also acids)
Base Cabinet: 6 bases
Flammable Cabinet #1: 15 solvents (ethanol, methanol, etc.)
Flammable Cabinet #2: 8 other flammables
Toxic Cabinet: 3 chemicals (EtBr, acrylamide, mercury salts)
General Storage: 148 buffers, salts, reagents
SPACE UTILIZATION:
Acid cabinets: 20/30 capacity (67%)
Flammable: 23/40 capacity (58%)
General: 148/200 capacity (74%)
RECOMMENDATION: Current space adequate for planned inventory
Scenario: Preparing for annual EHS safety inspection.
{
"inspection_type": "annual_ehs",
"focus_areas": [
"Chemical segregation compliance",
"Incompatible storage checks",
"Labeling and signage",
"Secondary containment"
],
"documentation_required": [
"Chemical inventory",
"Storage plan",
"Incompatibility records"
]
}
Workflow:
Output Example:
Pre-Inspection Report:
✅ COMPLIANT STORAGE: 187/195 chemicals (95.9%)
⚠️ ISSUES IDENTIFIED:
1. Acetic acid (glacial) stored with general chemicals
→ Move to acid cabinet
2. Hydrogen peroxide near ethanol shelf
→ Move to oxidizer section
3. Missing secondary containment for HCl
→ Add acid tray
📋 DOCUMENTATION READY:
✓ Chemical inventory (195 items)
✓ Storage plan (updated 2026-02-09)
✓ Incompatibility matrix (posted)
✓ Emergency contacts (current)
INSPECTION READINESS: 95% (2 chemicals need moving)
Scenario: Moving chemicals to a new location or different lab.
{
"relocation_type": "lab_move",
"from": "Building A, Room 301",
"to": "Building B, Room 205",
"chemicals_to_move": 150,
"special_considerations": [
"Some chemicals expire soon",
"Unknown origin of 5 chemicals",
"Need to dispose of 20 chemicals"
]
}
Workflow:
Output Example:
Relocation Plan:
CHEMICALS TO MOVE: 130 items
- Acids: 8 (pack together, upright)
- Bases: 5 (pack together, separate from acids)
- Flammables: 22 (DOT-approved containers)
- Oxidizers: 6 (separate transport)
- Toxics: 2 (locked container, manifest required)
- General: 87 (standard boxes)
CHEMICALS TO DISPOSE: 20 items
- Expired: 12
- Unknown: 5
- Unneeded: 3
→ Schedule waste pickup before move
PACKING SEQUENCE:
Day 1: Dispose of waste chemicals
Day 2: Pack general chemicals
Day 3: Pack flammables and toxics
Day 4: Transport and unpack
Day 5: Final inventory at new location
Scenario: Training new graduate students or technicians on chemical safety.
{
"training_type": "new_member_safety",
"trainees": 3,
"duration": "2 hours",
"topics": [
"Chemical hazard recognition",
"Storage segregation rules",
"Emergency procedures",
"Finding chemicals in lab"
]
}
Workflow:
Output Example:
Training Session: Chemical Storage Safety
DEMONSTRATION EXAMPLES:
1. Show classification: "ethanol" → flammable
2. Show incompatibility: HCl + NaOH → violent reaction
3. Show safe storage: PBS + NaCl → general storage together
INTERACTIVE QUIZ:
Q: Can you store acetone near hydrogen peroxide?
A: No - flammable + oxidizer = fire risk ✅
Q: Where should concentrated HCl go?
A: Acid cabinet with secondary containment ✅
HANDOUTS PROVIDED:
✓ Storage plan (current)
✓ Incompatibility matrix
✓ Emergency contact card
✓ SDS access instructions
TRAINING COMPLETE: 3/3 trainees passed quiz (100%)
Pre-Organization:
During Classification:
Storage Assignment:
Post-Organization Verification:
Documentation:
Classification Errors:
❌ Assuming dilute = safe → Even dilute acids/bases need proper storage
❌ Ignoring chemical name keywords → Missing hazards in complex names
❌ Not considering mixtures → Commercial reagents may have multiple components
❌ Classifying by use rather than hazard → Storing buffer salts with acids
Storage Arrangement Errors:
❌ Inadequate separation → 6-inch gap instead of 3-foot minimum
❌ Storing by alphabetical order → Acetic acid next to acetone
❌ Ignoring spill containment → No secondary containment for liquids
❌ Overcrowding cabinets → Blocking access to emergency equipment
Documentation Errors:
❌ Outdated storage plans → Chemicals moved but map not updated
❌ Missing hazard warnings → No incompatibility matrix posted
❌ No training records → Cannot prove safety training occurred
❌ Incomplete inventories → Missing chemicals from tracking system
Operational Errors:
❌ Using food containers → Chemicals stored in drink bottles
❌ No expiration monitoring → Old peroxides or other degradables
❌ Improper labeling → Abbreviations or formulas only
❌ Blocking access → Storage in front of eyewash or shower
Problem: Chemical cannot be classified
Problem: Too many "incompatible" pairs identified
Problem: Storage space insufficient
Problem: Lab members resist new storage system
Problem: Chemical reactions in storage
Problem: Cannot find chemical when needed
Available in references/ directory:
External Resources:
Located in scripts/ directory:
main.py - Chemical classification and storage sorting engineGeneral Rules:
Emergency Contacts:
| Parameter | Type | Default | Required | Description |
|-----------|------|---------|----------|-------------|
| --chemicals, -c | string | - | No | Comma-separated chemical list |
| --check | string | - | No | Check compatibility with another chemical |
| --list-groups, -l | flag | - | No | List storage groups |
# Sort list of chemicals
python scripts/main.py --chemicals "HCl,NaOH,ethanol,H2O2"
# Check compatibility between two chemicals
python scripts/main.py --chemicals "HCl" --check "NaOH"
# List all storage groups
python scripts/main.py --list-groups
| Risk Indicator | Assessment | Level | |----------------|------------|-------| | Code Execution | Python script executed locally | Low | | Network Access | No external API calls | Low | | File System Access | No file access | Low | | Data Exposure | No sensitive data | Low | | Safety Risk | Provides chemical safety guidance | Medium |
# Python 3.7+
# No additional packages required (uses standard library)
Last Updated: 2026-02-09
Skill ID: 184
Version: 2.0 (K-Dense Standard)
/plugin install chemical-storage-sorter@aipochRequires Claude Code CLI.
Lab managers and EHS professionals organize chemical inventories into safe storage groups during setup, audits, or relocations.
No reviews yet. Be the first to review this skill.
AIPOCH
@aipoch