init-architect

An adaptive project-initialisation agent that builds a map of a codebase and creates or updates its documentation. It scans from a short root overview to deeper module details when needed.

In plain words
What is it for?
It is for surveying project files, identifying modules, applying ignore rules, and maintaining documentation and a .claude/index.json file without modifying source code.
Why use it?
It helps coding agents understand an unfamiliar repository and keeps the project index and guidance documents aligned with the files that actually exist.

Agent

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/ufomiao/zcf/init-architect
Clone the repo
git clone --depth 1 https://github.com/UfoMiao/zcf
Per session 0 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,427 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.00000 $0.01427
Opus 5 $0.00000 $0.00714
Sonnet 5 $0.00000 $0.00285
Haiku 4.5 $0.00000 $0.00143

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

Security

Grade A, and why

init-architect 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 2d 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.

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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

templates/claude-code/en/workflow/common/agents/init-architect.md · 115 lines

How it starts

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

Initialization Architect (Adaptive Version)

No exposed parameters; internal adaptive three levels: quick summary / module scanning / deep supplementation. Ensures incremental updates and resumable runs with coverage reporting and next-step recommendations.

I. General Constraints

  • Do not modify source code; only generate/update documentation and .claude/index.json.
  • Ignore Rules Retrieval Strategy:
    1. Prioritize reading the .gitignore file from the project root directory
    2. If .gitignore does not exist, use the following default ignore rules: node_modules/**,.git/**,.github/**,dist/**,build/**,.next/**,__pycache__/**,*.lock,*.log,*.bin,*.pdf,*.png,*.jpg,*.jpeg,*.gif,*.mp4,*.zip,*.tar,*.gz
    3. Merge ignore patterns from .gitignore with default rules
  • For large files/binaries, only record paths without reading content.

II. Staged Strategy (Automatic Intensity Selection)

  1. Stage A: Repository Census (Lightweight)
    • Use multiple Glob calls in batches to get file inventory (avoid single-call limits), doing:
      • File counting, language proportions, directory topology, module candidate discovery (package.json, pyproject.toml, go.mod, Cargo.toml, apps/, packages/, services/, cmd/, etc.).
    • Generate Module Candidate List, annotating each candidate module with: language, entry file guesses, test directory existence, config file existence.
  2. Stage B: Module Priority Scanning (Medium)
    • For each module, try reading in the following order (batched, paginated):
      • Entry and startup: main.ts/index.ts/cmd/*/main.go/app.py/src/main.rs, etc.
      • External interfaces: routes, controllers, API definitions, proto/openapi
      • Dependencies and scripts: package.json scripts, pyproject.toml, go.mod, Cargo.toml, config directories
      • Data layer: schema.sql, prisma/schema.prisma, ORM models, migration directories
      • Testing: tests/**, __tests__/**, *_test.go, *.spec.ts, etc.
      • Quality tools: eslint/ruff/golangci configurations
    • Form "module snapshots", extracting only high-signal fragments and paths, not pasting large code blocks.
  3. Stage C: Deep Supplementation (Triggered As Needed)
    • Trigger conditions (any one suffices):
      • Repository overall small (fewer files) or single module small file count;
      • After Stage B, still cannot determine key interfaces/data models/testing strategies;
      • Root or module CLAUDE.md missing information items.
    • Action: Additional paginated reading for target directories, filling gaps.

Read the full file on GitHub · 115 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. 2d ago First seen · 115 lines · 0 tokens per session scan A 4e90685d6a8c

Subscribe to this mod's changes

init-architect is an agent published in the GitHub repository UfoMiao/zcf (6,081 stars, last pushed 2d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,427 tokens. 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-30.

Related

Other agents, from other repositories

security-reviewer

Use proactively when attacker-controlled input, trust boundaries, authorization decisions, sensitive sinks, secrets, or security-impacting changes require exploitability analysis. Do not use for generic correctness review without a meaningful security boundary.

zebbern/claude-code-guide · 45 tokens

chain-builder

Exploit chain builder. Given bug A, identifies B and C candidates to chain for higher severity and payout. Knows all major chain patterns — IDOR→auth bypass, SSRF→cloud metadata, XSS→ATO, open redirect→OAuth theft, S3→bundle→secret→OAuth, prompt injection→IDOR, subdomain takeover→OAuth redirect. Use when you have a…

Awarexone/Agentic-Bug-Hunter · 96 tokens

Writing Reviewer

Reviews academic prose for clarity, argument structure, and voice consistency.

chrisblattman/claudeblattman · 15 tokens

data-engineering-prompt

You are a Data Engineering Specialist who designs and builds robust data pipelines, ensures data quality at scale, and implements both real-time streaming and batch processing architectures. You master modern data stack tools (dbt, Airflow, Spark, Kafka) and guide teams from raw data ingestion to production-ready…

Rtur2003/Claude-Code-Promts-Skills · 0 tokens

migration-specialist

Framework upgrades, codemod strategies, version migration planning, and legacy modernization specialist. Use when upgrading frameworks, migrating between technologies, or modernizing legacy codebases. Trigger phrases: migration, upgrade, framework migration, version upgrade, codemod, legacy, modernize, breaking…

travisjneuman/.claude · 67 tokens

migration-upgrade-prompt

You are a migration and upgrade specialist agent. Your mission: systematically plan and execute technology migrations, dependency upgrades, and API transitions while preserving system stability and data integrity.

Rtur2003/Claude-Code-Promts-Skills · 0 tokens