You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[ ]**Sub-skills**: Keep the main prompt as a short execution plan; move detailed playbooks/output layouts into `## skill:` blocks the agent invokes only when needed
17
18
-[ ]**Prompt size**: Strip redundant instructions, examples, and pleasantries from the prompt body
18
19
-[ ]**Dynamic context**: Inject only required fields — `${{ github.event.issue.number }}` not the full event payload
19
20
-[ ]**Pull context on demand**: query logs/data only after a hypothesis forms; avoid preloading large raw dumps into the initial prompt
@@ -264,6 +265,16 @@ Nothing else.
264
265
265
266
**Why this saves tokens:** sub-agents run on the cheap `small` model; the main agent only reads compact `{"number":…, "category":…}` JSON; sub-agent dispatches can run in parallel.
266
267
268
+
### Pair sub-agents with sub-skills (progressive disclosure)
269
+
270
+
Use sub-skills as progressive disclosure for instruction-heavy tasks:
271
+
272
+
- Keep the main prompt short and plan-like (what to do, in what order).
273
+
- Put verbose instructions (report layout, rubric details, long formatting constraints) into `## skill:` blocks.
274
+
- Invoke those skills only at the moment they are needed (for example, when producing final output), so early planning/execution turns stay lean.
275
+
276
+
This pattern lowers ambient context and usually improves both latency and AIC by delaying expensive instruction payloads until the final phase.
Copy file name to clipboardExpand all lines: docs/src/content/docs/reference/cost-management.md
+9-1Lines changed: 9 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -476,7 +476,15 @@ See [Inline Sub-Agents](/gh-aw/reference/inline-sub-agents/) for the full syntax
476
476
477
477
### Use Inline Skills to Reduce Context
478
478
479
-
Move large instruction blocks out of the main prompt body using inline skills. At runtime, each `## skill:` block is extracted and written to engine-specific skill locations — the agent can invoke the skill on demand instead of receiving the guidance upfront, keeping the ambient context slim:
479
+
Move large instruction blocks out of the main prompt body using inline skills. At runtime, each `## skill:` block is extracted and written to engine-specific skill locations — the agent can invoke the skill on demand instead of receiving the guidance upfront, keeping the ambient context slim.
480
+
481
+
Treat the main prompt as an execution plan and sub-skills as deferred detail:
482
+
483
+
- Main prompt: concise plan, sequencing, and decision points.
484
+
- Sub-skills: verbose checklists, report templates/layout rules, and domain rubrics.
485
+
- Invoke sub-skills only when needed (for example, at final report generation), not at startup.
486
+
487
+
This progressive-disclosure pattern keeps early turns focused and reduces per-run token overhead:
0 commit comments