> ## Documentation Index
> Fetch the complete documentation index at: https://docs.steadwing.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Agent Skill

> Install the Steadwing Agent Skill so Claude Code, Cursor, and other coding agents can self-register and run root cause analysis the moment a production error appears **no API key to paste, no manual setup**.

## What is the Steadwing Agent Skill?

An Agent Skill is a folder of instructions and scripts that a coding agent discovers and uses on its own **no prompting required**. The Steadwing Agent Skill teaches your agent how to register with Steadwing, watch for production-style errors, and trigger root cause analysis automatically. Drop it in once and your agent goes from "writes code" to "investigates incidents."

Unlike the [MCP Server](/steadwing-mcp), the skill is **self-onboarding**: the first time it runs, it registers an agent for you and stores a key locally. There's nothing to paste and nothing to configure.

<CardGroup cols={2}>
  <Card title="Zero-Setup Auth" icon="key">
    The agent registers itself on first use and stores its own API key, no signup flow
  </Card>

  <Card title="Auto-Detection" icon="radar">
    Optionally watches your agent's output for tracebacks and offers to run RCA
  </Card>

  <Card title="One-Command Install" icon="terminal">
    Add the skill with a single command in Claude Code, Cursor, or Windsurf
  </Card>

  <Card title="Files Attached" icon="paperclip">
    Sends only the source files named in the stack trace for accurate analysis
  </Card>
</CardGroup>

## How do I install the Agent Skill?

Install the skill with the [`skills`](https://skills.sh) CLI:

```bash theme={null}
npx skills add steadwing/agent-skills
```

To install only the Steadwing skill from the collection:

```bash theme={null}
npx skills add steadwing/agent-skills --skill steadwing
```

Add `--global` to make the skill available across all of your projects:

```bash theme={null}
npx skills add steadwing/agent-skills --global
```

<Note>
  **Using Claude Code?** You can install the skill as a plugin instead. Add the marketplace, then install the plugin:

  ```bash theme={null}
  /plugin marketplace add steadwing/agent-skills
  /plugin install steadwing@steadwing-agent-skills
  ```
</Note>

<Note>
  The skill works with any agent that supports the open skills format, including Claude Code, Cursor, and Windsurf. The agent auto-detects which environment it's running in during registration.
</Note>

<Tip>
  The Steadwing Agent Skill is open source. View the code, report issues, or contribute at [github.com/steadwing/agent-skills](https://github.com/steadwing/agent-skills).
</Tip>

## How does the skill work?

<Steps>
  <Step title="Install the skill">
    Run `npx skills add steadwing/agent-skills` in your project. Your agent picks it up automatically.
  </Step>

  <Step title="Agent self-registers">
    The first time the skill runs, your agent calls Steadwing to register itself, then writes its credentials to `~/.steadwing/credentials.json`. **No API key to paste**.
  </Step>

  <Step title="Claim your agent">
    The skill prints a claim URL. Open it to link the agent to your Steadwing account and keep it from expiring.
  </Step>

  <Step title="Trigger RCA">
    Ask your agent to investigate an error or let auto-detection offer it for you. Steadwing runs the analysis in the background and returns a link to the full report.
  </Step>
</Steps>

## How do I claim an agent?

When the skill registers, it creates an **unclaimed** agent that expires in **3 days**. To keep it and link it to your organization, open the claim URL the skill prints after registration:

```text theme={null}
https://app.steadwing.com/login?claim=<token>
```

Claiming an agent associates it with your account so it inherits your connected integrations and never expires. You can check an agent's status, including time remaining before expiry, from the [Dashboard](https://app.steadwing.com).

<Tip>
  Claim your agent right after the first registration. Once claimed, every RCA it triggers can pull from your connected GitHub, Datadog, Sentry, and other integrations for deeper analysis.
</Tip>

## How do I use the skill for debugging?

### Investigate an error on demand

Paste a stack trace and ask your agent to look into it:

```text theme={null}
"Run RCA on this error: ConnectionTimeout in PaymentService.processOrder()"
```

The skill reads the files named in the trace, attaches them, and triggers analysis. Steadwing correlates the error with logs, metrics, and recent code changes, then returns the root cause with a suggested fix.

### Let auto-detection catch errors for you

Opt in to auto-detection and the skill installs a hook that watches your agent's tool output. When a production-style error appears an unhandled exception, a traceback, a failed deploy the skill surfaces it and offers to run RCA.

<Note>
  Auto-detection only **detects** and **asks**. The skill never sends anything to Steadwing without your confirmation — you're always in control of what gets analyzed.
</Note>

To remove auto-detection later, delete the Steadwing entry under `hooks.PostToolUse` in your agent's settings.

## How do integrations improve results?

The skill triggers the same analysis engine as the rest of Steadwing, so results get richer as you connect more tools to your account:

| Integration           | What It Adds                                           |
| --------------------- | ------------------------------------------------------ |
| **GitHub**            | Repository context, recent commits, deployment history |
| **Datadog / Grafana** | Metrics, monitors, and APM data                        |
| **Sentry**            | Error tracking and stack traces                        |
| **AWS / GCP**         | Cloud resource and service insights                    |

Connect integrations at [app.steadwing.com/integrations](https://app.steadwing.com/integrations) to unlock full investigation capabilities.

## FAQs

<AccordionGroup>
  <Accordion title="Do I need to sign up before installing the skill?">
    No. The skill registers an agent for you automatically on first use there's no signup flow and no API key to paste. To keep the agent past 3 days, claim it via the URL the skill prints after registering.
  </Accordion>

  <Accordion title="Where are my credentials stored?">
    The skill writes them to `~/.steadwing/credentials.json` (or `%APPDATA%\steadwing\credentials.json` on Windows) with owner-only permissions. They're never committed to your repo.
  </Accordion>

  <Accordion title="What happens if my agent expires?">
    Unclaimed agents expire after 3 days. If the key is revoked or expired, the skill detects it on the next call, re-registers automatically, and lets you know. Claim the agent to prevent expiry entirely.
  </Accordion>

  <Accordion title="Does the skill send my code automatically?">
    Only files explicitly attached to an RCA request are sent typically the handful named in the stack trace. Auto-detection never sends anything without your confirmation.
  </Accordion>

  <Accordion title="How is this different from the MCP server?">
    The [MCP Server](/steadwing-mcp) exposes a `run_rca` tool you invoke from your IDE and requires an API key from your account. The Agent Skill is self-onboarding and it registers its own agent and can watch for errors proactively. Use the skill for hands-off, zero-setup RCA; use MCP when you want explicit tool control.
  </Accordion>
</AccordionGroup>

Need help? Contact us at [hello@steadwing.com](mailto:hello@steadwing.com)
