File of the day
A Claude Code subagent that collects data and leaves the conclusions to you
Slava Sazhin 26 September 2026 2 min read 0 views
A Claude Code subagent that runs queries, appends each result with its source to a shared file and answers in a line or two. Conclusions stay with you.
Today's file is a subagent for Claude Code that collects data and does nothing else. Ask the main session to check a database, a log and two APIs, and every row it reads stays in its context, while the rows it decided did not matter never reach you. The data scout runs the queries, puts everything into a file and leaves the reading to you or to the session that called it.
How it works
The prompt that calls it names the queries and a file path. The scout appends what it gets to that file and answers with one or two lines of status, so the main session gets the status and the file holds the data. Every number in the file carries its source: the query, the address or the command. What it could not get goes in as a separate line with the reason, never as a guess.
It only appends, so several scouts can write to one run file. It appends with a quoted heredoc, cat >> FILE <<'EOF': without the quotes the shell turns $1200 in the data into 200 and runs any $(...) that came with it. Instructions it finds inside the data, such as a line on a web page, go into the file as text and are not followed.
What it will not do
Its prompt forbids picking what matters, conclusions, advice, code, editing any file but the one it was given, and changes in production. It has no Edit or Write tool, but it needs Bash to append to the file, which makes read only a rule in its prompt rather than a lock. If it works against a production database, give it a database user that can only read.
What to change
Ours runs on opus with effort: high. Put your own model and effort level in those two lines. In the tools line keep only what collection needs: a scout that only queries your own database does not need WebSearch and WebFetch.
Install
One file goes into ~/.claude/agents/, then restart Claude Code. The note below has a three-step check: find data-scout after @, ask it to count the files in a folder, and see the number and the command in the file.
The files
Files of the day are for paying subscribers: any plan opens every one. Already subscribed? Then sign in.
See the plansWas this article worth your time?
Read next
File of the day
A Claude Code command that sifts your notes into a knowledge base every night
A Claude Code command reads the notes of the last day at night and adds to your knowledge base what will still matter in three months. It deletes nothing.
File of the day
A Claude Code hook that lets read-only commands run without asking
A PreToolUse hook that lets Claude Code run grep, cat, ls and git log without a permission prompt and leaves every other command to you. One script.
Context Will Not Create Itself
The bank asked for its annual KYB. Why the agent uploaded the documents rather than me, and why it writes a diary entry after every task.
Give Claude a computer of its own
Your own Linux machine with Claude Code on it, working around the clock while your laptop is shut. From $3.49 a month.