Repository navigation
agent: list available skills in the system prompt - #457
Merged
BaaRai merged 1 commit intoNov 22, 2026
Merged
Conversation
The Skill tool's description carries the skill listing, but a description is only read once the model decides to open the tool: on a live run with 36 skills assigned the agent invoked Skill zero times across 485 trace records, hunting every class with raw Bash. Put the names where every turn already looks, with the rule to invoke the matching skill before hunting a class. Names-only, bounded at 1200 bytes, empty for skill-less agents (prompt stays byte-identical). The index rides the same seam as FindingGuidance, so the cached-prefix path keeps its two segments byte-identical to the unsplit prompt.
Owner
|
Thanks @NikolayGusev-astra. Merged. The names-only index reaches the system prompt for every agent path, stays bounded, and the split-prefix test keeps the cached prefix byte-identical. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
An agent's skills reach it only as text inside the
Skilltool's description (Registry.listing()). A tool description is read when the model decides to open that tool — and a model that hunts with raw Bash never does.Measured, not theorised: a run against a live target with 36 skills assigned to the agent recorded zero
Skillinvocations across 485 trace records. The agent probed every class by hand while 36 playbooks sat unread in one tool description. The same agent, given the skill names as a task constraint, invoked the matching skill within minutes (pentest-injection-classes,web-authz-testing) — so the mechanism works, it just needs to be in the prompt rather than behind a tool call.Changes
DeferredInfo.SkillIndex+SkillIndexBlock(names): renders the agent's skill names as a system-prompt block with the rule to invoke the matching skill before hunting a class. Names only (the descriptions stay in the tool), sorted, capped at 1200 bytes with(+N more, all listed in the Skill tool).deferredSystemappends it next toFindingGuidance;assembleWorkerSystem's cached-prefix path appends it in the same order, so the split prompt stays byte-identical to the unsplit one.server/assembly.gofills it from the registry it already builds for the Skill meta-tool.Verification
agent/skill_index_test.go: names+rule, empty case, cap cuts on a name boundary, index reaches the system prompt, and the split/unsplit prompts stay byte-identical.SkillIndexwiring removed, the index tests fail (index never reaches the prompt); restored, they pass.go test ./agent/ -count=1withARTEX_PG_DSNon a local PostgreSQL — ok.go build ./...,gofmt -l agent/ server/clean.Alternative considered
Skill-RAG — inject only the top-N skills matching the intent, mirroring
ARTEX_TOOL_RAG. Better precision, but it needs a matcher and it can hide the right skill when the intent wording misses. The index is the cheap half and stays correct under any matcher, so it can be the fallback layer if you want RAG on top.Both this and #453/#455 come from the same live run against a real target.