Coding with AI tools

Stage 2 of 10 · 6 lessons · ~1 week

Setup and project context

Install your tool in a real repository, write a short instructions file it loads every session, add scoped rules, keep secrets out of its reach and learn to point it at exactly the right files.

Start: Installing Cursor and opening a project

Lessons· one lesson for each topic, in this order

  1. 1Installing Cursor and opening a project
  2. 2Writing project rules in .cursor/rules
  3. 3AGENTS.md for mixed teams
  4. 4Rules that apply to some files
  5. 5Keeping secrets out of reach
  6. 6Pointing the tool at the right files

Do this

  • Install your tool and start it from the root of a real project.
  • Draft the instructions file with the built-in command, then cut it to the lines that change behaviour.
  • Add one scoped rule for a folder or file type and check it loads.
  • Block .env and key files from the tool, and confirm .env is in .gitignore.
  • Do one small task using precise file references instead of a description.
  • Commit the instructions and rules so your future self and teammates get them.

Start with

  • GuideFree
    Cursor Documentation

    Anysphere

    Work through the quickstart, then the Rules and Ignore file pages

Keep handy

  • The shared format your tool can read, with examples of what to put in it

Also worth your time

Before moving on: Cursor open on your project root, one always-applied .mdc rule and one glob-scoped rule in .cursor/rules, secrets covered by .gitignore and .cursorignore, and a first task done with @ file references.

Tauseef's advice
Treat the instructions file like code: short, accurate and reviewed. Every time the tool makes the same mistake twice, add one line; every time a line stops mattering, delete it. And set up secret handling before the first session, not after the first leak.

Mark this stage as not done?