‹ 首页

context-window-design

@owl-listener · 收录于 5 天前 · 上游提交 1 个月前

Designing around token limits, memory, and conversation persistence.

适合你,如果正在构建需要长对话记忆的 AI 应用

/ 通过 npx 安装 校验哈希
npx oh-my-skill add owl-listener/ai-design-skills/context-window-design
/ 通过 bash 安装
curl -fsSL https://oh-my-skill.com/install.sh | bash -s -- owl-listener/ai-design-skills/context-window-design
/ 已经装过?验证本机副本,不用重装
npx oh-my-skill verify owl-listener/ai-design-skills/context-window-design
安装目标可用 --agent / --scope 或 --to 明确指定;省略时只会在唯一已存在的 agent 目录上自动选择,零命中或多命中会停止并提示。content_hash 缺失或不一致均拒装。
144GitHub stars
~401上下文体积 · 单文件
索引托管

怎么用

商店整理自技能原文 · 版本 f41b650 · 表述以原文为准
它做什么

安装此技能后,Claude 在对话中会自动管理上下文窗口:对较早内容进行摘要压缩以释放 token,在 token 不足时优先保留重要上下文,并在上下文丢失时主动承认。

什么时候触发

在对话过程中,当历史消息接近上下文窗口上限时,Claude 会自动启动摘要、优先级排序等策略。

装好后可以这样说
触发摘要压缩,释放 token 空间。
调整优先级,确保关键信息不被丢弃。
触发检索增强生成,导入外部上下文。
技能原文 SKILL.md作者撰写 · MIT · f41b650

Context Window Design

Every AI model has a finite context window. Designing within this constraint — and designing the user experience around it — is a core skill for AI product design.

The Context Window as a Design Material

The context window is not just a technical limitation. It's a design material:

  • What goes in: System prompts, conversation history, retrieved documents, tool results, user preferences
  • What gets dropped: Older messages, less relevant context, verbose instructions
  • What the user sees: The conversation as presented may differ from what the model actually processes

Designers must understand context window allocation to design reliable experiences.

Memory and Persistence

Users expect AI to remember. Design for different memory horizons:

  • Within-conversation memory: What was said earlier in this chat. Usually handled by the context window itself.
  • Cross-conversation memory: Preferences, past decisions, ongoing projects. Requires explicit memory systems.
  • Shared memory: Context shared across multiple users or agents. Requires careful privacy design.
Strategies for Limited Context
  • Summarisation: Compress earlier conversation into summaries to free up tokens
  • Retrieval-augmented generation: Pull in relevant context on demand rather than keeping everything loaded
  • Priority ordering: Put the most important context closest to the prompt (recency bias in attention)
  • User-controlled context: Let users pin, remove, or prioritise what the AI remembers
  • Graceful degradation: When context is lost, acknowledge it rather than hallucinating continuity
Design Artefacts
  • Context budget allocations (how many tokens for system prompt, history, retrieval, etc.)
  • Memory architecture diagrams showing what persists and what's ephemeral
  • Context overflow UX flows (what happens when the window fills up)
  • User-facing memory controls specification
按 MIT 许可原样转载,未经改动 · 在 GitHub 查看 →

评论

登录即可评论;带「已验证安装」的,是发布者名下有本店的安装或持有记录。