file-cos-manager
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "file-cos-manager" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-e79abd184cacd1efe426f341a6d5f86a2d7868eb05a68c362288352855033ec8. Verify the upstream source and version against https://skillhub.cn/skills/user_c1ee5550/file-cos-manager before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
skillhub.cn
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Full lifecycle management for files/code/artifacts: uploads all files produced during command execution to COS by category for persistence, builds a searchable index list, and supports on-demand download and restoration to address file loss after AI sandbox sessions end.
Introduction source: third_party · user_c1ee5550 · 1.0.0 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Audience
- Not specified in the source documentation.
- Inputs and outputs
- Not specified in the source documentation.
- Software, accounts and paid services
- Not specified in the source documentation.
- Limits and differences
- Translation pending; see source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: file-cos-manager
slug: file-cos-manager
version: "1.0.0"
displayName: File COS Manager
description: 文件/代码/产物全生命周期管理 — 将执行命令过程中产生的所有文件按类别上传到 COS 持久化,建立可检索的索引清单,按需下载恢复。解决 AI 沙箱会话结束后文件丢失的问题。
user-invocable: true
allowed-tools:
- Read
- Write
- Edit
- Bash
- Glob
- Grep
- WebFetch
- WebSearch文件 COS 管理器 (File COS Manager)
核心职责
本 Skill 负责将每个任务/命令执行过程中产生的文件:
- 分类归档 — 按文件类型/用途分门别类
- 上传 COS — 使用
ima_cos_util上传到腾讯云对象存储 - 索引记录 — 维护 manifest 索引清单(.cos_index.md),记录每个文件的 cosKey、类别、时间、会话
- 按需下载 — 当用户需要历史文件时,根据索引找到 cosKey 并下载(通过
ima_cos_util的下载功能) - 跨会话恢复 — 新会话加载本 Skill 后,自动拉取 index 恢复到工作区
分类体系
| 类别 | 路径 | 说明 |
|---|---|---|
code |
脚本、程序源码 | .py, .js, .sh, .ts, .cpp 等 |
data |
数据文件 | .csv, .json, .xml, .db 等 |
config |
配置文件 | .env, .yml, .toml, .ini 等 |
output |
输出成果 | 报告、图片、生成的文档等 |
logs |
日志文件 | .log, stdout/stderr 输出 |
downloads |
下载的第三方资源 | 安装包、模型权重等 |
other |
其他/未分类 | 无法归入以上类别的文件 |
工作流程
1. 文件归档上传(任务结束时自动执行)
# 扫描工作区中新增/修改的文件
# 按类别归类
# 逐个调用 ima_cos_util -f <filepath> 上传
# 记录到 .cos_index.md
2. 索引查看
# 显示所有已上传文件的清单
cat /sandbox/workspace/.cos_index.md 2>/dev/null
3. 按需下载
# 根据 cosKey 或文件名搜索索引
# 使用 fetch/提供下载链接恢复文件
分类规则(自动识别)
按扩展名分类
.py,.js,.ts,.sh,.cpp,.c,.h,.go,.rs,.java,.rb,.php→code/.csv,.json,.xml,.yaml,.yml,.toml,.db,.sqlite,.md→data/.env,.ini,.cfg,.conf,.editorconfig,.gitignore→config/.pdf,.docx,.pptx,.xlsx,.png,.jpg,.jpeg,.gif,.svg,.html,.zip,.tar.gz→output/.log,.txt(日志类) →logs/
按路径分类
- 在
output/目录下的 →output/ - 在
downloads/目录下的 →downloads/ - 在
uploads/目录下的(用户上传原文件)→ 归为用户上传,标记source: user_upload
使用示例
上传单个文件
# 该命令由助手自动执行,用户无需手动调用
ima_cos_util -f /sandbox/workspace/output/report.pdf
# 返回 cosKey → 写入 .cos_index.md
批量归档整个工作区
# 由助手在任务结束时自动执行
bash /sandbox/workspace/skills/file-cos-manager/scripts/archive.sh
恢复上一次会话的文件
# 由助手在加载 Skill 时自动执行
bash /sandbox/workspace/skills/file-cos-manager/scripts/restore.sh
注意事项
- 小文件直接上传 — 单个文件无大小限制,但超大文件(>100MB)建议先压缩再上传
- 索引文件也上传 —
.cos_index.md本身也会被上传到 COS,确保跨会话可恢复 - 不上传用户隐私 —
uploads/中的用户原始文件只在用户明确要求时才上传 - 上传前清理 — 不上传
node_modules/、__pycache__/、.git/等无关目录
Current listing version
1.0.0
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 解决 AI 沙箱会话结束后文件丢失的核心痛点
- 提供全生命周期文件管理(分类、上传、索引、恢复)
- 显著提升用户在沙箱环境中的工作效率
Highlights
- description 明确描述功能与场景
- 触发词完整且边界清晰
Highlights
- 结构清晰,包含分类体系、工作流程、使用示例
- frontmatter 完整,文档组织良好
Areas to improve
-
引用文件缺失 Reported severity: Major
SKILL.md 中引用了 scripts/archive.sh 和 scripts/restore.sh,但未在传入内容中提供
Recommendation: 请补充 scripts 目录下的 archive.sh 和 restore.sh 脚本文件
-
工具可用性未说明 Reported severity: Minor
依赖 ima_cos_util 工具,但未说明该工具是否默认可用或如何获取
Recommendation: 建议在文档中说明 ima_cos_util 工具的可用性或提供安装指引
Highlights
- 提供了详细的分类规则和上传流程
- 考虑了跨会话恢复机制
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
-
Invoke commands or scripts
Read the script and arguments first. Use ordinary privileges and a scoped directory; confirm installation or execution in your host tool.
Mentioned in main document · lines 93, 99
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Not specified in the source documentation.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.