Section 02

2 of 5

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.

๐Ÿค–Intro to prompting
Orientation prompt

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

โŒ Weak prompt

โ€œMake a button in Reactโ€

โœ… Strong prompt

โ€œ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.โ€

๐Ÿค–Practice prompting
Practice prompt

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.

chain-of-thought.txt
// 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.

few-shot.txt
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.

system-prompt.txt
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.
๐Ÿค–Learn the techniques
Deep-dive prompt

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.

๐Ÿ”
Web search
Look up current information beyond the training cutoff
๐Ÿ’ป
Code execution
Run Python/JS code and see the real output
๐Ÿ“
File system
Read, write, and edit files on your computer
๐ŸŒ
Browser
Open URLs, click buttons, fill forms
๐Ÿ”Œ
APIs
Call external services: databases, GitHub, Slack, etc.
๐Ÿง 
Memory
Store and retrieve information across sessions

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.

๐Ÿค–AI tools & skills
Deep-dive prompt

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.

๐Ÿ—„๏ธ
Databases
Connect to Postgres, SQLite, or your company's database. Claude can query it directly.
๐Ÿ“…
Calendars & email
Read your calendar, draft emails, check availability, all from your AI chat.
๐Ÿ™
GitHub
Create PRs, review issues, search code. Claude can interact with your repos.
๐Ÿ”ง
Custom tools
Build your own MCP server to give Claude access to anything your business uses

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.

๐Ÿค–MCP explained
Deep-dive prompt

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.

Native slash commands (built in)
/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 SDK

The 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.

~/.claude/skills/explain-this.md
---
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.

๐Ÿค–Build your own skill
Practical prompt

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

  1. Observe: Read the current state (files, terminal output, messages)
  2. Think: Reason about what to do next using the LLM
  3. Act: Use a tool (write a file, run a command, search the web)
  4. 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.

๐Ÿค–Understand agents
Deep-dive prompt

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:

It uses skills (configured in settings.json) to control what tools it's allowed to use automatically vs. what requires your approval.

๐Ÿค–Claude Code deep dive
Research prompt

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.

ToolWhat it isBest for
Claude CodeTerminal-based AI agent, full codebase accessMulti-file tasks, autonomous refactoring, agentic workflows
CursorVS Code fork with AI built inIn-editor autocomplete + chat, familiar IDE feel
GitHub CopilotVS Code extension, autocomplete + chatLine-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.

Code Review
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 Like I'm New
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]
Debug Mode
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?
Implementation Plan
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.
๐Ÿค–Build your prompt library
Practice prompt

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.