# sling (/skills/sling)



[sling](https://github.com/starslingdev/skills/blob/main/skills/sling/SKILL.md) is a free, open-source, MIT-licensed agent skill that teaches your coding agent to use the [Sling CLI](https://docs.starsling.dev/sling-cli). It answers questions about live GitHub Actions runs, failed jobs, runner minutes, and cost using data collected by StarSling.

Paste this prompt into your coding agent to install the skill:

```text
Install the sling skill from https://github.com/starslingdev/skills for this project and for the coding agent you are running as, using your Skills CLI agent identifier (for example claude-code, codex, or cursor):
npx skills add starslingdev/skills --skill sling --agent <agent-id> --yes
```

<Callout type="info">
  The skill reads live CI data from StarSling's control plane and requires the StarSling GitHub App on your organization. For repo-wide audits, use [ci-speedup](https://docs.starsling.dev/skills/ci-speedup) for performance, [ci-score](https://docs.starsling.dev/skills/ci-score) for configuration best practices, or [ci-secure](https://docs.starsling.dev/skills/ci-secure) for security.
</Callout>

## Before you start

You need:

* The [Sling CLI installed](https://docs.starsling.dev/sling-cli/installation) on Apple Silicon macOS or x64 glibc Linux.
* The [StarSling GitHub App](https://github.com/apps/starslingdev) installed on the organization whose CI you want to inspect, with access to that organization. Personal repositories are not supported by the skill's StarSling data path.
* Node.js 22.20 or later and npm to install the skill with `npx`.
* An authenticated [GitHub CLI](https://cli.github.com/) if you want your agent to rerun or cancel runs, trigger workflows, or download artifacts.

Sign in from your own terminal, then check your setup:

```bash
sling login
sling doctor
```

Complete the browser approval yourself. The saved credential is per user, so a coding agent running as you can use it without signing in again. Signing in alone does not install the GitHub App.

## Install and run

From the target project's root directory, install the skill with Vercel's Skills CLI:

```bash
npx skills add starslingdev/skills --skill sling
```

Choose your coding agent and whether to install for the current project or globally. Then ask your agent to use the sling skill with a run or job URL, or a question about your organization's CI:

```text
Use the sling skill to explain why this GitHub Actions job failed: <job URL>
```

```text
Use the sling skill to show where this run spent its time: <run URL>
```

```text
Use the sling skill to find the biggest runner-minute hotspots in acme/api over the last 7 days.
```

## What the skill does

| Your question                     | How the skill investigates                                                                           |
| --------------------------------- | ---------------------------------------------------------------------------------------------------- |
| Why did this job fail?            | Starts with `sling why` for the server-classified cause, evidence, and suggested follow-up commands. |
| Where did the time go?            | Uses `sling time` to break down queue wait, provisioning, steps, and teardown.                       |
| Which log lines matter?           | Filters with `sling logs` instead of pulling an entire transcript.                                   |
| What is using our runner minutes? | Uses `sling top` and `sling usage` to attribute time and cost.                                       |
| What do we owe this period?       | Reads `sling bill` and distinguishes the amount due from the total before credits.                   |

The agent checks its environment first, requests structured JSON with `--agent`, and reads exit codes alongside the result. It reports incomplete telemetry and missing coverage instead of treating an empty response as proof that nothing happened. For a run with multiple jobs, it checks the job set before presenting one job's diagnosis as the cause of the whole run.

## Reads and actions

Sling reads and analyzes CI data; it does not change GitHub or CI state. When you ask to rerun or cancel a run, trigger a workflow, or download an artifact, the skill routes that action to `gh`, which needs its own authentication.

For a request such as “explain this failure, then rerun it,” the agent reports the diagnosis first and announces the action separately. You handle interactive login, logout, and CLI updates in your own terminal.

If Sling cannot provide a diagnosis, the skill explains what is unavailable. A GitHub CLI fallback can read accessible runs and logs, but does not provide Sling's failure classification or phase breakdown.

## Resources

<Cards>
  <Card title="Skill source" href="https://github.com/starslingdev/skills/blob/main/skills/sling/SKILL.md" description="Read the skill's routing rules, setup checks, and troubleshooting guidance." />

  <Card title="Sling CLI installation" href="/sling-cli/installation" description="Install the CLI, sign in, and verify your environment." />

  <Card title="Analyzing CI" href="/sling-cli/commands/analyze" description="Explore why, time, top, and usage." />

  <Card title="Skill command reference" href="https://github.com/starslingdev/skills/blob/main/skills/sling/references/command-reference.md" description="See the verified command flags and JSON response shapes used by the skill." />
</Cards>
