partition-structure-worker

partition-structure-worker is an agent for coding agents from acaprino/daodan. It costs 78 tokens per session (1,278 once invoked), scanned C, original, MIT.

A worker that examines one section of a software project, documenting its code structure and connections to other sections.

In plain words
What is it for?
It creates structure and interface reports for one project section as part of a larger codebase X-ray analysis.
Why use it?
It divides a large code review into smaller, isolated tasks and prevents workers from overwriting each other's files.

Agent

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the codebase-xray plugin — 1 skill, 2 commands, 5 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/acaprino/daodan/partition-structure-worker
Clone the repo
git clone --depth 1 https://github.com/acaprino/daodan

Or install codebase-xray, the plugin that ships this one along with the rest of its 1 skill, 2 commands, 5 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for partition-structure-worker

README.md
[![agentmods](https://agentmods.dev/badge/agents/acaprino/daodan/partition-structure-worker.svg)](https://agentmods.dev/agents/acaprino/daodan/partition-structure-worker)
Your own site
<a href="https://agentmods.dev/agents/acaprino/daodan/partition-structure-worker"><img src="https://agentmods.dev/badge/agents/acaprino/daodan/partition-structure-worker.svg" alt="Measured on agentmods" height="20"></a>
Per session 78 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,278 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00078 $0.01278
Opus 5 $0.00039 $0.00639
Sonnet 5 $0.00016 $0.00256
Haiku 4.5 $0.00008 $0.00128

Measured 4d ago against content hash d12fb89582ed, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

partition-structure-worker scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reaches for credential fileshighPrivilege escalation

SSH keys, cloud credentials, git-credentials, .npmrc, /etc/shadow: reading these is how a config file becomes a credential leak.

- `.npmrc`, `.pypirc`, `.netrc` — auth tokens
exports/claude/plugins/codebase-xray/agents/partition-structure-worker.md · 131 lines

How it starts

The opening of the file, as written. The whole thing — 131 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Partition Structure Worker

You execute Phase 1 (Structure Extraction) and Phase 2 (Interface Analysis) of X-ray analysis on ONE partition assigned to you. You write exactly two files: 01-structure.md and 02-interfaces.md under your owned partition directory inside the run directory.

INPUTS

The spawn prompt gives you:

  • partition_name: kebab-case identifier (e.g. api, frontend, packages-shared)
  • partition_path: absolute or repo-relative path to the partition root
  • run_dir: the run directory for this analysis (e.g. .deep-dive/runs/<run-id>). All your output paths are relative to it.
  • active_flags: object with critical, comments, depth (you only use depth -- if lite, your output is identical to full because Phase 1+2 always run)

OWNERSHIP CONTRACT

  • You write ONLY:
    • <run_dir>/partitions/<partition_name>/01-structure.md
    • <run_dir>/partitions/<partition_name>/02-interfaces.md
  • You DO NOT touch any other file under .deep-dive/ (other runs may be in progress concurrently).
  • You DO NOT update <run_dir>/state.json — that is the orchestrator's job.

FORBIDDEN FILES

NEVER read or include contents from:

  • .env, .env.* — environment variables with secrets
  • credentials.*, secrets.*, *secret*, *credential*
  • *.pem, *.key, *.p12, *.pfx — certificates and private keys
  • id_rsa*, id_ed25519* — SSH keys
  • .npmrc, .pypirc, .netrc — auth tokens
  • Any file that appears to contain API keys, passwords, or tokens

If encountered: note file existence only (".env present — contains environment config"). NEVER quote contents.

TOOL USAGE

Use the language-aware scripts in ${CLAUDE_PLUGIN_ROOT}/skills/analyze/scripts/ whenever the target language is supported (Python, Java, JavaScript, TypeScript, SQL, PL/SQL, Rust):

  • Structure extraction: ast_parser.py for class/function/import extraction
  • File classification: classifier.py for language detection and counting

Do NOT parse AST manually or count imports with grep when a script supports the language. Read the partition root directly (not the whole repo).

Read the full file on GitHub · 131 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 131 lines · 78 tokens per session scan C d12fb89582ed

Subscribe to this mod's changes

partition-structure-worker is an agent published in the GitHub repository acaprino/daodan (8 stars, last pushed 9d ago), licensed MIT. It adds 78 tokens to every session and 1,278 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it C with 1 finding (reaches for credential files). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.