prepare

prepare is a command for Claude Code from catlog22/Claude-Code-Workflow. It costs 25 tokens per session (1,834 once invoked), scanned A, original, MIT.

A read-only command that asks another command-line AI agent to inspect a project and return a compact, structured summary for later work.

In plain words
What is it for?
Use it before a task when the agent needs to understand the project, such as preparing an authentication feature, refactoring a payment API, or investigating a database query.
Why use it?
It gives the main coding agent project context without changing files or filling its memory with every detail.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions CLAUDE.md; mentions Gemini CLI.

Good fit Use it before a task when the agent needs to understand the project, such as preparing an authentication feature, refactoring a payment API, or investigating a database query.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/catlog22/claude-code-workflow/prepare
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.

Clone the repo
git clone --depth 1 https://github.com/catlog22/Claude-Code-Workflow

Made for: Claude Code.

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 prepare

README.md
[![agentmods](https://agentmods.dev/badge/commands/catlog22/claude-code-workflow/prepare/github.svg)](https://agentmods.dev/commands/catlog22/claude-code-workflow/prepare)
Your own site
<a href="https://agentmods.dev/commands/catlog22/claude-code-workflow/prepare"><img src="https://agentmods.dev/badge/commands/catlog22/claude-code-workflow/prepare/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for prepare

Your own site · 80×15
<a href="https://agentmods.dev/commands/catlog22/claude-code-workflow/prepare"><img src="https://agentmods.dev/badge/commands/catlog22/claude-code-workflow/prepare.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 25 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,834 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00025 $0.01834
Opus 5.5 $0.00010 $0.00734
Sonnet 5.5 $0.00005 $0.00367
Haiku 4.5 $0.00003 $0.00183

Measured 3mo ago against content hash 0d55f5c9739a, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

prepare 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 3mo 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.

.claude/commands/memory/prepare.md · 241 lines

How it starts

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

Memory Prepare Command (/memory:prepare)

1. Overview

The memory:prepare command delegates to a universal-executor agent to analyze the project and return a structured "Core Content Pack". This pack is loaded into the main thread's memory, providing essential context for subsequent agent operations while minimizing token consumption.

Core Philosophy:

  • Agent-Driven: Fully delegates execution to universal-executor agent
  • Read-Only Analysis: Does not modify code, only extracts context
  • Structured Output: Returns standardized JSON content package
  • Memory Optimization: Package loaded directly into main thread memory
  • Token Efficiency: CLI analysis executed within agent to save tokens

2. Parameters

  • "task context description" (Required): Task description to guide context extraction

    • Example: "在当前前端基础上开发用户认证功能"
    • Example: "重构支付模块API"
    • Example: "修复数据库查询性能问题"
  • --tool <gemini|qwen> (Optional): Specify CLI tool for agent to use (default: gemini)

    • gemini: Large context window, suitable for complex project analysis
    • qwen: Alternative to Gemini with similar capabilities

3. Agent-Driven Execution Flow

The command fully delegates to universal-executor agent, which autonomously:

  1. Analyzes Project Structure: Executes get_modules_by_depth.sh to understand architecture
  2. Loads Documentation: Reads CLAUDE.md, README.md and other key docs
  3. Extracts Keywords: Derives core keywords from task description
  4. Discovers Files: Uses CodexLens MCP or rg/find to locate relevant files
  5. CLI Deep Analysis: Executes Gemini/Qwen CLI for deep context analysis
  6. Generates Content Package: Returns structured JSON core content package

4. Core Content Package Structure

Output Format - Loaded into main thread memory for subsequent use:

{
  "task_context": "在当前前端基础上开发用户认证功能",
  "keywords": ["前端", "用户", "认证", "auth", "login"],
  "project_summary": {
    "architecture": "TypeScript + React frontend with Vite build system",
    "tech_stack": ["React", "TypeScript", "Vite", "TailwindCSS"],
    "key_patterns": [
      "State management via Context API",
      "Functional components with Hooks pattern",
      "API calls encapsulated in custom hooks"
    ]
  },
  "relevant_files": [
    {
      "path": "src/components/Auth/LoginForm.tsx",
      "relevance": "Existing login form component",
      "priority": "high"
    },
    {
      "path": "src/contexts/AuthContext.tsx",
      "relevance": "Authentication state management context",
      "priority": "high"
    },
    {
      "path": "CLAUDE.md",
      "relevance": "Project development standards",
      "priority": "high"
    }
  ],
  "integration_points": [
    "Must integrate with existing AuthContext",
    "Follow component organization pattern: src/components/[Feature]/",
    "API calls should use src/hooks/useApi.ts wrapper"
  ],
  "constraints": [
    "Maintain backward compatibility",
    "Follow TypeScript strict mode",
    "Use existing UI component library"
  ]
}

Read the full file on GitHub · 241 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. 3mo ago First seen · 241 lines · 25 tokens per session scan A 0d55f5c9739a

Subscribe to this mod's changes

prepare is a command published in the GitHub repository catlog22/Claude-Code-Workflow (2,110 stars, last pushed 5mo ago), licensed MIT. It adds 25 tokens to every session and 1,834 once invoked, about $0.0001 per session on Opus 5.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.

Related

prepare compared with commands from other repositories

prepare next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
preparecatlog22/Claude-Code-WorkflowCommand2.1k5mo agoMITA25Claude Code
verify-claimjamditis/mooc-starter-kitCommand112mo agononeA20Claude Code
beat-briefjamditis/mooc-starter-kitCommand112mo agononeA13Claude Code
cross-reviewjamditis/mooc-starter-kitCommand112mo agononeC20Claude Code
initfcakyon/claude-codex-settingsCommand1.2ktodayApache-2.0A0Claude Code
skill-refreshneo4j-contrib/neo4j-skillsCommand1226d agoMITA0Claude Code, GitHub Copilot
claude-requestverivus-oss/llm-cli-gatewayCommand197d agoMITA14Claude Code