Toggle (or allowlist) for Agent Skills roots — stop loading ~/.claude/skills and ~/.codex/skills when I only want .cursor / .agents

Feature request for product/service

Cursor CLI

Describe the request

I use Claude Code and Codex with skills stored under the standard compatibility paths (~/.claude/skills/, ~/.codex/skills/, and project .claude/skills/ /
.codex/skills/). I want to keep those directories for those tools.

Separately, I maintain Cursor-specific skills under ~/.cursor/skills/ and ~/.agents/skills/ (and project .cursor/skills/ / .agents/skills/).

Problem: Cursor’s docs say that for compatibility it also loads skills from the Claude and Codex directories. I don’t want Cursor’s Agent to discover or surface
skills from those compatibility paths at all—I want Cursor to only use the .cursor / .agents skill roots unless I opt in.

Requested behavior: A setting (names are illustrative) such as:

• “Load Claude/Codex compatibility skill directories” — default on for backward compatibility, off for users who want isolation; or
• cursor.agentSkills.roots allowlist / cursor.agentSkills.excludeRoots blocklist for filesystem roots.

Why this matters:

• Avoids duplicate or conflicting guidance when the same workflows exist for different ecosystems.
• Keeps Cursor’s Agent context focused on Cursor-native skills I intentionally placed under .cursor / .agents.
• Lets me share one machine with multiple agent CLIs without merging their skill namespaces.

Related: This overlaps with broader “too many skills loaded / duplication” concerns—for example: Critical Issue: Duplicate Skills Loading Causing Context Window
Waste and Confusion (Critical Issue: Duplicate Skills Loading Causing Context Window Waste and Confusion).

Docs reference: Agent Skills — Skill directories (Agent Skills | Cursor Docs) (compatibility loading from Claude and Codex paths).

Thanks for considering this—happy to beta-test or clarify expected UX (Settings → Rules vs JSON).

Operating System (if it applies)

MacOS

Please add this. Right now, even with only a couple of plugins installed, my agent has 50+ skills available. That is far more than I want and adds a lot of unnecessary prompt/context bloat.

A concrete example: I have the Sentry plugin installed, but I only need it for a few specific MCP tools exposed by the MCP server it configures. I do not need the skills it exports, and I already instruct my agent directly in my own prompts when I want it to use those MCP tools.

Currently, just having the Sentry plugin installed seems to automatically add around 30 skills, with no obvious way to disable them in Cursor settings. A per-plugin skills toggle, allowlist, or global “only enable selected skills” option would be very useful.

Hi @here

You can disable this today! Head to Cursor Settings and go to Rule, Skills and Subagents. Then toggle this off:

This setting doesn’t apply to cursor-cli, though, which is what OP asked about. How do we do the equivalent for cursor-cli?

Composer 2.5 gave me the cursor-agent wrapper script below. I confirmed that it works on Linux. :smiley: It also filters out Cursor’s built-ins by default.

#!/usr/bin/env bash
# cursor-agent-skill-filter — run cursor-agent with third-party skills hidden
#
# Problem: cursor-agent auto-discovers skills from many compatibility roots
# (~/.claude/skills, ~/.codex/skills, ~/.claude/plugins, ~/.cursor/plugins,
# ~/.cursor/skills-cursor, ~/.agents/skills, plus project .claude/.codex trees).
# The IDE toggle "Include third-party Plugins, Skills, and other configs" does
# NOT apply to the CLI — there is no cli-config.json equivalent.
#
# Solution: re-exec inside a private mount namespace (unshare) and bind-mount an
# empty directory over those paths. Only user/project Cursor skills remain
# visible (~/.cursor/skills/, .cursor/skills/). skills-cursor is mounted
# read-only so Cursor's managed-skills sync cannot repopulate it at runtime.
# Claude Code / Codex sessions in other terminals are unaffected.
#
# Usage:
#   cursor-agent-skill-filter [cursor-agent args...]
#   cursor-agent-skill-filter --cursor-skills   # also show ~/.cursor/skills-cursor/
#   cursor-agent-skill-filter --all-skills      # no filtering (plain cursor-agent)
#
# Environment:
#   CURSOR_AGENT_ALL_SKILLS=1      same as --all-skills
#   CURSOR_AGENT_CURSOR_SKILLS=1   same as --cursor-skills
#   CURSOR_AGENT_SKILL_FILTER_DEBUG=1   print mount diagnostics to stderr
#
# Requirements: Linux, util-linux (unshare), user namespaces enabled
#
set -uo pipefail

