summaryrefslogtreecommitdiff
path: root/package.py
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-03-22 23:45:19 +0000
committerPeter Stone <thepeterstone@gmail.com>2026-03-22 23:45:19 +0000
commit8abc63efdbc0bb96cd6c9aa99d6e9166e0bcabae (patch)
treef4d6a082eed9b10bc67436a3ca5188e0182961eb /package.py
parent11b905fd437d651b2e39745aa82a5dd36f70331e (diff)
chore: unify and centralize agent configuration in .agent/
Diffstat (limited to 'package.py')
-rw-r--r--package.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/package.py b/package.py
new file mode 100644
index 0000000..1e64be2
--- /dev/null
+++ b/package.py
@@ -0,0 +1,18 @@
+import zipfile
+import os
+import sys
+
+def package_skill(skill_path, output_filename):
+ with zipfile.ZipFile(output_filename, 'w', zipfile.ZIP_DEFLATED) as zipf:
+ for root, dirs, files in os.walk(skill_path):
+ for file in files:
+ file_path = os.path.join(root, file)
+ arcname = os.path.relpath(file_path, skill_path)
+ zipf.write(file_path, arcname)
+ print(f"Successfully packaged {skill_path} to {output_filename}")
+
+if __name__ == "__main__":
+ if len(sys.argv) < 3:
+ print("Usage: python3 package.py <skill_folder> <output_file>")
+ sys.exit(1)
+ package_skill(sys.argv[1], sys.argv[2])