所有技能子 agent 必须严格遵守本文件。改造后的技能目录结构固定为:
skills/<skill-name>/
├── SKILL.md # 必需,Agent Skills 标准格式
├── scripts/ # 可执行脚本,路径参数化 + logging 化
│ └── <entry>.py
├── references/ # 参考文档(可选但推荐)
│ └── *.md
├── requirements.txt # 依赖(可选)
└── README.md # 简短人读说明(可选)
YAML frontmatter 必须包含:
---
name: <skill-name> # 小写连字符,与目录名一致
description: <第三人称描述,必须包含 "This skill should be used when..." 句式,说明何时触发>
license: MIT
compatibility: <运行环境要求,如 Python 3.9+ 及关键依赖>
metadata:
version: "1.0"
last-reviewed: "2026-10-25"
skill-author: sinder
---
description 要求:
正文必须包含以下章节(用 ## 二级标题):
## Overview —— 这个技能解决什么问题,2–4 句## When to Use This Skill —— 具体使用场景列表(用 -)## Quick Start —— 可直接复制运行的命令示例## Workflow —— 分步骤说明(编号列表或 mermaid 流程图)## Parameters —— 关键参数说明表## Outputs —— 产出文件说明表## Validation —— 如何验证结果正确性(质控要点)## References —— 指向 references/ 下的文档sys.path.insert(0, str(Path(__file__).resolve().parents[3] / "packages"))
from biopipe_core import get_logger, get_config, SkillError
(parents[3] 是因为脚本在 skills/<name>/scripts/x.py,往上 3 层到仓库根)
禁止硬编码绝对路径:所有输入输出路径来自命令行参数,默认值基于 get_config()
禁止裸 print:用 logger = get_logger("biopipe.<skill-name>"),输出用 logger.info(...)
统一 CLI:用 biopipe_core.cli.bootstrap_cli(description, skill_name, main) 作为入口,
main(args) 返回退出码。必须有 --input、--output 等业务参数。
文件头:每个脚本加 shebang + 编码声明 + 模块 docstring(含用法示例)
必须有 if __name__ == "__main__": 入口
脚本必须能在没有输入文件时 --help 正常退出(不依赖真实数据)
原仓库 Bioinformatics_pipeline/<对应目录>/scripts/*.py 是改造来源。
保留原脚本的科学计算逻辑,但要:
原目录位置:C:/Users/DELL/WorkBuddy/2026-10-25-20-38-30/Bioinformatics_pipeline/
Bioinformatics_pipeline/(只读参考)README.md 以外的临时文件完成前必须自检并在返回中说明:
cd <repo>
python -c "import yaml,sys; d=yaml.safe_load(open('skills/<name>/SKILL.md').read().split('---')[1]); print(d['name'], '|', d['description'][:80])"
python skills/<name>/scripts/<entry>.py --help