{"slug": "taming-380-agent-skills-in-cursor-selective-injection-over-context-bloat", "title": "Taming 380+ Agent Skills in Cursor: Selective Injection over Context Bloat", "summary": "A developer outlined a method for using the 380+ skill catalog alirezarezvani/claude-skills in Cursor without blowing up context, noting that loading even 40 skills pushes 25k–40k tokens into every prompt turn. The approach uses git sparse-checkout to isolate only engineering and software-development subtrees and compiles them into a scoped .cursor/rules/claude-skills.mdc file with alwaysApply set to false, so skills load lazily. The developer also reports that routing Cursor's API calls through a proxy with native prompt caching cuts heavy multi-turn context costs by roughly 80-90%.", "body_md": "When experimenting with `alirezarezvani/claude-skills`—a massive catalog of 380+ agent skills covering architecture, debugging, and compliance—the immediate temptation is to wire the entire directory straight into your workspace.\n\nDon't do it.\n\nBluntly dumping hundreds of skill definitions into `.cursorrules` or global system prompts wastes context tokens, degrades model instruction-following, and leads to retrieval interference. Claude Code and Codex handle large dynamic tool registries through progressive loading, but IDE-based agents like Cursor and VS Code require strict context pruning.\n\nEach skill file carries markdown frontmatter, execution scripts, and explicit guardrails. Loading even 40 skills simultaneously pushes 25k–40k tokens into every prompt turn before you even paste a stack trace.\n\nTo adopt `alirezarezvani/claude-skills` effectively in Cursor, we isolate only domain-relevant subtrees (e.g., `engineering/` and `code-review/`) and map them directly into Cursor's modular `.cursor/rules/` directory using targeted extraction.\n\nRun this lightweight bash script in your project root to pull only the engineering rules and build a clean, scoped `.cursor/rules/claude-skills.mdc` file:\n\n``` bash\n#!/usr/bin/env bash\nset -euo pipefail\n\nSKILLS_DIR=\".claude-skills-cache\"\nTARGET_RULE=\".cursor/rules/claude-skills.mdc\"\nmkdir -p .cursor/rules \"$SKILLS_DIR\"\n\n# Sparse-checkout targeted domains only\nif [ ! -d \"$SKILLS_DIR/.git\" ]; then\n  git clone --depth 1 --filter=blob:none --no-checkout \\\n    https://github.com/alirezarezvani/claude-skills.git \"$SKILLS_DIR\"\n  pushd \"$SKILLS_DIR\" > /dev/null\n  git sparse-checkout set skills/engineering skills/software-development\n  git checkout\n  popd > /dev/null\nfi\n\n# Compile into a scoped Cursor rule\ncat << 'EOF' > \"$TARGET_RULE\"\n---\ndescription: \"Core Engineering Patterns from claude-skills\"\nglobs: *.{ts,js,py,go,rs}\nalwaysApply: false\n---\n\n# Selected Engineering Guardrails\nEOF\n\nfind \"$SKILLS_DIR/skills\" -name \"SKILL.md\" -exec cat {} + >> \"$TARGET_RULE\"\necho \"Compiled active skills into $TARGET_RULE\"\n```\n\nSetting `alwaysApply: false` ensures Cursor only pulls the skills when your prompt or file matching calls for them, keeping baseline conversation turns lightweight.\n\nEven with selective compilation, running deep architectural reviews alongside detailed rule files swells prefix tokens quickly. In our workflow, we route Cursor's custom OpenAI/Anthropic API calls through B-Lost's fast proxy endpoint, noting that native prompt caching cuts heavy multi-turn context costs by ~80-90% without losing chat history. When your system prefix remains stable across consecutive prompts, prompt caching turns an expensive 30k-token prompt into near-zero marginal inference overhead.\n\n`alirezarezvani/claude-skills` is one of the most comprehensive skill repositories available for coding agents, but treating it as an all-in-one bundle breaks token economy. Filter by domain, enforce lazy invocation via `.cursor/rules/`, and let prompt caching handle the rest.", "url": "https://wpnews.pro/news/taming-380-agent-skills-in-cursor-selective-injection-over-context-bloat", "canonical_source": "https://dev.to/sloves/taming-380-agent-skills-in-cursor-selective-injection-over-context-bloat-3d35", "published_at": "2026-10-01 22:32:02+00:00", "updated_at": "2026-10-01 22:44:39.447745+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "developer-tools", "large-language-models", "mlops"], "entities": ["Cursor", "alirezarezvani/claude-skills", "Claude Code", "Codex", "VS Code", "B-Lost", "Anthropic", "OpenAI"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/taming-380-agent-skills-in-cursor-selective-injection-over-context-bloat", "markdown": "https://wpnews.pro/news/taming-380-agent-skills-in-cursor-selective-injection-over-context-bloat.md", "text": "https://wpnews.pro/news/taming-380-agent-skills-in-cursor-selective-injection-over-context-bloat.txt", "jsonld": "https://wpnews.pro/news/taming-380-agent-skills-in-cursor-selective-injection-over-context-bloat.jsonld"}}