skills/dimon94/flow-attention-refresh/SKILL.md
注意力刷新协议。在关键时刻强制读取核心文档,防止目标遗忘。被 flow-dev, flow-ralph 等命令引用。
npx skillsauth add aiskillstore/marketplace flow-attention-refreshInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
解决 "Lost in the Middle" 效应:当上下文过长时,原始目标被"推出"注意力窗口。
问题:
上下文开始: [原始目标 - 距离很远,被"遗忘"]
↓
... 50+ 工具调用 ...
↓
上下文末尾: [最近的工具输出 - 在注意力窗口]
解决:
在关键时刻强制读取目标文档 → 将目标"拉回"注意力窗口
BEFORE MAJOR DECISION → READ GOAL FILES → THEN ACT
触发点: 任何 /flow-* 命令的 Entry Gate
动作:
read:
- BRAINSTORM.md "成功标准" 章节
- TASKS.md 当前阶段任务列表
focus: 本次命令要达成什么?
实现: 已由现有 Brainstorm Alignment Check 覆盖
触发点: flow-dev TDD 循环中,每个任务执行前
动作:
read:
- TASKS.md 当前任务 T### 段落 + DoD
- quickstart.md 相关命令
focus: 这个任务的验收标准是什么?
实现位置: flow-dev.md 阶段 3 TDD 循环
代码片段:
**注意力刷新** (Protocol 2):
→ Read: TASKS.md 当前任务 T### 段落
→ Focus: 任务目标和 DoD
→ Then: 开始执行任务
触发点: /flow-ralph 每次迭代开始
动作:
read:
- TASKS.md 第一个未完成任务
- ERROR_LOG.md 最近 5 条记录
focus: 下一步行动 + 避免重复错误
实现位置: flow-ralph.md Ralph Loop 开始处
代码片段:
**注意力刷新** (Protocol 3):
→ Read: TASKS.md 找到第一个 `- [ ]` 任务
→ Read: ERROR_LOG.md 最近 5 条(如存在)
→ Focus: 下一步行动是什么?有什么错误需要避免?
→ Then: 执行任务
触发点: 测试失败、构建错误、运行时异常后
动作:
read:
- ERROR_LOG.md 当前错误记录
- TASKS.md 当前任务定义
focus: 错误根因 + 解决方案
实现位置: flow-tdd skill 错误处理部分
代码片段:
**错误恢复刷新** (Protocol 4):
→ Record: 将错误追加到 ERROR_LOG.md
→ Read: ERROR_LOG.md 当前错误 + 历史相似错误
→ Read: TASKS.md 当前任务
→ Focus: 根因分析,避免盲目修复
→ Then: 有针对性地修复
现有机制:
┌──────────────────────────────────────┐
│ flow-brainstorming skill │
│ ↓ 触发于 /flow-init │
│ ↓ 输出 BRAINSTORM.md │
└──────────────────────────────────────┘
↓
┌──────────────────────────────────────┐
│ Brainstorm Alignment Check │
│ ↓ 在每个 flow-* Entry Gate │
│ ↓ 读取 BRAINSTORM.md 验证对齐 │
│ ↓ = Protocol 1 │
└──────────────────────────────────────┘
新增机制:
┌──────────────────────────────────────┐
│ flow-attention-refresh skill (本文件) │
│ ↓ 被 flow-dev, flow-ralph 引用 │
│ ↓ 在更细粒度的时刻刷新注意力 │
│ ↓ Protocol 2, 3, 4 │
└──────────────────────────────────────┘
| Excuse | Reality | |--------|---------| | "我记得目标是什么" | 上下文 50+ 工具调用后,你真的不记得了 | | "读文件浪费时间" | 读文件 < 1秒,返工 > 10分钟 | | "这个任务很简单" | 简单任务也会偏离目标 | | "刚刚读过了" | 每次迭代都要读,这是协议 |
如果你发现自己:
STOP。执行对应的 Protocol。
[PROTOCOL]: 变更时更新此头部,然后检查 CLAUDE.md
development
Apple Human Interface Guidelines for content display components. Use this skill when the user asks about charts component, collection view, image view, web view, color well, image well, activity view, lockup, data visualization, content display, displaying images, rendering web content, color pickers, or presenting collections of items in Apple apps. Also use when the user says how should I display charts, what's the best way to show images, should I use a web view, how do I build a grid of items, what component shows media, or how do I present a share sheet. Cross-references: hig-foundations for color/typography/accessibility, hig-patterns for data visualization patterns, hig-components-layout for structural containers, hig-platforms for platform-specific component behavior.
tools
Automate HelpDesk tasks via Rube MCP (Composio): list tickets, manage views, use canned responses, and configure custom fields. Always search tools first for current schemas.
testing
Expert Haskell engineer specializing in advanced type systems, pure functional design, and high-reliability software. Use PROACTIVELY for type-level programming, concurrency, and architecture guidance.
tools
GraphQL gives clients exactly the data they need - no more, no less. One endpoint, typed schema, introspection. But the flexibility that makes it powerful also makes it dangerous. Without proper controls, clients can craft queries that bring down your server. This skill covers schema design, resolvers, DataLoader for N+1 prevention, federation for microservices, and client integration with Apollo/urql. Key insight: GraphQL is a contract. The schema is the API documentation. Design it carefully.