npm package: @localskills/cli
Description: CLI for localskills.sh — install agent skills locally
Latest version: 0.9.0

# @localskills/cli

CLI for [localskills.sh](https://localskills.sh) — install, manage, and publish agent skills for AI coding tools.

## Install

```bash
npm install -g @localskills/cli
```

## Supported platforms

| Platform | ID | Global | Project | Method |
|---|---|---|---|---|
| Cursor | `cursor` | `~/.cursor/rules/` | `.cursor/rules/` | symlink |
| Claude Code | `claude` | `~/.claude/skills/` | `.claude/skills/` | symlink |
| Windsurf | `windsurf` | `~/.codeium/windsurf/memories/` | `.windsurf/rules/` | section (global), symlink (project) |
| Cline | `cline` | — | `.clinerules/` | symlink |
| GitHub Copilot | `copilot` | — | `.github/copilot-instructions.md` | section |
| Codex CLI | `codex` | `~/.codex/AGENTS.md` | `./AGENTS.md` | section |
| OpenCode | `opencode` | `~/.config/opencode/rules/` | `.opencode/rules/` | symlink |
| Aider | `aider` | — | `.aider/skills/` | symlink |

The CLI auto-detects which platforms are installed and pre-selects them during interactive flows.

## Commands

### `localskills login`

Authenticate with localskills.sh by pasting your API token.

```bash
localskills login
```

### `localskills logout`

Clear stored credentials.

### `localskills whoami`

Show the current authenticated user.

### `localskills install [slug]`

Install a skill to one or more platforms. Without a slug, launches an interactive picker.

```bash
# Interactive — prompts for skill, platforms, scope, and method
localskills install

# Direct — skip prompts
localskills install my-skill -t cursor,claude -g --symlink
```

**Options:**

| Flag | Description |
|---|---|
| `-t, --target <targets...>` | Target platforms (comma-separated) |
| `-g, --global` | Install globally (home directory) |
| `-p, --project [dir]` | Install in project directory |
| `--symlink` | Symlink from cache (default) |
| `--copy` | Copy file instead of symlinking |

### `localskills uninstall [slug]`

Remove an installed skill from all platforms. Without a slug, launches an interactive picker.

```bash
localskills uninstall my-skill --purge
```

**Options:**

| Flag | Description |
|---|---|
| `--purge` | Also remove from local cache |

### `localskills pull [slug]`

Update installed skills by fetching the latest content from localskills.sh. Without a slug, updates all installed skills.

```bash
# Update everything
localskills pull

# Update one skill
localskills pull my-skill
```

Symlinked installations update automatically when the cache is refreshed. Copied and section-based installations are re-written in place.

### `localskills list`

List available skills from localskills.sh.

```bash
localskills list
localskills list --public
```

### `localskills publish [file]`

Publish a local skill file to localskills.sh. Without a file argument, scans your project for unpublished skill files across all supported platform directories.

```bash
# Scan and publish interactively
localskills publish

# Publish a specific file
localskills publish .cursor/rules/my-skill.mdc -n "My Skill" --visibility public
```

**Options:**

| Flag | Description |
|---|---|
| `-t, --team <id>` | Team ID or slug |
| `-n, --name <name>` | Skill name |
| `--visibility <level>` | `private`, `public`, or `unlisted` (default: `private`) |
| `-m, --message <message>` | Version message |

## Installation methods

- **Symlink** (default) — links the skill file from `~/.localskills/cache/` to the target location. Updates propagate automatically via `localskills pull`.
- **Copy** — writes a standalone copy. Independent of cache but requires re-install to update.
- **Section** — for single-file platforms (Copilot, Codex, Windsurf global), injects the skill into a shared file between `<!-- localskills:start:slug -->` / `<!-- localskills:end:slug -->` markers.

## Configuration

Config and cache are stored at `~/.localskills/`:

```
~/.localskills/
  config.json       # Auth token, installed skills, preferences
  cache/
    my-skill/
      raw.md        # Original content
      meta.json     # Hash, version, metadata
      cursor.mdc    # Platform-specific transformed files
      claude/
        SKILL.md
```

## License

MIT