Skip to content

Instantly share code, notes, and snippets.

@ryanthegiantlion
Last active December 1, 2025 12:42
Show Gist options
  • Select an option

  • Save ryanthegiantlion/83cf49d5bfbfc020f291a20001960294 to your computer and use it in GitHub Desktop.

Select an option

Save ryanthegiantlion/83cf49d5bfbfc020f291a20001960294 to your computer and use it in GitHub Desktop.
How to Use LLMs Effectively for Coding

🧠 How to Use LLMs Effectively for Coding (2025 Edition)

LLM-assisted coding has evolved dramatically. If you're coming from the Copilot autocomplete era, the modern agentic workflow will feel like a superpower. This guide outlines practical patterns that work in real-world software engineering.


1. Create Project Context Before Doing Anything Else

Agentic LLMs only work well when they understand your project.

Think of this like onboarding a brand-new junior dev:

  • What would you explain on their first day?
  • What would they need to know before touching code?

Minimum viable context:

  • Your project README
  • Folder structure (frontend, backend, infra, tests)
  • Stack overview (frameworks, libraries, languages)
  • Coding conventions
  • Required workflows (tests, CI rules, branching strategy)
  • Architectural preferences (e.g., “we use service objects over fat controllers”)

You can:

  • Paste this into a Cursor project rule
  • Use a prebuilt Cursor template
  • Or ask your LLM to generate a contextual README based on your repo

Why it matters:
Without context, the model guesses — leading to hallucinations, incorrect assumptions, and giant unwanted changes.


2. Use a Requirements Doc + Task List for All Work

This is the biggest productivity multiplier.

The flow used at Amazon and other engineering orgs:

  1. LLM asks you clarifying questions first
    Prevents massive wrong assumptions.

  2. Generate a requirements document
    Inputs, outputs, constraints, edge cases, success criteria.

  3. Convert that into a hierarchical task list
    Parent tasks → subtasks with controllable granularity.

  4. Execute tasks based strictly on that plan
    This eliminates scope drift and conversational chaos.

A lightweight open-source version of this workflow:
https://github.com/snarktank/ai-dev-tasks


3. Start With Cursor

People try many tools, but the actual pattern is:

Experiment → get frustrated → return to Cursor for real work.

Cursor advantages:

  • Strong agentic capabilities
  • Excellent guardrails
  • MCP integration (tools, APIs, Playwright, UI agents, DB calls)
  • Works with any model (GPT, Claude, etc.)
  • Deep integrations across your workflow:
    • You can start a background agent from your IDE
    • See its changes as branches/PRs on GitHub
    • Chat with the same agent in:
      • the IDE
      • the browser
      • GitHub (e.g. on PRs)
  • IDE-native experience

Other tools have their place:

  • Claude Code for deep analysis or refactors
  • Devins / Cline for single-file execution
  • Continue for offline or open-source models

But for getting started with modern LLM-based software development, Cursor is the most reliable and ergonomic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment