| #!/usr/bin/env python3 | |
| """Download and set up MLE playbook skills for use with Claude Code Agent SDK.""" | |
| from pathlib import Path | |
| from huggingface_hub import snapshot_download | |
| def setup_playbooks(target_dir: str = "mle-playbooks") -> Path: | |
| target = Path(target_dir) | |
| snapshot_download("t2ance/mle-playbooks", local_dir=str(target)) | |
| # Prevent CLI skill discovery from walking up to parent projects | |
| (target / "playbooks" / ".git").mkdir(exist_ok=True) | |
| print(f"Playbooks ready at: {target / 'playbooks'}") | |
| print(f"Use as cwd with setting_sources=['project'] in ClaudeAgentOptions") | |
| return target / "playbooks" | |
| if __name__ == "__main__": | |
| setup_playbooks() | |