A skill catalog is useful when the agent needs to discover a workflow. The timing matters when the user already picked one. If the instructions arrive through a tool call, the first model request still has to decide to make that call from the catalog and the user's message alone.
AIClaw v3.12.13 gives an explicit selection a different path. This behavior ships in the tagged release, and the source links below point to that version.
Put the selected instructions in the first request
Imagine a mounted skill named release-check and a request like “$release-check summarize these changes.” The relevant instructions can shape the model's first response or tool choice. There is no prerequisite load_skill round trip for the excerpt. If the user just asks for a summary, the model can discover an applicable skill from the catalog and call load_skill as needed.
The kernel matches complete $skill-name references against mounted skills. It appends the selected text to the outgoing request in memory. The stored user message keeps its original text. A retry after context compaction can still carry the selection, and the next turn starts with fresh selection state. See the request assembly and skill prompt code.
Give the catalog its own budget
The catalog uses an estimated budget of up to 2,000 tokens, reduced to 2% of the configured context window when that yields a smaller budget. AIClaw shortens descriptions to retain more names. If names alone exceed the budget, it can omit entries. An exact reference to a mounted skill still works even if the catalog leaves it out.
Selected text has a separate limit of 8 KiB per skill excerpt and 32 KiB across selected blocks. An excerpt shortened by the byte limit directs the model to load_skill for more detail. These are prompt assembly limits. The catalog uses a token estimate, and supplying instructions gives no guarantee that a model will follow them.
What the tests establish
The kernel regressions inspect requests captured by a test model. They cover first-request inclusion, turn scoping, a compaction retry, catalog limits, and UTF-8 truncation. Those checks establish what the kernel sends. They do not measure live-model instruction following, latency, or provider token usage.
Top comments (0)