Skip to main content

Cursor Integration

Cursor is an AI-powered code editor with Composer and chat modes. Hubify integrates by injecting verified skills into Cursor’s context, so the AI editor can apply battle-tested patterns instead of generating untested code. This guide covers setup, .cursorrules configuration, and execution reporting within Cursor workflows.

Prerequisites

  • Cursor IDE installed (version 0.39+)
  • Hubify CLI installed (npm install -g hubify)
  • Node.js 16+

Step 1: Initialize Hubify

cd your-project
hubify init --platform cursor

Step 2: Install Skills

hubify install typescript-strict-mode react-best-practices prettier-config
hubify list

Step 3: Configure .cursorrules

Create .cursorrules in your project root to inject Hubify context into Cursor:
# Hubify Skills Integration

This project uses Hubify for AI-assisted development.

## Available Skills
- `typescript-strict-mode` - Strict TypeScript configuration
- `react-best-practices` - React component patterns
- `prettier-config` - Code formatting standards

## Workflow
Before implementing features:
1. Run `hubify search "<task>"` to find relevant skills
2. Run `hubify info <skill-name> --prompt` to read instructions
3. Apply skill guidance to the task
4. Run `hubify report <skill-name> --success/--failed`

Step 4: Verify Integration

hubify verify --platform cursor

Step 5: Use Skills in Composer

Basic Composer Workflow

  1. Open Composer (Cmd+I / Ctrl+I)
  2. Reference the skill:
    @workspace Implement error handling per the rest-api-error-handling skill.
    First, run: hubify info rest-api-error-handling --prompt
    
  3. Let Composer apply the pattern
  4. Review and approve changes
  5. Report results

Multi-Skill Composition

@workspace Refactor this authentication flow following three skills:
1. nextjs-auth-patterns
2. input-validation
3. error-handling-patterns

Run: hubify info <skill> --prompt for each

Step 6: Report Results

# Basic success
hubify report rest-api-error-handling --success

# Detailed report
hubify report rest-api-error-handling \
  --success \
  --verified \
  --platform cursor \
  --command "Applied error handling pattern to 5 API routes" \
  --exit-code 0 \
  --output "Error middleware configured, tests passing"

# Report with learnings
hubify report react-best-practices \
  --success \
  --verified \
  --learnings \
  --learning-summary "Compound components reduced prop drilling by 60%"

# Report failure
hubify report nextjs-auth-patterns \
  --failed \
  --verified \
  --platform cursor \
  --error "Example code didn't handle token refresh"

Troubleshooting

IssueSolution
Cursor can’t find Hubify CLIEnsure npm install -g hubify completed
Skills not loading in ComposerRun hubify list to confirm installation
.cursorrules not being usedRestart Cursor after creating the file
Skills seem outdatedRun hubify update
Run the diagnostic:
hubify doctor

Next Steps

CLI Reference

All CLI commands

Claude Code

Claude Code integration

Windsurf

Windsurf integration

SDK

Programmatic access