feat(hermes): flavour-mcp-setups + installer-skill [v1.0.0-hermes]
- hermes-flavour-mcp-setups: setup-projects-meta + setup-context7 rewritten as yaml-edit ~/.hermes/config.yaml (no clone/build) pre-checks binary+auth.toml exist, fallback to git clone with extraheader-pattern. mapping: pending → manual. - hermes-installer-skill: dist-hermes/meta/claude-skills-installer/SKILL.md recursive bootstrap installer. iterates dist-hermes/<cat>/<name>/, calls skill_manage(action='create') per skill. respects SKIPPED.md. - dist-hermes/mcp/: both MCP setup skills generated via build-hermes.py. - hermes-mvp-coverage: unblocked (ready → next task). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
161
dist-hermes/meta/claude-skills-installer/SKILL.md
Normal file
161
dist-hermes/meta/claude-skills-installer/SKILL.md
Normal file
@@ -0,0 +1,161 @@
|
||||
---
|
||||
name: claude-skills-installer
|
||||
version: 1.0.0
|
||||
description: Recursive bootstrap installer for claude-skills on Hermes. Iterates over `dist-hermes/<category>/<name>/` and installs each via `skill_manage(action='create')`. Respects `dist-hermes/SKIPPED.md` — skipped skills are not installed. Run once manually to bootstrap (`skill_manage(action='create', from='...')`), thereafter trigger «обнови claude-skills» to refresh all skills. The installer updates itself recursively — no separate update step.
|
||||
---
|
||||
|
||||
# claude-skills-installer
|
||||
|
||||
> Bootstrap installer for the claude-skills suite on Hermes. One-time manual registration, then «обнови claude-skills» keeps everything in sync.
|
||||
|
||||
## When to use
|
||||
|
||||
- **Bootstrap phase:** First-time setup on a Hermes machine. Run manually:
|
||||
```
|
||||
skill_manage(action='create', from='dist-hermes/meta/claude-skills-installer/SKILL.md')
|
||||
```
|
||||
- **Update phase:** Whenever user says «обнови claude-skills», «refresh claude-skills», or after `git pull` in the claude-skills repo.
|
||||
|
||||
## What it does
|
||||
|
||||
Iterates over `dist-hermes/<category>/<name>/` (all except `meta/`). For each:
|
||||
|
||||
1. Reads `SKILL.md` (frontmatter: name, version, description).
|
||||
2. Collects assets (README.md, SECURITY.md, scripts/, etc.) if present.
|
||||
3. Calls `skill_manage(action='create', category=<cat>, name=<name>, content=<SKILL.md>, assets=<...>)`.
|
||||
|
||||
Skips anything listed in `dist-hermes/SKIPPED.md` (these are intentionally not part of Hermes rollout).
|
||||
|
||||
**Recursive by design:** the installer lives in `meta/` and updates itself along with everything else.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- `dist-hermes/` tree exists (from `git clone claude-skills` + `python scripts/build-hermes.py`).
|
||||
- Hermes has `skill_manage()` native tool.
|
||||
- Working directory is `claude-skills` root (where `dist-hermes/` lives).
|
||||
|
||||
## Procedure
|
||||
|
||||
### Phase 0 — Verify dist-hermes
|
||||
|
||||
```bash
|
||||
ls dist-hermes/
|
||||
```
|
||||
|
||||
Should list: `software-development/`, `productivity/`, `mcp/`, `meta/`, `SKIPPED.md`.
|
||||
|
||||
If missing → run `python scripts/build-hermes.py` first.
|
||||
|
||||
### Phase 1 — Load SKIPPED.md
|
||||
|
||||
Read `dist-hermes/SKIPPED.md`. Parse the skip list — these categories/names will NOT be installed.
|
||||
|
||||
Example SKIPPED.md entry:
|
||||
```
|
||||
caveman (category: software-development)
|
||||
Reason: Hermes runs on glm-5.1 (cheap local model); token-compression motive disappears.
|
||||
```
|
||||
|
||||
### Phase 2 — Scan dist-hermes
|
||||
|
||||
Walk `dist-hermes/<category>/<name>/`. Collect:
|
||||
|
||||
```
|
||||
category: software-development | productivity | mcp | research
|
||||
name: <directory name>
|
||||
skill_file: dist-hermes/<category>/<name>/SKILL.md
|
||||
assets:
|
||||
- dist-hermes/<category>/<name>/README.md (if exists)
|
||||
- dist-hermes/<category>/<name>/SECURITY.md (if exists)
|
||||
- dist-hermes/<category>/<name>/scripts/* (if exists)
|
||||
```
|
||||
|
||||
**Skip conditions:**
|
||||
- `category/name` is in SKIPPED.md
|
||||
- `name == "claude-skills-installer"` (don't install yourself recursively)
|
||||
|
||||
Report the scan result:
|
||||
```
|
||||
Found N skills to install:
|
||||
software-development: pulling-before-work, active-platform, project-discipline, tdd-criteria
|
||||
productivity: using-markitdown
|
||||
mcp: setup-projects-meta, setup-context7
|
||||
Skipped M entries (see dist-hermes/SKIPPED.md)
|
||||
```
|
||||
|
||||
### Phase 3 — Confirm
|
||||
|
||||
Ask user:
|
||||
```
|
||||
Will install N skills. Proceed? (y/n)
|
||||
```
|
||||
|
||||
Wait for explicit confirmation. This is a bulk operation — permission is required.
|
||||
|
||||
### Phase 4 — Install loop
|
||||
|
||||
For each skill in the scan list:
|
||||
|
||||
```
|
||||
skill_manage(
|
||||
action='create',
|
||||
category='<category>',
|
||||
name='<name>',
|
||||
content='<SKILL.md content>',
|
||||
assets={
|
||||
'README.md': '<README.md content if exists>',
|
||||
'SECURITY.md': '<SECURITY.md content if exists>',
|
||||
'scripts/*': '<script files if exist>'
|
||||
}
|
||||
)
|
||||
```
|
||||
|
||||
**Important:** `skill_manage(action='create')` is idempotent. If a skill already exists, it updates to the new content.
|
||||
|
||||
Report progress per skill:
|
||||
```
|
||||
✓ pulling-before-work (v1.x.x)
|
||||
✓ active-platform (v1.x.x)
|
||||
...
|
||||
✗ <name> failed: <error>
|
||||
```
|
||||
|
||||
If any skill fails → stop, report the error, and ask whether to continue or rollback.
|
||||
|
||||
### Phase 5 — Verify
|
||||
|
||||
After the loop completes, ask user to verify:
|
||||
```
|
||||
hermes > skills_list()
|
||||
```
|
||||
|
||||
Should show all installed skills under their categories. Count should match N.
|
||||
|
||||
### Phase 6 — Final report
|
||||
|
||||
```
|
||||
✅ Installed N skills. Update complete.
|
||||
|
||||
Installed:
|
||||
software-development: <list>
|
||||
productivity: <list>
|
||||
mcp: <list>
|
||||
|
||||
Skipped:
|
||||
<list from SKIPPED.md>
|
||||
|
||||
To refresh: run this skill again after 'git pull' in claude-skills.
|
||||
```
|
||||
|
||||
## Out of scope
|
||||
|
||||
- Creating `dist-hermes/` — that's `build-hermes.py` job.
|
||||
- Installing skills NOT in dist-hermes (manual `skill_manage` calls).
|
||||
- Uninstalling skills (use `skill_manage(action='delete')` manually).
|
||||
|
||||
## Common mistakes
|
||||
|
||||
- **Running from wrong directory.** Must be in claude-skills root where `dist-hermes/` lives.
|
||||
- **Forgetting to rebuild dist-hermes.** After `git pull` in claude-skills, run `python scripts/build-hermes.py` before running installer.
|
||||
- **Installing skipped skills.** SKIPPED.md is the source of truth. If a skill is there, don't install it.
|
||||
- **Not verifying after install.** Always run `skills_list()` to confirm.
|
||||
Reference in New Issue
Block a user