{"skill":{"slug":"harmonia","displayName":"Harmonia","summary":"Check PyTorch, Transformers, and CUDA compatibility. Detect GPU, driver mismatches, and version conflicts in ML environments. Use when the user sets up ML/AI...","description":"---\nname: harmonia\ndescription: Check PyTorch, Transformers, and CUDA compatibility. Detect GPU, driver mismatches, and version conflicts in ML environments. Use when the user sets up ML/AI tools, installs torch or transformers, hits dependency errors, or asks about compatible versions.\nversion: 1.0.0\nauthor: ahmed-eladl\ntags: [\"ml\", \"pytorch\", \"cuda\", \"gpu\", \"transformers\", \"compatibility\", \"python\", \"diagnostics\"]\nmetadata:\n  openclaw:\n    emoji: \"🎵\"\n    homepage: https://github.com/ahmed-eladl/harmonia\n    requires:\n      bins:\n        - pip\n        - python3\n    install:\n      - id: pip\n        kind: uv\n        package: harmonia-ml\n        bins: [harmonia]\n        label: \"Install harmonia (pip install harmonia-ml)\"\n---\n\n# Harmonia — ML Dependency Harmony\n\nHarmonia detects GPU, CUDA, driver, OS, Python, and installed ML packages — then reports exactly what's compatible with what. Zero dependencies, works offline.\n\n## When To Use This Skill\n\n- User asks to **set up a PyTorch or ML environment**\n- User hits a **dependency error** with torch, transformers, torchaudio, torchvision, accelerate, or CUDA\n- User asks **\"what version of X works with Y\"** for ML packages\n- User asks to **check their GPU, CUDA, or driver setup**\n- User says something like \"my torch is broken\", \"CUDA error\", \"version mismatch\", \"which torch for my Python\"\n- User is installing **local models via Ollama** or setting up training\n\n## Instructions\n\n### Step 1: Install harmonia (if not already installed)\n\n```bash\npip install harmonia-ml\n```\n\n### Step 2: Choose the right command based on the user's need\n\n**Full environment scan** — use when diagnosing issues:\n```bash\nharmonia check\n```\nThis scans OS, Python, GPU, CUDA driver chain, torch, transformers, and known conflicts all at once.\n\n**Deep system diagnostics** — use when the user asks specifically about GPU, CUDA, or driver:\n```bash\nharmonia doctor\n```\nShows GPU model, VRAM, driver version, CUDA (nvidia-smi vs nvcc vs torch), glibc, virtualenv status.\n\n**Suggest compatible versions** — use when the user wants to know what works together:\n```bash\n# What works with a specific torch version?\nharmonia suggest torch==2.5.1\n\n# What works with a specific transformers version?\nharmonia suggest transformers==4.44.2\n\n# Best stack for specific Python + CUDA?\nharmonia suggest transformers --python 3.11 --cuda 12.1\n```\n\n**Show compatibility matrix** — use when the user wants to see all options:\n```bash\nharmonia matrix pytorch\nharmonia matrix transformers\n```\n\n**List known conflicts** — use when the user hit a specific error:\n```bash\nharmonia conflicts\n```\nShows known bug patterns with exact error messages and fixes.\n\n**JSON output** — use for programmatic processing:\n```bash\nharmonia check --json\n```\n\n### Step 3: Interpret the output for the user\n\n- Lines starting with `❌` are **errors** that must be fixed\n- Lines starting with `⚠️` are **warnings** worth noting\n- Lines starting with `✅` mean everything is fine\n- The `📦 Recommended compatible set` section gives the exact versions to install\n- The `Install command` at the bottom can be copied and run directly\n\n### Step 4: Help the user fix issues\n\nWhen harmonia reports errors, help the user fix them by running the suggested commands. Common fixes:\n\n- **Wrong companion version**: `pip install torchaudio==2.5.1` (use the version harmonia suggests)\n- **CUDA mismatch**: Install torch with the correct CUDA index URL from the recommendation\n- **torch too old for transformers**: `pip install torch>=2.4.0`\n- **No virtualenv**: `python -m venv .venv && source .venv/bin/activate`\n\n## Rules\n\n- Always run `harmonia check` FIRST when a user reports any ML dependency issue — do not guess\n- Always show the full output to the user — do not summarize away important details\n- If harmonia is not installed, install it with `pip install harmonia-ml` before running commands\n- Do NOT try to manually diagnose version compatibility — let harmonia do it\n- When harmonia suggests a fix, offer to run the fix command for the user\n- If the user asks about versions not in harmonia's database, say so and suggest checking the official docs\n\n## Constraints\n\n- This skill only checks compatibility — it does not install or modify packages unless the user asks\n- harmonia works offline with a local database — it does not make API calls\n- The database covers PyTorch 2.0–2.5 and Transformers 4.24–5.x — very old versions may not be covered\n","tags":{"latest":"1.0.0"},"stats":{"comments":0,"downloads":326,"installsAllTime":0,"installsCurrent":0,"stars":0,"versions":1},"createdAt":1775092142980,"updatedAt":1778492359131},"latestVersion":{"version":"1.0.0","createdAt":1775092142980,"changelog":"Initial release of harmonia.\n\n- Detects GPU, CUDA, driver, OS, Python, and main ML package versions for compatibility checks.\n- Diagnoses version conflicts and mismatches in PyTorch, Transformers, and related environments.\n- Provides specific commands for full environment diagnostics, system details, and compatibility suggestions.\n- Offers a compatibility matrix and lists known bug patterns and fixes.\n- Outputs actionable recommendations, including errors, warnings, and install commands.\n- Works offline with no dependencies beyond Python and pip.","license":"MIT-0"},"metadata":{"setup":[],"os":null,"systems":null},"owner":{"handle":"ahmed-eladl","userId":"s172tgwsfq1kvpmtva6cnxzg1983vfjh","displayName":"Ahmed Eladl","image":"https://avatars.githubusercontent.com/u/96540988?v=4"},"moderation":null}