initialize

An onboarding command that creates the required project-mapping structure and records onboarding progress.

In plain words
What is it for?
Run it first when setting up project onboarding and mapping the codebase.
Why use it?
It establishes the files and status information that later onboarding steps depend on, while leaving existing code unchanged.

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/goranerhartic/backend-onboarding/initialize
Clone the repo
git clone --depth 1 https://github.com/GoranErhartic/backend-onboarding
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,361 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.00015 $0.03361
Opus 5 $0.00008 $0.01681
Sonnet 5 $0.00003 $0.00672
Haiku 4.5 $0.00002 $0.00336

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

Security

Grade A, and why

initialize 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/initialize.md · 260 lines

How it starts

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

Initialize the onboarding structure and perform initial project mapping. This command must be run first before any other onboarding steps. All other steps will check for these files and return an error if initialization hasn't been completed. DO NOT MODIFY ANY EXISTING CODE.

CRITICAL - Parallel Execution & File Writes:

  • All file writes MUST be written directly to disk using file write tools (not staged/suggested edits).
  • When updating .cursor/onboarding-docs/CURSOR-ONBOARDING.md, ALWAYS re-read the file first to get the latest state from any parallel sessions.
  • If changes are staged and not applied, other parallel sessions will not see them and may overwrite work.
  • Each step marks itself as [P] (in progress) at the start to prevent duplicate execution.

EXECUTION PLAN:

  1. Mark Command as In Progress [P]:

    • Check if .cursor/onboarding-docs/CURSOR-ONBOARDING.md exists.
    • If it exists:
      • Read it to get the current Step Completion Status.
      • Update the Step Completion Status section to mark "Initialize Onboarding" as [P] (in progress).
      • Write the updated content back to .cursor/onboarding-docs/CURSOR-ONBOARDING.md.
    • If it doesn't exist: This will be created in step 6 with [P] status.
  2. Initialize Directory Structure:

    • Check if .cursor/onboarding-docs directory exists. If not, create it.
    • This directory will hold all onboarding documentation.
  3. Map File Tree:

    • If .cursor/onboarding-docs/PROJECT_MAP.txt already exists and is not empty: Read it first to check if mapping is already complete. If it appears complete, you may skip this step or update it.
    • Use list_dir tool recursively to explore the project structure.
    • Start from the workspace root and explore up to 5 levels deep.
    • Use glob_file_search to find files while excluding common directories:
      • Ignore: .git/, node_modules/, .venv/, venv/, dist/, build/, .cursor/onboarding-docs/, .next/, __pycache__/, bin/, obj/
    • Build a structured file tree representation and save it to .cursor/onboarding-docs/PROJECT_MAP.txt.
    • Format: Use indentation or tree structure (e.g., ├── or ) to show hierarchy.
    • Note: This can be run multiple times safely - it will update the mapping.
  4. Initial Analysis (Stack Discovery):

    • Read the PROJECT_MAP.txt to understand the project structure.
    • Identify and read dependency management files using glob_file_search or read_file:
      • .csproj, .sln (C#/.NET)
      • package.json, yarn.lock, pnpm-lock.yaml (Node.js)
      • pom.xml, build.gradle (Java)
      • go.mod, go.sum (Go)
      • pyproject.toml, requirements.txt, setup.py, Pipfile (Python)
      • Cargo.toml, Cargo.lock (Rust)
      • composer.json (PHP)
      • Gemfile, Gemfile.lock (Ruby)
      • build.sbt (Scala)
    • If no dependency files are found: Use codebase_search with query: "What programming language and framework is this project using?" to infer stack from source files.
    • Do not read other source code files at this stage unless dependency files are missing.
    • Determine the tech stack based on files found (e.g., "C# .NET Core 8.0 Web API with Entity Framework Core").
    • Extract key metadata for AI reference:
      • Primary language and version
      • Main framework(s) and versions
      • Key libraries/dependencies (top 5-10 most important)
      • Build system (MSBuild, npm, Maven, etc.)
      • Runtime requirements (.NET version, Node version, Python version, etc.)

3a. Detect Event-Driven Architecture Usage: * Determine whether the project leverages an event-driven/pub-sub model before later steps run: - Use codebase_search queries such as: - "Where are events published or emitted?" - "What message brokers or queues are used?" - "How are topics, queues, or streams defined?" - Use grep to scan for messaging keywords: - Publish|Subscribe|EventBus|EventEmitter|emit\(|on\(|topic|queue|Kafka|RabbitMQ|SQS|SNS|PubSub|NATS|EventBridge|Azure Service Bus - Review configuration files (docker-compose, infrastructure IaC, etc.) for broker references. * If clear signals exist: - Set detected to true. - Capture supporting evidence (file paths, services, broker names). * If no signals were found: set detected to false. * Write .cursor/onboarding-docs/EVENT_DRIVEN_STATUS.json: json { "detected": true|false, "evidence": ["path or identifier", "..."], "notes": "Short summary (e.g., 'Kafka producer in infra/kafka.ts')" } - Replace placeholders with actual findings (use empty list/string when unknown). * Update .cursor/onboarding-docs/CURSOR-ONBOARDING.md ## Event-Driven Architecture section (created below) with: - Detected: Yes/No - Signals: brief comma-separated hints - Next Step: instruct to run /onboarding/analyze-event-driven-architecture if detected.

Read the full file on GitHub · 260 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 · 260 lines · 15 tokens per session scan A a782ad64c7ea

Subscribe to this mod's changes

initialize is a command published in the GitHub repository GoranErhartic/backend-onboarding (11 stars, last pushed 9mo ago), licensed MIT. It adds 15 tokens to every session and 3,361 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.