# skill-cli

CLI for managing and testing [Anthropic Agent Skills](https://agentskills.io) (e.g. [anthropics/skills](https://github.com/anthropics/skills)).

## Install (npm)

```bash
# Global
npm install -g ancoder-skill-cli

# Or run without installing
npx ancoder-skill-cli --help
```

The npm package is self-contained and includes prebuilt binaries for:

- macOS arm64
- macOS x64
- Linux arm64
- Linux x64
- Windows x64

After install, the wrapper selects the correct bundled binary for the current platform automatically.

## Build from source (Go)

```bash
cd skill-cli
go build -o bin/skill-cli .
# Then run: ./bin/skill-cli --help
# Or via npm: node bin/skill-cli.js --help
```

## Commands

| Command | Description |
|--------|-------------|
| `skill-cli validate &lt;path&gt;` | Validate a skill directory's SKILL.md |
| `skill-cli list [--path &lt;dir&gt;]` | List installed skills |
| `skill-cli create &lt;name&gt; [--path &lt;dir&gt;]` | Create a new skill scaffold |
| `skill-cli test &lt;path&gt;` | Test a skill (placeholder) |

## Publish to npm

1. Set `repository.url` in `package.json` to your GitHub repo (e.g. `git+https://github.com/your-org/skill-cli.git`).
2. Build binaries per platform before publishing the npm package:

   ```bash
   bash scripts/build-all.sh
   ```

3. Optionally attach the same binaries to a GitHub Release with names:
   - `skill-cli-darwin-arm64`, `skill-cli-darwin-x64`
   - `skill-cli-linux-x64`, `skill-cli-linux-arm64`
   - `skill-cli-win32-x64.exe`
4. Publish the package:

   ```bash
   npm login --registry=https://registry.npmjs.org/
   npm publish --access public --registry=https://registry.npmjs.org/ --userconfig ~/.npmrc
   ```

Users who `npm install -g ancoder-skill-cli` get a fully bundled package. No extra binary download is required during install.

## License

MIT
