Add setup.py for automatic .git isolation
Browse files
setup.py
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""Download and set up MLE playbook skills for use with Claude Code Agent SDK."""
|
| 3 |
+
from pathlib import Path
|
| 4 |
+
from huggingface_hub import snapshot_download
|
| 5 |
+
|
| 6 |
+
def setup_playbooks(target_dir: str = "mle-playbooks") -> Path:
|
| 7 |
+
target = Path(target_dir)
|
| 8 |
+
snapshot_download("t2ance/mle-playbooks", local_dir=str(target))
|
| 9 |
+
# Prevent CLI skill discovery from walking up to parent projects
|
| 10 |
+
(target / "playbooks" / ".git").mkdir(exist_ok=True)
|
| 11 |
+
print(f"Playbooks ready at: {target / 'playbooks'}")
|
| 12 |
+
print(f"Use as cwd with setting_sources=['project'] in ClaudeAgentOptions")
|
| 13 |
+
return target / "playbooks"
|
| 14 |
+
|
| 15 |
+
if __name__ == "__main__":
|
| 16 |
+
setup_playbooks()
|