This file provides instructions for Cursor's AI Agent. It follows Boris Cherny's recommendations for AI-assisted coding workflows.
This repository contains configurations and workflows for optimizing AI-assisted coding with Claude Code and Cursor. Use this as a reference for setting up similar workflows in other projects.
- Use Python 3.10+
- Format with Ruff (
ruff format .) - Lint with Ruff (
ruff check .) - Test with pytest (
pytest --cov) - Always include type hints
- Use Google-style docstrings
- Follow PEP 8 with max line length 120
- Functions/variables: snake_case
- Classes: PascalCase
- Constants: UPPER_SNAKE_CASE
- Files: snake_case.py
Use Conventional Commits:
feat:new featurefix:bug fixdocs:documentation changesrefactor:code refactoringtest:adding or updating testschore:maintenance tasks
Always:
- Create feature branches from main
- Run tests before committing
- Write clear, concise commit messages
- Start complex tasks in Plan mode
- Get the plan right before implementing
- Break large tasks into smaller, focused steps
- Always verify work with tests when available
- Run linter after making changes
- Test UI changes in browser when applicable
- Use try-except with proper logging
- Provide clear error messages
- Don't silently ignore exceptions
| File | Purpose |
|---|---|
CLAUDE.md |
Claude Code memory (project-specific) |
AGENTS.md |
This file - Cursor agent instructions |
.cursor/skills/ |
Modular Cursor skills |
threads.md |
Boris Cherny's tips source material |
| Task | Command |
|---|---|
| Format code | ruff format . |
| Lint code | ruff check . |
| Fix lint issues | ruff check --fix . |
| Run tests | pytest |
| Run with coverage | pytest --cov |
- Provide concise, focused responses
- Show code examples when helpful
- Explain the "why" behind changes
- Prefer editing existing files over creating new ones
- Only create documentation when explicitly requested