Skip to content
Search

Cursor

lastmod 2025-11-04created 2025-01-0833 edits

The AI Code Editor

Categories

GNOME Desktop Icon

Add it with vi ~/.local/share/applications/Cursor.desktop.

[Desktop Entry]
Name=Cursor
Comment=AI-powered code editor
GenericName=Text Editor
Exec=/home/zer0/Applications/Cursor-1.1.6-x86_64.AppImage %F
Icon=Cursor
Type=Application
StartupNotify=true
StartupWMClass=cursor
Categories=Development;IDE;
MimeType=text/plain;inode/directory;
Actions=new-empty-window;
Keywords=cursor;editor;development;ai;
Terminal=false

[Desktop Action new-empty-window]
Name=New Empty Window
Exec=/home/zer0/Applications/Cursor-1.1.6-x86_64.AppImage --new-window %F
Icon=Cursor

Update the icon file with gtk-update-icon-cache

Then update.

update-desktop-database ~/.local/share/applications/

MCP Settings

Sequential Thinking

Integration with Ollama

Follow these two items:

  • Do not leave the "OpenAPI Key" field in Cursor empty; enter anything.
  • Add the OLLAMA_ORIGINS="*" environment variable when running Ollama.

Ollama is built so that it can be called in OpenAI API Key style, but the api key itself is not actually needed.

docker run -e OLLAMA_ORIGINS="*" {OLLAMA_IMAGE}

Rules

Memory Bank

TODO List

Finishing side projects with LLMs and Cursor

  • Took on an Engineering Manager role about 5 years ago, so writing code directly in the main job decreased
  • Outside of work, steadily works on personal projects to keep programming instincts and sharpen technical skills
  • In the past, time constraints made project progress slow, and projects were often abandoned before completion
  • However, in 2024, built the habit of building and deploying needed tools relatively quickly and 'finishing' a first version

Examples of recently finished side projects

  • jsonplayground.com : A JSON formatter that also provides JQ functionality running inside the browser (using WebAssembly), so data is not sent outside
  • webtomarkdown.com : Converts files to Markdown or extracts parts of websites as Markdown so they can be passed to an LLM as context
  • Draft design improvements for the flying club page Evergreen Soaring
  • Built a Chrome extension to automate responses to messages sent to the flying club
  • fitinterval.com : Provides an interval timer for workouts

Background on using LLMs and the Cursor IDE

  • LLMs greatly increase side project productivity
  • In particular, using LLMs for coding through the Cursor IDE is convenient
  • This post shares the overall flow of creating a new project, aiming to help readers try applying it
  • LLMs are not useful in every area, so you have to try them yourself and choose where to apply them

Example project: habit tracking website

  • Wants to recreate the habit tracking app currently in use as a website
  • All data is stored on the local device, with user privacy in mind

Starting the spec

  • First gives ChatGPT a brief description, then refines the application spec while answering its follow-up questions
  • Once it is reasonably concrete, asks it to organize the spec 'so that someone else could build the whole app from this spec alone'
  • States the intent to use TypeScript, React, and Tailwind CSS so the spec is generated based on those technologies
  • Keeps the final spec in SPEC.md for reference during later development

Bootstrapping the project

  • Uses Vite to quickly set up the project skeleton
  • Does the initial setup with the npm create vite@latest . command and puts SPEC.md in the project folder
  • Uses the agent feature in the Cursor IDE's Composer to automate Tailwind setup, basic file edits, and so on
  • This way, first-pass features such as the expected UX layout, local storage use, and Markdown export are implemented in a short time

Iterating in small units

  • Rather than requesting too many features at once, splits the needed improvements and asks the LLM for updates one by one
  • For example, splits UX changes, bug fixes, etc. into small pieces and gives instructions in Chat or Composer mode
  • Attaches images to Chat to describe the desired design and asks the LLM to implement it in code

Setting up continuous deployment

  • Using GitHub Actions, sets it up so that when a commit is pushed to the main branch, it builds automatically and deploys to GitHub Pages
  • In Cursor, provides a link to an example .yml file from another repo so the LLM can reference it to build the deployment pipeline

Overall tips

  • First organize the project overview and details with an LLM and save them for later context
  • Bootstrap and structure the project using tools or open-source templates
    • Set up essential development tools and the directory structure all at once and follow a manageable project pattern
  • Start the project quickly using Cursor Composer (agent mode) and the like
  • Use a mix of Claude-3.5-Sonnet and o1 (model)
    • Use o1 for broad drafting (first draft)
    • About 80% of the specific editing and refinement work is done with Claude-3.5-Sonnet
  • Choose the appropriate mode (Chat, Composer normal, Composer agent)
    • Chat: use when changes are needed at a specific location and you need to check the result of each edit
    • Composer (normal): when adding features across multiple files or multi-file changes are needed
    • Composer (agent): not used much yet, but for when automated work such as running commands, lint, and repeated fixes is needed (though tends to manage it split into small units)
  • When providing context, pass along specific files, documents, links, etc.
    • If needed, set Chat mode to query the entire codebase so the LLM searches for and suggests code that fits the context
  • Project-related documents can be saved in Markdown format (SPEC.md, etc.) and included as context
  • Use a .cursorrules file in the project folder
    • Instruct it not to use certain libraries, or force the use of Tailwind and the shadcn component library, etc.
    • By defining rules you want reflected in prompts in advance like this, you can steer the results in the desired direction for most requests
  • Work while understanding the code as a whole
    • Maintain code quality and structure so that situations where the LLM cannot debug do not arise
    • Keep splitting work into small units, and use the LLM for refactoring or module separation when needed

Wrap-up

  • If you quickly finish a project this way and make a deployed version, it becomes much easier to restart even after a short break
  • The habit of finishing small keeps momentum going, and you can get motivation by quickly seeing small results

How to use Cursor properly

Used well, Cursor produces fast, clean code. Used wrong, Cursor produces AI spaghetti code that you have to clean up all week. Here is how to use Cursor properly.

  • Set 5-10 clear Project Rules so Cursor understands the structure and constraints. For an existing codebase, try /Generate Cursor Rule.
    • You can set Project Rules by going to Cursor > Setting > Cursor Settings.
    • If you type a slash (/) in the Cursor chat, there is /Generate Cursor Rules. With it, Cursor generates Rules based on the conversation so far.
    • Cursor Rules official documentation (link)
  • Write clear prompts. Describe the tech stack, behavior, constraints, etc. in detail, like a short specification.
  • Work file by file. Generate, test, and review code in small, focused units.
  • Write test cases first, lock them, and generate code until all tests pass.
    • Cursor provides the .cursorignore feature, which can prevent Cursor from editing test case files. (link)
  • Always review AI output, fix problematic parts yourself, and then tell Cursor to use the fixed code as an example.
  • Use the @file, @folder, and @git commands so Cursor can see the right parts of the codebase.
  • Keep design documents and task requirements (checklists) in the .cursor folder so the AI fully understands what to do next.
    • If you put files as MD files in the .cursor folder, they are applied as project-global rules.
  • If the code is wrong, write it yourself. Cursor learns faster from edits than from explanations.
    • Cursor uses the user's edits as context. (link)
  • You can use chat history to iterate on previous prompts without starting over.
    • In Cursor, you can add previous chat history as context.
  • Choose models deliberately. Choose Gemini if you need precision, and Claude if you need breadth.
  • For new or unfamiliar tech stacks, paste documentation links. Ask Cursor to explain every error and fix line by line.
  • Let large projects index overnight and limit the context scope to keep performance good.
    • You can index the codebase so Cursor gives better answers. Generally, Cursor indexes all files in the codebase. (link)
  • (For now) structure and control are key

