Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Persist user decisions and project constraints to mdbase across sessions. Trigger on /user-thoughts or /ustht, or when user discusses architecture, tech stack, rules, UI/UX, or mentions '想法', '记录', 'mdbase'.
.claude/skills/bilal140202-user-thoughts/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-07 | ✗→✓ | ▲ Improved | 125% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 100% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 177% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 198% | 0% |
| case-14 | ✗→✓ | ▲ Improved | 160% | 0% |
跨会话、跨 Agent 时,用户积累的决策和约束会彻底丢失。user-thoughts.SKILL 将这些想法持久化到 mdbase,绑定于项目而非会话——任何接手的 Agent 读取 mdbase 即可继承用户的完整意图,无需重新推导。
user-thoughts.SKILL/user-thoughts 或 /ustht 命令时/user-thoughts 或 /ustht 引导(详见 references/commands.md)命令前缀:/user-thoughts 为完整前缀,/ustht 为简写,两者等价可互换。
激活边界:当用户发言同时包含指令和想法时(如"把这个按钮改成红色"),Agent 应执行指令并同时记录想法。仅当发言纯粹是闲聊或与项目完全无关时(如"今天天气不错")才不激活。
用户发言 → Agent 识别项目想法 → 写入 raw/(即时计划)
↓
用户执行 /ustht sortin → Agent 处理 raw/ → 按维度追加到 mdbase/
↓
用户执行 /ustht mdbase show → Agent 展示组织好的想法库INSTANT_STATUS=off):仅响应技能命令,不自动识别想法INSTANT_STATUS=on 且 SKILL_STATUS=on):自动识别用户想法并写入 #raw/,mdbase 写入延迟到 sortinignore start/end 区间内发言不记入模式组合:即时计划 + 忽略可同时生效。SKILL_STATUS=off 时即时计划自动暂停,无论 INSTANT_STATUS 值如何。被动/即时计划通过 define.ini 持久化;忽略区间仅上下文有效。
@/:SKILL 安装目录(SKILL.md 所在目录,即 user-thoughts/)~/:工作目录#ustht/ = ~/.ustht/(.ustht 是 user-thoughts 的运行时缩写)#mdbase/ = ~/.ustht/mdbase/#ignored/ = ~/.ustht/ignored/#raw/ = ~/.ustht/raw/#export/ = ~/.ustht/export/.ustht/
├── define.ini # SKILL 运行状态
├── README.ai.md # .ustht/ 目录说明
├── raw/ # 用户原始发言(按日期分片)
│ └── yyyy-mm-dd.md
├── ignored/ # 被标记忽略的发言
│ └── yyyy-mm-dd.md
├── mdbase/ # 整理后的用户想法库
│ ├── backlog.md # 待办事项(用户明确提出但尚未开始的事项,由 sortin 归入)
│ ├── README.ai.md # mdbase 索引与概览
│ └── details/ # 按维度组织的想法文件
│ ├── rules.md # 项目规则、约束、原则
│ ├── plans.md # 项目规划、方向性想法
│ ├── ui/
│ │ ├── outline.md # UI 整体设计
│ │ └── details.md # UI 细节设计
│ ├── dev-stack.md # 技术栈选型、框架决策
│ ├── general.md # 通用(不属于其他维度的想法)
│ └── ... # 按需扩展
└── export/ # 从 mdbase 导出的内容依赖(本 SKILL 不提供):
#ustht/ 下各文件,也用于初始化时逐文件复制模板cp -r 等递归命令(防止符号链接攻击)SubAgent 可用时必须使用,不得由主 Agent 自行维护。原因:mdbase 维护涉及多文件读写,SubAgent 可并行处理各维度文件,显著减少主 Agent 的上下文占用和执行时间。SubAgent 不可用时主 Agent 才直接执行。
必需工具缺失时向用户发出警告,SKILL 进入只读模式:只读命令(mdbase show、raw、status、ignore show)仍可用,写入命令(sortin、write_raw、ignore start/end、ignore --last、init)返回提示。
@/scripts/ 下提供 Python 脚本,Agent 可通过 bash 直接调用,减少多文件操作的 token 消耗:
| 脚本 | 用途 | 调用示例 | |------|------|---------| | common.py | 共享工具函数(供其他脚本导入) | 不直接调用 | | status.py | 显示当前状态 | python @/scripts/status.py | | init.py | 初始化 .ustht/ | python @/scripts/init.py | | show_raw.py | 查看未处理 raw | python @/scripts/show_raw.py | | show_mdbase.py | 查看 mdbase 索引/维度 | python @/scripts/show_mdbase.py show [--all\|--维度名] | | sortin.py | 执行软维护 | python @/scripts/sortin.py [--dry] | | write_raw.py | 写入 raw 条目 | python @/scripts/write_raw.py "想法" [--dim 维度] | | toggle.py | 切换状态 | python @/scripts/toggle.py skill\|instant [on\|off] | | ignore_ops.py | 忽略操作 | python @/scripts/ignore_ops.py show\|remove_last\|add_suffix |
> resort(硬维护) 无独立脚本——该操作需要 Agent 语义分析(去重、归类、合并),由 Agent 直接执行。
脚本自动检测工作目录下的 .ustht/,无需手动指定路径。所有脚本支持 --help 参数查看详细用法。优先使用脚本处理机械性操作,将 Agent 的上下文留给语义分析(如维度归类)。
本文档中 &[keyname] 表示引用 #ustht/define.ini 中 keyname 的值,是文档内的简写记法。Agent 通过读取 define.ini 获取实际值。define.ini 的写入由 sortin/resort/init 通过整文件覆写完成,不使用 &[keyname]=value 语法。
| 键名 | 类型 | 说明 | |------|------|------| | SKILL_STATUS | on\|off | 技能启用状态 | | INSTANT_STATUS | on\|off | 即时计划启用状态(需 SKILL_STATUS=on 才生效) | | LAST_SORTIN | yyyy-mm-dd HH:MM | 上次 sortin 时间戳 |
命令以 /user-thoughts 或 /ustht 引导,两者等价。完整正则语法和自然语言映射见 references/commands.md。
/ustht init — 初始化工作目录(创建 .ustht/ 及模板)/ustht status — 输出全部状态(SKILL_STATUS、INSTANT_STATUS、LAST_SORTIN、未处理 raw 文件数、mdbase 维度文件数)/ustht skill — 输出技能状态/ustht skill on|off — 开启/关闭技能/ustht instant — 输出即时计划状态/ustht instant on|off — 开启/关闭即时计划/ustht sortin [--dry] — 软维护(追加新想法),--dry 预览不写入/ustht resort [--dry] — 硬维护(重整全部 mdbase),--dry 预览不写入/ustht ignore start|end — 开始/结束忽略区间(仅上下文有效)/ustht ignore --last — 忽略上一条已记录的想法(从 raw 中删除该条目,记入 #ignored/;若 raw 文件变空,保留空文件不删除)/ustht ignore — 独立使用时等价于 --last(优先匹配全行命令正则,不触发后缀模式)/ustht ignore show — 列举 #ignored/ 目录内容(只读命令,SKILL 关闭时仍可用).*/ustht ignore — 后缀模式,忽略本条消息的想法(不记入 raw,记入 #ignored/;不受 SKILL_STATUS 控制)/ustht raw — 查看未处理的 raw 记录/ustht mdbase show [--all|--维度名] — 查看索引或指定维度/ustht mdbase export [--all|--维度名] — 导出到 #export//ustht import <路径> — 扫描路径下 .md 文件,并入 mdbase触发规则: 用户发言匹配命令,或自然语言意图明确指向唯一命令时触发。详细映射见 references/commands.md。
链式命令: 使用 && 连接多条命令,按顺序依次执行。如 /ustht skill on && instant on。
当 &[INSTANT_STATUS] 为 on 时自动执行:
#raw/ 当天日期.md,格式 - [HH:MM] 想法原文 | 待归入:预判维度/ustht ignore(或 /user-thoughts ignore)的发言不写入流程入参:sortin 软维护(追加)| resort 硬维护(重整)。
#raw/ 全部 .md,过滤掉已含 <!-- processed --> 标记的文件<!-- processed --> 标记define.ini 中 LAST_SORTIN 时间戳#mdbase/README.ai.md 索引和概要维度文件管理、raw 状态机制详见 references/sortin.md。
当工作目录下不存在 .ustht/ 时,Agent 自动触发 /ustht init,或用户手动执行:
~/ 创建 .ustht/ 目录@/assets/Runtime-Template/ 全部内容到 #ustht/#raw/、#ignored/、#export/ 目录(若模板未包含)define.ini 包含完整键值(SKILL_STATUS、INSTANT_STATUS、LAST_SORTIN)/ustht 形式展示)已存在 .ustht/ 时执行 /ustht init:输出提示"已初始化",不覆盖。
User: "登录页用 OAuth2,别用 JWT——上个项目吃过 token 过期的亏。"
Agent: [即时计划] 已记录到 raw/2026-05-31.md
User: "/ustht sortin"
Agent: [sortin] 1 条新想法归入 rules.md
User: "/ustht mdbase show rules"
Agent:
## rules.md
- [2026-05-31 14:00] 登录页用 OAuth2,别用 JWT——上个项目吃过 token 过期的亏。User: "/ustht ignore start"
User: "今天天气不错,中午吃什么?"
User: "/ustht ignore end"
User: "首页按钮改成圆角 8px"
Agent: [即时计划] 已记录到 raw/2026-05-31.md(仅"圆角 8px"一条)[会话 1]
User: "Next.js + Prisma,不要 MongoDB。暗色主题优先。"
Agent: [即时计划] 已记录
[会话 2 / 不同 Agent]
Agent 读取 .ustht/mdbase/ → 已知技术栈和 UI 偏好 → 直接实现| 待归入:维度名 后缀,按日期分组加标题,不改动想法正文。原文中的否定句、具体数值、限定条件都是关键意图,丢失它们等于丢失决策general.md,待办类想法归入 backlog.md(注意:backlog.md 存储在 mdbase/ 根目录而非 details/ 下,与其他维度不同)resort 纠正——语义理解有边界,用户纠正是正常的迭代过程.ustht/ 目录的安全性由用户保障,SKILL 不做脱敏处理——保持原文原则要求不修改内容,敏感数据由用户通过 ignore 主动管理[a-z0-9] 开头和结尾的 [a-z0-9-] 序列,支持 / 作为子目录分隔符(如 ui/outline),禁止 ..、\——维度名会被拼接为文件路径,特殊字符可能导致路径遍历攻击。所有操作限制在 #ustht/ 内<!-- processed --> 仅检查文件第一行——防止用户想法中的标记字符串干扰 sortin 判断=——防止键值注入。写入使用整文件覆写ignore 主动排除,.ustht/ 安全性由用户保障完整安全规范见 references/safety.md。
ignore start 仅在当前上下文有效,跨会话自动失效——这是设计选择,不是缺陷,因为忽略意图通常只对当前对话有意义<!-- processed --> 标记:必须在文件第一行,不能放在其他位置——sortin 仅检查第一行来判断文件是否已处理<!-- deprecated -->,不物理删除——保留历史可追溯性[a-z0-9] 开头和结尾,仅 [a-z0-9-],支持 / 子目录分隔,含 ..、\ 的参数必须拒绝——防止路径遍历攻击=,整文件覆写不追加——防止键值注入general.md,不轻易新建维度——维度膨胀会降低 mdbase 的可用性sortin、ignore start/end、ignore --last、init)返回提示,只读命令(mdbase show、raw、status、ignore show)仍可用。后缀模式 .../ustht ignore 不受 SKILL_STATUS 控制.ustht/,互不影响更多边界场景和完整交互示例见 references/edge-cases.md。
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 14,438 | 7,042 | -51% | 1 | 1 | 0% | 2,171 | 5,627 | +159% | 0 | 0 | — |
case-02 | fail→fail | 15,462 | 6,323 | -59% | 1 | 1 | 0% | 2,491 | 5,813 | +133% | 0 | 0 | — |
case-03 | fail→fail | 5,716 | 13,575 | +137% | 1 | 1 | 0% | 890 | 5,882 | +561% | 0 | 0 | — |
case-04 | fail→fail | 17,821 | 21,928 | +23% | 1 | 1 | 0% | 3,385 | 8,121 | +140% | 0 | 0 | — |
case-05 | pass→pass | 8,076 | 6,916 | -14% | 1 | 1 | 0% | 1,147 | 5,811 | +407% | 0 | 0 | — |
case-06 | fail→fail | 17,589 | 10,318 | -41% | 1 | 1 | 0% | 2,511 | 6,216 | +148% | 0 | 0 | — |
case-07 | fail→pass | 15,266 | 3,356 | -78% | 1 | 1 | 0% | 2,411 | 5,416 | +125% | 0 | 0 | — |
case-08 | fail→pass | 17,926 | 4,808 | -73% | 1 | 1 | 0% | 2,762 | 5,511 | +100% | 0 | 0 | — |
case-09 | fail→pass | 11,953 | 3,230 | -73% | 1 | 1 | 0% | 1,922 | 5,331 | +177% | 0 | 0 | — |
case-10 | pass→pass | 10,327 | 6,184 | -40% | 1 | 1 | 0% | 1,535 | 5,923 | +286% | 0 | 0 | — |
case-11 | fail→pass | 13,197 | 3,854 | -71% | 1 | 1 | 0% | 1,795 | 5,353 | +198% | 0 | 0 | — |
case-12 | pass→pass | 17,024 | 7,933 | -53% | 1 | 1 | 0% | 2,378 | 6,177 | +160% | 0 | 0 | — |
case-13 | pass→pass | 15,348 | 6,410 | -58% | 1 | 1 | 0% | 2,339 | 5,828 | +149% | 0 | 0 | — |
case-14 | fail→pass | 11,542 | 3,085 | -73% | 1 | 1 | 0% | 2,055 | 5,351 | +160% | 0 | 0 | — |
case-15 | fail→pass | 13,593 | 6,590 | -52% | 1 | 1 | 0% | 2,448 | 5,926 | +142% | 0 | 0 | — |
case-16 | fail→pass | 5,075 | 4,468 | -12% | 1 | 1 | 0% | 826 | 5,450 | +560% | 0 | 0 | — |
case-17 | fail→pass | 12,809 | 6,969 | -46% | 1 | 1 | 0% | 1,954 | 5,864 | +200% | 0 | 0 | — |
case-22 | fail→pass | 13,880 | 4,599 | -67% | 1 | 1 | 0% | 2,129 | 5,514 | +159% | 0 | 0 | — |
case-18 | fail→pass | 17,248 | 8,445 | -51% | 1 | 1 | 0% | 2,265 | 6,062 | +168% | 0 | 0 | — |
case-19 | fail→pass | 11,289 | 3,599 | -68% | 1 | 1 | 0% | 1,691 | 5,229 | +209% | 0 | 0 | — |
case-20 | fail→pass | 10,802 | 2,633 | -76% | 1 | 1 | 0% | 1,464 | 5,140 | +251% | 0 | 0 | — |
case-21 | fail→pass | 19,301 | 8,969 | -54% | 1 | 1 | 0% | 2,758 | 6,211 | +125% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +59 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.