feat(skills): stacked slash-skill invocations — /skill-a /skill-b do XYZ (#57987)

Inspired by Claude Code v2.1.199 (July 2, 2026): stacked slash-skill
invocations load all leading skills (up to 5), not just the first.

- agent/skill_commands.py: split_stacked_skill_commands() consumes leading
  /skill tokens (stops at the first non-skill token so slash-path arguments
  are never swallowed); build_stacked_skill_invocation_message() composes
  the multi-skill turn reusing the existing bundle scaffolding markers so
  extract_user_instruction_from_skill_message() keeps memory providers
  storing the user's instruction, not N skill bodies.
- cli.py + gateway/run.py: dispatch the stacked path on both surfaces.
- 11 new tests + docs section in skills.md.
This commit is contained in:
Teknium 2026-07-05 02:20:01 -07:00 committed by GitHub
parent 30479961b8
commit 9767e19b60
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 363 additions and 7 deletions

View file

@ -62,6 +62,26 @@ Every installed skill is automatically available as a slash command:
/excalidraw
```
### Stacking multiple skills in one command
You can invoke several skills in a single message by chaining slash commands
at the start — every leading `/skill` token (up to 5) is loaded, and the rest
becomes your instruction:
```bash
/github-pr-workflow /test-driven-development fix issue #123 and open a PR
```
Parsing stops at the first token that isn't an installed skill, so arguments
that happen to start with `/` (like file paths) are never swallowed:
```bash
/ocr-and-documents /tmp/scan.pdf extract the tables # loads one skill; /tmp/scan.pdf is the argument
```
For combinations you use repeatedly, prefer a [skill bundle](#skill-bundles) —
same effect under one short command.
The bundled `plan` skill is a good example. Running `/plan [request]` loads the skill's instructions, telling Hermes to inspect context if needed, write a markdown implementation plan instead of executing the task, and save the result under `.hermes/plans/` relative to the active workspace/backend working directory.
You can also interact with skills through natural conversation: