Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问许可证需确认审计通过

cursor-context-managementCursor context management 搜索

Agent Skill

cursor-context-management 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

848

周安装

35

GitHub Stars

2,094

下载量

277
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:cursor-context-management(Cursor context management 搜索)
来源仓库:https://github.com/jeremylongshore/claude-code-plugins-plus-skills
仓库路径:skills/cursor-context-management
安装命令:
npx skills add https://github.com/jeremylongshore/claude-code-plugins-plus-skills --skill cursor-context-management
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/jeremylongshore/claude-code-plugins-plus-skills --skill cursor-context-management

简介

cursor-context-management 用于优化Cursor AI的上下文使用策略,提高响应准确性和相关性。

  • 适用于控制系统提示、规则文件和代码引用范围,减少无关信息干扰。
  • 需调整.contextrc配置和@提及策略,系统将动态组装每次请求的上下文内容。
  • 安装前请理解不同上下文源的优先级和作用域限制。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Cursor Context Management

Optimize how Cursor AI uses context to produce accurate, relevant responses. Context is everything the model sees when generating a response -- managing it well is the single biggest lever for output quality.

Context Sources

Cursor assembles context from multiple sources before each AI request:

┌─ Always Included ─────────────────────────────────────┐
│  System prompt (Cursor internal)                      │
│  Active .cursor/rules/*.mdc with alwaysApply: true    │
│  Current file (for Tab, Inline Edit)                  │
└───────────────────────────────────────────────────────┘
┌─ Conditionally Included ──────────────────────────────┐
│  Selected code (highlighted before Cmd+L/Cmd+K)       │
│  @-mention targets (@Files, @Folders, @Code)          │
│  Glob-matched rules (.mdc with matching globs)        │
│  Conversation history (prior turns in chat)           │
│  Open editor tabs (lightweight reference)             │
└───────────────────────────────────────────────────────┘
┌─ On-Demand (explicit @-mention) ──────────────────────┐
│  @Codebase  → semantic search across indexed files    │
│  @Docs      → crawled external documentation          │
│  @Web       → live web search results                 │
│  @Git       → uncommitted diff or branch diff         │
│  @Lint Errors → current file lint diagnostics         │
└───────────────────────────────────────────────────────┘

Context Pills

Active context appears as pills at the top of the Chat/Composer panel:

[main.ts] [src/utils/] [@Web: next.js 15] [Rule: typescript-standards]
  • Click a pill to expand and see its contents
  • Click x on a pill to remove it from context
  • Adding too many pills fills the context window, degrading response quality

@-Mention Strategy by Task

Code Understanding

@src/auth/middleware.ts @src/types/user.ts
Explain how the JWT validation works and what happens when a token expires.

Use @Files for specific files. Avoid @Folders unless you need the full directory -- it consumes a lot of context.

Bug Investigation

@src/hooks/useCart.ts @Lint Errors @Recent Changes
The cart total is NaN after the latest changes. What broke?

@Recent Changes + @Lint Errors gives the model forensic context.

Architecture Questions

@Codebase where are database queries made?

@Codebase triggers semantic search across the indexed codebase. Good for discovery when you do not know which files are relevant. Costs more context than targeted @Files mentions.

Using External Knowledge

@Docs Prisma @Web prisma client extensions 2025
How do I add soft-delete as a Prisma Client extension?

@Docs uses pre-indexed documentation. @Web does a live search. Combine both for comprehensive answers about third-party tools.

Context Budget Management

Each model has a context limit. Overloading it causes the model to drop information silently:

ModelContext WindowPractical Limit
GPT-4o128K tokens~80K usable
Claude Sonnet200K tokens~150K usable
Claude Opus200K tokens~150K usable
cursor-small8K tokens~5K usable

Signs of Context Overflow

  • Model forgets instructions from earlier in the conversation
  • Responses become generic or repetitive
  • Model contradicts what it said 3 turns ago
  • Suggested code ignores file context you provided

Mitigation Strategies

  1. Start new conversations frequently. One topic per conversation.
  2. Use specific @Files, not @Folders. @src/api/users.ts is better than @src/api/.
  3. Remove context pills you no longer need. Click x to drop stale files.
  4. Avoid @Codebase for narrow questions. It pulls in many code chunks. Use @Files when you know the location.
  5. Break large tasks into steps. Ask for the type definitions first, then the implementation, then the tests -- in separate turns or chats.

Automatic vs Manual Context

Cursor automatically includes context in some cases:

FeatureAutomatic Context
Tab CompletionCurrent file + open tabs + recent edits
Inline Edit (Cmd+K)Selected code + surrounding file
Chat (Cmd+L)Conversation history + explicitly added context
Composer (Cmd+I)Referenced files + codebase search

For Chat and Composer, you control context through @-mentions. Tab and Inline Edit manage their own context automatically.

.cursorignore for Context Control

Prevent files from ever being included in AI context:

# .cursorignore (project root)

# Secrets and credentials
.env
.env.*
**/secrets/
**/credentials/

# Large generated files
dist/
build/
node_modules/
*.min.js
*.bundle.js

# Data files that consume context budget
*.csv
*.sql
*.sqlite
fixtures/

Note: .cursorignore is best-effort. It prevents files from appearing in indexing and AI features, but is not a security boundary for protecting secrets. Use .gitignore and environment variables for actual secret management.

Advanced: Scoped Rules as Context

Project rules automatically inject context when relevant files are opened:

# .cursor/rules/database-patterns.mdc
---
description: "Database query patterns and conventions"
globs: "src/db/**/*.ts,src/repositories/**/*.ts"
alwaysApply: false
---
# Database Conventions
- Use parameterized queries exclusively
- All queries go through repository pattern
- Wrap multi-table operations in transactions
- Use connection pooling (pool size: 10)

This rule automatically loads when editing database files, giving the AI the right conventions without you manually adding context each time.

Enterprise Considerations

  • Data sensitivity: Use .cursorignore to exclude files with PII, credentials, or regulated data
  • Privacy Mode: Ensures code sent as context has zero data retention at model providers
  • Conversation hygiene: Train teams to start new chats per task to avoid context bleed
  • Cost awareness: Larger context = more tokens = higher API costs when using BYOK

Resources

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

37.75%
按下载量换算105

Claude

31.06%
按下载量换算86

Cursor

17.89%
按下载量换算50

Gemini CLI

8.39%
按下载量换算23

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills