Skip to content

CrossComm/ai-coding-exercises

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Cursor IDE Training Exercises

Overview

Welcome to the Cursor IDE training exercises! These hands-on exercises will teach you the most powerful features of Cursor 2.0 through practical coding scenarios. Complete all exercises in approximately 63 minutes (or ~27 min for Foundations only).

What You'll Learn

By completing these exercises, you'll master:

  • Intelligent Autocomplete - Let Cursor write code from comments and context
  • Project Context - Use AGENTS.md to teach AI your project standards
  • Coding Standards - Enforce patterns with auto-attaching Cursor Rules
  • Context & Shortcuts - Navigate efficiently with @ references and keyboard shortcuts
  • Safe Experimentation - Use checkpoints and duplicate for risk-free exploration
  • Real-time Documentation - Get current library docs with MCP/Context7
  • Agent Workflow - Use the Agents Window for autonomous coding
  • Mode & Model Selection - Choose the right AI mode and model for each task
  • Strategic Planning - Create executable plans with Plan Mode
  • Parallel Productivity - Run multiple agents simultaneously for 3-4x speed boost

Prerequisites

Before starting, ensure you have:

  • Cursor IDE installed (latest version)
  • Git configured on your system
  • Programming knowledge in at least one of: C#, JavaScript, or Python
  • Node.js installed (for Context7 MCP server - covered in Exercise 06)

Exercise Structure

Each exercise is language-agnostic in concept but includes starter code for:

  • C# - Following m_ prefix conventions, #region blocks, XML documentation
  • JavaScript - ES6+ patterns, async/await, modern module systems
  • Python - PEP 8 conventions, type hints, pythonic patterns

Choose your preferred language and work through the exercises in order.

The 12 Exercises

Phase 1: Foundations (27 min)

Learn: Tab completion, comment-to-code generation, commit message generation

What you'll do: Use Cursor's predictive capabilities to write methods from comments, navigate with Tab-Tab, and auto-generate commit messages.


Learn: Project context documentation, narrative AI instructions

What you'll do: Create comprehensive AGENTS.md files that help AI understand your project holistically, including nested directory-specific context.


Learn: Auto-attach rules, glob patterns, enforced coding patterns

What you'll do: Create .cursor/rules that automatically enforce naming conventions, test patterns, and code quality standards when working in specific files.


Learn: @ symbol references, essential keyboard shortcuts, explicit vs auto context

What you'll do: Master the @ symbol to add precise context (@files, @folders, @symbols, @URLs) and learn keyboard shortcuts (Cmd+I, Cmd+K, Cmd+L, Shift+Tab) for efficient workflows.


Learn: Automatic checkpoints, restore agent changes, Duplicate feature

What you'll do: Experience Cursor's safety net - use checkpoints to rollback agent changes, and Duplicate to fork conversations and explore alternative approaches.


Learn: MCP server setup, Context7 real-time documentation, "use context7" prompts

What you'll do: Install the Context7 MCP server and use "use context7" to fetch current documentation, avoiding outdated code generation.


Phase 2: Cursor 2.0 Core Features (36 min)

Fresh Start Recommended: Before starting Phase 2, reset exercise files to their original state:

git checkout -- exercises/cursor-exercises/exercises-files/

Learn: Agents Window (Cmd+I), Review changes, Find Issues, agent execution

What you'll do: Experience the complete agent workflow - open Agents Window, create tasks, monitor progress, review changes, use AI-powered issue detection, and accept changes.


Learn: Agent/Ask/Plan/Custom modes, Composer vs Claude Sonnet model selection

What you'll do: Switch between agent modes for different tasks, and choose the right AI model (Composer for speed, Sonnet for complex reasoning).


Learn: Executable planning (Shift+Tab), plan critique, phase-by-phase execution

What you'll do: Use Plan Mode to create structured implementation plans for complex features, critique the plan to catch issues early, then execute phase-by-phase or all at once.


Learn: Parallel agents, worktrees, 3-4x productivity boost

What you'll do: Launch multiple agents simultaneously working on independent tasks using isolated worktrees, achieving dramatic productivity gains through parallelization.


Learn: Multiple solution comparison, model selection, architectural decisions

What you'll do: Use Cycle Agent Count to generate multiple solutions from different models for a caching feature, then compare and select the best approach.


Learn: Embedded browser, visual verification, E2E testing with AI

What you'll do: Use Cursor's browser tool to have an AI agent navigate websites, interact with forms, and verify visual elements - enabling AI-assisted end-to-end testing.


Getting Started

  1. Choose Your Language

    • Navigate to any exercise folder
    • Open the language folder you're comfortable with (csharp/, javascript/, or python/)
    • Each exercise README explains the concept in language-agnostic terms
  2. Work Through Exercises in Order

    • Exercises build on each other progressively
    • Start with Exercise 01 and work sequentially
    • Don't skip exercises - each introduces critical concepts
  3. Read the Exercise README First

    • Each exercise has detailed instructions
    • Learning objectives are clearly stated
    • Success criteria help you know when you're done
  4. Use Cursor Features as Instructed

    • Follow the prompts to practice specific Cursor features
    • Experiment and observe Cursor's behavior
    • Compare your results with the exercise goals

Learning Philosophy

These exercises follow a learn-by-doing approach:

  • No solution folders - You learn through practice and experimentation
  • Real scenarios - Work with practical code problems, not toy examples
  • Progressive complexity - Each exercise builds on previous knowledge
  • Feature-focused - Master specific Cursor capabilities in each exercise

Tips for Success

  • Open relevant files in tabs - Cursor uses open tabs for better context
  • Read exercise READMEs carefully - They contain important setup steps
  • Don't rush - Take time to understand each feature
  • Experiment - Try variations beyond the instructions
  • Use keyboard shortcuts - Cmd+I (Agents Window), Shift+Tab (Plan Mode)

Keyboard Shortcuts Reference

Shortcut Action
Cmd/Ctrl + I Open Agents Window
Cmd/Ctrl + K Inline edit selected code
Cmd/Ctrl + L Open chat with current file
Shift + Tab Enter Plan Mode
Cmd/Ctrl + T New agent tab
Cmd/Ctrl + . Cycle through agent modes

Workshop Format Options

For Individual Learners

Work through all 12 exercises at your own pace (~63 minutes total)

For Workshop Instructors

  • New students: Complete all exercises (Phase 1 and Phase 2)
  • Returning students familiar with basic Cursor: Skip to Phase 2 (Exercise 07+) for Core Agent features
  • Time-constrained (~27 min): Focus on Exercises 01-06 (Foundations)
  • Quick agent overview (~18 min): Exercises 07-09 only (Agent Workflow + Plan Mode)

What's Next?

After completing these exercises, you'll be ready to:

  • Use Cursor 2.0 for real project work
  • Implement the complete agent-centered workflow
  • Leverage parallel agents for maximum productivity
  • Create effective project documentation (AGENTS.md, rules)
  • Plan and execute complex features confidently
  • Navigate efficiently with keyboard shortcuts
  • Use real-time documentation with Context7
  • Choose the right AI mode and model for each task

Additional Resources

Support

If you encounter issues:

  1. Check the exercise README for troubleshooting tips
  2. Verify your Cursor version is up to date
  3. Ensure prerequisites are installed (Node.js for MCP)
  4. Review the full workshop guide for detailed explanations
  5. Refer to the cheat sheet for quick syntax reminders

Ready to start? Head to Exercise 01: Autocomplete and begin your Cursor mastery journey!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published