Hermes Skill Distillation: Smarter AI Factory (2026)
Introduction
If you automate work with ChatGPT or a generic “agent” wrapper, you already know the grind: every session starts from zero. You paste the same rules, the same HTML structure, the same CSS constraints — and the model still re-invents the wheel on Tuesday after nailing it on Monday.
Hermes Agent (Nous Research) targets that failure mode with a closed learning loop: after a hard task succeeds, the runtime can distill the procedure into a portable skill file under ~/.hermes/skills/, compatible with the agentskills.io open standard. The next time you say “use the same style again,” Hermes loads the skill via progressive disclosure — a compact index first, full instructions only when needed — instead of burning tokens rediscovering the workflow.
This article explains Automatic Skill Distillation, the agentskills.io format, and a concrete visionOS-style glassmorphism landing page example (5+ tool calls → saved skill). For the Claude-style web shell, see our Hermes WebUI self-hosted guide. If you route multiple agents on channels, pair this with OpenClaw multi-agent orchestration.
The pain: prompt bloat and “sometimes smart” agents
Traditional chat agents treat each conversation as an isolated event. Your “system prompt” grows into a novel: H2/H3 hierarchy rules, brand colors, glass gradients, file paths, test commands. Models compress and forget; you get variance — one run perfect, the next missing a section.
| Symptom | What you feel | Root cause |
|---|---|---|
| Prompt inflation | 2k+ tokens before the real task | No durable procedure store |
| One-shot brilliance | Great output once, drift later | No versioned playbook |
| Tool roulette | Wrong tool order on retry | No recorded success path |
| Bill shock | Re-paying for the same reasoning | No skill index / lazy load |
~/.hermes/skills/, so future similar tasks load procedure instead of re-deriving it from chat history.
agentskills.io and the closed learning loop
The open standard
agentskills.io describes skills as on-demand knowledge packages: a directory with a required SKILL.md (YAML frontmatter + markdown body) and optional references/, scripts/, templates/, and assets/. Hermes is explicitly compatible with this standard — skills you create locally can be published to the Skills Hub or shared with other tools that speak the same format. Official reference: Hermes Skills System docs.
Closed loop (5 stages)
┌─────────────┐ ┌──────────────┐ ┌─────────────────┐
│ User task │────▶│ Agent executes│────▶│ 5+ tool calls? │
│ (natural │ │ tools + code │ │ success? │
│ language) │ └──────────────┘ └────────┬────────┘
└─────────────┘ │ yes
▼
┌─────────────┐ ┌──────────────┐ ┌─────────────────┐
│ Next task: │◀────│ skill_manage │◀────│ Distill SKILL.md │
│ skills_list │ │ patch/improve│ │ ~/.hermes/skills/│
│ → skill_view│ └──────────────┘ └─────────────────┘
└─────────────┘
| Stage | What happens | Where it lives |
|---|---|---|
| 1. Execute | Agent completes a novel workflow | Session + workspace files |
| 2. Reflect | Decides if the path is reusable | Internal policy (complexity heuristics) |
| 3. Distill | skill_manage create writes SKILL.md |
~/.hermes/skills/<category>/<name>/ |
| 4. Retrieve | skills_list() → skill_view(name) |
Progressive disclosure (~3k token index) |
| 5. Improve | patch updates after errors or user corrections |
Same skill directory |
Upstream docs list explicit creation triggers: after a complex task (5+ tool calls) succeeds, when the agent found a working path after errors, when the user corrected approach, or when a non-trivial workflow was discovered (When the Agent Creates Skills).
Progressive disclosure: why the second run feels instant
Hermes does not inject every skill into context at startup. It uses levels documented in the Skills guide:
| Level | API / behavior | Token cost (order of magnitude) |
|---|---|---|
| 0 | skills_list() — name, description, category |
~3k tokens for full catalog |
| 1 | skill_view(name) — full SKILL.md |
Only when matched |
| 2 | skill_view(name, path) — reference file |
Surgical load |
So when you ask “build another landing page in the same glass style,” the agent matches design-glassmorphism-page (or your distilled name) from the index — milliseconds-scale local index lookup, not a full re-planning pass across six tools. You still pay for generation, but you stop paying to rediscover structure, heading rules, and CSS patterns. Stability improves because the procedure is file-backed, not hope-backed.
Case study: glassmorphism HTML landing page (5+ tools)
Imagine this task (realistic for frontend / marketing automation):
“Create a single-page HTML promo with H2/H3 sections, visionOS-inspired glass cards (backdrop-filter, soft borders), dark OLED background, and mobile-safe typography. Write files to my workspace.”
A successful first run might chain six or more tool calls, for example:
terminal— inspect workspace / createlanding/write_file—index.htmlskeleton with semantic H2/H3write_file—styles.csswith glass gradient tokensterminal— optional screenshot or validatorpatch— fix contrast orprefers-reduced-motionskill_managecreate— distill procedure
After completion, Hermes can write something logically named design-glassmorphism-page (directory ~/.hermes/skills/design/design-glassmorphism-page/SKILL.md). Your prompt said design_glassmorphism_page.md; on disk the canonical artifact is SKILL.md per agentskills.io — treat the .md name as the skill’s identity, not a random loose file in $HOME.
Excerpt shape (illustrative frontmatter):
---
name: design-glassmorphism-page
description: Build single-file HTML landings with visionOS-style glass sections (H2/H3, OLED dark, backdrop-filter).
version: 1.0.0
metadata:
hermes:
tags: [html, css, landing]
category: design
---
## When to Use
User asks for glass / visionOS-style marketing page with structured headings.
## Procedure
1. Scaffold index.html with one H1, ≥2 H2, nested H3 where needed.
2. Add styles.css: --glass-bg, backdrop-filter: blur(20px), 1px border rgba(255,255,255,0.12).
3. Verify contrast ≥ 4.5:1 on body text; add @media (prefers-reduced-motion: reduce).
...
Second request: “Use the previous style — new single page for product B.”
The agent calls skills_list(), matches glass / landing / HTML, runs skill_view("design-glassmorphism-page"), and executes the checklist. Same layout discipline, far fewer exploratory tool calls, lower variance.
ChatGPT-style agent vs Hermes procedural factory
| Dimension | ChatGPT / long system prompt | Generic open-source agent | Hermes + skill distillation |
|---|---|---|---|
| Memory of procedure | Session-only | Often none | ~/.hermes/skills/ files |
| Standard format | Proprietary | Ad hoc | agentskills.io SKILL.md |
| Trigger to learn | Manual “remember this” | Rare | 5+ tool calls, corrections, dead-end recovery |
| Load cost | Full prompt every time | Full prompt | Index ~3k tokens, drill-down on demand |
| Improvement | Re-paste rules | Manual docs | skill_manage patch |
| Portability | Locked to vendor | Varies | Hub install / publish |
Recommended path:
- If tasks are one-off Q&A → stay in chat; skills add little.
- If you repeat multi-step automations (deploy, reports, HTML factories) → install Hermes, let distillation run, curate skills with
hermes skills list. - If you need a visual three-column UI → add Hermes WebUI on the same
~/.hermesstate.
Runbook: install, provoke distillation, reuse a skill
Step 1 — Install Hermes Agent
curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash
hermes setup # model provider + API keys
Step 2 — Confirm skills directory
ls -la ~/.hermes/skills/
hermes chat --toolsets skills -q "What skills do you have?"
Bundled skills seed on install; agent-created skills appear under category subfolders.
Step 3 — Run a deliberately complex task
Use a real workspace path. Ask for a multi-file HTML/CSS deliverable (like the glass landing page). Aim for ≥5 tool calls so you hit the documented creation threshold.
Step 4 — Verify distillation
find ~/.hermes/skills -name 'SKILL.md' -newer ~/.hermes/config.yaml 2>/dev/null | head
hermes chat --toolsets skills -q "Show me the design-glassmorphism-page skill"
Or invoke directly: /design-glassmorphism-page if the skill name registered as a slash command.
Step 5 — Second run with short prompt
hermes chat -q "New single-page HTML for product B — same glass style as before."
Watch logs: expect skills_list early, then skill_view, then targeted write_file / patch — not a full rediscovery chain.
Step 6 — Curate and publish (optional)
hermes skills browse
hermes skills search landing --source skills-sh
hermes skills publish skills/my-skill --to github --repo owner/repo # when ready
Step 7 — Harden on an always-on host (optional)
Distilled skills persist on disk; the agent process should too. A dedicated Mac mini or small VPS keeps Gateway/cron alive. Remote ops: Mac mini M4 SSH guide — treat it as uptime for your factory.
Operational implications
- Back up
~/.hermes/skills/— this is your procedural IP; git-init the folder or snapshot nightly. - Review agent-created skills — read SKILL.md after distillation; add pitfalls the model missed.
- Use
patchoveredit— upstream recommendspatchfor token-efficient skill updates. - Separate profiles —
hermes profile create research --no-skillsfor experiments; default profile for production distillations. - Cross-tool skills —
skills.external_dirsin~/.hermes/config.yamlscans shared team skill repos (External Skill Directories).
Monitor success rate informally: if second-run tasks need fewer tool calls and hit fewer layout regressions, your factory is working.
Two factory scenarios where distillation pays off most often:
Scenario A — Frontend / landing-page pipeline
You ship one glassmorphism promo per week. Without skills, each page costs 15–25 tool calls (explore CSS, fix contrast, restructure headings). After distillation, runs often drop to 4–8 calls: list skills → load glass skill → write files → verify. The win is not “faster tokens” alone — it is repeatable structure (H2/H3 contract, CSS variables, motion fallbacks) your team can trust in CI or cron-driven builds.
Scenario B — DevOps / report automation
Nightly jobs chain terminal, log parsers, and Slack delivery. The first week is messy; the fifth night should not re-negotiate shell flags. Hermes records the winning script order in SKILL.md, then patches when a flag deprecates. Pair with Gateway cron (Hermes docs — scheduled automations) so the same skill runs headless while you sleep on a Mac mini or VPS — same ~/.hermes volume whether you use CLI or Hermes WebUI.
Troubleshooting
No new skill after a long task
Pattern: Task finished but ~/.hermes/skills/ unchanged.
Fix: Confirm ≥5 successful tool calls and outcome marked success; retry with an explicit “save this workflow as a skill.” Check toolset includes skills: hermes chat --toolsets skills. See Agent-Managed Skills.
Skill exists but agent ignores it
Pattern: Second run still improvises.
Fix: Short prompt must match trigger text in the skill’s “When to Use” section; run skill_view manually to verify description keywords; ensure skills_list isn’t opted out (hermes skills opt-in --sync).
skill_manage permission or path errors
Pattern: Permission denied under ~/.hermes/skills.
Fix: chmod -R u+rwX ~/.hermes/skills; on Docker mounts align UID/GID with Hermes WebUI volume docs.
Token usage still high
Pattern: Index loads but full skill always pulled.
Fix: Split reference material into references/ subfiles; use Level-2 skill_view(name, path) pattern in the SKILL body instructions.
FAQ
skill_manage after a successful complex workflow and write a reusable SKILL.md under ~/.hermes/skills/, following agentskills.io structure. Future tasks load that procedure instead of re-deriving steps from chat.~/.hermes/skills/<category>/<skill-name>/SKILL.md, plus optional references/, scripts/, templates/. Hub installs and bundles use the same tree.hermes skills browse, hermes skills install, and agentskills.io-compatible hubs. Agent-created skills coexist with bundled and hub skills; local names shadow external dirs.skills_list, ~3k tokens) and on-demand skill_view — not reloading the entire catalog into every turn. Latency is dominated by avoiding rediscovery, not magic sub-10ms generation.Conclusion
Hermes Agent skill distillation turns “I explained this once” into a procedural production line: agentskills.io-compatible files, a closed learning loop, and progressive disclosure so the second HTML factory run reuses design-glassmorphism-page instead of a megabyte prompt.
Install with hermes setup, run one genuinely hard task (5+ tools), inspect ~/.hermes/skills/, then issue a short follow-up prompt and measure tool-call count drop. Official docs: Skills System · GitHub — NousResearch/hermes-agent · agentskills.io.
Continue with official Hermes Skills resources
Skill distillation triggers, progressive disclosure levels, and skill_manage behavior are documented upstream. Use the Skills guide and GitHub repo when you install, audit, or publish procedures.