Instant Actions
1-5 second improvements that add up fast
Master the art of micro-optimizations. Learn dozens of daily time-saving techniques that individually save seconds but collectively reclaim hours of productive coding time every week.
Small optimizations create massive impact:
Now multiply that by 20-30 different optimizations, and you’ve reclaimed weeks of productive time annually.
Instant Actions
1-5 second improvements that add up fast
Smart Defaults
Set once, save time forever
Batch Operations
Do multiple things at once
Automation Rules
Let Cursor work while you think
# Instead of: New File → Type name → Select folder# Use: Ctrl+K in file explorer
"create UserProfile.tsx in components folder with React component boilerplate"
Time saved: 10 seconds per file creation
// Just type the component/function nameUserProfile<Tab>// Cursor auto-imports: import { UserProfile } from './components/UserProfile'
Time saved: 5 seconds per import
// Place cursor on any functionshowDocs<Ctrl+K>"add JSDoc with parameters and return type"// AI adds complete documentation in 1 second
Time saved: 30 seconds per function
// Select variable nameuserName<Ctrl+K>"rename to currentUserName throughout file"// Instant rename with all references
Time saved: 20 seconds per rename
// When you see a red squiggle<Ctrl+.> // Quick fix menu// or<Ctrl+K> "fix this error"
Time saved: 15 seconds per error
{ "Smart Console Log": { "prefix": "clg", "body": [ "console.log('$1:', $1); // @cursor: add helpful context" ] }, "Error Handler": { "prefix": "tryx", "body": [ "try {", " $0", "} catch (error) {", " // @cursor: add appropriate error handling", "}" ] }}
{ "files.autoSave": "afterDelay", "files.autoSaveDelay": 1000, "editor.formatOnSave": true, "editor.codeActionsOnSave": { "source.fixAll": true, "source.organizeImports": true }}
Time saved: 5 seconds × 100 saves/day = 8 minutes/day
# .zshrc or .bashrcalias gs="git status"alias gc="cursor @git 'create commit message from staged changes'"alias pr="cursor @git 'create PR description from branch changes'"alias fix="cursor 'fix all linter errors in current file'"
- Always suggest the fastest solution first- Auto-import all dependencies- Generate tests alongside implementations- Add error handling automatically- Include loading states in UI components- Add TypeScript types for all functions
@folder components/"Convert all class components to functional components with hooks"
Time saved: 5 minutes per component × 10 components = 50 minutes
@folder src/utils/"Generate test files for all utilities that don't have tests"
Time saved: 10 minutes per test file × 20 files = 3.3 hours
@folder api/"Add OpenAPI documentation to all endpoints"
Time saved: 5 minutes per endpoint × 30 endpoints = 2.5 hours
// Use Agent mode for complex multi-file operations"Find all console.log statements and replace with proper logger.debug calls""Update all deprecated React lifecycle methods to hooks""Add error boundaries to all route components"
// Type: rfc<Tab>// Cursor knows your patterns and generates:import React from 'react';import styles from './ComponentName.module.css';
interface ComponentNameProps { // Cursor predicts common props}
export const ComponentName: React.FC<ComponentNameProps> = ({ // Props destructured}) => { // Common hooks you use
return ( <div className={styles.container}> {/* Cursor predicts structure */} </div> );};
// Type: api<Tab>// Generates your standard endpoint:router.post('/endpoint', authenticate, validate(schema), async (req, res) => { try { // Cursor adds standard structure const result = await service.method(req.body); res.json({ success: true, data: result }); } catch (error) { // Standard error handling logger.error('Endpoint error:', error); res.status(500).json({ success: false, error: error.message }); } });
# Automated commit workflowalias commit="cursor '@git create conventional commit message from staged changes'"
# Smart PR creationalias newpr="cursor '@git create PR with: title from branch name, description from commits, checklist from .github/pull_request_template.md'"
# Automated changelogalias changelog="cursor '@git generate changelog from commits since last tag'"
// Before committing@git diff --staged
"Review this code for:- Security issues- Performance problems- Missing error handling- Code style violationsFix any issues found"
Time saved: 10 minutes per commit
// After writing a functionfunction calculateDiscount(price, percentage) { // implementation}
// Immediately:<Ctrl+K> "generate comprehensive tests for this function"
Time saved: 5 minutes per function
# Instead of manually adding files@related # Cursor finds related files automatically@imports # Include all files that import this one@similar # Find files with similar patterns
// Building context for a bug fix@error "TypeError: Cannot read property 'name'"@recent # Recent changes that might have caused it@blame # Who last touched this code
# Semantic search saves time@code "authentication flow" # Finds all auth-related code@code "payment processing" # Finds payment logic@code "user permissions" # Finds authorization code
# Start your day script#!/bin/bashcursor @git "summarize PRs that need my review"cursor @linear "list my tasks for today with priorities"cursor @slack "summarize important messages"cursor "create a daily plan based on the above"
# Quick PR review@pr #123
"Provide:1. Summary of changes2. Potential issues3. Test coverage analysis4. Performance impact5. Security concerns"
# Wrap up scriptcursor @git "create summary of my commits today"cursor @linear "update task statuses based on commits"cursor "generate standup notes for tomorrow"
// Cursor learns your patterns// After typing a few similar functions:function get<Tab>// Cursor predicts: getUserById, getProductBySlug, etc.
// Chain operations in one command"Extract this logic to a custom hook,add TypeScript types,generate tests,and update all components using it"
// Work on multiple features simultaneously// Terminal 1: Frontendcursor "implement user dashboard UI"
// Terminal 2: Backendcursor "create API endpoints for dashboard"
// Terminal 3: Testscursor "generate integration tests for dashboard flow"
// Track your time savingsconst timeSavers = { autoImports: { count: 0, secondsEach: 5 }, quickFixes: { count: 0, secondsEach: 15 }, aiCompletions: { count: 0, secondsEach: 20 }, batchOperations: { count: 0, secondsEach: 300 },
getTotalSaved() { return Object.values(this).reduce((total, saver) => { if (typeof saver === 'object') { return total + (saver.count * saver.secondsEach); } return total; }, 0); }};
Activity | Frequency | Time Saved | Weekly Total |
---|---|---|---|
Auto-imports | 200/week | 5 sec | 16.7 min |
Quick fixes | 100/week | 15 sec | 25 min |
AI completions | 300/week | 20 sec | 100 min |
Batch refactoring | 5/week | 30 min | 150 min |
Total | 4.9 hours |
{ "sharedSnippets": "https://github.com/team/cursor-snippets", "sharedRules": ".cursor/team-rules/", "sharedAliases": "scripts/team-aliases.sh", "sharedWorkflows": "workflows/"}
# Weekly team sync"What time-saving technique did you discover this week?"- Alice: "Using @similar to find related code"- Bob: "Batch converting tests to TypeScript"- Carol: "Auto-generating API documentation"
Start implementing these time savers to:
Your journey through productivity patterns is complete! You now have:
Remember: Every second saved is a second earned for creative work. Start with one technique, make it a habit, then add another. Within a month, you’ll be coding at superhuman speed.