pref

A preference editor for a thinking-tree recorder, letting users describe in natural language what conversation insights to record and how to organize them.

In plain words
What is it for?
Use it to add, change, remove, or view preferences such as excluding debugging details or choosing a title style.
Why use it?
It turns recording preferences into an explicit, confirmed configuration instead of requiring manual edits to a hidden preferences file.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/corallips/thinking-tree/pref
Any agent
npx skills add CoralLips/thinking-tree --skill pref
Clone the repo
git clone --depth 1 https://github.com/CoralLips/thinking-tree

Made for: Claude Code, Codex.

Per session 29 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 882 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00029 $0.00882
Opus 5 $0.00015 $0.00441
Sonnet 5 $0.00006 $0.00176
Haiku 4.5 $0.00003 $0.00088

Measured yesterday against content hash 983ec33c25a5, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

pref scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/pref/SKILL.md · 114 lines

What it actually says

调整记录偏好

用户通过自然语言描述偏好,系统更新 ~/.thinking-tree/.preferences.md

用法

/pref 不要记录 debug 过程
/pref 碎片标题用问句形式
/pref 更关注产品认知,技术细节不用记
/pref 显示当前偏好

$ARGUMENTS 是自然语言描述的偏好调整。

工具准备

本 skill 依赖 AskUserQuestion 提供选项式确认。进入交互前:

  1. 若工具列表已含 AskUserQuestion → 直接使用
  2. 未加载 → 先执行 ToolSearch("select:AskUserQuestion") 加载 schema
  3. 加载失败(session 不支持该工具)→ 降级为纯文本确认:
    • 清晰列出编号选项(例如 1) 确认 2) 不改 3) 调整
    • 明确告知回复格式(例如「回复编号」)
    • 不要跳过确认步骤

降级只影响呈现方式,不影响功能。

执行步骤

1. 读取当前偏好

读取 ~/.thinking-tree/.preferences.md(如果存在)。

2. 理解意图

判断用户想要:

  • 新增偏好 — 之前没有类似规则
  • 修改偏好 — 调整已有规则的方向或程度
  • 删除偏好 — 用户说"取消"、"恢复默认"等
  • 查看偏好 — 用户说"显示"、"当前"、"有哪些"

3. 展示方案并确认

不要直接修改文件,先展示你打算怎么改,让用户确认:

我理解你想:不记录纯 debug 讨论

打算这样调整 .preferences.md:
  + 新增「记录范围」:不记录纯 debug 过程中的排查细节
  
确认?(y/n)

如果涉及修改或删除已有偏好,要明确展示前后对比:

打算这样调整:
  ~ 修改「记录范围」:
    原:只关注产品认知
    改:只关注产品认知和架构决策

确认?(y/n)

用 AskUserQuestion 工具获取确认,提供选项按钮(用户点击即可,不用打字):

  • 选项 1:「确认,就这样改」
  • 选项 2:「不改了」
  • 选项 3:「调整一下」(用户补充说明后重新展示方案)

4. 用户确认后写入

确认后修改 ~/.thinking-tree/.preferences.md,保持格式:

# 记录偏好

> 通过 /pref 命令管理。clarifier 每轮读取此文件作为额外判断依据。

## 记录范围
- {什么要记、什么不记}

## 记录风格
- {标题风格、内容详略、结构偏好}

## 整理偏好
- {/reduce 时的分组偏好、保留倾向}

只写用户明确表达的偏好,不要自作主张填充默认值。空分区不写。

5. 反馈

偏好已更新:
  + 新增:不记录纯 debug 讨论

当前偏好共 N 条。

注意事项

  • .preferences.md 是纯人类可读的 markdown,不是 JSON
  • 每条偏好一行,用 - 开头
  • 偏好之间不能矛盾——如果新偏好和旧偏好冲突,替换旧的
  • 用户说"重置"或"清空"时,删除所有条目但保留文件框架
  • 这个文件只影响 clarifier 的判断,不改变 clarifier 的核心规则
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 114 lines · 29 tokens per session scan A 983ec33c25a5

Subscribe to this mod's changes

pref is a skill published in the GitHub repository CoralLips/thinking-tree (1 stars, last pushed 4mo ago), licensed MIT. It adds 29 tokens to every session and 882 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories