Programming with AI: Workflows for coders using Claude, Copilot, and Cursor

Greg Foster
Greg Foster
Graphite software engineer
Try Graphite

Table of contents

AI-powered coding tools are transforming the daily workflow of software developers. This post explores three popular assistants – Claude, GitHub Copilot, and Cursor – detailing how each supports coding tasks, their unique strengths, and when to use them. We'll also look at how Graphite can be integrated into the process to review AI-generated code for quality and correctness. By the end, you'll understand how these tools complement each other to boost productivity while keeping code quality high. For a broader perspective on how AI is transforming development, explore our guide on how AI is reshaping the software development lifecycle.

Claude (by Anthropic) is a conversational AI assistant known for its ability to handle large context windows and complex instructions. Programmers use Claude via chat interfaces or CLI tools (like the claude-code CLI) to get help with coding problems, generate code snippets, or analyze large codebases. Claude excels at understanding and reasoning about code – it was specifically noted for "human-level understanding of code" in rigorous evaluations. This deep comprehension allows Claude to spot subtle bugs and suggest improvements in code that other models might miss. Claude's ability to understand code context is a key differentiator – learn more about context awareness in AI and how it enhances code analysis.

In practice, Claude can be treated like an AI pair programmer you converse with. For example, you might paste a function or error log into Claude and ask for an explanation or a fix. Thanks to its extensive context window (tens of thousands of tokens in newer versions), Claude can ingest multiple files or large code diffs at once. Anthropic's Claude has even been embedded directly into coding workflows – Claude Code is a CLI tool that puts Claude in your terminal, enabling it to "understand your entire codebase" and make coordinated changes across files. This means you can ask Claude to refactor a function that spans many modules or update API calls project-wide, and it will intelligently carry out the task (with your approval for each change). Claude's strength is in high-level guidance, architecture suggestions, debugging assistance, and any scenario where you need an AI with a broad overview of your project.

Imagine you're implementing a complex algorithm and get stuck on a tricky bug. You can describe the issue to Claude (or provide the code snippet) and ask for help. Claude might explain the bug and even suggest a corrected code snippet. Its ability to reason about code behavior and even read documentation or error messages you provide makes it a powerful assistant when you need more than just an auto-completion – you need insight.

GitHub Copilot is an AI pair programmer integrated directly into your editor. It uses OpenAI models (like Codex and beyond) to provide real-time code suggestions. As you write code, Copilot continuously suggests the next line or block, effectively offering auto-complete style coding suggestions inside your IDE. This means you can start writing a function or comment describing what you intend to do, and Copilot will propose code to implement it. Copilot shines at boilerplate tasks and familiar patterns – it can draft a function, generate a configuration file, or even write simple tests based on function names and docstrings. For a detailed comparison of AI tools across different programming languages, check out our guide on AI tools for writing and reviewing Python.

For instance, if you type a comment like "// function to check if number is prime" in JavaScript or Python, Copilot might immediately suggest the implementation of the is_prime function. Developers often use Copilot to speed up writing unit tests, by prompting it with something like "write tests for the BankAccount class covering edge cases," upon which Copilot (especially Copilot Chat) can produce a suite of tests. It analyzes the context in the open file and related files to tailor its suggestions. The code block below shows a simple example of Copilot completing a Python function based on a comment prompt:

Terminal
# Developer prompt: function to calculate factorial of n
def factorial(n):
"""Compute factorial of n using recursion."""
# Copilot suggestion:
if n <= 1:
return 1
return n * factorial(n-1)

In a daily workflow, Copilot acts as an ever-present helper that reduces typing and looks up common solutions. It's ideal for incremental coding: when you have a sense of what you want (e.g., "loop through records and aggregate by field") – you start writing it and Copilot finishes the routine parts. Copilot also supports some conversational interactions via Copilot Chat, allowing you to ask questions in natural language within VS Code or other IDEs (like JetBrains). This is useful for quick clarifications (e.g., "What does this error mean?" or "How do I format a date in Go?"). Copilot's tight integration into coding environments and its speed make it a go-to for boosting productivity during coding, especially for known patterns and repetitive code.

