hermes - ✅(Solved) Fix Feature request: eager-load flag for skills whose value depends on body content (e.g., browser-harness) [1 pull requests, 1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#14405Fetched 2026-04-24 06:17:28
View on GitHub
Comments
0
Participants
1
Timeline
5
Reactions
0
Participants
Timeline (top)
labeled ×4cross-referenced ×1

Root Cause

It fails silently for a different class: meta-skills whose value lives in the body or in content the body points to. Concrete example: browser-harness ships a SKILL.md + ~70 site-specific skills under domain-skills/. The main SKILL.md says "After cloning the repo, search domain-skills/ first for the domain you are working on." If the agent never loads the body (because the short description didn't trigger it for a site-specific task), that rule is never seen and the agent reinvents approaches already solved in the repo. Issue on the browser-harness side with full context: https://github.com/browser-use/browser-harness/issues/155.

Fix Action

Fixed

PR fix notes

PR #14432: feat(skills): support eager prompt injection

Description (problem / solution / changelog)

Closes #14405

Summary

  • add metadata.hermes.eager support so selected skills can inline their body into the base skills prompt
  • persist eager skill bodies in the skills prompt snapshot so cold-start and cached paths behave the same
  • add regression coverage for eager body injection and snapshot reuse in build_skills_system_prompt()

Testing

  • python3 -m pytest -o addopts= tests/agent/test_prompt_builder.py

Changed files

  • agent/prompt_builder.py (modified, +104/-14)
  • tests/agent/test_prompt_builder.py (modified, +64/-10)

Code Example

---
name: browser-harness
description: Direct browser control via CDP...
metadata:
  hermes:
    eager: true
---
RAW_BUFFERClick to expand / collapse

Problem

Hermes's skill loader is lazy by default — only name and description land in the system prompt; the body is read on-demand via skill_view(). Reasonable for tool-bundle skills where the description fully signals when the body is needed.

It fails silently for a different class: meta-skills whose value lives in the body or in content the body points to. Concrete example: browser-harness ships a SKILL.md + ~70 site-specific skills under domain-skills/. The main SKILL.md says "After cloning the repo, search domain-skills/ first for the domain you are working on." If the agent never loads the body (because the short description didn't trigger it for a site-specific task), that rule is never seen and the agent reinvents approaches already solved in the repo. Issue on the browser-harness side with full context: https://github.com/browser-use/browser-harness/issues/155.

Why a "just load everything" fix doesn't work

Hermes can't universally eager-load every skill's body — with many skills installed, full bodies would blow the system prompt budget. The right change is opt-in.

Proposed: eager frontmatter flag

Let a skill declare in its YAML frontmatter that its body must be in the default prompt:

---
name: browser-harness
description: Direct browser control via CDP...
metadata:
  hermes:
    eager: true
---

Minimal plumbing in build_skills_system_prompt (agent/prompt_builder.py:595):

  • Keep emitting the current - <name>: <description> lines for all skills (the menu stays).
  • For any skill where frontmatter.metadata.hermes.eager is truthy, also inline the body (or behind an <eager_skills> wrapper).

Lazy-load stays the default; meta-skills opt in.

Secondary issue (for awareness, not this PR)

The scanner requires files named literally SKILL.md with YAML frontmatter (agent/prompt_builder.py:678, tools/skills_tool.py:572). Skill repos with their own layout (e.g. browser-harness's domain-skills/<site>/scraping.md) can't be added to skills.external_dirs as-is. That's on the repos to adapt — but once eager: true exists, the "load one skill, the body tells the agent to scan a directory" pattern becomes viable again without external-dir support.

Code references verified against current checkout

  • build_skills_system_prompt — agent/prompt_builder.py:595
  • System-prompt emission line — agent/prompt_builder.py:786: index_lines.append(f" - {name}: {desc}")
  • Lazy-load instruction to the agent — agent/prompt_builder.py:792: "Before replying, scan the skills below. If a skill matches ... you MUST load it with skill_view(name)..."
  • Lazy-load entry point — agent/skill_commands.py:152: _load_skill_payload
  • SKILL.md-only scanner — agent/prompt_builder.py:678, tools/skills_tool.py:572

🤖 Filed with help from Claude Code — line references verified against the local Hermes checkout.

extent analysis

TL;DR

To fix the issue with meta-skills, add an eager frontmatter flag to the skill's YAML frontmatter to opt-in for eager loading of the skill's body.

Guidance

  • Identify meta-skills whose value lives in the body or in content the body points to, such as the browser-harness skill.
  • Add the eager frontmatter flag to the skill's YAML frontmatter, as shown in the proposed example: ```yaml

name: browser-harness description: Direct browser control via CDP... metadata: hermes: eager: true

* Update the `build_skills_system_prompt` function in `agent/prompt_builder.py` to inline the body of skills with the `eager` flag.
* Verify that the skill's body is loaded correctly by checking the system prompt for the presence of the skill's body.

## Example
```yaml
---
name: browser-harness
description: Direct browser control via CDP...
metadata:
  hermes:
    eager: true
---

This example shows how to add the eager frontmatter flag to a skill's YAML frontmatter.

Notes

The proposed solution only addresses the issue with meta-skills and does not affect the lazy loading of other skills. The eager flag is an opt-in solution, allowing skills to declare whether their body should be loaded eagerly.

Recommendation

Apply the workaround by adding the eager frontmatter flag to the skill's YAML frontmatter, as this allows meta-skills to opt-in for eager loading of their body without affecting the lazy loading of other skills.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - ✅(Solved) Fix Feature request: eager-load flag for skills whose value depends on body content (e.g., browser-harness) [1 pull requests, 1 participants]