How to use Cursor (+ best tips)

Recently, many developers do most of their coding with just Cursor's agent input box, and the author also handles 80% this way

  • Using YOLO mode: the AI automatically keeps fixing until the build or tests pass
    • Reportedly "yolo mode" has been renamed to "auto run mode".
  • Handling complex tasks: even difficult tasks can be automated iteratively with TDD-based prompts
  • Designing UI with Cursor: possible via Builder.io and the like
  • Automatic fixing of TypeScript errors: leave the work of repeatedly fixing and checking build errors to Cursor
  • Log-based debugging and iterative fixing: instruct it to add logs, then tell it to use them to solve the problem, and repeat
  • Using the Command K / Command I shortcuts: quickly edit the selected code
  • Automatic commit message generation: can generate automatically summarized commit messages
  • Bug finder: can detect potential bugs based on recent changes

Cursor users' top 3 preferred language models and why

  • Cursor users' top 3 preferred language models and why | GeekNews
  • gpt-4.1 is a careful, faithful helper, strong in accurate code understanding and a conservative approach
  • gemini 2.5 pro excels at handling wide context and has excellent image analysis, but risks causing over-editing
  • sonnet 3.5/3.7 is creative and smart, but lacks context retention and consistency, so it wavers in long conversations
  • grok-3-beta is slow but shows outstanding potential in design visualization and complex problem solving
  • Users split models according to their workflow, and prefer a strategy of restoring checkpoints and switching models when debugging fails

gpt-4.1

  • Behaves like an intelligent, highly reliable assistant
  • Does not jump to conclusions; follows requests but does not make excessive changes
  • A model that feels like an extension of the developer, especially suited to experienced developers

gemini 2.5 pro

  • Powerful when using wide context such as long console logs and entire code files
  • Excellent image analysis ability, can catch visual errors
  • The drawback is that it can act too autonomously, causing unnecessary code deletion or over-editing
  • Requires careful control

sonnet 3.5 / 3.7

  • 3.7 is creative and smart, but sometimes loses context or ignores instructions in long conversations
  • 3.5 is strong at understanding and editing code based on a single file
  • Its integration with Cursor is not showing consistent performance due to transitional issues

Other opinions and strategies

  • grok-3-beta is slow but useful for solving problems other models failed on
  • One user uses the following model division-of-labor strategy:
    • o3/4-mini: organizing plans and Markdown-based reasoning
    • gemini 2.5 pro: for whole-file-based problem analysis and function calling
    • sonnet 3.5: for cmd+k-based single-file edits

See also

Favorite site

Articles

  • Reverse engineering Cursor's LLM client | GeekNews
    • [Original] Reverse Engineering Cursor's LLM Client · TensorZero
    • Shares the experience of using TensorZero as an open-source proxy to intercept and analyze traffic between Cursor and LLM providers (OpenAI, etc.), and to observe prompts, models, and inference results in real time and run optimization experiments
    • Cursor can override the Base URL and model name when calling LLMs, so your own proxy (TensorZero) integrates easily
    • Internally, Cursor calls LLMs through its own servers, so a full proxy setup requires an Ngrok + Nginx reverse proxy and CORS header configuration
    • Through the proxy, you can observe everything Cursor actually sends to the LLM, including the system prompt, user prompt, and inline code edit requests, and you can switch/experiment with various LLMs (A/B testing) in real time
    • Analysis of Cursor's system prompt shows that with a prompt of only about 642 tokens, the LLM understands and handles most software engineering contexts. Code editing is handled by a separate "apply model" (a less intelligent auxiliary model)
    • With a proxy structure like TensorZero, per-user customized LLM experiments and feedback-based optimization are possible, and this structure is ideal for quality evaluation of code assistant tools (A/B testing), prompt optimization, and real-world usage monitoring
  • (Translation) The perfect Cursor AI setup for React and Next.js
author Zer0 sitemap