batch-init

An automation for finding software projects whose documentation is missing or out of date, then initializing those documents in batches. A batch is a group processed together, with no more than three projects handled at once.

In plain words
What is it for?
Use it to initialize or refresh documentation across projects listed in projects-list.md, using the configured document name and agent command.
Why use it?
It removes the need to inspect and update every project document manually.

Cursor rule

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 rules/jasonchen0604/codebase-to-portfolio/batch-init
Clone the repo
git clone --depth 1 https://github.com/jasonChen0604/codebase-to-portfolio
Per session 54 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 875 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00054 $0.00875
Opus 5 $0.00027 $0.00438
Sonnet 5 $0.00011 $0.00175
Haiku 4.5 $0.00005 $0.00088

Measured yesterday against content hash 8f4f84a25d07, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

batch-init scanned grade A with 0 findings 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 yesterday.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

adapters/cursor/batch-init.mdc · 68 lines

How it starts

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

Batch Init Skill

Goal

Find valid projects in projects-list.md that need their project doc initialized or updated, run the init-project-doc skill in parallel (max 3 per batch), and update projects-list.md after each batch completes.

Step 0: Read config

Read profile.config.json from the current working directory. If missing, tell the user to copy examples/profile.config.example.json to profile.config.json and fill it in, then stop.

  • doc_filename (default CLAUDE.md)
  • agent_command — the shell command template used to run init-project-doc non-interactively in a project directory. Default: claude --dangerously-skip-permissions -p "/init-project-doc". Other CLIs can be substituted, e.g. codex exec "/init-project-doc" (see docs/installation.md for per-tool examples). This flag skips interactive permission/trust prompts — only use it in directories you trust.

Execution Steps

Step 1: Get the latest version number

Run the /get-latest-version skill to get the version string to use as the "latest version" baseline.

  • Return format is a string (e.g. "2.0")
  • If none is returned, all projects with a doc file are treated as "outdated"

Step 2: Filter candidate projects

From the table in projects-list.md, filter rows that satisfy all of the following:

  1. "Active" column is ✅ (skip ❌)
  2. Matches at least one of:
    • Doc-file column is ❌ (not yet initialized)
    • Doc-file column is ✅ but "Version" column is not the latest (including )

Sort by table order, take the first N (default N=5; user can specify in prompt, e.g. "batch init 3").

Step 3: Run init-project-doc in parallel (max 3 per batch)

Split candidate projects into batches of max 3, run within each batch in parallel, batches run sequentially:

cd <project path> && <agent_command>
  • <project path> is the "Path" column value from the table; expand ~ to $HOME
  • Issue all 3 commands in the same batch simultaneously via Bash tool with run_in_background: true, then wait for all to complete
  • After each batch finishes, read each project's <doc_filename> frontmatter to get skill_version, then proceed to the next batch

Read the full file on GitHub · 68 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. yesterday First seen · 68 lines · 54 tokens per session scan A 8f4f84a25d07

Subscribe to this mod's changes

batch-init is a cursor rule published in the GitHub repository jasonChen0604/codebase-to-portfolio (2 stars, last pushed 1mo ago), licensed MIT. It adds 54 tokens to every session and 875 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.