E

Efficient Prime

A command template for utilities workflows. Streamlines development with pre-configured patterns and best practices.

CommandClipticsutilitiesv1.0.0MIT
0 views0 copies

Efficient Prime

Prime Claude's context with your project's codebase structure, key files, and recent changes so it can work more effectively on all subsequent tasks in the session.

When to Use This Command

Run this command when...

  • You are starting a new Claude Code session and want maximum effectiveness from the first prompt
  • Your project is large and Claude needs to understand the directory layout and key entry points
  • You want Claude to be aware of recent git changes that affect the current work

Avoid this command when...

  • You have already loaded context through other means earlier in this session
  • You are working on an isolated file that has no project-level dependencies

Quick Start

# .claude/commands/efficient-prime.md --- allowed-tools: ["Bash", "Read", "Glob", "Grep"] --- Read project structure, key configuration files, and recent git history. Build a mental model of the codebase for subsequent tasks.

Example usage:

/efficient-prime

Example output:

Priming Complete
================
Project: e-commerce-api (Node.js + Express + PostgreSQL)
Key Files:
  - src/server.ts (entry point)
  - src/routes/index.ts (route registry)
  - prisma/schema.prisma (database schema)

Recent Changes (last 5 commits):
  - Add pagination to product listing
  - Fix cart total calculation
  - Update Prisma to v5.8

Active Branch: feature/order-history
Ahead of main by: 3 commits

Ready for your next task.

Core Concepts

ConceptDescription
Structure scanMaps the directory tree and identifies key entry points
Config parsingReads package.json, tsconfig, .env.example for tech stack info
Git awarenessLoads recent commits, current branch, and uncommitted diff summary
Entry point detectionFinds main files, route registries, and database schemas
Project Root --> List Structure --> Identify Key Files
                                         |
                              Read Configurations
                                         |
                              Load Git Context
                                         |
                              Primed & Ready

Configuration

OptionDefaultDescription
depth3Directory tree depth to scan
history5Number of recent commits to include
include-difftrueInclude a summary of current uncommitted changes
key-filesautoOverride auto-detected key files with explicit paths
verbosefalseShow every file scanned during priming

Best Practices

  1. Prime once per session -- repeated priming wastes tokens without adding new information.
  2. Customize key files -- if auto-detection misses important files, list them explicitly.
  3. Include recent history -- recent commits help Claude understand what work is actively in progress.
  4. Use before complex tasks -- priming pays off most for multi-file changes and large refactors.
  5. Combine with CLAUDE.md -- priming automatically reads CLAUDE.md if present, so keep it current.

Common Issues

  1. Priming takes too long -- reduce depth and history count for very large monorepos.
  2. Key files missed -- add them to the key-files config list or mention them in CLAUDE.md.
  3. Token limit reached -- very large projects may exceed context limits. Reduce scan depth or exclude large generated directories.
Community

Reviews

Write a review

No reviews yet. Be the first to review this template!

Similar Templates