Vibe Coding Forem

Nick Porter
Nick Porter

Posted on

New fav claude CLI commands: /primer & /wrap-up

I have been weaving command into my daily workflow quite frequently lately! It all started when I realized I was repeating the same set of requests or questions to claude at specific intervals, the start of the conversation and when I was ready to wrap up and get all the lint and tests passing.

As an example of some of the things I would continuously ask claude to make sure they took care of were:

In The Start Of Conversations:

-use SPARC (see other article)
-make sure to prefer skills over grep
-write code cleanly the first time or you'll be forced to clean it up on pre-commit

At The End Of Conversations:

-ALL tests and lint warnings/errors HAVE to be fixed (sorry to caps out on ya there but I told claude this a whole lotta times!)
-really all the files that are yet to be committed ARE part of the work we did, so REALLY you have to clean ALL of them up
-that last attempt at eslint ignore is sus claude! go back and take your time QUALITY > SPEED

So in the middle of doing it again I stopped, opened a different claude and asked it to write our first command ...

/primer - Quality Engineering Mode Activation

Purpose: This command activates a structured workflow that prevents "jumping straight to code" - one of the
most common failure patterns in AI-assisted development. It's essentially a mental reset that enforces
disciplined engineering practices.

Intent: To ensure Claude (or any developer) follows the RESEARCH → PLAN → EXECUTE workflow instead of immediately implementing solutions without understanding the full context.

How It Works:

  1. Mindset Activation: Reminds the AI that it's working on a production app with real users, establishing core principles (Quality > Speed, Tested > Assumed, Verified > Guessed)
  2. Three-Phase Workflow:
    • Phase 1 (Research): Load memory files, consult relevant skills (specialized documentation), verify current state via git/console/database
    • Phase 2 (Plan): Choose appropriate scale (5-15 min bug fix vs 2-4 hour major feature), select TDD approach, present plan for approval
    • Phase 3 (Execute): Only proceeds after user approval - write tests first, implement, cleanup, run quality gates
  3. Anti-Pattern Prevention: Explicitly calls out common pitfalls like "The Grep Trap" (searching raw code instead of consulting curated knowledge) and "The Shortcut Temptation" (rushing after a few tasks)

Implementation Details:

  • Uses a memory system (.claude/memory/) for persistent context across sessions
  • Integrates with 16+ specialized "skills" (domain-specific guides)
  • Enforces Test-Driven Development via 3 path choices
  • Requires explicit user approval between phases (prevents autonomous runaway)

/wrap-up - Pre-Push Quality Verification

Purpose: A comprehensive pre-commit checklist that ensures nothing broken or undocumented makes it to the repository. Think of it as an automated "Did I forget anything?" system.

Intent: To enforce completion standards before code leaves the developer's machine - the "last 10%" that often gets skipped when rushing.

We have EXPLICIT documentation for claude that that LAST 10% is the MOST important 10% and no skipping is allowed!

How It Works:

  1. Inventory Phase: Runs git status to identify ALL modified files (staged, un-staged, and untracked)
  2. Autonomous Quality Gates (runs in background):
    • TypeScript type checking
    • ESLint validation (with strict rules against warnings in modified files)
    • Security audit (SQL injection, XSS, RLS policy checks)
    • Architecture review (React 19 compliance, Boy Scout Rule violations)
    • Test execution
  3. Memory System Updates (MANDATORY):
    • Session file: Documents what was done, problems encountered, solutions found, patterns established
    • Known-gotchas: ONLY for critical, cross-cutting production issues (with strict bloat prevention)
    • Common-patterns: ONLY for reusable cross-domain snippets (also bloat-protected)
    • Skills: Domain-specific learnings update relevant specialized guides
  4. Final Status Report: Presents a checklist-style summary with all quality gate results and files ready for commit

Implementation Details:

  • Quality gates run in parallel for speed (40s total vs 55s sequential)
  • Uses AI-powered code review (Haiku model) for pattern detection
  • Enforces strict documentation standards (prevents knowledge loss between sessions)
  • Includes bloat prevention mechanisms (session files vs shared memory)
  • Requires explicit user approval before committing (no autonomous commits)

The Killer Innovation: The memory update requirement ensures that learnings persist across AI sessions - solving the "every new Claude starts from zero" problem.

Let's show how I use 2 commands for this bug fix!

The Bug

You can see here a simple translation problem right, well, just open claude, hit /primer and explain the problem with a screen shot as shown here then let claude do the work.

When claude is done do /wrap-up. Claude will make sure you want to push the code up, but when your ready you just say 'push' and kick back!

Welp ... not quite so fast homie! Check out the repro ...

Ok no worries let's jsut show that to claude and let em do it's thing!

NOW we're ready for /wrap-up!

It learned how to flatten the intl json properly and documented it in /session (in another article!)

It ALSO updated the intl skill without me needing to ask it!

Now just tell it 'push'!

That's that, super friction free workflow!

Top comments (0)