Skip to content

skill: script-first-tool-batching - #2156

Closed
adamteale wants to merge 3 commits into
obra:mainfrom
adamteale:skill/script-first-tool-batching
Closed

skill: script-first-tool-batching#2156
adamteale wants to merge 3 commits into
obra:mainfrom
adamteale:skill/script-first-tool-batching

Conversation

@adamteale

@adamteale adamteale commented Aug 15, 2026

Copy link
Copy Markdown

Thinking Path

Analysed DeepSeek Harness (dsh, released 2026-08-13) and its Code Mode design — the observation that "LLMs are better at writing code than at emitting tool calls." Benchmarked the token cost of sequential tool calls vs script batching. Baseline-tested the skill with 8 live sessions (glm-5.3 + deepseek-v4-flash) per the writing-skills TDD methodology.

Implementation

New skill: skills/script-first-tool-batching/SKILL.md

Teaches models to go straight to scripting for batch operations rather than exploring first (ls/grep/wc) then scripting. The script's output IS the exploration — refine based on what it returns.

Baseline test results (8 sessions, 2 models)

Simple batch task (list dirs + extract first line of README): both glm-5.3 and flash naturally write a single bash for-loop without guidance. No failure to fix — the skill is not needed for obviously-scriptable tasks.

Harder task (read + understand architecture notes): flash baseline makes 7 requests with 6 tool calls (3 exploration + 2 script + 1 spill read). With skill guidance: 3 requests with 2 tool calls (script + refined script). −57% requests, −67% tool calls.

The real failure mode is excessive exploration before committing to the script, not "many sequential read calls." Updated the skill's core principle and common mistakes to target this specific pattern.

Notes

  • Complementary to the tool-result pruner extension (bounds what enters context; this skill avoids producing large results in the first place)
  • Skill follows the writing-skills format guide: verb-first name, "Use when..." description, <500 words
  • British English throughout

Teaches models to batch multi-step tool-call operations into a single
script instead of N sequential calls. Derived from DeepSeek Harness's
Code Mode analysis + benchmark evidence showing 80% prompt-token
reduction when intermediate results never enter context.
Baseline test (8 runs, glm-5.3 + flash): simple batch tasks are already
scripted naturally by both models. The real failure mode is excessive
exploration (ls/grep/wc) before committing to the script — 7 requests
baseline vs 3 with skill guidance (−57%). Updated core principle and
common mistakes to target this specific pattern.
@adamteale
adamteale marked this pull request as ready for review August 15, 2026 16:05
@obra

obra commented Aug 19, 2026

Copy link
Copy Markdown
Owner

Hi. Thanks so much for contributing this. I don't think this is currently a great fit for superpowers but you should absolutely be publishing your own skills.

@obra obra closed this Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants