📋 How to use the library
Each prompt is independent — use what you need, in whatever order makes sense. The parts between <assim> are variables: replace them with your own use case. Golden rule: keys and secrets always go in the environment file (.env), never pasted into the chat. Start builds in Plan Mode (see module 3.2).
The eight prompts cover a project’s life cycle: you prepare the groundwork (1-2), build and fix (3-4), improve (5), package for reuse (6), and take it to production (7-8). This is the library you’ll return to with every new build.
Illustrative diagram — the lifecycle covered by the eight prompts, from groundwork to production.
📄 Setup & CLAUDE.md
What it is
The first prompt for every project: generate the CLAUDE.md, the persistent system prompt that defines who the AI is, what you’re building, and how it should help you. It’s written in Markdown and sits at the root of the project folder.
What is it?CLAUDE.md — a text file the AI reads every session; it works like an “onboarding document” with a role, context, rules, and style. Keep it lean (a few hundred lines).
Why learn
Without CLAUDE.md, you re-explain the context in every conversation. With it, the AI knows the project’s goal and your preferences from the first message—and you can iterate on the file just by talking.
🎯 Goal: create the project's initial CLAUDE.md.
Crie um arquivo CLAUDE.md na raiz deste projeto. Ele é o system prompt persistente que você vai ler em toda sessão. Inclua estas seções: - Papel: você é <ex.: um assistente de automações n8n>. - Contexto: estou construindo <ex.: workflows de IA para uma agência>. - Como ajudar: me ajude a planejar, construir, depurar e otimizar. - Preferências: explicações concisas e diretas; português; descreva o resultado e me pergunte quando faltar informação. - Regras: procure uma ferramenta existente antes de criar uma nova; quando algo falhar, diagnostique e aprenda; mantenha este arquivo atualizado; nunca peça para eu colar chaves no chat (use o .env). Mantenha enxuto (poucas centenas de linhas). Depois, me mostre o arquivo.
✅ How to verify: the file CLAUDE.md exists in the root directory, with the requested sections and a reasonable length. Open and read it to confirm the role and context are right; ask for adjustments in conversation if you want.
Key concepts
One project per folder.
Read every session.
Only the essentials.
Edit through conversation.
🔌 Connect a tool via MCP
What it is
The prompt for giving AI “arms”: install an MCP server that exposes a set of external tools (scraping the web, reading databases, communicating with apps). The configuration is in .mcp.json at the project level, and the API key goes in the .env — you paste it manually, never into the chat.
What is it?MCP (Model Context Protocol) — a protocol in which one connection exposes several tools; the AI decides which one to use and when. .mcp.json — the server configuration file. /mcp — the command that lists the connected servers.
Why learn
Without MCP, the AI only reads and writes files. With MCP, it acts in the world. Configuring it at the project level (not globally) avoids security warnings every time you restart, and reading the key from .env keeps the secret out of the code.
🎯 Goal: install and connect an MCP server with the key in .env.
Instale o MCP server de <ex.: Firecrawl, para busca/scraping na web> neste projeto, com a configuração no NÍVEL DO PROJETO (não global). Passos: 1. Use o comando de instalação para Claude Code da documentação oficial: <cole aqui o comando de instalação do provedor> 2. Gere/atualize o .mcp.json com a entrada do server e um placeholder de API key. 3. Garanta que a chave seja lida do arquivo .env — NÃO me peça para colar a chave aqui no chat. Apenas me diga o nome da variável a preencher no .env. 4. Ao final, faça uma verificação de conexão (status do server). Se o server não aparecer, me lembre de reiniciar o Claude Code.
✅ How to verify: run /mcp and confirm the server appears in the list with a healthy status. The key is in .env (which is in the .gitignore), not in the chat or in the .mcp.json.
🎯 Practical tip
If the server doesn’t show up after installation, restart Claude Code before doing anything else—that fixes it most of the time.
Key concepts
Server config.
Not global.
Never in chat.
Verify the connection.
🧱 Create a workflow from scratch
What it is
O comprehensive opening prompt: a single request that describes the result, the data source, and the destination, letting the AI decide the architecture (including how to store/search documents). It’s “one prompt to rule them all”—getting this right at the start saves a lot of back and forth.
Why learn
Instead of dictating "use a vector store," you describe the problem and let AI suggest the best approach (system prompt for small docs; vector store for scale). It asks for anything missing—and you approve the plan before the build.
🎯 Goal: launch a complete build with a single prompt (example: email support agent).
Entre em plan mode. Quero o resultado a seguir, e você decide a arquitetura. Objetivo: um agente que lê os e-mails recebidos, identifica perguntas de suporte técnico e rascunha uma resposta baseada nas nossas políticas. Anexei os documentos <ex.: politicas.pdf e faq.pdf> na pasta do projeto. Requisitos: - Use as informações dos documentos como fonte da verdade; não invente. - E-mails que não forem de suporte devem ser ignorados. - Quando não houver resposta nos documentos, NÃO invente: avise que vamos pesquisar e retornar. Antes de construir: leia os documentos, decida como armazená-los e buscá-los (system prompt vs. vector store, escolha e justifique), me faça as perguntas de esclarecimento e proponha o plano com a lista de credenciais. Não construa até eu aprovar.
✅ How to verify: the AI read the docs, proposed a justified architecture (e.g., a vector store for scalability), asked for any missing information, and listed the credentials. You approve only after the plan makes sense.
Key concepts
Result + source + destination.
The architecture.
Source of truth.
Before the build.
🐞 Debug an error
What it is
O troubleshooting template ready: paste the error message verbatim, say where it occurred and what you expected, and ask for the cause + a targeted fix. Works for both local errors and failures that only appear in production (in execution traces).
Why learn
AI fixes things quickly when given context, and slowly (or gets it wrong) when given only "it errored." This template standardizes what it needs: the exact error, where it occurred, and what you expected.
🎯 Goal: a reusable template that has the AI diagnose and fix issues.
Deu erro. Contexto completo: - Onde: <nó/passo/arquivo, ex.: "trace do passo 3, chamada à API X"> - O que eu esperava: <ex.: "que retornasse a lista de resultados"> - O que aconteceu: <sintoma observado> - Mensagem de erro (literal): """ <cole o erro / trecho do trace EXATAMENTE como apareceu> """ Diagnostique a causa raiz, explique POR QUE aconteceu, e aplique a correção mínima necessária. Não mude mais nada além disso. Depois, me diga exatamente como reproduzir o teste para confirmar que foi resolvido.
✅ How to verify: the AI identifies the cause (e.g., the API response format differs from what was expected), applies a targeted fix, and gives you the test step. Rerun it; if a new error appears, repeat the template with the new message.
Key concepts
Paste it exactly.
Provide the context.
Ask why.
Without changing anything else.
🎚️ The 6 enhancements
What it is
Six prompts that take an agent from “works” to “works well.” Three are about errors/logic (fallback for no match, time filter, automated message filter) and three for output quality (brand tone, client name, confidence indicator). Apply one at a time, grounding the request in the existing workflow, and test each one.
Why learn
These six cover the most common edge cases for a real agent. Always name the workflow in the request — without this, AI may create a new workflow instead of editing yours. And to test a filter, you need to send exactly the type of input it should catch.
🎯 Goal: enhancements 1–3 (errors/logic), one at a time.
No workflow existente "<nome exato>", aplique UMA melhoria por vez:
[1] Fallback sem match: quando a busca na base não encontrar resposta, em vez de
inventar, gere um rascunho educado dizendo que vamos pesquisar e retornar.
Use um marcador de "encontrou/não encontrou" para decidir o caminho.
[2] Filtro por tempo: processe apenas entradas mais recentes que <ex.: 10 minutos>.
[3] Filtro de automáticos: ignore mensagens automáticas (no-reply, postmaster,
ausência/out-of-office, newsletters, notificações de entrega). Marque com um
sinalizador e desvie para "ignorar".
Edite ESTE workflow (não crie outro). Me explique o que muda antes de aplicar.
✅ How to verify: for [1], send a question outside the knowledge base and check that you get the "let’s research this" draft (not an invented answer). For [2]/[3], send exactly the type of input the filter should catch and confirm it’s rerouted.
🎯 Goal: enhancements 4–6 (output quality), one at a time.
No workflow existente "<nome exato>", aplique UMA melhoria por vez:
[4] Tom de marca: ajuste o tom das respostas para <ex.: amigável, prestativo,
informal, entusiasmado>. Atualize tanto a resposta principal quanto o
rascunho de fallback.
[5] Nome do cliente: extraia o nome da assinatura/fechamento da mensagem
(padrões como "Abraços, João") e use na saudação; se não houver, use uma
saudação genérica como "Olá".
[6] Indicador de confiança: classifique a resposta como alta/média/baixa pela
qualidade do match na base, e anexe um selo discreto (verde/amarelo/vermelho)
no rascunho, só para revisão interna.
Edite ESTE workflow. Teste cada um com a entrada apropriada.
✅ How to verify: [4] the draft sounds like the requested tone; [5] the greeting uses the right name (and falls back to a generic one when there’s no signature); [6] the badge appears consistent with how well the knowledge base answered.
Key concepts
Layer by layer.
To edit, not create.
Handle errors first.
Send the exact input.
🧩 Create a skill / slash command
What it is
The prompt for packaging a repeated task as a skill: a markdown file (SKILL.md) with a name, description, arguments, and steps, which lives in .claude/skills and becomes a slash command callable (e.g., /draft-email).
What is it?Skill — a workflow in markdown, callable on demand. Slash command — the shortcut that triggers the skill. Skills load only when invoked, so they don’t weigh down the context like a huge CLAUDE.md.
Why learn
A skill puts an end to “re-explaining”: consistency (the same process every time), context savings (loads only when called), and reuse (clear the conversation and call it again with new inputs). If you invoke it without arguments, the skill asks for what’s missing.
🎯 Goal: create a skill in the official format (example: draft an email).
Crie uma skill no formato oficial do Claude Code, chamável como slash command. Nome: <ex.: draft-email> O que faz: <ex.: escrever um e-mail polido, conciso e sem enrolação>. Argumentos esperados: <ex.: bullets com os pontos-chave, destinatário, tom>. Comportamento: se eu invocar sem argumentos, pergunte o que faltar antes de gerar. Salve a saída em <ex.: temporary/>. Crie a estrutura .claude/skills/<nome>/SKILL.md com nome, descrição, argumentos e passos. Depois me diga como invocá-la.
✅ How to verify: there is a .claude/skills/<nome>/SKILL.md. Clear the context, invoke the slash command (e.g., /draft-email) and confirm that it requests the inputs and produces the output in the right location.
Key concepts
Name, args, steps.
Where they live.
How to invoke it.
Saves context.
⏰ Create a scheduled agent
What it is
The prompt for an agent that runs alone, on a schedule (cron): every morning, it researches a fixed topic, synthesizes the findings, and writes a line in a spreadsheet. Since no one will be watching, the prompt needs to address the agentic gap from the start: fixed inputs, structured output, error handling, and logging at every step.
What is it?Cron — a 5-field pattern (minute, hour, day of the month, month, day of the week) that defines when to run; 0 7 * * * = 7 a.m. every day. Agentic gap — in production, AI isn’t watching to self-heal, so errors and logs need to be planned for.
Why learn
An agent that runs without you is only reliable if it was designed to fail gracefully: log each step (so you can diagnose later), handle errors without bringing everything down, and produce predictable output. Asking for this in the first prompt is cheaper than patching it later.
🎯 Goal: build an unsupervised scheduled task (daily research → spreadsheet).
Entre em plan mode. Construa uma tarefa AGENDADA que roda sozinha, sem humano presente, todo dia às <ex.: 8h> (cron). O que ela faz a cada execução: 1. Pesquisa na web o tópico fixo "<ex.: novidades em automação com IA>" (definido no topo do arquivo, fácil de trocar). 2. Sintetiza os achados em um resumo curto. 3. Escreve uma linha na planilha <ex.: "Daily Research", aba Sheet1> com as colunas: data, tópico, resumo, fontes, status. Requisitos para rodar sem supervisão (agentic gap): - Inputs FIXOS (sem me fazer perguntas no meio da execução). - Saída ESTRUTURADA e previsível. - Trate erros sem derrubar a tarefa; se uma etapa falhar, registre e siga, gravando ao menos uma linha parcial com status de erro. - Faça LOG claro em cada passo (mensagens específicas, não "falhou"). - Segredos vêm do ambiente, nunca do código nem do chat. Antes de construir, planeje, me pergunte o que faltar e liste as credenciais.
✅ How to verify: after deploying, trigger it manually (don’t wait for the scheduled time) and review the trace step by step. Confirm the row in the spreadsheet and the schedule (cron + next run) in the dashboard. Force a failure and confirm the task doesn’t crash and still records the error status.
Key concepts
5 fields = when.
No questions in the middle.
From the 1st prompt.
Predictable.
🛡️ Frontend + security audit
What it is
Two prompts that close the production loop: one for generate a frontend with personality (using the design skill, so it doesn’t look like generic AI) and another to ask for a security audit rigorous app review before opening it to the world.
Why learn
An open app without an audit is a real risk: anyone with the URL can trigger your workflow and use up your tokens (you pay for other people’s usage). The audit checks protected routes, unexposed keys, secrets stored only in environment variables, and data isolation by user (RLS).
🎯 Goal: generate a frontend with personality (not generic).
Crie o frontend para <ex.: o app de qualificação de leads>. USE a skill de design de frontend para que NÃO fique com a cara genérica de site gerado por IA. Estrutura desejada: <ex.: cabeçalho fixo com logo à esquerda e CTA à direita; hero com texto grande e direto; um formulário que envia os dados e mostra o resultado retornado pelo backend>. A URL do backend e quaisquer chaves devem vir de variáveis de ambiente (placeholder por enquanto). Me mostre o resultado para eu dar feedback específico depois.
✅ How to verify: the frontend has its own visual identity (not the default AI layout), the form works with a backend placeholder, and no key appears in the client code.
🎯 Goal: audit the app's security before opening it.
Aja como um especialista em segurança e faça uma auditoria detalhada deste app. Verifique e me reporte achados + correções para cada item: - Rotas protegidas: existe rota que dispara o backend sem autenticação? - Chaves expostas: alguma chave/segredo aparece no código do frontend? - Variáveis de ambiente: todos os segredos estão em env vars (e fora do git)? - Isolamento de dados (RLS): um usuário consegue ver dados de outro mesmo com um bug no frontend? - Abuso/custo: alguém com a URL consegue rodar o workflow e gastar meus tokens? Liste os problemas por severidade e proponha a correção de cada um. Depois, aplique as correções que eu aprovar.
✅ How to verify: you get a list grouped by severity. No keys in the frontend; routes that trigger the backend require authentication; secrets only in env vars; RLS active to isolate data by user. Fix any failures and audit again.
✓ Secure app
- ✓Routes that cost tokens require login.
- ✓Secrets only in environment variables.
- ✓RLS isolates each user’s data.
✗ App at risk
- ✗Open app: anyone can spend your tokens.
- ✗API key in the frontend code.
- ✗Without RLS: a bug exposes other people’s data.
Key concepts
Frontend with its own look.
Require login.
Never in the frontend.
Isolates data.
Which of these places is safe for storing the API key your app uses?
📌 Module Summary
Next track:
Track 4 — Skills & Agents: package workflows and build local, scheduled, and event-driven agents.