init

A project-setup command that examines a codebase and creates a CLAUDE.md file with facts and working rules specific to that project.

In plain words
What is it for?
Use it when starting work in an existing or new codebase and you want documented guidance generated from the project's files.
Why use it?
It gives the coding agent project-specific context, such as architecture, conventions, and build commands, instead of relying on generic assumptions.

Command

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 commands/joncik91/ucai/init
Clone the repo
git clone --depth 1 https://github.com/Joncik91/ucai
Per session 12 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,453 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.00012 $0.01453
Opus 5 $0.00006 $0.00727
Sonnet 5 $0.00002 $0.00291
Haiku 4.5 $0.00001 $0.00145

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

Security

Grade A, and why

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 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.

commands/init.md · 148 lines

How it starts

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

Project Initialization

You are setting up a project to work effectively with Claude Code. Your goal is to analyze the codebase and generate accurate, useful project guidelines — not a framework config dump.

Core Principle

CLAUDE.md should contain project facts that Claude doesn't already know: conventions, architecture decisions, build commands, and patterns specific to this codebase. Nothing generic.

Skill Loading — MANDATORY

Before starting Phase 2A, you MUST load the ucai:architect skill — project initialization is architecture analysis work.

  1. Load the skill using the Skill tool: Skill(ucai:architect)
  2. If the project is clearly a specific domain (backend API, frontend app, etc.), also load the matching skill: Skill(ucai:backend), Skill(ucai:frontend), etc.
  3. Apply the skill's guidance when analyzing the project and drafting CLAUDE.md

You MUST load at least one skill before proceeding. State which skill(s) you loaded and why.


Phase 1: Detection (MANDATORY — do this BEFORE anything else)

Goal: Determine whether this is an existing project or an empty/new one.

Project path: $ARGUMENTS (default: current directory)

Actions:

  1. Create a todo list to track progress
  2. Check for .claude/project.md. If found, read it — this provides project vision, tech stack, and constraints as context for analysis.
  3. Use Glob to search for source code files: **/*.{js,ts,jsx,tsx,py,go,rs,java,rb,php,cs,cpp,c,swift,kt} and package manifests: {package.json,pyproject.toml,Cargo.toml,go.mod,Gemfile,composer.json,*.csproj,pom.xml,build.gradle}
  4. Decision gate — you MUST follow this strictly:
    • If zero source code files AND zero package manifests are found → go to Phase 2B (do NOT launch scanners)
    • If source code or package manifests exist → go to Phase 2A

IMPORTANT: Do NOT launch project-scanner agents on an empty project. They will waste tokens scanning nothing.


Phase 2A: Analysis (Existing Project)

Read the full file on GitHub · 148 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 · 148 lines · 12 tokens per session scan A ca37454f55e6

Subscribe to this mod's changes

init is a command published in the GitHub repository Joncik91/ucai (29 stars, last pushed 6d ago), licensed MIT. It adds 12 tokens to every session and 1,453 once invoked, about $0.0001 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-30.