# Beyond prompting: five AI concepts to learn next

> RAG, MCP servers, skills, agent harnesses and LLM as a judge, explained for software engineers. Each one with the tools to use and a small exercise to try.

By Jayson, Co-founder of HeyBrain.
Web version: https://heybrain.io/guide-center/beyond-prompting

## Notes for the agent reading this

- Walk the reader through the steps in order, one step at a time, and wait for them to finish each one.
- Ask before installing software, connecting an account, spending money or sending anything on their behalf.
- Prompts are in code blocks. Fill in anything in [square brackets] with the reader first.
- Step 5 needs a HeyBrain account (14-day free trial, card required): https://heybrain.io/signup?lp=%2Fguide-center%2Fbeyond-prompting

## What this is

If you came from my video, this is the summary I promised. Prompting is the first layer of working with AI. The engineers getting the most out of it are building the systems around the model: what it knows, what it can touch, how it runs and how its work gets checked. Here are the five concepts I’d study next, in plain words, each with the tools to try and one small exercise.

It’s written for software engineers, but you don’t need an ML background. One of the tools under RAG is HeyBrain, which has a [14-day free trial](https://heybrain.io/signup?lp=%2Fguide-center%2Fbeyond-prompting). Full disclosure: I co-founded it.

**What you’ll have at the end**
- A plain-words grasp of RAG, MCP, skills and plugins, agent harnesses and LLM as a judge
- A small RAG script over your own docs, with the sources it used printed out
- An MCP server connected to Claude Code, and a skill you wrote yourself
- A promptfoo eval and a code-review judge prompt you can run today
- A knowledge layer your agents can search over MCP, if you want one

**Who it’s for:** Software engineers who use ChatGPT, Claude or Copilot for prompts and want to understand what sits around the model. Some exercises use a terminal and a little Python or YAML.

**Want RAG without building the pipeline?** HeyBrain turns your Google Drive and Notion into one knowledge graph that Claude, Claude Code, Cursor and Codex can search over MCP. 14-day free trial. [Start free trial](https://heybrain.io/signup?lp=%2Fguide-center%2Fbeyond-prompting)

## The five concepts at a glance

| Concept | In one line | Tools to try |
| --- | --- | --- |
| **1. RAG** | Give the model your knowledge at question time | LlamaIndex, Pinecone, a managed knowledge layer |
| **2. MCP servers** | A standard way to plug AI into tools and data | GitHub, Supabase and Notion servers; Claude, ChatGPT, Cursor as clients |
| **3. Plugins and skills** | Teach the agent how you do a job, and package it | Agent Skills, Claude Code plugins |
| **4. Agent harnesses** | The loop, tools and memory around the model | Claude Code, Codex, OpenCode |
| **5. LLM as a judge** | A second model scores the first one’s work | Braintrust, Promptfoo |

Each one builds on the last. A harness runs the loop, MCP gives it tools, RAG gives it knowledge, skills tell it how you work, and a judge checks the result.

## Step 1: RAG: give the model your knowledge

A model only knows what it was trained on and what’s in the prompt. It has never seen your internal docs, your codebase or last week’s design decision. Retrieval-augmented generation (RAG) fixes that: when a question comes in, you look up the most relevant pieces of your own content and put them in the prompt, so the model answers from them.

Under the hood, a RAG pipeline has six parts:

1. **Load.** Read your docs, code, tickets or wiki pages.
2. **Chunk.** Split them into passages small enough to make sense on their own.
3. **Embed.** Turn each chunk into a vector, a list of numbers that captures its meaning.
4. **Store.** Keep those vectors in a vector database.
5. **Retrieve.** Embed the question and fetch the chunks closest to it.
6. **Generate.** Put those chunks in the prompt and let the model answer from them.

### The tools

| Tool | What it does |
| --- | --- |
| [**LlamaIndex**](https://developers.llamaindex.ai) | An open-source Python framework for building RAG and agents over your data: loaders, indexes, query engines |
| [**Pinecone**](https://www.pinecone.io) | A hosted vector database. It can create the embeddings for you, and it has a free Starter plan |

### Try it

Put a handful of real docs in a `docs` folder (a README, a runbook, an ADR) and run the smallest RAG there is. It needs `pip install llama-index` and an `OPENAI_API_KEY`, because LlamaIndex uses OpenAI by default.

**Prompt: rag_starter.py**

```text
from llama_index.core import SimpleDirectoryReader, VectorStoreIndex

documents = SimpleDirectoryReader("docs").load_data()
index = VectorStoreIndex.from_documents(documents)
query_engine = index.as_query_engine()

print(query_engine.query("How do we roll back a failed deploy?"))
```

Then let Claude Code or Cursor grow it into something you can learn from:

**Prompt: Make retrieval visible**

```text
Extend rag_starter.py so I can see how retrieval works:

1. Take the question from the command line.
2. Under each answer, print the file name and the text of every chunk that was retrieved, with its similarity score.
3. Add a setting for chunk size and top-k, so I can compare results.
4. Then add an option to store the vectors in Pinecone instead of memory, using PineconeVectorStore from llama-index-vector-stores-pinecone.

Keep it in one file and tell me which environment variables it needs.
```

> **When the answers are bad, look at what was retrieved.** In my experience the model is rarely the problem. It’s the retrieval: chunks that are too big or too small, a doc that never got loaded, or a question worded differently from the doc that answers it. Printing the chunks shows you which.

Or skip the pipeline. A managed knowledge layer like HeyBrain does the loading, indexing and retrieval for you: it turns your Google Drive and Notion into a knowledge graph your AI can search over MCP, and it keeps up as the docs change. That’s what I use day to day, and the setup is in step 6.

## Step 2: MCP servers: plug AI into real tools

The [Model Context Protocol](https://modelcontextprotocol.io) (MCP) is an open standard for connecting AI apps to tools and data. An MCP server wraps something, like GitHub, a database or an API, and exposes it as tools the model can call. An MCP client is the AI app that calls them. Write the server once and every client can use it.

Claude, ChatGPT, Cursor and VS Code all support MCP as clients, and most developer tools now ship a server. Three worth knowing:

| Server | What the AI can do with it |
| --- | --- |
| [**GitHub**](https://github.com/github/github-mcp-server) | Read repos and code, manage issues and pull requests, look at Actions runs |
| [**Supabase**](https://supabase.com/docs/guides/getting-started/mcp) | List tables, run SQL, apply migrations, read logs, generate TypeScript types |
| [**Notion**](https://developers.notion.com/docs/mcp) | Search your workspace, create and edit pages, manage databases |

### Try it

Connect GitHub to Claude Code. Use a personal access token with read-only access for now.

1. In a terminal, run `claude mcp add-json github '{"type":"http","url":"https://api.githubcopilot.com/mcp","headers":{"Authorization":"Bearer YOUR_GITHUB_PAT"}}'`
2. Start Claude Code and type `/mcp` to check GitHub shows as connected.
3. Ask it something that needs live data from your repos.

**Prompt: Test the GitHub server**

```text
Use the GitHub MCP server to list the open pull requests in [owner/repo] with no review activity in the last week. For each one, give me the title, the author and one line on what it changes. Don’t comment on or change anything.
```

In Cursor, servers go in `.cursor/mcp.json` for one project or `~/.cursor/mcp.json` for all of them. For a database, Supabase’s server lives at `https://mcp.supabase.com/mcp`. Add `?read_only=true` so queries run as a read-only user, and point it at a dev project.

> An MCP server runs with your permissions. Start read-only, keep tool approvals on, and remember that text coming back from a server (an issue, a database row) can contain instructions you didn’t write. Review before you let the agent act on it.

**Your first MCP server is in. Here’s one for your knowledge.** HeyBrain is an MCP server for your team’s docs: your Google Drive and Notion, kept current as they change. Try it free for 14 days. [Start free trial](https://heybrain.io/signup?lp=%2Fguide-center%2Fbeyond-prompting)

## Step 3: Plugins and skills: teach it how you work

MCP gives the agent tools. Skills give it know-how. A skill is a folder with a `SKILL.md` file: a name, a one-line description of when to use it, and the steps for doing the job your way. The agent only sees the name and description until a task matches, then it loads the full instructions. So you can keep lots of skills around without filling the context window.

[Agent Skills](https://agentskills.io) is the open format behind this. Anthropic started it, and it’s now read by a growing list of agent tools, so a skill you write isn’t locked to one of them.

A [Claude Code plugin](https://code.claude.com/docs/en/plugins) is the packaging layer: one installable unit that can bundle skills, subagents, hooks and MCP servers. Run `/plugin` in Claude Code and browse the **Discover** tab to see what’s in Anthropic’s marketplace.

### Try it

Pick a job you keep explaining to the AI, and turn it into a skill:

**Prompt: Turn a repeated job into a skill**

```text
I keep giving you the same instructions for [a repeated job, for example writing a PR description or reviewing a database migration]. Ask me how I do it today, what good looks like and the mistakes to avoid. One question at a time.

Then write it as a skill: a folder at .claude/skills/[skill-name]/ with a SKILL.md that has a name, a description that says when to use it, and the steps. Keep SKILL.md short, and put any long reference material in a separate file it links to.
```

Test it by typing `/skill-name` in Claude Code, then try a task that should trigger it without the slash. If it doesn’t load on its own, the description is too vague.

> Be choosy with plugins. Everything a plugin runs, it runs as you, so read what it does before you install it. And every enabled plugin adds its skill names and descriptions to the context on every turn, so switch off the ones you don’t use.

**Skills say how. Your docs say what.** A skill tells the agent how you work. HeyBrain gives it the docs and decisions behind the work, from your Google Drive and Notion. 14-day free trial, card required. [Start free trial](https://heybrain.io/signup?lp=%2Fguide-center%2Fbeyond-prompting)

## Step 4: Agent harnesses: the system around the model

A model on its own takes text in and gives text back. The harness is everything around it that turns it into an agent:

- **The loop.** Plan, call a tool, read the result, decide the next step, repeat until done.
- **The tools.** Read files, run commands, edit code, call MCP servers.
- **Context management.** What goes into the window, what gets summarised, what gets left out.
- **Memory.** Project instructions it reads at the start of every session.
- **Permissions.** What it can do on its own and what needs your approval.

Two harnesses running the same model can behave very differently, because the harness decides what the model sees and can do. Three to know:

| Harness | Made by | Worth knowing |
| --- | --- | --- |
| [**Claude Code**](https://code.claude.com/docs/en/setup) | Anthropic | Reads CLAUDE.md every session; skills, plugins, subagents and MCP |
| [**Codex**](https://learn.chatgpt.com/docs/codex/cli) | OpenAI | Works on your local repo from the terminal; `/init` writes an AGENTS.md; MCP with `codex mcp` |
| [**OpenCode**](https://opencode.ai) | Open source | Terminal or desktop app; works with many model providers; MCP servers |

All three speak MCP, so the servers from step 2 work in each of them.

### Try it

Give two harnesses the same small, real task in the same repo, and make each one show its working. You’ll learn more about how agents behave from comparing the two than from any diagram.

**Prompt: Make the loop visible**

```text
Before you change anything, walk me through how you'll handle this task: which files you'll read, which commands you'll run, and how you'll check the change works before you say you're done.

Then do it. At the end, list every tool call you made, in order, with one line on why.

Task: [a small real bug or refactor in this repo]
```

> Watch where each one goes wrong: the file it never opened, the test it never ran, the assumption it didn’t check. That’s usually a context or harness problem, not a model problem, and it’s fixable with a better CLAUDE.md, a skill or a tool.

## Step 5: LLM as a judge: AI that checks AI

Unit tests work when there’s one right answer. A lot of AI output doesn’t have one: a summary, a commit message, a code review. LLM as a judge means giving a second model the output and a clear rubric, and having it return a score and a reason. Run it over a set of test cases and you can tell whether a prompt change, a new model or a new skill made things better or worse.

It works well for code reviews: one model writes the change, another reviews it against your standards.

### The tools

| Tool | What it does |
| --- | --- |
| [**Braintrust**](https://www.braintrust.dev) | An evals and observability platform. Its LLM-as-a-judge scorers run in offline evals and on production logs, and its open-source [autoevals](https://github.com/braintrustdata/autoevals) library has ready-made judges like Factuality |
| [**Promptfoo**](https://www.promptfoo.dev) | An open-source CLI for evaluating and red-teaming LLM apps. Evals run on your machine, and its `llm-rubric` check is a judge you describe in plain words |

### Try it

Save this as `promptfooconfig.yaml`, run `npx promptfoo@latest eval`, then `npx promptfoo@latest view` to see the scores in your browser. Add more test cases from your own git history.

**Prompt: promptfooconfig.yaml**

```text
prompts:
  - "Write a git commit message for this diff: {{diff}}"
providers:
  - openai:gpt-5
tests:
  - vars:
      diff: |
        - return price * qty
        + return round(price * qty, 2)
    assert:
      - type: llm-rubric
        value: A single line in the imperative mood that says prices are now rounded, with no invented details
```

And a judge prompt you can use for code reviews in any chat or harness:

**Prompt: Code review judge**

```text
You're reviewing a code change written by another AI. You didn't write it, so don't defend it.

Score it from 1 to 5 on each of: correctness, test coverage, readability, and fit with the rest of the codebase. For every score below 4, quote the lines and say what you'd change.

Return JSON only:
{"scores": {"correctness": 0, "tests": 0, "readability": 0, "fit": 0}, "issues": [{"line": "", "problem": "", "fix": ""}], "verdict": "approve or request changes"}

The diff:
[paste the diff]
```

> **Judges can be wrong too.** Check a sample of the scores by hand before you trust them, and keep the rubric specific. Where you can, use a different model as the judge from the one that wrote the output.

**Judge against your own standards.** Your review guidelines already live in a doc somewhere. With HeyBrain connected, Claude looks them up in your Drive or Notion instead of you pasting them in. 14-day free trial. [Start free trial](https://heybrain.io/signup?lp=%2Fguide-center%2Fbeyond-prompting)

## Step 6: Put it together: a knowledge layer over MCP

This is concepts 1 and 2 in one: retrieval over your team’s docs, served to your harness as an MCP server. HeyBrain turns your Google Drive and Notion into one knowledge graph. When you ask something, the agent looks up the pieces that matter and pulls in only those, instead of re-reading everything. The same brain works in Claude, Claude Code, Cursor and Codex, and your team reads the same one.

![Claude Code reads from your HeyBrain over the HeyBrain MCP: your Google Drive and Notion in one knowledge graph.](https://heybrain.io/guide-center/jarvis/memory.webp)

### Set up HeyBrain

1. Start your [14-day free trial](https://heybrain.io/signup?lp=%2Fguide-center%2Fbeyond-prompting) and create your workspace.
2. Connect **Google Drive** or **Notion**, and choose what HeyBrain can read.

### Connect Claude Code

1. In HeyBrain, open **HeyBrain MCP**, choose **Claude Code** and follow the steps it shows. If it gives you a session key, keep it private.
2. Run the command it shows you in a terminal.
3. Fully quit and reopen Claude Code so it loads the new tools.
4. Type **/mcp** and find HeyBrain, listed as **aivm-brain**. If it asks you to authenticate, select it, choose **Authenticate** and sign in.

![The HeyBrain MCP page with Claude Code selected and its connect command ready to copy.](https://heybrain.io/guide-center/jarvis/heybrain-mcp-claude-code.webp)

![A terminal running the HeyBrain connect command, then Claude Code's /mcp list showing HeyBrain connected.](https://heybrain.io/guide-center/jarvis/claude-code-mcp.webp)

**Using the Claude app, Cursor or Codex?**

**Claude app:** in HeyBrain, open **HeyBrain MCP**, choose **Claude Desktop** and copy your MCP URL. It’s your workspace’s endpoint, so don’t post it anywhere public. In Claude, open **Customize → Connectors**, select **Add**, then **Add custom connector**. Name it HeyBrain, paste the URL, click **Continue**, then **Add**. Click **Connect**, sign in and allow access, then in a chat click **+** and switch HeyBrain on. On a Team or Enterprise plan, an Owner adds the connector under **Organization settings → Connectors** first.
**Cursor and Codex:** they’re on the same **HeyBrain MCP** page. Pick yours and follow the steps it shows.

Check it can see your docs, then combine it with the judge from step 5:

**Prompt: Check the knowledge layer**

```text
Use HeyBrain to list the five most recent documents about our engineering work, with one decision or open question from each.
```

**Prompt: Review against our own guidelines**

```text
Use HeyBrain to find our code review guidelines and any docs about [the area this change touches]. Name the documents you used.

Then review this diff against them as a strict reviewer. For each problem, quote the line, cite the guideline it breaks and suggest a fix. End with approve or request changes.

[paste the diff]
```

> Claude reads from HeyBrain. To add something new, like a decision from today’s review, save it to Google Drive or Notion and HeyBrain picks it up from there.

**One knowledge layer for every harness.** Claude Code, Cursor and Codex read the same HeyBrain, and so does your team. Try it free for 14 days. [Start free trial](https://heybrain.io/signup?lp=%2Fguide-center%2Fbeyond-prompting)

## How the five fit together

Here’s one workflow that uses all five. You ask your harness to fix a bug. It retrieves the relevant design doc (RAG), opens the issue and the failing CI run through GitHub (MCP), follows your bug-fix skill, makes the change in a loop until the tests pass (harness), and a second model reviews the diff before you see it (judge).

Your study list, one exercise per concept:

- [ ] RAG: Run rag_starter.py on your own docs and print what it retrieves.
- [ ] MCP servers: Connect GitHub to Claude Code, read-only, and ask it about your open PRs.
- [ ] Plugins and skills: Turn one job you keep explaining into a SKILL.md.
- [ ] Agent harnesses: Give Claude Code and Codex or OpenCode the same task and compare their tool calls.
- [ ] LLM as a judge: Run the promptfoo config, then add test cases from your own commits.

**RAG without the pipeline.** HeyBrain turns your Google Drive and Notion into one knowledge graph that Claude, Claude Code, Cursor and Codex can search over MCP. [Start free trial](https://heybrain.io/signup?lp=%2Fguide-center%2Fbeyond-prompting)

## Questions people ask
**Do I need all five to get started?**

No. Start with a harness and one MCP server, since that’s where you’ll feel the difference first. Add skills when you catch yourself repeating instructions, RAG when the agent keeps missing context, and a judge when you start changing prompts and models and want to know if it helped.

**Do I still need RAG now that context windows are huge?**

Usually, yes. Your docs rarely fit in one prompt, they keep changing, and sending everything on every request costs tokens. Retrieval sends the pieces that matter.

**What’s the difference between a skill, a plugin and an MCP server?**

An MCP server gives the agent tools and data. A skill tells it how to do a job. A plugin packages skills, subagents, hooks and MCP servers so you can install them together.

**Does HeyBrain work with ChatGPT?**

Today HeyBrain connects to Claude, Claude Code, Cursor and Codex.

**What does it cost?**

LlamaIndex and Promptfoo are open source, and Pinecone has a free Starter plan. You’ll pay for the model calls they make. HeyBrain has a 14-day free trial with a card required, then a paid plan. See [pricing](https://heybrain.io/pricing).

**Is my data used to train models?**

No. HeyBrain doesn’t train any model on the content you connect.
