npm package: @prodflow/cli
Description: Install and manage Prodflow skills for AI coding agents
Latest version: 0.2.1

# @prodflow/cli

Install and manage [Prodflow](https://prodflow.co) skills for AI coding agents.

Skills are markdown instruction files that teach AI agents how to perform specific tasks. Create them on Prodflow, publish, and install into any supported agent with one command.

## Install a skill

```bash
npx @prodflow/cli skills add <slug>
```

This fetches the skill from Prodflow and installs it for all detected agents on your machine.

### What happens

1. The skill is downloaded to a canonical directory (`.agents/skills/<name>/SKILL.md`)
2. Symlinks are created for each detected agent (e.g. `.claude/skills/`, `.cursor/skills/`)
3. A lock file (`.skill-lock.json`) tracks what's installed

### Options

```bash
# Install globally (available across all projects)
npx @prodflow/cli skills add <slug> -g

# Copy files instead of symlinking
npx @prodflow/cli skills add <slug> --copy

# Install by page ID or URL
npx @prodflow/cli skills add 550e8400-e29b-41d4-a716-446655440000
npx @prodflow/cli skills add https://app.prodflow.co/pages/abc123
```

## List installed skills

```bash
npx @prodflow/cli skills list

# Global scope
npx @prodflow/cli skills list -g
```

## Remove a skill

```bash
npx @prodflow/cli skills remove <name>

# Global scope
npx @prodflow/cli skills remove <name> -g
```

This removes the skill directory, all agent symlinks, and the lock file entry.

## Private skills

Public skills work without authentication. For private skills, log in first:

```bash
npx @prodflow/cli login
```

This opens your browser to authenticate with Prodflow. The token is stored at `~/.prodflow/config.json` with restricted file permissions.

After logging in, `skills add` automatically uses your credentials when a public fetch fails.

## Supported agents

| Agent | Type | Skills directory |
|-------|------|-----------------|
| Claude Code | Symlinked | `.claude/skills/` |
| Cursor | Symlinked | `.cursor/skills/` |
| Cline | Symlinked | `.cline/skills/` |
| Amp | Universal | `.agents/skills/` (reads canonical dir directly) |
| Codex | Universal | `.agents/skills/` (reads canonical dir directly) |

Universal agents read from the canonical directory. Non-universal agents get symlinks pointing to it.

## How it works

```
npx @prodflow/cli skills add my-skill
    |
    v
GET /api/public/v1/pages/my-skill/md   (no auth)
    |                                       |
    | 200 OK                          404 Not Found
    v                                       |
Parse SKILL.md                         Has token?
    |                                  no -> error
    v                                  yes -> GET /api/v1/pages/:id (with auth)
Write to .agents/skills/my-skill/           |
    |                                       v
    v                                  Parse SKILL.md
Symlink to each agent dir                   |
    |                                       v
    v                                  (same as left)
Update .skill-lock.json
    |
    v
Done
```

## Creating skills

Skills are created on [Prodflow](https://app.prodflow.co). Any page can be converted to a skill, which adds metadata (description, version, allowed tools) and a publishable slug.

Once published, the install command appears on the skill page and can be shared with your team.

## License

MIT