Skip to content

oprogramadorreal/optimus-claude / skills/init

Bootstraps a project for Claude Code or Codex — generates routed project guidance from detected structure, reconciles existing docs, and offers test infrastructure. Claude Code can also install formatter hooks. Writes .claude/, CLAUDE.md, AGENTS.md and subproject docs/; may append to README/.gitignore and, with approval, install dev dependencies. Preserves existing guidance through review and recorded ownership. Use for initial setup or upgrades.

templates/docs/coding-guidelines.md

View on GitHub
# Coding principles for [PROJECT NAME]

> Optimus baseline. Keep project-specific rules here or in a routed project guide.

## Follow existing patterns

Write code that reads like the code around it — match the architecture, naming, and idiom already there. Prefer the framework and the standard library over a new dependency or a hand-rolled equivalent. A different approach has to be a clear improvement, and applied consistently rather than left as a second style in the same codebase.

## Scope discipline

Only change what the task requires. Don't improve adjacent code, add docstrings to untouched functions, or reformat files you are passing through. A bug fix does not need surrounding cleanup, and a one-shot operation rarely needs a helper. Remove code your change strands; leave code you merely walked past for its own change.

## Build what is required

Default to the simplest design that meets current requirements. No speculative abstractions, no configurability, no error handling beyond what correctness and security actually need, no half-finished implementations. When you control every call site, change them directly rather than adding a compatibility shim or a feature flag; for a published API with external consumers, follow the project's deprecation policy.

## Abstraction

Extract an abstraction when it removes real duplication, separates concerns that are already tangled, or makes something testable — not for symmetry, and not in anticipation of reuse. Deep nesting and long functions are evidence to weigh, not a trigger. When simplicity and decomposition pull against each other, the tiebreak is which version a reader understands faster. Aim for high cohesion, low coupling, and few side effects; evolve a pattern when the codebase has outgrown it, deliberately rather than speculatively.

## Validate at trust boundaries

Validate untrusted input — user input, external APIs, deserialization, and your own public API surface. Within a trust domain, rely on internal code and framework guarantees instead of guarding against states that cannot occur. Complexity that exists to satisfy a security or correctness requirement is not over-engineering.

## Names and comments

Names carry purpose and domain meaning, scaled to scope: short for short-lived locals, descriptive for module-level and public symbols. Avoid placeholders like `data`, `info`, or `temp` that send the reader elsewhere for context. Comment non-obvious intent and tradeoffs; don't narrate what the code already says.
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 321kUpdated Claude CodeCodexVerifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 321kUpdated Claude CodeCodexVerifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 321kUpdated Claude CodeCodexVerifiedInstall
skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.Stars: 197kUpdated Claude CodeCodexVerifiedInstall