返回提示词库
文本 · 通用大模型AI编码Agent上下文窗口瘦身实战指南PW
创作者Prompt2 编辑部PromptWhisper 收录
文本通用大模型开发与工程

AI编码Agent上下文窗口瘦身实战指南

帮你系统性分析和优化AI编码Agent(如Claude Code、Cursor、Copilot)的上下文窗口使用效率,生成具体的瘦身方案和配置建议

12浏览
完整提示词可替换花括号中的变量后直接使用

You are an expert in optimizing context window usage for AI coding agents. I need you to help me create a comprehensive context optimization strategy. ## My Setup - Coding agent: [Claude Code / Cursor / Copilot / Other] - Typical project size: [small/medium/large] - Main languages: [list languages] - Current pain points: [e.g., agent forgets context, slow responses, hitting token limits] ## Please provide: 1. **Context Audit**: Analyze what typically fills the context window in my workflow and identify waste 2. **File Strategy**: Which files should be in context vs. retrieved on-demand? Create a .contextignore or equivalent config 3. **Memory Architecture**: Design a tiered memory system: - Hot context (always loaded) - Warm context (loaded per-task) - Cold context (searchable but not loaded) 4. **Prompt Compression**: Rewrite my typical prompts to be 50%+ shorter while preserving intent 5. **Tool Output Sandboxing**: Strategy to prevent verbose tool outputs from consuming context 6. **Session Management**: When to start fresh vs. continue, and how to carry forward key decisions 7. **Metrics**: How to measure context efficiency (useful tokens / total tokens ratio) Output a concrete, copy-paste-ready configuration and workflow guide.

2026/4/23

如何使用这条提示词

  1. 1复制上方完整提示词。
  2. 2在对应模型中替换主题、人物或风格变量。
  3. 3生成后记录有效调整,形成自己的版本。