Stop Pasting Documents into AI Chats Every Turn: Six Ways Tested to Cut Token Costs
The editorial team of IT Renkei Map measured how six ways of handing documents and instructions to AI coding agents change token[1] consumption: pasting into the chat every turn, pasting once and then referencing it, an external file, a SKILL[2], AGENTS.md[3] (CLAUDE.md in Claude Code), and a file-plus-SKILL combination. They ran Claude Code (subscription) with Claude Sonnet 5.5 and Antigravity CLI with Gemini 3.8 Flash; conversations lasted 10 turns for short texts and 5 turns for a long text, and input cost was converted at official prices. The biggest cost factor was re-pasting: pasting the material again every turn cost 136% more than pasting once and referencing it in Claude Code, 83% more with Antigravity's Claude on short texts, and 173% more with Gemini on the long text, so simply stopping the re-pasting cut input cost by 58% and 63%. Instructions in AGENTS.md stayed near the paste-once baseline (−5% to +6%), while SKILL and external files cost the same or more because the agent reads them back and resends their content; in Antigravity's runs with the file method the agent re-read article.md every turn and per-turn input was 1.3–3.4 times the baseline.
A prompt cache[4] reads cheaply only the part that matches the start of a previous request, so re-pasted material is billed as new input and is then sent with every following turn; in Antigravity's Claude short-text runs, re-pasting added 3,457 tokens per turn against 929 for referencing. In Claude Code the re-pasting method cost 2.4 times the baseline, with most of its input cost coming from cache writes (84% versus 75% for the baseline), and in Gemini's long-text runs it reached 2.7 times. The recommended placement order is: common rules in AGENTS.md, procedures for specific tasks in SKILL, working materials in files, and one-off instructions in the prompt, referencing earlier material by title rather than 'the earlier text'. Four rules protect the cache mid-conversation: reference documents by title; start a new conversation after editing instruction files, since CLAUDE.md and AGENTS.md load only once at the start (edits take effect after /clear, /compact or a new conversation); keep single inputs above the cache minimums of 512 tokens for Claude Sonnet 5.5 and 4,096 tokens for Gemini 3.8 Flash's implicit cache (Gemini inputs of 17,459 tokens or fewer never hit the cache in the test); and mind the lifetimes of 1 hour with a Claude Code subscription and 5 minutes via API key or cloud. In measurements, Claude Code still read from cache after a 58-minute pause and lost it at 61 minutes, while in Antigravity Claude's cache cut off after 6 minutes and Gemini's after 12. The one reversal came in Gemini's short conversations, where pasting twice was cheapest because the single-input methods stayed under the 19,492 tokens needed for cache use — a coincidence the authors say is not an argument for pasting twice.
Sources
-
JPQiita JA
AI に資料を毎回貼るな!ファイル・SKILL・AGENTS.md 活用でトークン課金最大 6 割減? 6 つの方法を試してみた


