# @tbolp/pi-skill-manager

Pi extension (pi package) that lets you interactively manage which skills Pi loads: per-skill on/off at **global** scope, and per-skill **disable / enable / inherit** at **per-project** scope.

## Install

```bash
pi install npm:@tbolp/pi-skill-manager
```

Or try it for one invocation:

```bash
pi -e npm:@tbolp/pi-skill-manager
```

## Usage

Run the interactive manager:

```
/skill-manager
```

In the panel:

- `↑/↓` — navigate
- `Tab` — switch between `global` and `project` scope
- `Space` / `Enter` — toggle the selected skill
  - **global** scope: on/off
  - **project** scope: cycle `disabled / enabled / inherit` (project-level skills only cycle `disabled / enabled`)
- `S` / `Esc` — close and save

By default every skill "inherits" the global setting. When a skill is set to `disabled` it is not loaded; `enabled` forces it on; `inherit` follows the global `disabled` list.

You can also disable all skills for one session only (no file written):

```bash
pi --skills-off
```

## Behavior

- In the `global` scope, configuration is stored in `<agent-dir>/skill-manage.json` as `{ "disabled": string[] }`.
- In the `project` scope, configuration is stored in `<cwd>/.pi/skill-manage.json` as `{ "modes": { [skill]: "disabled"|"enabled"|"inherit" } }`.
- On `before_agent_start`, disabled skills are filtered out of the system prompt's `<skills>` section.
- The extension intercepts `/skill:<name>` commands for skills that are not enabled.

## Security / disclosure

This extension reads and writes local `skill-manage.json` files, inspects and filters the system prompt, and intercepts `/skill:<name>` input. Review the source before installing.

## Development

```bash
pi install ./skill-manager   # from the repo root, or
pi -e ./skill-manager
```

## License

MIT
