Get the FREE Ultimate OpenClaw Setup Guide →

optimus-prime

npx machina-cli add skill Vibe-Builders/claude-prime/optimus-prime --openclaw
Files (1)
SKILL.md
3.6 KB

Ultrathink.

Role

You are a project configurator. Analyze the codebase and configure Claude to work effectively with it.

Context Assessment

Before starting, check:

  • .claude/rules/ has path-scoped files besides _apply-all.md? → Ask if user wants to reconfigure (_apply-all.md is a boilerplate default and should not be touched)
  • .claude/project/ exists? → Ask if user wants to reconfigure
  • ./CLAUDE.md exists? → Ask if user wants to regenerate

Wait for user confirmation before proceeding.

Quick Start

  1. Analyze project codebase (patterns, stack, conventions)
  2. Copy matching starter skills from .claude/starter-skills/ to .claude/skills/, adapt generic parts
  3. Create skills for uncovered stacks via /touch-skill
  4. Create .claude/project/ with on-demand references
  5. Identify .claude/rules/ path-scoped guardrails (if any — rules are optional)
  6. Generate ./CLAUDE.md entry point
  7. Delete .claude/starter-skills/ (starters have been processed)

Core Philosophy

  1. Three-layer system — Skills (framework knowledge) + Rules (guardrails, auto-attach) + Project references (on-demand context)
  2. Context-aware placement — Auto-attach only what prevents wrong code; everything else is on-demand
  3. LLM-driven analysis — Claude explores codebase, not scripts
  4. Leverage existing tools — Use /touch-skill + docs-seeker for skill generation

Decision Matrix

DetectedWhereRule Test
General framework/librarySkill via /touch-skill
Project-specific constraint (wrong code even with skill).claude/rules/ with paths:"With the relevant skill activated, will code still be wrong without this?" → Yes
Architecture, structure, domain context.claude/project/

Rules are optional. "Important" ≠ "must auto-attach." Only create rules for things skills can't cover.

Red flags that something is NOT a rule:

  • Applies to all files (**/*.swift, **/*.ts) → probably general knowledge, belongs in skill
  • A skill already teaches this pattern → redundant, don't duplicate
  • It's a language/framework feature, not a project decision → skill

Output Structure

./CLAUDE.md                       # Entry point
.claude/rules/
└── <name>.md                     # Path-scoped guardrails (auto-attached)
.claude/project/
└── *.md                          # On-demand references (architecture, structure)

Constraints

  • Rule files must be concise — guardrails only, not documentation
  • Rules auto-attach: do NOT reference them in CLAUDE.md
  • Project references go to .claude/project/ and ARE referenced in CLAUDE.md
  • Show what will be created before creating
  • Ask for confirmation at gates

References

ReferenceContent
analysis-checklist.mdWhat to look for in projects
claude-md-template.mdCLAUDE.md format guide

Workflows

  • Full Setup — Complete project setup flow (default workflow)

Templates

  • templates/CLAUDE.template.md — CLAUDE.md starter

Additional Context (Optional)

<user-context>$ARGUMENTS</user-context>

Source

git clone https://github.com/Vibe-Builders/claude-prime/blob/main/.claude/skills/optimus-prime/SKILL.mdView on GitHub

Overview

Optimus-prime analyzes the codebase to tailor Claude for a given project. It detects conventions and stack, decides which skills to create, and generates CLAUDE.md entry points with project-specific rules.

How This Skill Works

The role acts as a project configurator: it examines the repository for patterns, stack, and conventions, checks for existing .claude/rules, .claude/project, and CLAUDE.md, and then copies matching starter skills from .claude/starter-skills/. It creates or updates project-specific rules and CLAUDE.md, then prompts for confirmation before applying any changes.

When to Use It

  • Starting a new project and configuring Claude for that repository
  • Introducing a new tech stack or framework into an existing project
  • Reconfiguring Claude when project conventions or architecture change
  • Regenerating CLAUDE.md entry points after major refactors
  • Preparing to deploy or hand over a repository with project-specific guardrails

Quick Start

  1. Step 1: Analyze the project codebase (patterns, stack, and conventions)
  2. Step 2: Copy matching starter skills from .claude/starter-skills/ to .claude/skills/ and adapt
  3. Step 3: Generate CLAUDE.md entry point, create .claude/project/ if needed, and review before applying

Best Practices

  • Ask for user confirmation at each gate before making changes
  • Do not touch _apply-all.md inside .claude/rules (keep boilerplate safe)
  • Reuse and adapt matching starter-skills from .claude/starter-skills/ rather than building from scratch
  • Create rules only for gaps that skills cannot cover; avoid over-attachment
  • Document exactly what will be created and shown to the user before proceeding

Example Use Cases

  • Configure Claude for a React + Node API project to auto-attach relevant rules and generate CLAUDE.md
  • Set up Claude for a Django + PostgreSQL backend with REST endpoints and project-specific guardrails
  • Add a new microservice in a polyrepo and generate per-service CLAUDE.md and rules
  • Migrate an in-house monorepo to per-project context with .claude/project references
  • Regenerate CLAUDE.md after major refactor to reflect new conventions and stacks

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers