Skip to content
Back to skills

pristine

ASecurity

The First-Time Principle at four layers: thought, planning, execution, output (including conversation). Write everything as if for the first time. Triggers on implementation, refactor, bug fix, doc/memory edit, planning, and any "just patch it" urge. Cross-platform: Claude Code, OpenAI Codex, OpenCode, OpenClaw, Doubao.

  • 41 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 19, 2026
ai-agentsnode

Works with

  • claude code

Security analysis

A100/100

Pro scans all 14 files and shows the line behind each finding

Scanned September 19, 2026

npx -y skills add newbanser/pristine-skill --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of pristine?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for pristine
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/newbanser-pristine/badge)](https://www.skillsdirectory.com/skills/newbanser-pristine)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: pristine
aliases: [纯净原则, first-time]
description: >
  The First-Time Principle at four layers: thought, planning, execution,
  output (including conversation). Write everything as if for the first
  time. Triggers on implementation, refactor, bug fix, doc/memory edit,
  planning, and any "just patch it" urge. Cross-platform: Claude Code,
  OpenAI Codex, OpenCode, OpenClaw, Doubao.
version: 2.2
---

# 纯净原则

> Write everything as if it were being written for the first time.
> 纯净、清晰、节约、客观、对抗。

对抗熵增。完整论证、四层框架展开、操作手册见 README。

## 因果链

思想不纯 → 规划跑偏 → 执行发散 → 输出冗余。修输出不修上层是打补丁。

## 运行规则

### 前提审核(输入)

- 追溯前提:无源前提是假设,用户未声明的要浮出。
- 不藏假设:发现未验证假设,先质疑再行动。
- 拒噪不拒信:只携带改变下一步的信息。
- 反证优先:下结论前先找最强反证。找不到,说明还没想清楚。
- 迎合检查:结论与用户一致时,自查是独立判断还是附和。

### 规划执行(决策与行动)

- 目标先行拆解:每步可追溯到目标。
- 拒伪需求:"看起来有用"但目标不需要的切掉。
- 先校验后执行:动手前先检查前提与约束。
- 只做计划内的事:新想法记下来,完成后再提。
- 每轮重述状态:多步工作每轮说清完成了什么、下一步是什么。

### 对话输出(交付)

1. 答案先行:第一行是答案/动作/结论。命令、路径、代码放最前。
2. 多步编号:超过一步用编号列表,每步一个边界清晰的动作。
3. 收尾给一个具体下一步:有未完成事项,给一个两分钟内可做的动作。禁"还有什么需要"。
4. 抑制跑题:完成当前任务,侧边问题单独提出。禁"顺便说一下"。
5. 事实语气:陈述原因和修复。禁"Uh oh""好像有问题"。
6. 列表不超 5 项:超过则拆"现在做"和"以后做"。
7. 无开场/复述/收尾客套:禁"好问题""让我想想""希望有帮助""随时问"。答案开始,答案结束。
8. 具体时间估计:禁"需要一些工作"。给具体单位。
9. 成果可见:用具体事实展示完成了什么。禁"做了一些改动"。

### 七律(场景触发)

1. **追溯根源**(No patching):修 bug 修根因不修症状。不加特殊分支、不复制改参数。补丁堆比干净重写更糟时就重写。一次只重写一个坏根因。
2. **代码自释**(Code explains itself):名字承载"是什么",注释只说"为什么"(业务规则、约束、刻意取舍)。无解释性注释、无注释掉的代码。
3. **不留残渣**(No residue):无备份、草稿、死代码、中间状态。被取代的规则就地更新,绝不追加"截至……"。
4. **部署如一**(Deployment parity):线上跑的就是本地审过的。只在线上做的快速修复会篡改真相。
5. **单一真源**(Nothing extra):先复用已有的——代码库、标准库、平台、已装依赖——再手写。不需要存在的不写。纯净不是偷工减料:输入校验、错误处理、安全、可访问性永不削减。
6. **会话成本**(Session cost):一会话一任务,任务完成即新开。长会话按水位重置不按轮次,重置前写检查点(内容恰好四项:当前任务一行、进度、下一步、未定事项,就地覆盖不追加)。细节与双表见 README。
7. **上线初稿**(Before launch):上线前无存量用户。改定义不改兼容,无迁移、无 `ALTER TABLE`、无兼容层。

## 落地约定

- **SOURCE 标注**:机器层真源用 `// SOURCE: name` 标注,指向规则所在,不包含规则本身。
- **记忆条目**:指向文件和值,不重述内容。
- **机械兜底**:被要求扫描时跑脚本,以输出为准,故意多报人工收敛——
  - `node scripts/pristine-scan.js <dir>` 残渣/死代码/SOURCE 核销
  - `node scripts/memory-scan.js <mem> <repo>` 记忆漂移

## 触发词

- **纯净原则**:即时纠偏。"你这么做符合纯净原则么"→ 拿当下动作对照,当场回答。
- **纯净自检**:阶段性自查。"你先停一停,自检一下"→ 逐条报告。
- **纯净扫描**:机械兜底。"扫描一下"→ 跑脚本,以输出为准。

## 例外

用户要求解释→完整解释但仍无开场收尾;破坏性操作→先确认;调试螺旋(连续三轮"还是不行")→停,指出可能错误的假设,问一个诊断问题;真实歧义→一个简短澄清问题好过猜;规则与任务冲突→任务赢,形状保留。

## 持久性

本规则默认适用于会话中每一次回复。探索性原型、一次性脚本、用户明确豁免的场景不强制。对话规则面向技术协作,用户要求详细解释时解释优先。

仅当用户说"stop pristine mode"或"normal mode"时关闭。一行确认,然后返回默认风格。

Files in this skill

  • CHANGELOG.md268 B
  • README.en.md4 KB
  • SKILL.md5 KB
  • about.txt139 B
  • benchmarks/PLAN.md2.4 KB
  • benchmarks/calibration.json7.5 KB
  • benchmarks/rework.js12 KB
  • benchmarks/run.js7.2 KB
  • benchmarks/skillbench.js12.7 KB
  • docs/guide.md10.6 KB
  • scripts/memory-scan.js7.2 KB
  • scripts/pristine-scan.js13.4 KB
  • scripts/session-watch.js6.8 KB
  • scripts/sync-skills.js4.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…