all_skills=0
cursor_skills=0
passthrough=()
while [[ $# -gt 0 ]]; do
    case "$1" in
        --all-skills) all_skills=1; shift ;;
        --cursor-skills) cursor_skills=1; shift ;;
        *) passthrough+=("$1"); shift ;;
    esac
done
[[ "${CURSOR_AGENT_ALL_SKILLS:-}" == 1 ]] && all_skills=1
[[ "${CURSOR_AGENT_CURSOR_SKILLS:-}" == 1 ]] && cursor_skills=1

_ALL_HIDE_TARGETS=(
    "$HOME/.claude/skills"
    "$HOME/.codex/skills"
    "$HOME/.cursor/skills-cursor"
    "$HOME/.claude/plugins"
    "$HOME/.cursor/plugins"
    "$HOME/.agents/skills"
)

_debug() {
    [[ "${CURSOR_AGENT_SKILL_FILTER_DEBUG:-}" == 1 ]] || return 0
    echo "cursor-agent-skill-filter: $*" >&2
}

_cleanup_stale_mounts() {
    local target
    for target in "${_ALL_HIDE_TARGETS[@]}"; do
        while mountpoint -q "$target" 2>/dev/null; do
            _debug "cleaning stale mount on $target"
            umount "$target" 2>/dev/null || break
        done
    done
}

_skill_targets() {
    local targets=(
        "$HOME/.claude/skills"
        "$HOME/.codex/skills"
        "$HOME/.claude/plugins"
        "$HOME/.cursor/plugins"
        "$HOME/.agents/skills"
    )
    if [[ "$cursor_skills" -eq 0 ]]; then
        targets+=("$HOME/.cursor/skills-cursor")
    fi
    printf '%s\n' "${targets[@]}"
}

_empty_dir=""
_mounts=()

_teardown() {
    local target
    for target in "${_mounts[@]}"; do
        umount "$target" 2>/dev/null || true
    done
    if [[ -n "$_empty_dir" ]]; then
        rmdir "$_empty_dir" 2>/dev/null || true
    fi
}

_setup() {
    _empty_dir="$(mktemp -d)"
    local target
    while IFS= read -r target; do
        [[ -n "$target" ]] || continue
        mkdir -p "$target"
        if mount --bind "$_empty_dir" "$target"; then
            _mounts+=("$target")
            if [[ "$target" == "$HOME/.cursor/skills-cursor" ]]; then
                mount -o remount,bind,ro "$target" 2>/dev/null \
                    && _debug "hid (ro) $target" \
                    || _debug "hid $target (ro remount failed)"
            else
                _debug "hid $target"
            fi
        else
            echo "cursor-agent-skill-filter: warning: failed to hide $target" >&2
        fi
    done < <(_skill_targets)
}

if [[ "$all_skills" -eq 0 && "${CURSOR_AGENT_UNSHARED:-}" != 1 ]]; then
    _cleanup_stale_mounts
    reexec_args=()
    [[ "$cursor_skills" -eq 1 ]] && reexec_args+=(--cursor-skills)
    reexec_args+=("${passthrough[@]}")
    exec unshare --user --mount --map-root-user -- \
        env CURSOR_AGENT_UNSHARED=1 "$0" "${reexec_args[@]}"
fi

if [[ "$all_skills" -eq 0 ]]; then
    trap _teardown EXIT INT TERM
    _setup
    _debug "skill isolation active (cursor_skills=$cursor_skills)"
fi

exec cursor-agent "${passthrough[@]}"

Is there any way to selectively choose which third-party plugins/skills to enable? I love that it can read my Claude or Codex skills, but there are also some built-in ones to Claude which I would like to disable in Cursor while keeping most of the other detected third-party plugins/skills.