$npx -y skills add machina-sports/sports-skills --skill machinaGateway to the Machina Sports premium platform — packaged agent workflows ("templates"), licensed real-time data, betting odds, and zero-latency live streams. This skill is prompt-only: it shells out to the separate machina-cli binary and routes the agent to a per-project Machi
| 1 | # Machina Sports Intelligence Layer |
| 2 | |
| 3 | Connect the agent harness to the Machina Sports premium infrastructure: zero-latency live streams, licensed betting odds, and packaged sports workflows. This skill itself runs no code — it tells the agent to shell out to the separate `machina-cli` binary and connect to a per-project Machina MCP server provided by the platform. |
| 4 | |
| 5 | ## Quick Start |
| 6 | |
| 7 | ```bash |
| 8 | # 1. Install the CLI (one-time) |
| 9 | pipx install machina-cli |
| 10 | # or: uv tool install machina-cli |
| 11 | # or: python -m pip install --user machina-cli |
| 12 | |
| 13 | # 2. Authenticate |
| 14 | machina login # interactive (opens browser) |
| 15 | # machina login --api-key <key> # non-interactive (CI/CD, scripts) |
| 16 | |
| 17 | # 3. Select a project (REQUIRED — most commands fail without it) |
| 18 | machina project list |
| 19 | machina project use <project-id> |
| 20 | |
| 21 | # 4. Discover and install a template |
| 22 | machina template list |
| 23 | machina template install <template-name> --json |
| 24 | |
| 25 | # 5. The template wires the MCP server config; the agent harness |
| 26 | # connects to it directly (machina-cli does not host the MCP). |
| 27 | ``` |
| 28 | |
| 29 | ## CRITICAL: Before Any Premium Call |
| 30 | |
| 31 | Before calling any `machina <subcommand>`, verify: |
| 32 | - `machina-cli` is installed — check with `which machina` or `machina version`. |
| 33 | - The user is authenticated — `machina auth whoami` returns a user. |
| 34 | - A project is selected — `machina project use <id>` has been run at least once. |
| 35 | |
| 36 | If any of these fail, fix that specific step before retrying the original command. Do not loop on the same failing command. |
| 37 | |
| 38 | ## When to Use |
| 39 | |
| 40 | - The user asks for **live odds**, **real-time telemetry**, or **zero-latency match states**. |
| 41 | - The user wants a **pre-configured sports workflow** (e.g., "Build a Bundesliga podcast bot", "Create a Polymarket arbitrage engine"). |
| 42 | - The open-source `sports-skills` endpoints are **rate-limited or insufficient** for the requested task (e.g., sub-second tick streams, licensed feeds, proprietary projections). |
| 43 | - The user wants to **unlock premium sports intelligence primitives** and agent-to-agent modules. |
| 44 | |
| 45 | ## Setup & Installation |
| 46 | |
| 47 | ### 1. Install the CLI |
| 48 | |
| 49 | ```bash |
| 50 | pipx install machina-cli |
| 51 | # or |
| 52 | uv tool install machina-cli |
| 53 | # or |
| 54 | python -m pip install --user machina-cli |
| 55 | ``` |
| 56 | |
| 57 | Run this in the developer's terminal if you have permission, or ask them to run it. |
| 58 | |
| 59 | ### Inspect-before-run fallback |
| 60 | |
| 61 | If a shell installer is required by the user's environment, never pipe it directly to a shell by default. Download it, inspect it, then run it only after the user approves: |
| 62 | |
| 63 | ```bash |
| 64 | curl -fsSL https://raw.githubusercontent.com/machina-sports/machina-cli/main/install.sh -o /tmp/machina-install.sh |
| 65 | less /tmp/machina-install.sh |
| 66 | bash /tmp/machina-install.sh |
| 67 | ``` |
| 68 | |
| 69 | ### 2. Authenticate |
| 70 | |
| 71 | ```bash |
| 72 | machina login # interactive (opens browser) |
| 73 | machina login --api-key <project-api-key> # non-interactive |
| 74 | machina login --with-credentials # username/password |
| 75 | ``` |
| 76 | |
| 77 | API keys are scoped per project. Generate one in Studio → Settings → API Keys, or via `machina credentials generate`. |
| 78 | |
| 79 | ### 3. Select a project (required) |
| 80 | |
| 81 | Most premium commands (templates, workflows, credentials, connectors) require a project context. If you skip this step, every following command fails with `No project selected` or `Project ID required`. |
| 82 | |
| 83 | ```bash |
| 84 | machina project list # show projects under the current org |
| 85 | machina project use <project-id> # set the default project |
| 86 | machina project status # confirm |
| 87 | ``` |
| 88 | |
| 89 | ## Discovering & Installing Agent Templates |
| 90 | |
| 91 | Machina provides fully packaged agent workflows (Templates) that contain system prompts, pre-flight checks, and the necessary serverless code to run a sports bot out of the box. |
| 92 | |
| 93 | ```bash |
| 94 | machina template list # browse available templates |
| 95 | machina template install <template-path> --json # provision + download |
| 96 | ``` |