Foundations Module 4 · Cheat Sheets

Vibe Coding Reference

What you'll learn

~12 min
  • Understand what vibe coding means and when it's appropriate
  • Activate planning mode in each CLI tool
  • Know the safety spectrum from throwaway prototypes to production code
  • Set up project memory files so the AI remembers your conventions

By the end of this lesson, you will have a reference for every power feature across the four CLI tools we teach — planning modes, autonomous modes, thinking levels, context management, and project memory. Bookmark this page and come back whenever you need to look something up.

💡How to use this cheat sheet

Bookmark this page. These commands and modes are your toolkit — copy them into your terminal when you need them. Come back whenever you need a quick reference.

This is a reference page — you'll use it later

This cheat sheet covers commands you’ll learn in Module 6 (CLI tool setup) and Module 7 (Git). If you’re working through the course in order, bookmark this page now and return after Module 7. The commands below won’t work until you’ve installed your tools and initialized Git.

Already set up? Use this as your daily reference.

What is vibe coding?

Andrej Karpathy coined the term in February 2025: “fully give in to the vibes, forget that the code even exists.” You describe what you want, the AI writes the code, and you accept the results based on whether the output feels right — without necessarily reading every line.

Simon Willison drew an important distinction: vibe coding is for throwaway prototypes where you do not review the code. Vibe engineering is for production work where you are accountable for every line the AI writes.

Both are valid

Vibe coding a weekend prototype? Go fast, skip the review. Building something your team or users depend on? Slow down, read the code, test it properly. The tools and modes below support both workflows — the difference is how much you review and how much autonomy you grant.

Tool modes at a glance

Every CLI tool has at least two operating modes. This table shows the big picture.

Tool Modes at a Glance

How each CLI tool handles interaction, planning, and autonomy

ToolInteractive (default)Planning modeAutonomous mode
Claude CodeDefault conversationShift+Tab or /plan-d (alias for --dangerously-skip-permissions)
Gemini CLIDefault conversationShift+Tab or /plan (ON by default)--yolo (auto-enables sandbox)
Codex CLISuggest modeExplicit prompt (“plan this first”)--full-auto
Copilot CLIAgent mode (agentic)Shift+Tab--allow-all-tools
Version note

Tool behavior and commands evolve between releases. If a command doesn’t work as shown, run <tool> --help or /help to check your installed version. Not all commands exist in all versions.

Planning modes

Planning modes let the AI analyze your project and propose a strategy before making any changes. Think of it as “read-only thinking.”

Planning Modes

How to activate read-only analysis in each tool

ToolHow to activateWhat happensHow to exit
Claude CodeShift+Tab or type /planAI reads files and proposes a plan; no edits until you approveShift+Tab again to toggle back
Gemini CLIShift+Tab or type /plan (ON by default)AI outlines steps and waits for confirmationShift+Tab to toggle back, or say “go ahead”
Codex CLIAsk it: “Plan your approach first”AI describes intended changes before making themApprove the plan
Copilot CLIShift+TabAI proposes changes without applying themShift+Tab to toggle back
TRY ITYou want Claude Code to analyze your project and propose a plan before editing anything. What do you type?
$

Autonomous / YOLO modes

These modes let the AI execute tasks with minimal or no confirmation. Useful for speed; risky if you are not careful.

Autonomous Modes

Maximum-speed execution with minimal confirmation

ToolCommandSafety netWhat it skips
Claude Codeclaude -dNone — full accessFile edit confirmations, command approvals
Gemini CLIgemini --yoloTypically auto-enables Docker sandbox (when configured)File and command confirmations
Codex CLIcodex --full-autoOS-enforced sandbox (typically no network, file isolation)All confirmations
Copilot CLIcopilot --allow-all-toolsAsks before destructive commandsMost edit confirmations
Autonomous modes are power tools

A chainsaw is useful but dangerous. Autonomous modes are the same. Use them for throwaway prototypes, learning experiments, and sandboxed environments. Never use them near important data you have not backed up. Even for throwaway work, at least run the code in an isolated folder and quickly scan for destructive commands.

When NOT to vibe code
  • Code that handles PII (personally identifiable information), financial data, or credentials
  • Production deployments or anything users depend on
  • Security-sensitive logic (authentication, authorization, encryption)
  • Code that runs with elevated privileges (sudo, admin, root)
  • Anything your team, employer, or agency holds you accountable for

In these cases, switch to plan mode, review diffs carefully, and test before shipping.

🧬In Your Field: Biotechclick to expand

Never run autonomous modes near research data. A single misplaced rm -rf in YOLO mode can wipe out months of sequencing results. If you want to experiment with autonomous features, create a fresh directory first: mkdir experiment && cd experiment. Keep your data directories separate and backed up. Always run git init and git commit -m "pre-AI" before activating YOLO mode so you can easily revert destructive changes.

