Skip to content
cursor-hello-world logo

Cursor Hello World

cursor-hello-world

Create your first project using Cursor AI features: Tab, Chat, Composer,

SKILL.md

Full skill instructions

Cursor Hello World

A hands-on 10-minute walkthrough of Cursor's four core AI features: Tab Completion, Chat, Inline Edit, and Composer.

Setup

mkdir cursor-hello && cd cursor-hello
npm init -y
npm install typescript tsx @types/​node --save-dev
npx tsc --init

Open the project in Cursor: cursor . (or File > Open Folder).

Exercise 1: Tab Completion

Create src/​utils.ts. Start typing and let Tab complete:

// Type this much:
export function formatCurrency(amount: number, currency: string

// Tab suggests:
export function formatCurrency(amount: number, currency: string = 'USD'): string {
  return new Intl.NumberFormat('en-US', {
    style: 'currency',
    currency,
  }).format(amount);
}

Press Tab to accept the full suggestion, or Cmd+Right Arrow to accept word-by-word.

Try These Prompts for Tab

Type a comment describing what you want, then start the function:

// Validate an email address using regex
export function validateEmail(

// Sort an array of objects by a key
export function sortBy<T>(

// Calculate the distance between two lat/​lng points in km
export function haversineDistance(

Tab reads your comment and generates the implementation.

Exercise 2: Chat (Cmd+L)

Open Chat with Cmd+L. Try these prompts:

Ask about your code:

@src/​utils.ts
What does the formatCurrency function do? Does it handle edge cases
like negative numbers or very large values?

Generate new code:

Write a TypeScript function that converts a nested object
to a flat key-value map with dot-separated keys.
Example: { a: { b: 1 } } → { "a.b": 1 }

Debug a concept:

Explain the difference between Promise.all() and Promise.allSettled()
with code examples showing when to use each.

Chat responds with explanations and code snippets. Click Apply on any code block to insert it into your editor.

Exercise 3: Inline Edit (Cmd+K)

Open src/​utils.ts. Select the formatCurrency function body. Press Cmd+K.

Type your instruction:

Add support for locale parameter with default 'en-US'.
Handle NaN input by returning '$0.00'.

Cursor shows the diff inline:

  • Green = added lines
  • Red = removed lines

Press Cmd+Y to accept, Esc to reject.

Inline Edit Quick Tasks

Select any code and press Cmd+K with instructions like:

  • "Add TypeScript types"
  • "Refactor to use early returns"
  • "Add error handling"
  • "Convert to async/​await"
  • "Add JSDoc documentation"

Exercise 4: Composer (Cmd+I)

Press Cmd+I to open Composer. Ask it to create a complete feature:

Create a simple task manager module:

1. src/​types/​task.ts - Task interface with id, title, completed, createdAt
2. src/​services/​task-service.ts - TaskService class with:
   - addTask(title: string): Task
   - completeTask(id: string): Task
   - listTasks(): Task[]
   - deleteTask(id: string): void
3. src/​index.ts - Demo script that creates 3 tasks, completes one, lists all

Use in-memory storage (Map). Include TypeScript types throughout.

Composer shows all files it will create/​modify. Review each diff, then click Apply All.

Run the Result

npx tsx src/​index.ts

Feature Comparison Summary

FeatureShortcutUse ForScope
TabAutomaticLine/​block completions while typingCurrent cursor position
ChatCmd+LQuestions, explanations, code snippetsConversation-based
Inline EditCmd+KEdit selected code with instructionsSelected code block
ComposerCmd+IMulti-file generation and refactoringMultiple files

Next Steps After Hello World

  1. Add project rules: Create .cursor/​rules/ with coding standards (see cursor-rules-config skill)
  2. Index your codebase: Open a real project and wait for indexing (see cursor-codebase-indexing skill)
  3. Learn @-mentions: Use @Files, @Codebase, @Docs in Chat (see cursor-context-management skill)
  4. Configure your model: Try different models for different tasks (see cursor-model-selection skill)

Enterprise Considerations

  • Hello World exercises do not send sensitive code to AI providers -- safe for evaluation
  • Enable Privacy Mode before using Cursor with production codebases
  • Tab completions work immediately; Chat and Composer require active subscription or BYOK API key

Resources

More skills from jeremylongshore

openrouter-compliance-review logo
jeremylongshore/claude-code-plugins-plus-skills

openrouter-compliance-review

Review OpenRouter integration for regulatory compliance (SOC2, GDPR,

2.8K 0
View
maintainx-data-handling logo
jeremylongshore/claude-code-plugins-plus-skills

maintainx-data-handling

Data synchronization, ETL patterns, and data management for MaintainX.

2.8K 0
View
groq-core-workflow-a logo
jeremylongshore/claude-code-plugins-plus-skills

groq-core-workflow-a

Execute Groq primary workflow: chat completions with tool use and JSON

2.8K 0
View
validating-csrf-protection logo
jeremylongshore/claude-code-plugins-plus-skills

validating-csrf-protection

Validate CSRF protection implementations for security gaps. Use when

2.8K 0
View
api-contract logo
jeremylongshore/claude-code-plugins-plus-skills

api-contract

Configure this skill should be used when the user asks about "API contract",

2.8K 0
View
ideogram-incident-runbook logo
jeremylongshore/claude-code-plugins-plus-skills

ideogram-incident-runbook

Execute Ideogram incident response with triage, mitigation, and postmortem.

2.8K 0
View
gamma-sdk-patterns logo
jeremylongshore/claude-code-plugins-plus-skills

gamma-sdk-patterns

Reusable patterns for the Gamma REST API (no SDK exists).

2.8K 0
View
deepgram-sdk-patterns logo
jeremylongshore/claude-code-plugins-plus-skills

deepgram-sdk-patterns

Apply production-ready Deepgram SDK patterns for TypeScript and Python.

2.8K 0
View
openrouter-upgrade-migration logo
jeremylongshore/claude-code-plugins-plus-skills

openrouter-upgrade-migration

Migrate to OpenRouter from direct provider APIs or upgrade between SDK/model

2.8K 0
View
openrouter-common-errors logo
jeremylongshore/claude-code-plugins-plus-skills

openrouter-common-errors

Diagnose and fix common OpenRouter API errors. Use when encountering

2.8K 0
View
linear-cost-tuning logo
jeremylongshore/claude-code-plugins-plus-skills

linear-cost-tuning

Optimize Linear API usage, reduce unnecessary calls, and maximize

2.8K 0
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View