Skip to content
cccskills
FreePublished on GitHub

reasoning-sandwich

Template for pre-reasoning → action → post-verification model allocation

The English summary is being prepared. Showing the original description.

See how to install

Files included (1)

  • SKILL.md2.2 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Reasoning Sandwich Pattern

Purpose

A model allocation pattern that wraps implementation actions with stronger-model reasoning phases. The "sandwich" structure ensures complex tasks get proper analysis before and verification after the core action.

Pattern

[Pre-reasoning] → stronger model (opus)
  ├── Analyze requirements
  ├── Identify edge cases
  └── Define success criteria

[Action] → balanced model (sonnet)
  ├── Implement solution
  ├── Generate code/content
  └── Execute plan

[Post-verification] → balanced or lighter model (sonnet/haiku)
  ├── Verify against criteria
  ├── Check for regressions
  └── Validate completeness

Model Allocation Table

PhaseRecommended ModelRationale
Pre-reasoning (analyze/plan)opusComplex architectural reasoning, edge case detection
Action (implement/generate)sonnetOptimized for code generation, balanced cost
Post-verification (review/test)sonnet or haikuStructural verification, checklist validation

When to Apply

ScenarioApply Sandwich?Reason
New feature implementationYesNeeds analysis → code → verification
Bug fix with clear root causeNoDirect action sufficient
Architecture decisionYesHeavy pre-reasoning, lighter action
Batch file editsNoMechanical action, no reasoning needed
Security-sensitive changesYesExtra verification phase critical

Integration

This pattern is used by:

  • structured-dev-cycle — stages map to sandwich phases
  • evaluator-optimizer — generator/evaluator model selection guidance
  • deep-plan — research (pre) → plan (action) → verify (post)

Anti-patterns

Anti-patternProblemFix
Opus for everythingWasteful, slowReserve opus for reasoning-heavy phases
Haiku for planningInsufficient depthUse opus for complex analysis
Skipping verificationFalse completion riskAlways include post-verification phase

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Pre-action boundary checking — validates agent tool calls against declared capabilities and task contracts

The English summary is being prepared. Showing the original description.

baekenough/second-brain15Updated Oct 8, 2026

Auto-detect project context and optimize harness — deactivate unused agents/skills, suggest missing experts, generate project profile

The English summary is being prepared. Showing the original description.

baekenough/second-brain15Updated Oct 8, 2026

Adversarial code review using attacker mindset — trust boundary, attack surface, business logic, and defense evaluation

The English summary is being prepared. Showing the original description.

baekenough/second-brain15Updated Oct 8, 2026

Apache Airflow best practices for DAG authoring, testing, and production deployment

The English summary is being prepared. Showing the original description.

baekenough/second-brain15Updated Oct 8, 2026

Alembic migration patterns for naming conventions, safety checks, expand-contract, env.py configuration, and CI integration

The English summary is being prepared. Showing the original description.

baekenough/second-brain15Updated Oct 8, 2026

Pre-routing ambiguity analysis — scores request clarity and asks clarifying questions when needed (inspired by ouroboros)

The English summary is being prepared. Showing the original description.

baekenough/second-brain15Updated Oct 8, 2026

See all skills by baekenough

Report a problem with this skill