zip-export-deliverable
它能做什么
这项技能帮助智能体把完成的项目目录转换为 ZIP 压缩包。适合需要以单个文件交付代码库或项目的人。
适用场景
- ✓当交付物是必须导出为 ZIP 文件的项目目录时。
- ✓当项目文件和文件夹已经存在,只剩打包的时候。
- ✓当你希望确认 ZIP 文件确实已被创建的时候。
技能链接
https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/zip-export-deliverable/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我的项目文件夹已经完成。请检查所有文件是否都在,然后把整个文件夹压缩为 ZIP 以便交付。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体列出项目文件以确认它们存在,然后在单独的步骤中使用带递归参数的 zip 命令。之后它检查 ZIP 文件,确认已经创建。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
ZIP Export Deliverable Finalization
Purpose
When a task requires delivering a codebase or project directory as a ZIP archive, this skill ensures the deliverable is actually created through an explicit finalization step, rather than assuming directory creation equals completion.
When to Apply
Use this skill when:
- The task deliverable is a codebase, project, or directory structure
- The deliverable must be exported or packaged as a ZIP file
- You have already created the project files and directory structure
Common Pitfall
Do NOT assume that creating the project directory and files means the deliverable is complete. The ZIP archive itself must be explicitly created as a final step.
Step-by-Step Instructions
Step 1: Verify Project Structure
Before creating the ZIP, confirm all required files and directories exist:
ls -la ./project/
# or
find ./project -type f | head -20
Step 2: Create Dedicated Final Iteration
Add a final step/iteration specifically for ZIP creation. This should be a distinct action, not combined with other tasks.
Step 3: Execute ZIP Command
Run the zip command with recursive flag:
zip -r project.zip ./project
Or with a custom name:
zip -r <deliverable-name>.zip ./<project-directory>
Step 4: Verify ZIP Creation
Confirm the ZIP file was created successfully:
ls -lh project.zip
# Should show file size > 0
unzip -l project.zip | head -20
# Should list contents
Step 5: Report Completion
Explicitly confirm the ZIP deliverable has been created in your final response to the user.
Code Example
import subprocess
import os
def finalize_deliverable(project_dir="project", zip_name="project.zip"):
"""Create ZIP archive of project deliverable."""
# Step 1: Verify project exists
if not os.path.exists(project_dir):
raise FileNotFoundError(f"Project directory {project_dir} not found")
# Step 2: Create ZIP
result = subprocess.run(
["zip", "-r", zip_name, f"./{project_dir}"],
capture_output=True,
text=True
)
if result.returncode != 0:
raise RuntimeError(f"ZIP creation failed: {result.stderr}")
# Step 3: Verify
zip_size = os.path.getsize(zip_name)
print(f"Created {zip_name} ({zip_size} bytes)")
return zip_name
Checklist
- All project files are created in the expected directory
- A dedicated step is allocated for ZIP creation
-
zip -r <name>.zip ./<directory>command is executed - ZIP file existence and size are verified
- Deliverable completion is explicitly confirmed to the user
Related Patterns
- File creation should always include verification steps
- Deliverables should be explicitly validated before marking tasks complete
- Archive/export operations need their own iteration, not implicit completion
常见问题
用什么命令生成 ZIP?
技能使用带 -r 参数的 zip 命令,以包含所有子文件夹。
如何检查 ZIP?
技能列出该文件,以确认 ZIP 存在并显示其大小。
我可以自己选择 ZIP 的名称吗?
可以,技能展示了为压缩包指定自定义名称的方法。
详情
作者的原始描述
Ensures codebase deliverables are properly exported as ZIP archives through a dedicated finalization step
repo: HKUDS/AgentPilot
热度
- GitHub 星标
- 7.8k
- 排名
- #13035
- 许可证
- MIT
- 更新时间
- 2026/11/1
评论
- …
同一仓库的更多技能
agentpilot
7.8k帮你的智能体准备任务并运行 AgentPilot 循环,逐步改进项目:循环会提出修改、测试修改并为其打分。
openspace
7.8k帮你的智能体设置 OpenSpace,这是一个用于存储和获取智能体技能的工具,并通过 MCP 将其连接到你的 AI 应用。
rsi-arena
7.8k帮你的智能体设置并运行标准 AI 基准测试,例如 AIME 和 Terminal-Bench,用来比较不同的改进方法。
experiment-guide
7.8k帮你的智能体规划小型实验、阅读实验结果并记录发现,同时研究如何改进一个程序。