Cursor is an AI-powered code editor that builds on VS Code's interface, supercharging it with AI capabilities. Unlike Copilot which is an extension, Cursor is a full development environment designed around AI assistance. It uses advanced models – including OpenAI's GPT-4 and Anthropic's Claude – to understand your project and provide intelligent help. One of Cursor's key advantages is deep codebase awareness: it can analyze your entire repository to inform its suggestions. This means you can ask Cursor's AI agent questions about your codebase (e.g., "Where is the user authentication logic defined?") or let it index the code to improve completions.

Say you have a Python function with a loop and you want to make it more pythonic. You could invoke Cursor's command mode (e.g., press a hotkey) and type "convert this loop to a list comprehension." Cursor's AI will rewrite the code for you. If our code was:

Terminal
# Before refactor:
def process_data(data_list):
result = []
for item in data_list:
result.append(item * 2)
return result

After the Cursor command, it would transform into:

Terminal
# After Cursor refactor:
def process_data(data_list):
return [item * 2 for item in data_list]

Cursor effectively acts as a powerful AI pair-programmer that lives inside your editor. It's especially useful for larger projects where understanding the whole context is important – the tool "analyzes your entire codebase for deep project insight", enabling cross-file refactoring and consistent code generation. Its strengths lie in interactive use (chatting or commanding the editor), and it tends to excel with languages like Python, JavaScript, TypeScript, etc., where a lot of usage data has tuned the models. One thing to note: because Cursor uses heavy-duty models, some features require a paid plan (Pro) and it may occasionally be slower or need internet access for the AI. But for many, the productivity gains of having an editor that can practically "write and edit code itself" are worth it.

Each of these AI tools has its niche. Here's a quick comparison of Claude vs. Copilot vs. Cursor in terms of strengths and ideal use cases:

  • Integration & UI: Copilot is an extension that seamlessly integrates into your existing IDE (VS Code, JetBrains, etc.), activating as you code. Cursor is its own VS Code-based IDE; you have to use the Cursor app, but in return you get a UI built around AI assistance. Claude isn't tied to an IDE – you interact with it through a chat (web or Slack) or via command-line tools. This means Claude is used somewhat outside your editor workflow unless you use a plugin/CLI to bring it in.
  • Scope of assistance: Copilot is great for inline code generation – completing lines or small chunks in real time. Cursor handles inline completion too, but also supports larger tasks: multi-file edits, project-wide changes, and answering questions with full project context. Claude can handle the broadest scope in terms of reasoning – you can give it an entire design doc or multiple files to consider – but it won't automatically apply changes to your codebase unless you copy its suggestions back in.
  • Unique strengths: Claude's hallmark is its large context window and strong reasoning. It's the tool you'd use to discuss a complex algorithm or generate code from a high-level spec, possibly producing multiple files at once or analyzing a whole codebase dump. Copilot's strength is speed and convenience for routine coding – it's always there suggesting, which speeds up writing boilerplate or using unfamiliar APIs by example. Cursor's unique strength is command-driven refactoring and codebase intelligence – it's like having a junior developer who has read your entire repo and can execute your instructions (refactor this, document that, find usage of X) directly.

It's worth noting that these tools are not mutually exclusive – many developers incorporate all three into their workflow as needed. For example, you might use Copilot by default in your IDE, pop open Cursor for a challenging refactor or to generate documentation across the project, and consult Claude (via chat) when you need a detailed explanation or architectural guidance.

Integrating AI into coding means we can produce code faster – but ensuring that code is correct and maintainable is the next challenge. This is where Graphite comes in. Graphite is a developer toolchain focused on improving code review, and it offers an AI-powered reviewer, Diamond, to automatically analyze your pull requests. Think of Graphite as a safety net and quality filter for AI-generated code (and human-written code alike). For a comprehensive overview of the current landscape, explore our guide on AI-powered code review solutions.

Diamond hooks into your version control workflow: for example, when you open a GitHub pull request, Graphite's bot will immediately provide feedback on the changes. It delivers immediate, actionable feedback on every pull request. Unlike simple linters or style checkers, Graphite's Diamond agent performs an in-depth analysis. It checks for bugs, security vulnerabilities, performance issues, style inconsistencies, documentation problems and more. Importantly, it doesn't look at the diff in isolation – it considers the context of the entire repository to avoid ignorant suggestions. For instance, if you accidentally introduced a bug by misusing a utility function, Graphite can catch it by understanding how that function is supposed to behave across the codebase.

What makes Graphite especially powerful is the quality of its comments. The AI aims to avoid noise – only high-signal, relevant findings are reported. Each issue comes with an explanation and often a suggested fix. For example, Graphite might detect a logic bug: "The condition in the if statement is inverted; it should likely be if (!condition) instead of if (condition)", and it will point to the exact line. It might flag a security problem: "This code is logging a GitHub access token – remove this to avoid leaking credentials". It can even catch edge cases (e.g., use of a Linux-specific command that will fail on macOS, offering a cross-platform alternative) and performance pitfalls (like accidentally serializing promises instead of running in parallel). These are real examples of issues Graphite's AI has identified. By integrating Graphite into your repo, every time you or Copilot/Claude/Cursor submits code, you get an AI code review within minutes highlighting potential problems and improvements. To learn how to effectively implement this workflow, check out our guide on integrating AI into your code review workflow.

To use Graphite, you typically connect it to your GitHub repository (or organization) – there's minimal setup, and then it acts on each PR automatically. For local development, Graphite also provides a VS Code extension so you can get feedback before even pushing your code. In short, Graphite helps you catch the things that are easy to overlook, so that human reviewers (including yourself) can focus on more complex or subjective feedback. By integrating Graphite into an AI-enhanced workflow, you add an extra layer of assurance. The key to success is building developer trust with high-signal AI feedback that provides actionable insights without overwhelming noise.

AI coding tools like Claude, Copilot, and Cursor are revolutionizing how developers write software. They serve as tireless assistants – whether operating inside your editor or as a conversational partner – to help generate code, fix issues, and even explain complex concepts. Each has its strengths: Copilot is unobtrusive and efficient for instant suggestions, Cursor offers a rich AI-driven IDE experience, and Claude brings advanced reasoning especially suited for complex tasks. By leveraging them appropriately, developers can focus more on creativity and design, letting the AI handle the repetitive or very complex aspects. For insights into the future of development, explore our guide on software development trends in 2025.

However, there's still the need for oversight. That's why integrating a tool like Graphite's AI reviewer is so valuable. It acts as a guardrail, reviewing AI-generated (and human) code to catch mistakes and encourage best practices before code is merged. The synergy of writing code with AI and then reviewing code with AI is enabling individuals and teams to ship faster without sacrificing quality. As we've seen, a well-rounded workflow might use multiple AI helpers: each tool fills a niche, and together they cover the spectrum of coding tasks from writing to reviewing.

In summary, the combination of Claude, Copilot, Cursor, and Graphite can transform your development workflow. You get the speed and productivity of AI-generated code plus the confidence of AI-augmented code review. Embracing these tools allows developers to focus on what humans do best – building creative solutions – while leaving the mundane or very labor-intensive tasks to our new AI partners. For teams evaluating the investment, our guide on is AI code review worth it? provides detailed insights into the ROI and benefits of AI-assisted development.

For teams looking to optimize their AI-assisted workflows, explore our guides on stacked diffs for managing complex changes and building a culture of thoughtful code reviews.

Built for the world's fastest engineering teams, now available for everyone