Section 02
Prompt Engineering, Skills & Agents
Talking to AI is a skill. Here's how to get dramatically better results, and how AI systems go from chatbots to autonomous agents.
Most people use AI like a Google search. They type a vague question and hope for the best. But the difference between a mediocre AI response and a great one often comes down entirely to how you framed the input.
Prompt engineering is the practice of structuring your inputs to an LLM to reliably get better outputs. It's part art, part science.
What is prompt engineering and why does it matter? Give me a beginner-friendly overview of the most important techniques, things like being specific, giving context, using roles, and chain-of-thought. Use before/after examples to show the difference.
๐ Copy this prompt and paste it into Claude, ChatGPT, or Gemini โ it will explain everything in as much detail as you want.
The Basics: What Makes a Good Prompt?
Be specific
Vague in = vague out. Tell the model exactly what you want, in what format, at what length.
Give it a role
"You are a senior software engineer..." primes the model to respond with that perspective and vocabulary.
Show, don't just tell
Examples are powerful. If you show the model what good output looks like, it will match the pattern.
Ask for structure
"Give me a numbered list", "Respond in JSON", "Format as a table": models follow formatting instructions well.
Before and After
โMake a button in Reactโ
โCreate a React button component using TypeScript and Tailwind CSS. It should accept a variant prop of โprimaryโ or โsecondaryโ, a disabled state, and an onClick handler. Use functional components and export it as default.โ
I want to practice prompt engineering. Give me 5 examples of vague prompts and their improved versions. Then give me 3 "exercises": tasks where I write a weak prompt first, then you'll show me how to improve it. Start with software-related topics.
๐ Copy this prompt and paste it into Claude, ChatGPT, or Gemini โ it will explain everything in as much detail as you want.
Core Prompting Techniques
Chain-of-Thought (CoT)
Instead of asking for an answer directly, ask the model to think step by step. This dramatically improves accuracy on reasoning tasks because it forces the model to โshow its workโ and catch mistakes mid-generation.
// Without CoT
"What is 17 ร 23?"
// With CoT โ much more reliable
"Calculate 17 ร 23. Think step by step before giving the final answer."Few-Shot Prompting
Give the model examples of what you want before asking it to do the task. This is called โfew-shotโ learning. The model infers the pattern from the examples.
Input: "The weather today is great."
Sentiment: Positive
Input: "I missed the bus and now I'm late."
Sentiment: Negative
Input: "The package arrived on time."
Sentiment: ???System Prompts
Most LLM APIs accept a โsystem promptโ, a special instruction that sets the model's behavior before the conversation starts. Think of it as the model's job description and personality.
You are a senior TypeScript engineer at a startup. You write clean, idiomatic code.
You always:
- Use TypeScript strict mode
- Prefer functional patterns
- Add brief comments on non-obvious logic
- Flag potential security issues
You never add unnecessary boilerplate or over-engineer simple solutions.Explain these prompting techniques with examples: chain-of-thought, few-shot prompting, zero-shot prompting, role prompting, and instruction following. Which ones work best for coding tasks vs. creative writing vs. analysis?
๐ Copy this prompt and paste it into Claude, ChatGPT, or Gemini โ it will explain everything in as much detail as you want.
Skills (Tools)
A plain LLM can only generate text. But modern AI systems can be given tools, also called skills, that let them take real actions in the world.
When you use Claude Code, you're using an LLM with tools. Claude can read your files, run terminal commands, edit code, and remember context, all because it has been given those capabilities as tools.
Important: Claude decides when to use tools automatically. You don't call them directly. You just give Claude a goal (โfix the bug in pricing.tsโ) and it figures out which tools to use and when. Slash commands (below) are different: those are workflows you invoke explicitly.
How do "tools" or "function calling" work in LLMs? What happens technically when an AI uses a tool like web search or a file system? How does the model decide when to use a tool? Explain the tool-use loop with a concrete example.
๐ Copy this prompt and paste it into Claude, ChatGPT, or Gemini โ it will explain everything in as much detail as you want.
MCP: Model Context Protocol
Tools give AI agents abilities. MCP (Model Context Protocol) is the standard that lets those tools be shared, discovered, and connected across different AI systems. Think of it as a universal plug: instead of every AI tool being custom-wired to one specific AI, MCP lets any compatible AI agent connect to any compatible tool server.
To enable MCP servers in Claude Code, add them to your settings.json file (found at ~/.claude/settings.json). The Claude Code docs maintain a growing list of community MCP servers you can add in minutes.
Explain the Model Context Protocol (MCP) to me in plain English. What problem does it solve? How is it different from regular AI tools/function calling? What MCP servers are available out of the box with Claude Code? How do I add an MCP server to Claude Code? Give me a step-by-step example of connecting Claude to a database using MCP.
๐ Copy this prompt and paste it into Claude, ChatGPT, or Gemini โ it will explain everything in as much detail as you want.
Claude Code Slash Commands & the Skill Builder
Beyond tools Claude uses automatically, Claude Code ships with built-in slash commands, pre-built workflows you trigger yourself by typing / in the terminal. Think of them as keyboard shortcuts for common dev tasks.
/commitWrites a git commit message and commits your staged changes/review-prReviews an open pull request with AI feedback/simplifyReviews recently changed code for quality and suggests improvements/scheduleCreates a scheduled remote agent that runs on a cron schedule/loopRuns a prompt or command on a recurring interval/claude-apiScaffolds apps that use the Claude API / Anthropic SDKThe Skill Builder: Create Your Own Slash Commands
Claude Code lets you create custom skills, your own slash commands that encode repeatable workflows. A skill is just a Markdown file you save to ~/.claude/skills/. Once saved, it shows up in the / menu just like a native command.
This is a huge win for beginners: instead of re-explaining your preferences every session, you bake them into a skill once and reuse them forever.
---
name: explain-this
description: Explain the current file to me in plain English
---
Read the file I'm currently working on and explain it like I've never seen it before.
Walk through:
1. What this file does
2. How it's structured
3. The key functions or components and what they do
4. What I'd need to understand to safely modify it
Use plain English. No jargon without definition.Save that file, then type /explain-this in any Claude Code session and it just works.
Show me how to create a custom Claude Code skill (slash command). What does the skill file look like? Where do I save it? Walk me through creating 3 useful beginner skills: one for explaining code, one for writing commit messages in a specific style, and one for reviewing a file for security issues. Show me the full file contents for each.
๐ Copy this prompt and paste it into Claude, ChatGPT, or Gemini โ it will explain everything in as much detail as you want.
Agents
An AI agent is an LLM that can act autonomously in a loop: observe โ think โ act โ observe โ think โ act, until it completes a goal.
The agent loop
- Observe: Read the current state (files, terminal output, messages)
- Think: Reason about what to do next using the LLM
- Act: Use a tool (write a file, run a command, search the web)
- Repeat: Feed the result back and keep going until done
Claude Code is an agent. When you tell it โbuild me a login page,โ it reads your codebase, plans the component, writes files, runs the linter, fixes errors, and reports back. That's the agent loop running.
Multi-Agent Systems
You can chain agents together: one agent plans, another writes code, a third runs tests, a fourth handles deployment. Claude Code's โsubagentโ system works exactly this way, spinning up specialized agents for different parts of a task.
Explain AI agents to me. What makes something an "agent" vs. just a chatbot? What is the ReAct pattern? What are multi-agent systems? Give me real examples of what agents can accomplish that a single LLM prompt cannot. Also, what are the risks of agents acting autonomously?
๐ Copy this prompt and paste it into Claude, ChatGPT, or Gemini โ it will explain everything in as much detail as you want.
Claude Code: An Agent Built Into Your Terminal
Claude Code is a CLI tool that turns your terminal into an AI-powered development environment. It's not just autocomplete. It's a full agent with access to:
- Your entire codebase (reads files, follows imports)
- Your terminal (runs commands, sees output)
- Git (reads history, creates commits)
- A persistent memory system (remembers things across sessions)
- Sub-agents it can delegate tasks to
It uses skills (configured in settings.json) to control what tools it's allowed to use automatically vs. what requires your approval.
Explain how Claude Code works as an AI agent for software development. What makes it different from GitHub Copilot or ChatGPT? How does it use tools to interact with the file system and terminal? What's the "agent loop" in a coding context? What should I know before using it on a real project?
๐ Copy this prompt and paste it into Claude, ChatGPT, or Gemini โ it will explain everything in as much detail as you want.
Claude Code vs. Cursor vs. GitHub Copilot
Every beginner asks this. They're all AI coding tools, but they're built differently and shine in different situations.
| Tool | What it is | Best for |
|---|---|---|
| Claude Code | Terminal-based AI agent, full codebase access | Multi-file tasks, autonomous refactoring, agentic workflows |
| Cursor | VS Code fork with AI built in | In-editor autocomplete + chat, familiar IDE feel |
| GitHub Copilot | VS Code extension, autocomplete + chat | Line-by-line suggestions while you type |
They're not mutually exclusive. Many developers use Cursor for in-editor work and Claude Code for bigger agentic tasks. For this guide we're focusing on Claude Code because it teaches the agent model most clearly.
Prompt Templates for Developers
Steal these. Adapt them. Use them every day.
Review this code for bugs, security issues, and performance problems. Be specific: point to line numbers and explain why each issue matters. Then suggest improvements. [paste your code here]
Explain this code to me like I've never seen it before. Walk through what it does, why it's structured this way, and what I'd need to know to modify it safely. [paste your code here]
I'm getting this error: [paste error]. Here's the relevant code: [paste code]. Here's what I've already tried: [what you tried]. What's causing this and how do I fix it?
I want to build [feature]. My stack is [stack]. Before writing any code, give me a step-by-step implementation plan. Point out the hard parts and any libraries that would help. Only then write the code.
Help me build a personal prompt engineering library for software development. I want reusable templates for: code review, debugging, explaining code, writing tests, refactoring, and architecture planning. For each, give me a template with [placeholders] and explain what makes it effective.
๐ Copy this prompt and paste it into Claude, ChatGPT, or Gemini โ it will explain everything in as much detail as you want.