hermaeuswaelon/fl33t/hermes-internals-patching
Claude Code and agent skill by hermaeuswaelon/fl33t
- community
- ext:[{"type":"plugin","description":"Custom plugin integration"}]
Checking that the SKILL.md file is still in the repository.
Modify Hermes agent internals (delegate_tool.py, context_compressor.py, conversation_loop.py, etc.) to extend functionality, fix bugs, or add features without waiting for upstream releases.
Install
npx vskill@latest install hermaeuswaelon/fl33t/hermes-internals-patchingSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as hermaeuswaelon/fl33t/hermes-internals-patching.
Hermes Internals Patching
Guide to safely modifying Hermes Agent's Python source code for customization, bug fixes, and feature additions.
Safety Rules
- Always read the full method/function before editing. Use
read_filewith offsets to understand the full scope. - Use `patch` tool (not sed/heredoc) for targeted edits. It runs syntax checks automatically.
- After patching, verify with a lint check (the patch tool does this) and a quick functional test.
- Never change `context_window_size` — the user's 128K parent / 32K delegate caps are intentional.
- Cross-profile guard —
write_fileandpatchto another profile's skills/plugins/cron/memories will be blocked unlesscross_profile=Trueis explicitly passed.
Common Patch Targets
| File | Purpose | Risk | |
|---|---|---|---|
/opt/hermes-agent/tools/delegate_tool.py | Subagent delegation, _build_child_agent method | Medium — affects all subagents | |
/opt/hermes-agent/agent/context_compressor.py | Context window gating, compression thresholds | High — can cause infinite loops if once-only flags missing | |
/opt/hermes-agent/agent/conversation_loop.py | Main conversation loop, gate firing logic | High — controls all agent turns | |
/opt/hermes-agent/hermes_cli/config.py | Config schema and defaults | Medium — affects config parsing |
Known Patches Applied
See references/ for session-specific patch details.
Technique: request_overrides Plumbing
delegation.request_overrides from config.yaml does NOT automatically flow to child subagents. The _build_child_agent method in delegate_tool.py builds _child_request_overrides but doesn't consult the delegation config. To fix:
- Read
delegate_tool.pyaround line 1300-1330 to find the AIAgent call - After
_child_request_overrides = build_child_request_overrides(...), insert:
``python if delegation_config and delegation_config.get("request_overrides"): for k, v in delegation_config["request_overrides"].items(): if k not in _child_request_overrides: _child_request_overrides[k] = v ``
- Then pass it as
request_overrides=_child_request_overridesto AIAgent constructor
Technique: Once-Only Gate Flags
To prevent infinite compression loops in the gated context system, add _has_fired_tier1 / _has_fired_tier1_5 / _has_fired_tier2 flags to context_compressor.py and a _gate_has_fired flag to conversation_loop.py. These are booleans that prevent the same gate tier from firing more than once per session.
Verification
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingprofile/skills/hermes-agent/hermes-internals-patching/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Extension points
pluginCustom plugin integration
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/hermaeuswaelon/fl33t/hermes-internals-patching)