用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/cas-bigdatalab/piflow --skill random-selector命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | random_selector |
| description | 从CSV数据集中随机抽取样本。支持按比例(0-1)或固定数量抽取,当两者同时提供时取较小值。 |
| allowed-tools | ["process"] |
| name_zh | 从CSV数据集中随机抽取样本算子 |
| input_params | [{"name":"input_file","type":"string","required":true,"description":"输入CSV文件路径"},{"name":"output_file","type":"string","required":true,"description":"输出CSV文件路径"},{"name":"select_ratio","type":"float","required":false,"description":"抽取比例(0-1),与select_num同时提供时取较小值"},{"name":"select_num","type":"int","required":false,"description":"抽取数量,与select_ratio同时提供时取较小值"},{"name":"seed","type":"int","required":false,"description":"随机种子"}] |
| output_params | [{"name":"output_file","type":"csv_file","description":"随机采样后的CSV文件"}] |
| tag | 数据筛选 |
| publisher | COMMUNITY |
该技能通过 random_selector.py 执行 CSV 数据随机采样。
确保 input_file 存在。
根据需求组合参数,仅提供用户明确指定的参数。若参数为可选(None),则不要在 shell 命令中包含该 flag。
使用以下模板执行:
python scripts/random_selector.py \
--input_file "{input_file}" \
--output_file "{output_file}" \
{ "--select_ratio " + str(select_ratio) if select_ratio else "" } \
{ "--select_num " + str(select_num) if select_num else "" } \
{ "--seed " + str(seed) if seed else "" }