About agent-package-sync
agent-package-sync is a skill for organizing agent and expert result packages in a repository. It checks instruction files and skill folders, creates or refreshes ZIP archives as needed, and produces an upload checklist without committing changes.
Key features
- 01Checks repository changes
- 02Normalizes instruction file naming
- 03Scans first-level skill folders
- 04Creates or refreshes skill ZIPs
- 05Lists files for upload
- 06Avoids Git commits and pushes
Use cases
- 01Preparing a result package for upload
- 02Refreshing ZIPs for changed skills
- 03Checking instruction-file naming conflicts
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ shyxin/ skills --skill agent-package-syncAfter installing, type/agent-package-syncin Claude Code to confirm it loaded.
Bundled filesscripts/package_sync.py
Details
From the project READMEAgent Package Sync
目标
用于公司工作中整理任意 agent/专家结果包。典型结果包结构:
<repo>/
result/
AGENTS.md
soul.md
README.md
skills/
<skill-name>/
<skill-name>.zip
默认路径:
repo_root: 当前仓库根目录,或用户指定目录package_root:<repo_root>/result
如果用户给出明确路径,以用户路径为准。
工作流
- 检查 git 状态和变更摘要,只用于了解改动范围。
- 检查主指令命名:
- 如果存在
Instructions.md且不存在AGENTS.md,改名为AGENTS.md。 - 如果两者都存在,不覆盖,提示用户确认。
- 如果只有
AGENTS.md,保持不动。 - Windows 下如果出现
agents.md / AGENTS.md大小写冲突,提示规范为AGENTS.md。
- 如果存在
- 扫描
<package_root>/skills下所有一级目录作为候选 skill。 - 对每个候选 skill:
- 如果缺少同名
.zip,生成。 - 如果该 skill 目录出现在 git 变更中,重打。
- 如果用户要求全部重打,全部重打。
- 如果显式开启
--mtime,再按时间戳补充判断。
- 如果缺少同名
- 打包规则:
- zip 内保留顶层 skill 目录名。
- 排除
__pycache__和.pyc。 - 不默认排除业务文件;如果用户明确要求保留
auth.json,必须打入 zip。
- 输出上传清单:
AGENTS.mdsoul.md- 实际生成或存在的 skill zip
- 其他用户指定的文档
禁止事项
- 不执行
git add。 - 不执行
git commit。 - 不执行
git push。 - 不回滚用户修改。
- 不删除业务目录,除非用户明确要求并且路径已核验。
推荐脚本
优先使用:
python <skill>/scripts/package_sync.py --repo <repo_root>
常用参数:
python <skill>/scripts/package_sync.py --repo C:\code_proj\maintenance-execution-expert
python <skill>/scripts/package_sync.py --package C:\code_proj\maintenance-execution-expert\result
python <skill>/scripts/package_sync.py --repo C:\code_proj\maintenance-execution-expert --all
python <skill>/scripts/package_sync.py --repo C:\code_proj\maintenance-execution-expert --mtime
脚本只整理文件和 zip,不做提交。
Comments
Markdown supported