# Hermes Skills Curation

Enable/disable, merge, archive, and reorganize skills in a Hermes profile.

## Architecture

- **config.yaml** (`~/.hermes/config.yaml`): `skills.disabled` list controls which skills are disabled. Skills NOT in this list are enabled.
- **Skills files**: `~/.hermes/skills/<category>/<skill-name>/SKILL.md` — one directory per skill.
- **Bundled skills**: Shipped with Hermes (e.g. `hermes-agent`). Cannot be deleted via `skill_manage(delete=...)`. Found via `hermes skills list`.
- **Hub skills**: Installed via `hermes skills install`. May not have a physical directory in `~/.hermes/skills/`.
- **Special entries**: `.llama-cpp-disabled` is a flag entry in the disabled list, not a real skill.
- **Curator**: `.curator_state` and `.curator_backups/` in `~/.hermes/skills/` — internal curator infrastructure, do not modify directly.

## CLI Commands

```bash
hermes skills list           # Show all installed skills with status
hermes skills config         # Interactive enable/disable (TUI)
hermes skills search <term>  # Search registries
hermes skills install <name> # Install from hub
```

## Bulk Enable/Disable via Config

Edit `config.yaml` directly for batch operations:

```python
import yaml

with open('~/.hermes/config.yaml') as f:
    config = yaml.safe_load(f)

disabled = set(config['skills']['disabled'])

# Enable: remove from disabled list
disabled -= {'skill-to-enable', 'another-skill'}

# Disable: add to disabled list
disabled.add('skill-to-disable')

config['skills']['disabled'] = sorted(disabled)

with open('~/.hermes/config.yaml', 'w') as f:
    yaml.dump(config, f, default_flow_style=False, allow_unicode=True, width=120, sort_keys=False)
```

## Merge Two Skills

1. **Target**: read both SKILL.md files, pick the better umbrella name
2. **Update target**: `skill_manage(action='patch', ...)` — add merged content
3. **Delete originals**: `skill_manage(action='delete', name='original1', absorbed_into='target')`
4. **Config**: replace old entries in disabled list with merged name
5. **Archives**: check for leftover reference files

## Archive a Skill (Delete + Backup)

1. Ensure a full backup exists (`cp -a ~/.hermes/skills ~/.hermes/skills.backup.<date>`)
2. Move directory: `mv ~/.hermes/skills/<category>/<skill-name> ~/.hermes/skills-archived-<date>/`
3. Remove from disabled list in config.yaml (if present)
4. Delete a skill via the API: `skill_manage(action='delete', name='skill-name', absorbed_into='')`
5. For bundled/hub skills with no physical dir, leave the config entry alone — skill_manage delete will refuse them

## Verify After Changes

```bash
hermes skills list | grep enabled    # Confirm correct count
python3 -c "import yaml; c=yaml.safe_load(open('config.yaml')); print(len(c['skills']['disabled']))"
ls ~/.hermes/skills/<category>/      # Confirm directory state
```
