agentleFS
sunitghubsunitghub/canon-skills/skills/bulk-read/SKILL.md

bulk-read

Skill9 starsChanged 22 days agoMITView on GitHub

Size-gated citation-only reading for large files — checks line count, reads directly under the threshold, dispatches a fresh-context Haiku subagent that returns only file:line citations over it. Use when exploring/understanding a large file (not editing it) in any sprint tier, not just high-risk orient research.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use only the subagent's returned citations: Never ask the subagent to paste back raw file content, and never follow up by reading the file …

    line 38
  2. Distinctive:

    A vague question produces a vague citation set: If the subagent's answer doesn't actually resolve what you needed, that's a sign the …

    line 62

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Bulk Read

Portable, advisory alternative to a hard read-size block. Canon installs zero Claude Code hooks — see Gotchas — so this skill cannot mechanically prevent a large direct Read the way a PreToolUse hook could. It generalizes skills/sprint/reference/orient.md's citation-only subagent pattern into a single-file primitive usable from any tier, not just high-risk orient.

When to use

You're about to read a file to understand or research it — trace a caller, learn a pattern, answer "what does X do" — and the file might be large. Not for a file you are about to edit: Edit needs the real, direct Read; editing and reasoning are not delegable to a subagent that never actually holds the content.

Steps

  1. Check size. wc -l <file> — plain POSIX, works identically in macOS Terminal and Windows Git Bash. No GNU-only flags, no PowerShell, no uuidgen-class Windows pitfalls.
  2. Under 300 lines (default threshold, adjustable): just Read it directly. Delegation has a real round-trip cost (dispatch + subagent turnaround); routing a small file wastes more than it saves — mirrors the same tradeoff skills/sprint/reference/orient.md's own dispatch step accepts for small subsystems.
  3. 300+ lines, exploratory read: dispatch one fresh-context subagent (Agent tool, model: haiku — same tier as explore in AGENTS.md's Model Tiers) with:
    • The file path (forward slashes — never a Windows-style backslash path in the prompt).
    • The specific question you need answered (not "summarize this file" — a targeted question keeps the subagent's own read purposeful and its citations relevant).
    • Instruction: read the file, answer the question, and cite every claim as file:line — \quoted text`— the same citation contractorient.md` already uses. Return text only; do not write files.
  4. Use only the subagent's returned citations. Never ask the subagent to paste back raw file content, and never follow up by reading the file yourself unless its answer is insufficient — that would defeat the entire point.

What this does and doesn't guarantee

This is advisory instruction, not mechanical enforcement. Nothing stops a direct Read of a 900-line file if you (or a future session) skip this skill — there is no hook blocking that call. This is a deliberate tradeoff, not an oversight: canon installs zero Claude Code hooks, an incident-driven, repeatedly-reaffirmed decision (DECISIONS.md — hooks removed after none proved load-bearing, one destroyed a user's settings.json; a later hook-based design was explicitly rejected for colliding with this rule). A PreToolUse size-gate hook would also be Claude-Code-only — silently absent under Codex — which conflicts with canon's cross-harness portability goal more than the advisory gap here does. If canon's zero-hooks stance changes, revisit this tradeoff; until then, this skill is the portable alternative, not a guarantee.

Gotchas

  • Codex per-agent model selection needs a custom agent file. The Haiku dispatch in step 3 is confirmed working under Claude Code. Under Codex, the generic spawn_agent call has no model field, but a named custom subagent defined in ~/.codex/agents/*.toml can set its own model, overriding agents.default_subagent_model — don't assume the cost savings hold under Codex without setting up and testing such an agent file live (same caveat canon's own AGENTS.md carries under ## Model Tiers: canon internals, not copied to projects, for explore).
  • A vague question produces a vague citation set. If the subagent's answer doesn't actually resolve what you needed, that's a sign the question was under-specified, not that this skill failed — re-dispatch with a sharper question rather than falling back to a direct Read.
  • 300 is a default, not a law. Adjust up or down for a specific file/task if you have a concrete reason (e.g. a 280-line file that's mostly boilerplate imports is fine to read directly; a dense 250-line file might be worth routing anyway). Don't treat the number as load-bearing precision.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.