# Install Skills

> Install Aerostack skills into your workspace — they appear in your gateway automatically. No mcp.json editing required.

When you install a skill, it appears in your existing gateway URL automatically. You configure the gateway once and never touch it again — installing new skills just adds more tools.

---

## Prerequisites

**1. Have your gateway URL configured** in your editor or AI client. If you haven't set this up yet:

```bash
# Create a workspace and get your gateway URL + token
aerostack workspace create my-workspace
# → Token: mwt_xxxxxxxx (copy this, shown once)
```

Add to your editor config (example for Cursor `~/.cursor/mcp.json`):

```json
{
  "mcpServers": {
    "my-workspace": {
      "url": "https://gateway.aerostack.dev/ws/my-workspace",
      "headers": { "Authorization": "Bearer mwt_xxxxxxxx" }
    }
  }
}
```

**2. Have the Aerostack CLI installed** with your API key configured.

---

## Install a Skill

```bash
# Install a public skill (no auth needed)
aerostack skill install johndoe/github-skill

# Install using the @ prefix (equivalent)
aerostack skill install @johndoe/github-skill

# Install a team-private skill (CLI verifies your team membership)
aerostack skill install @acme/internal-crm-skill
```

After install, the skill's tools appear in your gateway immediately:

```
✓ github__create_issue added to your gateway
✓ github__list_pull_requests added to your gateway
✓ github__merge_branch added to your gateway

All tools available through: https://gateway.aerostack.dev/ws/my-workspace
```

No mcp.json change needed.

---

## Workspaces

Skills are installed into a **workspace** — your private collection of skills behind one gateway URL. You can have multiple workspaces (e.g. "personal", "client-work", "team-shared").

### Set your active workspace

The active workspace is where `skill install` adds skills by default:

```bash
aerostack workspace list
# → team-shared    https://gateway.aerostack.dev/ws/team-shared

aerostack workspace use client-work
# → Active workspace set to: client-work

aerostack skill install @johndoe/github-skill
# → Added to client-work workspace
```

### Override per-install

```bash
aerostack skill install @johndoe/github-skill --workspace team-shared
```

### Create a new workspace

```bash
aerostack workspace create new-project
# → Token: mwt_... (add to your editor config)
```

---

## Key-Required Skills

Some skills require an API key from the publisher (e.g. a paid service or a third-party API). The CLI handles this interactively:

```bash
aerostack skill install @johndoe/openai-skill
# → The gateway will inject it automatically on each tool call.
```

You enter the key once. It's stored encrypted in your workspace and injected by the gateway on every call. The skill publisher never sees your key.

---

## List Installed Skills

```bash
aerostack skill list
# johndoe/calendar-skill    v1.0.0    calendar__create_event, calendar__list_events
```

---

## Remove a Skill

```bash
aerostack skill remove @johndoe/github-skill
# ✓ Removed github__create_issue, github__list_prs, github__merge_branch from gateway
```

---

## Update Skills

```bash
# Update a specific skill
aerostack skill update @johndoe/github-skill

# Update all skills in active workspace
aerostack skill update
```

---

## Install into Your Editor (Optional)

If you prefer to configure your editor's mcp.json directly instead of using a workspace, use the `--editor` flag:

```bash
# Patch Cursor's config directly
aerostack skill install @johndoe/github-skill --editor cursor

# --editor vscode
```

This writes the skill's MCP server entry into the editor's config file. The workspace gateway approach is recommended for team setups (one URL for everyone).

---

## Discover Skills

Browse skills at [aerostack.dev/skills](https://aerostack.dev/skills), or search from the CLI:

```bash
aerostack skill search "send slack message"
# → johndoe/notify-skill  ★ 38    send_slack_notification
```

Your gateway also has a built-in `find_skill` meta-tool — your LLM can discover and request new skills mid-conversation:

```
You: "I need to send a Slack message."
Agent: I found the @acme/slack-skill. Install it? [yes]
Agent: ✓ Installed. Sending your message...
```
