123DevOps··6 min read

AI coding assistants: Claude Code, GitHub Copilot, Cursor, and best practices

The categories of coding assistants (completion, chat, and agentic tools), what Claude Code, GitHub Copilot, Cursor, and alternatives do, best practices, where they shine, where they call for caution, and how to measure impact without vanity metrics.

AI

AI coding assistants have gone from “smart autocomplete” to tools that read the whole repository, edit multiple files, and run the tests. That changes the job of writing software: producing code gets cheaper, and reviewing, testing, and providing context become even more valuable.

In this article, we’ll map the landscape by category, look at what the main tools do, and, above all, how to use them without trading speed for bugs.

The three categories of assistants

  • Inline completion in the editor: as you type, the assistant suggests the next line or block, and you accept it with a keystroke. It’s fast and low-friction, but it sees little context beyond the open file and its neighbors.
  • Chat in the IDE: you select code and ask (“what does this do?”, “write tests for this function”), and the answer uses the open or referenced files as context.
  • Agentic tools: you describe a task, and the tool explores the repository, builds a plan, edits multiple files, and runs commands (tests, lint, build) with your permission, iterating until it’s done. They work in the terminal, in the IDE, or in cloud environments — it’s the same concept as AI agents in DevOps, applied to code.

The main tools

These tools’ features change fast. The descriptions below cover only general, stable capabilities — check the current documentation and pricing before adopting any of them.

Claude Code

Anthropic’s agentic coding tool. It runs in the terminal, in IDE extensions, in a desktop app, and on the web. It reads the repository, edits multiple files, and runs commands, asking for permission according to its configuration. It uses a project instructions file (CLAUDE.md) and can connect to external tools through MCP.

GitHub Copilot

GitHub’s assistant, integrated into the major IDEs and into GitHub itself. It offers inline completion, chat, and agentic features — both in the IDE and in GitHub workflows, such as working from an issue and opening a pull request for review. It accepts project instructions in .github/copilot-instructions.md.

Cursor

An “AI-first” code editor based on VS Code. It combines completion, chat, and an agent mode that edits multiple files in the same environment, plus project rules to guide its behavior.

Other options

  • Windsurf (formerly Codeium): editor and extensions with agentic features;
  • JetBrains AI: an assistant built into JetBrains IDEs;
  • Amazon Q Developer: AWS’s assistant, also focused on cloud services;
  • Open source: Continue (an IDE extension where you choose the model, including local ones) and Aider (a terminal tool integrated with Git).

Comparison by category

There is no “best assistant”: there’s the one that fits your workflow and your company’s policy. The table compares categories, not products:

Category How it works Examples Good for
Inline completion Suggests the next lines as you type GitHub Copilot, Cursor, Windsurf, JetBrains AI, Continue Repetitive code, well-known API calls
Chat in the IDE Answers about selected code or referenced files GitHub Copilot, Cursor, JetBrains AI, Amazon Q Developer, Continue Explaining code, generating targeted tests
Agentic (terminal/IDE) Reads the repository, plans, edits multiple files, and runs commands with permission Claude Code, GitHub Copilot, Cursor, Aider Refactors, multi-step tasks, test-backed fixes

Best practices

Give the assistant context

The assistant doesn’t know your team’s conventions. Write project instruction files — CLAUDE.md, AGENTS.md (an open format read by several tools), or .github/copilot-instructions.md — and keep the README up to date:

# Project instructions

- Stack: Python 3.12, FastAPI, PostgreSQL; tests with pytest.
- Run tests: `make test`. Lint: `make lint`. Both must pass.
- Follow the layering pattern in `app/` (routers → services → repositories).
- Never edit files in `migrations/` by hand; use `make migration`.
- Don't add dependencies without justifying them in the PR.

Work in small tasks and ask for a plan

Ask for one thing at a time (“add pagination to the orders endpoint”), not “improve the system.” For bigger tasks, ask for a plan first and correct course before any edits. Prompt engineering techniques help you be specific.

Review it like a colleague’s PR

AI-generated code is code that you will sign off on. Read the whole diff, question naming, error handling, and edge cases — the same criteria as a code review that works:

git diff --stat          # which files changed and by how much
git add -p               # accept hunk by hunk, not everything at once
make test && make lint   # nothing goes in without passing the suite

Run the tests

Tests are the safety net against confident mistakes. A good testing pyramid makes using AI much safer; ask the assistant to write the test before the fix.

Protect secrets, licenses, and data

  • Never paste secrets (keys, tokens, passwords) or personal data into the chat or into files the assistant reads.
  • Check licenses: suggested snippets may resemble third-party code; some products offer filters for this.
  • Follow company policy: which tools are approved, which repositories may be sent, where data is processed, and whether it’s used for training.

Where they shine and where to be careful

Assistants shine at boilerplate, tests, mechanical refactors, explaining legacy code, scripts and small automations, repetitive migrations, and documentation.

They call for extra care in security-critical code (authentication, cryptography, authorization), complex concurrency, fine-grained performance work, and unfamiliar APIs — the model may invent a function or parameter that doesn’t exist. In those cases, check the official documentation and treat the suggestion as a draft.

Measuring impact without vanity metrics

“Lines generated by AI” and “percentage of suggestions accepted” measure usage, not value. Code accepted quickly can turn into rework the following week. Prefer delivery-flow indicators:

  • Lead time from commit to production and change failure rate (the DORA metrics);
  • Review time and PR size;
  • Defects found in production and rework;
  • Team perception, through short, periodic surveys.

Compare a pilot group against the previous period for a few weeks before drawing conclusions.

Checklist

  • Tool approved by the company’s security and data policy
  • Project instructions file with stack, commands, and conventions
  • Small tasks, with a plan reviewed before editing
  • Every diff reviewed like a colleague’s PR
  • Tests and lint run before every commit
  • No secrets or personal data sent to the assistant
  • Impact measured with delivery metrics, not usage metrics

The assistant writes fast; responsibility for the code still belongs to whoever hits merge.

Get updates on new posts and stay in the loop!