cursor-docs
Single source of truth and librarian for ALL Cursor documentation. Manages local documentation storage, scraping, discovery, and resolution. Use when finding, locating, searching, or resolving Cursor documentation; discovering docs by keywords, category, tags, or natural language queries; scraping from llms.txt; managing index metadata (keywords, tags, aliases); or rebuilding index from filesystem. Run scripts to scrape, find, and resolve documentation. Handles doc_id resolution, keyword search, natural language queries, category/tag filtering, alias resolution, llms.txt parsing, markdown subsection extraction for internal use, hash-based drift detection, and comprehensive index maintenance.
What this skill does
# Cursor Documentation Skill ## CRITICAL: Path Doubling Prevention - MANDATORY **ABSOLUTE PROHIBITION: NEVER use `cd` with `&&` in PowerShell when running scripts from this skill.** **The Problem:** If your current working directory is already inside the skill directory, using relative paths causes PowerShell to resolve paths relative to the current directory instead of the repository root, resulting in path doubling. **REQUIRED Solutions (choose one):** 1. **ALWAYS use absolute paths** (recommended) 2. **Use separate commands** (never `cd` with `&&`) 3. **Run from repository root** with relative paths **NEVER DO THIS:** - Chain `cd` with `&&`: `cd <relative-path> && python <script>` causes path doubling - Assume current directory - Use relative paths when current dir is inside skill directory ## CRITICAL: Large File Handling - MANDATORY SCRIPT USAGE ### ABSOLUTE PROHIBITION: NEVER use read_file tool on the index.yaml file The file exceeds context limits and will cause issues. You MUST use scripts. **REQUIRED: ALWAYS use manage_index.py scripts for ANY index.yaml access:** ```bash python scripts/management/manage_index.py count python scripts/management/manage_index.py list python scripts/management/manage_index.py get <doc_id> python scripts/management/manage_index.py verify ``` All scripts automatically handle large files via `index_manager.py`. ## Available Slash Commands Use the consolidated `docs-ops` skill for common workflows: - **`/cursor-ecosystem:docs-ops scrape`** - Scrape Cursor documentation from llms.txt sources - **`/cursor-ecosystem:docs-ops refresh`** - Refresh the local index and metadata without scraping - **`/cursor-ecosystem:docs-ops validate`** - Validate the index and references for consistency - **`/cursor-ecosystem:docs-ops rebuild-index`** - Force rebuild the search index - **`/cursor-ecosystem:docs-ops clear-cache`** - Clear the documentation search cache ## Overview This skill provides automation tooling for Cursor documentation management. It manages: - **Canonical storage** (encapsulated in skill) - Single source of truth for official docs - **Subsection extraction** - Token-optimized extracts (60-90% savings) - **Drift detection** - Hash-based validation against upstream sources - **Sync workflows** - Maintenance automation - **Documentation discovery** - Keyword-based search and doc_id resolution - **Index management** - Metadata, keywords, tags, aliases for resilient references **Core value:** Prevents link rot, enables offline access, optimizes token costs, automates maintenance, and provides resilient doc_id-based references. ## When to Use This Skill This skill should be used when: - **Scraping documentation** - Fetching docs from Cursor sources - **Finding documentation** - Searching for docs by keywords, category, or natural language - **Resolving doc references** - Converting doc_id to file paths - **Managing index metadata** - Adding keywords, tags, aliases, updating metadata - **Rebuilding index** - Regenerating index from filesystem (handles renames/moves) ## Workflow Execution Pattern **CRITICAL: This section defines HOW to execute operations in this skill.** ### Delegation Strategy #### Default approach: Delegate to Task agent For ALL scraping, validation, and index operations, delegate execution to a general-purpose Task agent. **How to invoke:** Use the Task tool with: - `subagent_type`: "general-purpose" - `description`: Short 3-5 word description - `prompt`: Full task description with execution instructions ### Execution Pattern **Scripts run in FOREGROUND by default. Do NOT background them.** When Task agents execute scripts: - **Run directly**: `python plugins/cursor-ecosystem/skills/cursor-docs/scripts/core/scrape_docs.py` - **Streaming logs**: Scripts emit progress naturally via stdout - **Wait for completion**: Scripts exit when done with exit code - **NEVER use `run_in_background=true`**: Scripts are designed for foreground execution - **NEVER poll output**: Streaming logs appear automatically, no BashOutput polling needed - **NEVER use background jobs**: No `&`, no `nohup`, no background process management ### Error and Warning Reporting **CRITICAL: Report ALL errors, warnings, and issues - never suppress or ignore them.** When executing scripts via Task agents: - **Report script errors**: Exit codes, exceptions, error messages - **Report warnings**: Deprecation warnings, import issues, configuration problems - **Report unexpected output**: 404s, timeouts, validation failures - **Include context**: What was being executed when the error occurred ## Quick Start ### Refresh Index End-to-End (No Scraping) Use this when you want to rebuild and validate the local index/metadata **without scraping**: ```bash python plugins/cursor-ecosystem/skills/cursor-docs/scripts/management/refresh_index.py ``` ### Scrape All Documentation Use this when the user explicitly wants to **hit the network and scrape docs**: ```bash # Scrape from configured llms.txt sources python plugins/cursor-ecosystem/skills/cursor-docs/scripts/core/scrape_docs.py # Refresh index after scraping python plugins/cursor-ecosystem/skills/cursor-docs/scripts/management/refresh_index.py ``` ### Find Documentation ```bash # Resolve doc_id to file path python plugins/cursor-ecosystem/skills/cursor-docs/scripts/core/find_docs.py resolve <doc_id> # Search by keywords (default: 25 results) python plugins/cursor-ecosystem/skills/cursor-docs/scripts/core/find_docs.py search agent mcp # Natural language search python plugins/cursor-ecosystem/skills/cursor-docs/scripts/core/find_docs.py query "how to configure agent mode" # List by category python plugins/cursor-ecosystem/skills/cursor-docs/scripts/core/find_docs.py category core # List by tag python plugins/cursor-ecosystem/skills/cursor-docs/scripts/core/find_docs.py tag cli ``` **Search Options:** | Option | Default | Description | | --- | --- | --- | | `--limit N` | 25 | Maximum number of results to return | | `--no-limit` | - | Return all matching results (no limit) | | `--min-score N` | - | Only return results with relevance score >= N | | `--fast` | - | Index-only search (skip content grep) | | `--json` | - | Output results as JSON | | `--verbose` | - | Show relevance scores | ## Configuration System The cursor-docs skill uses a unified configuration system. **Configuration Files:** - **`config/defaults.yaml`** - Central configuration file with all default values - **`config/filtering.yaml`** - Content filtering rules - **`config/tag_detection.yaml`** - Tag detection patterns **Environment Variable Overrides:** All configuration values can be overridden using environment variables: `CURSOR_DOCS_<SECTION>_<KEY>` ## Dependencies **Required:** `pyyaml`, `requests`, `beautifulsoup4`, `markdownify`, `filelock` **Optional (recommended):** `yake` (for keyword extraction) **Python Version:** Python 3.11+ recommended ## Core Capabilities ### 1. Scraping Documentation Fetch documentation from configured sources using llms.txt format. ### 2. Extracting Subsections Extract specific markdown sections for token-optimized responses. ### 3. Change Detection Detect documentation drift via 404 checking and hash comparison. ### 4. Finding and Resolving Documentation Discover and resolve documentation references using doc_id, keywords, or natural language queries. ### 5. Index Management and Maintenance Maintain index metadata, keywords, tags, and rebuild index from filesystem. ## Platform-Specific Requirements ### Windows Users **MUST use PowerShell (recommended) or prefix Git Bash commands with `MSYS_NO_PATHCONV=1`** Git Bash on Windows converts Unix paths to Windows paths, breaking filter patterns. **Example:** ```bash MSYS_NO_PATHCONV=1 python scripts/core/scrape_docs.py --filter "/docs/" ``` ## Troubleshooting ### Unicode Encoding Errors **Status:** FIXED - Scripts auto-detect Windows and configure UTF-8 encoding. ### 404
Related in Writing & Docs
jax-development
IncludedUse this skill when the user is writing, debugging, profiling, refactoring, reviewing, benchmarking, parallelising, exporting, or explaining JAX code, or when they mention JAX, jax.numpy, jit, grad, value_and_grad, vmap, scan, lax, random keys, pytrees, jax.Array, sharding, Mesh, PartitionSpec, NamedSharding, pmap, shard_map, Pallas, XLA, StableHLO, checkify, profiler, or the JAX repo. It helps turn NumPy or PyTorch-style code into pure functional JAX, fix tracer/control-flow/shape/PRNG bugs, remove recompiles and host-device syncs, choose transforms and sharding strategies, inspect jaxpr/lowering/IR, and benchmark compiled code correctly.
nature-article-writer
IncludedDrafts, rewrites, diagnostically critiques, and style-calibrates primary research manuscripts for Nature and Nature Portfolio journals. Use when the user wants a Nature-style title, summary paragraph or abstract, introduction, results, discussion, methods, figure legends, presubmission enquiry, cover letter, reviewer response, or when a scientific draft sounds generic, jargon-heavy, structurally weak, or AI-ish and needs precise, broad-reader-friendly prose without inventing data, analyses, or references. Best for primary research articles and letters rather than reviews or press releases unless explicitly adapting one.
deckrd
IncludedDocument-driven framework that derives requirements, specifications, implementation plans, and executable tasks from goals through structured AI dialogue. Use when user says "write requirements", "create spec", "plan implementation", "derive tasks", "structure this feature", "break down into tasks", or "document this module". Also use for reverse engineering existing code into docs (/deckrd rev). Do NOT use for direct code writing — use /deckrd-coder after tasks are generated. Do NOT use when the user only wants to run or fix existing code without planning.
clinical-decision-support
IncludedGenerate professional clinical decision support (CDS) documents for pharmaceutical and clinical research settings, including patient cohort analyses (biomarker-stratified with outcomes) and treatment recommendation reports (evidence-based guidelines with decision algorithms). Supports GRADE evidence grading, statistical analysis (hazard ratios, survival curves, waterfall plots), biomarker integration, and regulatory compliance. Outputs publication-ready LaTeX/PDF format optimized for drug development, clinical research, and evidence synthesis.
handling-sf-data
IncludedSalesforce data operations with 130-point scoring. Use this skill to create, update, delete, bulk import/export, generate test data, and clean up org records using sf CLI and anonymous Apex. TRIGGER when: user creates test data, performs bulk import/export, uses sf data CLI commands, needs data factory patterns for Apex tests, or needs to seed/clean records in a Salesforce org. DO NOT TRIGGER when: SOQL query writing only (use querying-soql), Apex test execution (use running-apex-tests), or metadata deployment (use deploying-metadata).
accelint-ac-to-playwright
IncludedConvert and validate acceptance criteria for Playwright test automation. Use when user asks to (1) review/evaluate/check if AC are ready for automation, (2) assess if AC can be converted as-is, (3) validate AC quality for Playwright, (4) turn AC into tests, (5) generate tests from acceptance criteria, (6) convert .md bullets or .feature Gherkin files to Playwright specs, (7) create test automation from requirements. Handles both bullet-style markdown and Gherkin syntax with JSON test plan generation and validation.