🏛️In Your Field: Government / State Devclick to expand

Never run autonomous modes near PII (personally identifiable information) or production systems. Government data has legal protections. Use autonomous modes only in isolated development environments with synthetic test data. If your agency has a sandbox environment, use it.

Thinking and effort levels

Some tools let you control how deeply the AI thinks before responding. Higher effort = slower but more thorough.

Thinking & Effort Levels

Controlling how deeply the AI reasons

ToolCommandLevelsWhen to use
Claude Code/effortlow · medium · high · maxLow for quick edits, high/max for architecture
Gemini CLIThinking mode (enabled by default)On/off via settingsDisable for simple tasks to save time
Codex CLIModel selection at startVaries by modelChoose model based on task complexity
💡Match effort to task

Asking the AI to “rename this variable” does not need max effort. Asking it to “redesign the authentication system” does. Adjusting effort saves time on simple tasks and improves quality on hard ones.

Context management

As conversations get long, the AI can lose track of earlier details. These commands help you manage the conversation window.

Context Management

Keeping conversations focused and efficient

CommandToolWhat it does
/compactClaude CodeCondenses conversation history, keeping key context
/clearClaude Code, Gemini CLIWipes conversation and starts fresh
/costClaude CodeShows token usage and cost for the current session
/modelClaude Code, Gemini CLISwitch to a different model mid-session
/modeCodex CLISwitch autonomy level mid-session
/initClaude CodeGenerate a CLAUDE.md project memory file
TRY ITYour Claude Code conversation is getting long and responses are getting less accurate. What command condenses the history without losing key context?
$

Real Session Workflow

This is the rhythm experienced practitioners actually follow — not one-shot commands, but a cycle of thinking and building:

Session Lifecycle

The practical cycle for real work

StepWhat you doKey commands
1. LaunchStart Claude Code in your project directoryclaude (careful work) or claude -d (prototyping)
2. OrientEnter plan mode, describe what you’re building, get a recommended approachShift+Tab or /plan
3. BuildExit plan mode, tell Claude to start with the first component, review as it buildsShift+Tab to toggle back
4. CheckpointCommit working state before moving to the next piecegit add -A && git commit -m "checkpoint"
5. Manage contextCondense when the session gets long; clear when switching tasks/compact or /clear
6. RepeatBack to plan mode for the next pieceOrient → Build → Checkpoint → Manage

The mode dance: The back-and-forth between plan mode and execute mode IS the skill. You think in plan mode, build in execute mode, checkpoint with git, and repeat. When context gets stale, /compact preserves key decisions. When you’re starting a completely new task, /clear gives you a fresh start — but commit first.

Why -d for prototyping: claude -d (short for --dangerously-skip-permissions) removes the confirmation prompts so you can move fast on throwaway work. Use claude (without the flag) for anything you care about keeping.

Describe, don’t command: “I need a contact form with validation” beats “create a file called form.html with an input element.” Give context and intent — let Claude figure out the implementation.

Project memory files

Project memory files tell the AI about your project’s conventions, preferences, and structure before you say anything. They persist across sessions. The files below are commonly used conventions in this course — check each tool’s documentation for which files are officially auto-read vs. manually referenced.

Project Memory Files

Persistent instructions the AI reads automatically

FileToolWhat to put in it
CLAUDE.mdClaude CodeProject overview, coding conventions, key paths, preferences
.github/copilot-instructions.mdGitHub CopilotCoding standards, architecture notes, naming conventions
GEMINI.mdGemini CLIProject context, style preferences, domain-specific notes
AGENTS.mdCodex CLIProject overview, conventions, what to avoid
💡Start with /init

In Claude Code, type /init and the AI will read your project and generate a CLAUDE.md file automatically. It is the fastest way to get started with project memory. Review the generated file and edit it to match your preferences.

📊In Your Field: MIS / Businessclick to expand

Put your business conventions in memory files. If your department uses specific naming conventions (camelCase for API fields, snake_case for database columns), date formats (ISO 8601 vs MM/DD/YYYY), or reporting standards, add them to your project memory file. The AI will follow them in every session without you having to repeat yourself.

MCP (Model Context Protocol)

All four CLI tools now support MCP — a standard protocol that lets AI tools connect to external services (databases, APIs, documentation servers, etc.) through plug-in “servers.” You configure MCP servers in your project config, and the AI can call them during a session.

MCP is an advanced topic

You will not need MCP for this course. It is mentioned here so you know the capability exists. When you are ready, each tool’s documentation explains how to configure MCP servers.

Context window management

Your context window is like a physical desk — the longer you work without cleaning up, the harder it is to find what you need. Research shows every frontier model degrades as input grows, even well before hitting the maximum token limit.

Rule of thumb: A model’s effective context is roughly 60-70% of its advertised maximum. A focused 30K conversation will outperform a sprawling 200K one.

When to Clear vs. Compact

Keep your context clean for better results

ActionWhen to use it
/clearAfter every commit. When switching tasks. After 2+ corrections on same issue.
/compactMid-task, need to shed weight without losing thread. Use before auto-compact triggers.
Start freshSession over 30 min on same thread. AI repeating itself. Switching codebase areas.
Keep goingMid-task with good results. Context under 50% capacity. Iterating on same piece.

What Survives Clearing

You never lose your work — these persist automatically

LayerClaude CodeGemini CLICodex CLI
Project memoryCLAUDE.mdGEMINI.mdAGENTS.md
Session resumeclaude --continue/resumecodex resume
Git stateReads status/diff/logSimilarSimilar
Plan files~/.claude/plans/PersistN/A
Auto-memoryMEMORY.md/memoryN/A

Best practices:

  1. One task, one session. Build, commit, clear, move on. The single most impactful habit.
  2. Commit before you clear. Git is your permanent save. Conversation is temporary.
  3. Use plan mode for complex work. Natural breakpoints for clearing between phases.
  4. Save state before clearing. Ask the AI to summarize progress, then add it to your project memory file.
  5. Use /btw for throwaway questions (Claude Code). Sees context but does not grow it.
  6. Delegate research to subagents. They run in their own context, keeping your main conversation clean.

The safety spectrum

Not every project needs the same level of caution. Use this spectrum to decide how much autonomy to grant:

Safe to vibe code Always review carefully
| |
v v
Throwaway Learning Internal Production
prototype exercise tool / public-facing
| | | |
YOLO mode Auto-edit Plan first Plan mode +
Don't read Skim output Review diffs read every line
the code
KNOWLEDGE CHECK

Your team asks you to build a quick prototype to demo an idea at tomorrow's meeting. Nobody will use this code after the demo. Which approach is most appropriate?

When things go wrong

Quick recovery commands when the AI makes a mess:

ProblemRecovery
AI changed files you didn’t want changedgit diff to see what changed, git restore . to undo all local changes
Need to revert the last commitgit reset --soft HEAD~1 (keeps changes staged for review)
Command is hangingPress Ctrl+C
AI is going off-trackType /clear and restate your goal in 1-2 sentences
Context is getting staleUse /compact to condense, then continue
Not using Git yetRestore from your last manual backup or snapshot
🔧

When Things Go Wrong

Use the Symptom → Evidence → Request pattern: describe what you see, paste the error, then ask for a fix.

Symptom
You enabled YOLO/autonomous mode and the AI deleted or overwrote important files
Evidence
Files are missing or overwritten after running in autonomous mode
What to ask the AI
"I ran my CLI tool in autonomous mode and it deleted/overwrote files I needed. How do I recover? I was using git -- can I restore from my last commit? And how do I prevent this next time?"
Symptom
The AI keeps forgetting project context mid-conversation
Evidence
The AI suggests changes that contradict decisions from earlier in the conversation
What to ask the AI
"My conversation is getting long and the AI is forgetting context from earlier. Should I use /compact to condense the history, or start a new session? How do I preserve the important decisions?"
Symptom
Project memory file is outdated and the AI follows stale conventions
Evidence
The AI keeps using patterns you've moved away from, citing CLAUDE.md or similar
What to ask the AI
"My CLAUDE.md file has outdated information and the AI keeps following old patterns. How do I update it? Can I ask the AI to regenerate it based on the current project state?"

Common workflows

Safe prototype flow:

  1. mkdir prototype && cd prototype && git init
  2. Start your AI tool in default (interactive) mode
  3. Describe what you want. Review proposed edits before accepting.
  4. Test the output. If it works, git add . && git commit -m "working prototype".

High-risk task flow:

  1. Activate plan mode (/plan or Shift+Tab)
  2. Review the AI’s proposed plan
  3. Approve step by step, checking diffs along the way
  4. Test thoroughly before committing

Long session rescue flow:

  1. Run /compact to condense conversation history
  2. If quality is still poor, try /model to switch models
  3. If context is completely lost, /clear and restate your goal from scratch

Key takeaways

  • Vibe coding = speed over review for throwaway work. Vibe engineering = same tools but you read every line. Both are valid depending on the stakes.
  • Planning modes (Shift+Tab, /plan) let the AI analyze before acting. Use them for any non-trivial task.
  • Autonomous modes are powerful but risky. Never use them near important data, research files, or production systems without backups.
  • /compact saves your context window. Use it when conversations get long and the AI starts forgetting earlier decisions.
  • Project memory files (CLAUDE.md, .github/copilot-instructions.md) persist across sessions. Start with /init and customize from there.