Best Practices for AI Coding Assistants
Tool-neutral best practices for working with AI coding assistants such as Claude Code, GitHub Copilot and Cursor, checked against their official docs, the AGENTS.md convention and the OpenSSF guide to security-focused assistant instructions. It covers instruction files, writing task prompts, verification loops, reviewing generated code, security and dependencies, and managing permissions and context.
6
Sefism · Oct 2026
24
Sefism · Oct 2026
7
Sefism · Oct 2026
AI
Sefism · Oct 2026
Best practices
AI & Machine Learning
Sefism
16 min read
Intermediate
Free
What this best practices guide is
Tool-neutral best practices for working with AI coding assistants such as Claude Code, GitHub Copilot and Cursor, checked against their official docs, the AGENTS.md convention and the OpenSSF guide to security-focused assistant instructions. It covers instruction files, writing task prompts, verification loops, reviewing generated code, security and dependencies, and managing permissions and context.
It has 6 chapters and 24 practices, each with why it matters, what to do and what to avoid. For developers using AI coding assistants.
Chapter by chapter
1. Project instruction files (4 practices)
Assistants start every session knowing nothing about your project. A short, well-kept instruction file gives them the context they cannot infer from the code.
2. Writing task prompts (4 practices)
The quality of a coding session depends on the first prompt. These practices give the assistant enough to solve the right problem the first time.
3. Verification loops (4 practices)
An assistant stops when the work looks done. These practices give it a real signal for done, so it can check and fix its own work.
4. Reviewing and owning generated code (4 practices)
Generated code is your code once you merge it. These practices keep review meaningful when much of the diff came from an assistant.
5. Security and dependencies (4 practices)
Assistants repeat insecure patterns from their training data and can invent packages. These practices follow the OpenSSF guide for security-focused assistant instructions.
6. Permissions, sandboxing and session hygiene (4 practices)
Agentic assistants run commands and edit files on your machine. These practices control what they can touch and keep long sessions effective.
How it works on Sefism
The guide reads like a short course: a syllabus, then one chapter per page in a focused reader, with a quiz at the end of each chapter for members. The opening chapters are open to everyone. Adding it to your account uses credits, opens every chapter and keeps your progress.
Every claim is checked against the sources listed on the page (7 cited).
Ready to start?
Opens on Sefism in a new tab.
Stuck on something specific?
Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Sessions are free for approved Sefism members, and a few slots open each week.
Follow along
New writing, resources and project ideas land here first.