Critical Issue: Duplicate Skills Loading Causing Context Window Waste and Confusion

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Problem Summary

Cursor currently lacks a robust management system for loading Skills. It aggressively scans multiple tool-related directories (Codex, Claude Code, etc.) and loads every SKILL.md file it finds without any de-duplication or version control logic. This results in the same skill being loaded multiple times into the context window, causing token waste and logic ambiguity.

Detailed Description

The root cause is the absence of a centralized management layer for Skills. Cursor scans broad directories but fails to:

  1. Filter by origin: It reads internal plugin directories of other tools (like ~/.claude/plugins/cache/).
  2. De-duplicate by name: It doesn’t group skills by their name property.
  3. Resolve version conflicts: It doesn’t prioritize the latest version when duplicates exist.

Example: The “Management Failure” in Practice

In my environment, the same planning-with-files skill is loaded from 11 different paths across multiple tool ecosystems (Codex, Claude Code, etc.):

The planning-with-files skill is currently loaded from 11 different paths:

  1. ~/.codex/skills/planning-with-files/.agent/skills/planning-with-files/SKILL.md
  2. ~/.codex/skills/planning-with-files/.clawd/skills/planning-with-files/SKILL.md
  3. ~/.codex/skills/planning-with-files/.codex/skills/planning-with-files/SKILL.md
  4. ~/.codex/skills/planning-with-files/.continue/skills/planning-with-files/SKILL.md
  5. ~/.codex/skills/planning-with-files/.cursor/skills/planning-with-files/SKILL.md
  6. ~/.codex/skills/planning-with-files/.factory/skills/planning-with-files/SKILL.md
  7. ~/.codex/skills/planning-with-files/.gemini/skills/planning-with-files/SKILL.md
  8. ~/.codex/skills/planning-with-files/.kilocode/skills/planning-with-files/SKILL.md
  9. ~/.codex/skills/planning-with-files/.opencode/skills/planning-with-files/SKILL.md
  10. ~/.codex/skills/planning-with-files/skills/planning-with-files/SKILL.md
  11. ~/.claude/plugins/cache/planning-with-files/planning-with-files/2.3.0/skills/planning-with-files/SKILL.md

All of these have:

  • Same name: planning-with-files
  • Differing versions: Depending on the tool that installed them, versions range from 2.3.0 (Claude Code) to 2.10.0 (Codex/others).
  • Identical/Overlapping descriptions: All essentially describe the same core functionality, but with slight variations based on the version.

Impact

1. Context Window Waste

  • Each duplicate skill’s metadata (name, version, description, fullPath) is included in the context
  • For planning-with-files alone, this means ~11x the metadata is loaded
  • This wastes valuable context window tokens that could be used for actual code/instructions

2. Version Conflict & Redundancy

  • Different versions of the same skill may be present across different tool environments (e.g., 2.10.0 in Codex vs 2.3.0 in Claude Code).
  • Cursor loads all of them, leading to redundancy and potential version conflicts.
  • The AI may reference an outdated version of the skill’s instructions, even when a newer one is available.

3. Selection Ambiguity

  • When the AI needs to use a skill, it sees multiple identical entries
  • No clear priority or deduplication logic
  • Could lead to selecting the wrong path or version

4. User Confusion

  • Users may have a preference (e.g., “only use Codex directory skills” as noted in .cursor/skills/README.md)
  • But Cursor doesn’t respect such preferences and loads everything

Expected Management Behavior

  1. Intelligent Scanning: Cursor should have a whitelist of intended scan paths and avoid deep-scanning other tools’ private cache or plugin directories unless explicitly configured.
  2. Mandatory De-duplication: Group skills by name. If multiple instances exist, Cursor should only register ONE instance.
  3. Version Resolution: Implement a “latest version wins” policy by default.
  4. User-defined Scope: Provide a setting to restrict Skill loading to specific project-level or global directories.

Suggested Solutions

Option 1: Implement a “Skills Registry” Layer

Instead of direct filesystem scanning for every chat, maintain a registry that handles de-duplication and versioning before the metadata is injected into the AI context.

Option 2: Respect .cursorignore or Skill-specific configuration

Allow users to exclude certain paths from Skill scanning, or provide a .cursor/skills/settings.json to define the authoritative source for skills.

Option 3: Respect Project-Level Preferences

  • Check for .cursor/skills/README.md or .cursor/skills/config.json in the project
  • Only scan directories specified by the user

Environment

  • OS: macOS
  • Cursor Version: [Please fill in your Cursor version]
  • Skills Location: Multiple paths under ~/.codex/skills/ and ~/.claude/plugins/cache/

Additional Notes

This issue becomes more severe as users install more skills, as each skill may be installed in multiple tool directories (Codex, Cursor, Continue, etc.), creating exponential duplication.


Priority: High - This affects all users who have skills installed in multiple locations and wastes context window tokens on every conversation.

Steps to Reproduce

  1. Environmental Setup: Install multiple AI coding assistants that utilize a SKILL.md based architecture (e.g., both Codex and Claude Code).
  2. Skill Installation: Install/sync the same skill (e.g., planning-with-files) into both tools. This will create duplicate SKILL.md files in different global directories (e.g., ~/.codex/skills/ and ~/.claude/plugins/cache/).
  3. Open Cursor: Launch Cursor and open any project.
  4. Trigger Skill Discovery: Start a new Chat session.
  5. Verify Duplication:
    • Ask the AI to list available skills or check the agent_skills context (if accessible via developer tools/logs).
    • Observe that the same skill is listed multiple times, with paths pointing to the different tool installation directories mentioned in Step 2.

Operating System

MacOS

Version Information

Version: 2.4.21
VSCode Version: 1.105.1
Commit: dc8361355d709f306d5159635a677a571b277bc0
Date: 2026-01-22T16:57:59.675Z
Build Type: Stable
Release Track: Default
Electron: 39.2.7
Chromium: 142.0.7444.235
Node.js: 22.21.1
V8: 14.2.231.21-electron.0
OS: Darwin arm64 25.1.0

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the report. Yes, duplicates of planning-with-files are indeed showing up in the UI, and some are marked as “third-party skills,” which can’t be removed through the interface.

This confirms the bug - Cursor loads Skills from different directories and treats them as separate entities, even though it’s the same skill with the same name.

Workaround:

Since the UI doesn’t allow you to remove “third-party skills,” try manually cleaning up the files:

  1. Keep Skills only in one directory - for example, ~/.cursor/skills/ (or .cursor/skills/ in the project)
  2. Delete/rename duplicates from other directories:
    • ~/.codex/skills/planning-with-files/ (and all nested .agent/, .clawd/, etc.)
    • ~/.claude/plugins/cache/planning-with-files/
  3. Restart Cursor

This should remove the duplicates, as Cursor scans the filesystem on startup.

Status: The bug is logged in the system (deduplication of Skills). Your report will help raise the priority.

1 Like