Go from never having used a coding agent to working productively and safely with one. The learner should understand what an agent is and how it differs from a chat assistant. They should choose a tool, set up a protected first project, describe tasks the agent can do well, and follow and verify its work. They should recover from bad changes, manage context, and plan bigger changes. They should also use tests as the definition of done and run everyday workflows (bug fixes, features, writing tests, codebase exploration, scripts, small tools, refactors). Throughout, they should keep secrets and systems safe and keep their own understanding growing instead of outsourcing it.
Keeping secrets out of the agent's reach
card 1 of 6
The agent asks to look at your .env
builds on: What never to let an agent touch, What the agent can and cannot see
You type: 'the weather lookup fails with error 401, fix it'. A few steps in, the agent shows:
⚙ Run: cat .env
[Approve? yes / no / always]
Your `.env` holds your real weather API key and your payment key. The agent only wants to check the settings, and it is your own laptop. Saying yes feels harmless. Is it?
Terms on this card
- API key
- A secret string that lets a program use an online service (weather, payments, AI). It identifies your account, so usage is charged to you.
- .env
- A file in a project that holds environment variables, often secrets like API keys, loaded when the app starts.
- cat
- A terminal command that prints a file's contents.
- 401
- A web error code meaning 'unauthorized': the service rejected the key or found none.
- agent
- An AI tool that doesn't just chat. It reads your project's files, edits them and runs commands to carry out a task you give it.
Lesson goal: Explain how secrets leak: the agent reads `.env`, prints keys in logs, commits them, or sends them to the model provider. Use ignore and deny rules, test keys and separate credentials so the agent never needs the real ones. ·
the whole lesson