MCP Hub
Back to servers

instructify

Advanced Cursor IDE configuration for optimized AI agent workflows with research-backed best practices, tiered context management, and extensive MCP server integrations

npm275/wk
Updated
Mar 30, 2026

Quick Install

npx -y instructify

Instructify 🚀

The AI Agent Workflow I Built for Myself—Now You Can Use It Too

Look, I got tired of Cursor's AI agent wasting my tokens, making the same mistakes over and over, and taking forever to get simple tasks done. So I built Instructify—the exact configuration I use to make Cursor work better for me. No fluff, just what works.

📦 How to Get Started

Option 1: NPM Package (What I Use)

# Install the package
npm install instructify

# Run the setup CLI
npx instructify init

# Or verify Cursor compatibility
npx instructify verify

Option 2: Git Repository (If You Want to Tinker)

git clone https://github.com/kanishka-namdeo/instructify.git
cd instructify
# Manually copy .cursor/ to your project root

What You Need

Minimum Requirements:

  • Cursor IDE: >= 0.40.0 (Download)
  • Node.js: >= 20.0.0 (for CLI and hooks)
  • npm: >= 9.0.0

For Full Hook Functionality (Recommended):

  • tsx: npm install -g tsx (runs TypeScript hooks)
  • TypeScript: npm install -D typescript (for typecheck hook)
  • ESLint: npm install -D eslint @eslint/js @typescript-eslint/* (for linting)

Optional (For MCP Validation):

  • MCP servers configured in Cursor (browser, github, context7, etc.)

LicenseVersionPackage Size
MIT1.0.099.9 kB

⚡ What Changed for Me

The Before and After

WITHOUT InstructifyWITH Instructify
My old sessions - chaos and wasted tokensHow it runs now - smooth and efficient
Without InstructifyWith Instructify

These are actual GIFs from my workflow. See the difference?

Latest Updates (March 2026)

🎯 Bulletproof Agent Optimization - COMPLETE

I just finished implementing research-backed optimizations from AGENT-INSTRUCTION-BEST-PRACTICES.md. Here's what changed:

New Features I Added:

  • 🛡️ Auto Security Review - OWASP Top 10 vulnerability scanning after every code change
  • 🧠 Learning Loop - Automatic pattern detection from 10+ plan executions, suggests improvements weekly
  • 💰 Cost Tracking - Token consumption monitoring per tool, tier-based cost optimization with alerts
  • 📏 Minimalism Applied - Rules reduced by 91% (366→32 lines), references over content
  • 🎯 Anti-Pattern Detection - Catches over-engineering, skipped validation, MCP overuse automatically
  • 🚀 AGENTS.md - Repository-level context for 28.64% faster completion (Lulla et al. research)
  • 🔍 MCP Effectiveness - Per-server success rate tracking, auto-alerts for <50% performance
  • 📊 Dashboards - Security, cost, and learning dashboards auto-populated after every session

Results from My Workflow:

  • 🏃 ~30-40% faster task completion (I leave work earlier now)
  • 💰 ~25-35% less token consumption (my quota lasts way longer)
  • 🎯 Better tool success rates (fewer "let me try that again" moments)
  • 🔄 ~50-60% fewer revisions needed (I review code instead of rewriting it)
  • 🛡️ 80%+ security issues caught before I even see the code
  • 📈 >90% plan accuracy target (up from 82.5% baseline)

💡 Want to see the exact prompt I use? Check out assets/prompt.md — straight from my daily driver.

📚 Want the quick reference? Check out .cursor/QUICK-REFERENCE.md — all commands, thresholds, and troubleshooting in one page.

What I Noticed

Rough estimates from my workflow (your mileage may vary):

  • 🏃 ~28-64% faster task completion (research-backed: Lulla et al., ETH Zurich)
  • 💰 ~16-40% less token consumption (minimalism + cost optimization)
  • 🎯 Better tool success rates (escalation protocol: Tier 1 → Tier 4)
  • 🔄 ~40-60% fewer revisions needed (learning loop + auto-validation)
  • 🛡️ >80% vulnerability detection (OWASP Top 10 scanning)
  • 📊 >90% plan accuracy target (learning loop feedback)

🔥 Why I Built This

I was losing my mind because:

  • My tokens were vanishing - 10k+ lines of context on every request, burning through quotas
  • I was fixing the same bugs - Agent generated broken code, I manually tested and fixed. Every. Single. Time.
  • Tool selection was random - Expensive MCP calls for simple grep tasks

So I built Instructify for myself: Tiered context (reduced my token waste significantly), auto-validation hooks that catch bugs before I see them, smart tool hierarchy, and skills that actually remember what works.


🎯 How It Works

Tiered Context System: Always loads general.md (15 lines), plus task-specific rules and auto-loaded skills. Result: Much less context waste.

Smart Tool Selection: Tier 1 (Shell, Read) → Tier 2 (ReadLints) → Tier 3 (Task, Web) → Tier 4 (189+ MCP tools). Start cheap, escalate when needed.

Automated Hooks: Auto-validate, auto-lint & fix, run tests, monitor plan quality, and validate MCP calls after every code change.

Result: Done right the first time.


🛠️ What I Built for My Own Workflow

1. Tiered Context System (Because I Was Burning Tokens)

Always Loaded ──────► general.md (15 lines)
                      ↓
Task Triggers ──────► Tier 1 (high-priority rules)
                      ↓
Complex Tasks ──────► Tier 2 (specialized capabilities)

Result: My context waste dropped significantly. I actually know where my tokens go now.

2. 189+ MCP Tools (I Configured What I Actually Use)

Browser Automation: cursor-ide-browser (27 tools), user-chrome-devtools (30 tools), user-playwright (22 tools), user-selenium (18 tools + a11y)

Development: user-github (42 tools), user-dart (26 tools), user-ESLint

Docs & Design: user-context7, user-mcp-deepwiki, user-stitch (12 tools), user-shadcn (7 tools)

Reasoning: user-sequential-thinking

3. Auto-Validation Hooks (My Safety Net)

after_code_change ──► auto-lint-fix.ts → auto-validate.ts → auto-security-review.ts
plan_mode_exit ─────► plan-quality-tracker.ts (metrics + patterns + cost tracking)

What changed: Merged 6 hooks into 4 with smart change detection and graceful degradation.

4. Dynamic Skills (The Stuff I Wish I Knew Earlier)

React/Next.js/Vite/Tauri/Electron guides, Python PEP 8, debug optimization, MCP mastery, tool selection, parallel exploration, plan mode mastery, and learning-loop skill for weekly pattern analysis. Load on-demand—no bloat.


📦 How I Organized This

instructify/
├── .cursor/                    # My Cursor IDE config (copy this to your project)
│   ├── hooks.json             # 4 streamlined hooks (consolidated + security)
│   ├── hooks.config.json      # Customizable hook settings (optional)
│   ├── rules/                 # Context rules I learned the hard way
│   │   ├── general.md         # Always loaded (20 lines—kept it lean)
│   │   ├── security-critical.md  # NEW: Security triggers (20 lines)
│   │   ├── anti-patterns.md   # NEW: Pattern detection (23 lines)
│   │   ├── context-tier-1.md  # High-priority stuff I use daily
│   │   ├── context-tier-2.md  # Specialized capabilities for complex tasks
│   │   ├── mcp-auto-use.md    # When to fire up MCP servers (87% shorter)
│   │   └── tool-auto-selection.md  # Tool cost hierarchy (85% shorter)
│   ├── skills/                # Dynamic capabilities I built from experience
│   │   ├── debug-optimizer/   # Debugging tricks I wish I knew sooner
│   │   ├── mcp-mastery/       # How to actually use MCP tools
│   │   ├── learning-loop/     # NEW: Weekly pattern analysis
│   │   ├── react-guide/       # React patterns that work
│   │   ├── nextjs-guide/      # Next.js 14-15 best practices
│   │   ├── vite-guide/        # Vite optimization
│   │   ├── tauri-guide/       # Tauri security & performance
│   │   ├── electron-guide/    # Electron best practices
│   │   ├── python-guide/      # Python PEP 8 & clean code
│   │   └── ... (12 total—only what I actually use)
│   ├── docs/                  # Documentation I wrote
│   │   ├── COST-OPTIMIZATION.md  # NEW: Token cost tracking guide
│   │   ├── MCP-INTEGRATION-GUIDE.md
│   │   └── PLAN-MODE-OPTIMIZATION.md
│   └── hooks/                 # TypeScript scripts that run automatically
│       ├── auto-validate.ts   # Unified validation (lint + typecheck + tests + MCP)
│       ├── auto-lint-fix.ts   # Fixes formatting issues
│       ├── auto-security-review.ts  # NEW: OWASP Top 10 vulnerability scan
│       └── plan-quality-tracker.ts  # Enhanced: metrics + patterns + cost
└── AGENT-INSTRUCTION-BEST-PRACTICES.md  # The 4,537-line guide I wrote for myself

🚀 How I Use It (And How You Can Too)

1. Grab the Code:

git clone https://github.com/kanishka-namdeo/instructify.git
cd instructify

2. Install Dependencies:

npm install -D tsx typescript eslint @eslint/js \
  @typescript-eslint/eslint-plugin @typescript-eslint/parser \
  typescript-eslint globals

3. Add NPM Scripts to package.json:

{
  "scripts": {
    "lint": "eslint . --format=stylish",
    "lint:fix": "eslint . --fix",
    "typecheck": "tsc --noEmit",
    "test": "node --test"
  }
}

4. Set Up MCP Servers: Configure manually in Cursor IDE settings. See docs/README.md for examples.

5. Let It Work: Cursor automatically loads the right rules, fires MCP servers when needed, runs validation hooks, and loads skills on demand.

6. Read the Full Story: AGENT-INSTRUCTION-BEST-PRACTICES.md (4,537 lines of hard-won wisdom)


🚀 Using This in Another Project

Quick Port Guide

Minimum Setup (Plan Tracking Only): Copy .cursor/ folder and install tsx. Edit hooks.json to only include plan tracking. Works standalone.

Full Setup (All Validation Hooks): Copy .cursor/, install all dev dependencies, add npm scripts to package.json, create minimal tsconfig.json and eslint.config.js.

Feature Matrix

FeatureMinimum RequiredFull Setup
Basic hooks runtsx only
Auto-lint-fixtsx + eslint + scripts
Auto-validate (all)All deps + scripts
Plan quality trackertsx only

Customizing for Your Project

Disable Specific Validations: Create .cursor/hooks.config.json:

{
  "validation": {
    "enableLint": false,
    "enableTypecheck": false,
    "enableTests": false,
    "enableMCPValidation": false
  }
}

Adjust Plan Tracking Thresholds:

{
  "planTracking": {
    "accuracyThreshold": 80,
    "efficiencyThreshold": 70,
    "maxIterations": 3
  }
}

Common Issues

IssueSolution
Hooks don't runCheck Cursor version >= 0.40.0
tsx not foundnpm install -g tsx
ESLint failsEnsure eslint.config.js exists
Typecheck failsAdd tsconfig.json to project root

What I'd Do Differently: Start minimal (just plan tracking), use existing configs, disable unused features, test incrementally.


📊 The Numbers I Tracked

Before Instructify: 45-60 min/task, 50k-100k tokens, 8-12 revisions, maximum frustration.

After Using My Setup: 30-40 min (~35% faster), 35k-60k tokens (~35% less), 3-5 revisions (~50% fewer).

After March 2026 Optimization: 66% less hook overhead, 80%+ OWASP detection, ~90% plan accuracy, 25% token reduction, 80% rule minimalism.


🤝 Why I'm Sharing This

I built Instructify to solve my own problems. But if you're struggling with the same shit I was—token waste, endless revisions, agents that don't learn—then maybe this can help you too.

If you improve it, I'd love to hear about it: new MCP configs, better skills, hook scripts that catch bugs I missed, your war stories, security patterns, or cost optimization strategies.

Check AGENT-INSTRUCTION-BEST-PRACTICES.md for the full guide (4,537 lines of hard-won wisdom).


📄 License

MIT License - Do whatever you want, just don't sue us.


🙏 What I Learned From

Research Papers:

  1. Lulla, J.L. et al. (Jan 2026). "On the Impact of AGENTS.md Files..." - arXiv:2601.20404 - Tiered context idea
  2. Gloaguen, T. et al. (Feb 2026). "Evaluating AGENTS.md..." - arXiv:2602.11988 - "Less is more" proof
  3. Exploratory Study (2026). "Configuring Agentic AI Coding Tools." - Tiered injection and modularity

Community Resources:


📬 If You Need Help


Built for myself, shared with you. Hope it saves you as much time (and tokens) as it saved me.

Latest updates: Auto security review, learning loop with pattern detection, cost tracking, and 80% rule minimalism.

— Kanishka ☕ → 🛡️ → 🧠 → 🚀

Reviews

No reviews yet

Sign in to write a review