闲社服务运行正常AI智能体自动化平台
f

冰柜样本定位

技能标识:freezer-sample-locator

Track and retrieve sample locations in -80°C freezers with hierarchical

作者:admin | 来源记录:ClawHub
登记来源
ClawHub
版本
V 0.1.0
检测标记
后台标记通过
免费
免费获取
0
收藏
来源与检测标记为平台登记信息,并不代表已展示可复核的检测报告。使用前请核对版本、依赖和所需权限,建议先在隔离环境中运行。
概述
安装方式
版本历史

冰柜样本定位

冷冻样本定位器

目的:使用分层存储组织系统化管理和检索-80°C冷冻柜中的样本位置。

分类:工具/脚本型(本地脚本执行)

🎯 核心功能

主要操作

  • - 记录:使用分层坐标(冷冻柜→层→架→盒→位置)存储样本位置
  • 检索:按名称、项目、冷冻柜、日期或唯一ID搜索样本
  • 管理:更新样本元数据、删除记录、维护库存
  • 导出:生成带筛选选项的CSV/JSON格式报告

数据完整性特性

  • - 冲突检测:防止重复位置分配
  • 验证:强制执行正确的位置编码规则
  • 审计追踪:跟踪创建和修改时间戳
  • 备份:基于JSON的存储,自动创建文件

数据结构

样本位置信息存储在JSON文件中:

json
{
samples: [
{
id: uuid,
name: 样本名称,
project: 项目名称,
freezer: F01,
level: 1,
rack: A,
box: 01,
position: A1,
quantity: 1,
date_stored: 2024-01-15,
notes: 备注,
created_at: 2024-01-15T10:30:00Z,
updated_at: 2024-01-15T10:30:00Z
}
]
}

参数

全局参数
参数类型默认值必填描述
commandstring-是要执行的命令(add, search, list, update, delete, export, stats)
--config
string | - | 否 | 配置文件路径 |

添加命令
参数类型默认值必填描述
--namestring-是样本名称
--project
string | - | 是 | 项目标识符 |

| --freezer | string | - | 是 | 冷冻柜ID(例如F01) | | --level | int | - | 是 | 层架编号 | | --rack | string | - | 是 | 架标识符 | | --box | string | - | 是 | 盒编号 | | --position | string | - | 是 | 盒内位置(例如A1) | | --quantity | int | 1 | 否 | 样本数量 | | --notes | string | - | 否 | 附加备注 |

搜索命令
参数类型默认值必填描述
--namestring-否按样本名称搜索(模糊)
--project
string | - | 否 | 按项目搜索(精确) |

| --freezer | string | - | 否 | 按冷冻柜ID搜索 | | --id | string | - | 否 | 按样本UUID搜索 |

列表命令
参数类型默认值必填描述
--freezerstring-否按冷冻柜ID筛选

更新命令
参数类型默认值必填描述
--idstring-是要更新的样本UUID
--position
string | - | 否 | 新位置 |

| --quantity | int | - | 否 | 新数量 | | --notes | string | - | 否 | 新备注 |

删除命令
参数类型默认值必填描述
--idstring-是要删除的样本UUID

导出命令
参数类型默认值必填描述
--output, -ostring-是输出文件路径
--freezer
string | - | 否 | 按冷冻柜ID筛选 |

统计命令

无需额外参数。

使用指南

🚀 使用指南

命令行界面

样本管理

bash

添加新样本

python scripts/main.py add \ --name Sample-001 \ --project Project-A \ --freezer F01 \ --level 1 \ --rack A \ --box 01 \ --position A1 \ --quantity 2 \ --notes Primary culture

搜索操作

python scripts/main.py search --name Sample-001 # 名称搜索(模糊) python scripts/main.py search --project Project-A # 项目搜索(精确) python scripts/main.py search --freezer F01 # 冷冻柜搜索 python scripts/main.py search --id uuid-string # ID搜索(精确)

列表(可选筛选)

python scripts/main.py list # 所有样本 python scripts/main.py list --freezer F01 # 特定冷冻柜

更新样本信息

python scripts/main.py update --id uuid --position B2 --quantity 1

删除样本记录

python scripts/main.py delete --id uuid

导出功能

python scripts/main.py export --output samples.csv --freezer F01

统计

python scripts/main.py stats

Python API使用

python from scripts.main import FreezerSampleLocator

初始化定位器

locator = FreezerSampleLocator()

添加样本(带验证)

sample = locator.add_sample( name=Sample-001, project=Project-A, freezer=F01, level=1, rack=A, box=01, position=A1, quantity=2, notes=Primary culture )

多条件搜索

results = locator.search_samples( name=Sample-001, project=Project-A )

获取格式化位置

location = locator.getsamplelocation(sample_id) print(location[location_str]) # F01 > L1 > RA > B01 > A1

导出数据

locator.export_csv(inventory.csv, freezer=F01)

🧪 评估与测试

成功标准

  1. 1. 功能准确性:100%正确的位置记录和检索
  2. 性能:1000+样本数据库响应时间<1秒
  3. 数据完整性:并发操作零损坏
  4. 用户体验:清晰的错误信息和直观的命令

测试套件

python

核心功能测试

def testaddsample(): 测试样本添加及验证

def testsearchoperations():
测试按名称、项目、冷冻柜搜索

def testconflictprevention():
测试重复位置检测

def testexportfunctionality():
测试CSV/JSON导出格式

def testdataintegrity():
测试并发访问安全性

验证清单

  • - [ ] 位置编码验证
  • [ ] 重复检测准确性
  • [ ] 搜索结果正确性
  • [ ] 导出格式合规性
  • [ ] 错误处理稳健性
  • [ ] 文件权限安全性

📊 监控与维护

使用指标

  • - 操作量:跟踪添加/搜索/更新/删除频率
  • 数据库大小:监控样本数量增长
  • 性能指标:响应时间趋势
  • 错误率:失败操作频率

维护任务

  • - 数据备份:定期JSON文件备份
  • 性能优化:大数据集索引重建
  • 验证更新:位置编码规则变更
  • 安全审查:访问模式分析

健康检查

bash

验证数据库完整性

python scripts/main.py stats

测试搜索性能

python scripts/main.py search --name test

导出验证

python scripts/main.py export --output test.csv

📋 位置编码标准

分层坐标系统
组件格式范围描述
冷冻柜IDF01, F02, F03...F01-F99物理冷冻柜单元
层
1-10 | 1-10 |

标签

skill ai

通过对话安装

以下为平台配置的接入选项,并非逐项实测通过。能否安装取决于客户端支持、技能来源和运行环境:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 freezer-sample-locator-1776082142 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 freezer-sample-locator-1776082142 技能

通过命令行安装

skillhub install freezer-sample-locator-1776082142

下载

⬇ 下载 freezer-sample-locator v0.1.0(免费)

文件大小: 9.46 KB | 发布时间: 2026-4-14 11:52

v0.1.0 最新 2026-4-14 11:52
Initial release of the Freezer Sample Locator tool/script.

- Enables recording, searching, updating, and exporting sample locations in -80°C freezers with hierarchical coordinates.
- Prevents position conflicts and ensures data integrity using JSON-based storage and validation.
- Supports fast search and inventory exports in CSV and JSON formats.
- Provides CLI and Python API interface for sample management operations.
- Includes audit trail with creation/modification timestamps and built-in backup features.
- Tracks usage, performance, and error metrics for ongoing maintenance.
返回顶部