# keeping-one-source-of-truth

An agent skill that keeps each fact in exactly one place and stops copies from drifting apart. Useful the moment a value begs to be pasted elsewhere.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 17700 installs · ★ 6
- Author: riekelt
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/riekelt/principal-engineer/tree/HEAD/plugins/principal-engineer/skills/keeping-one-source-of-truth/SKILL.md
- Updated: 2026-09-11
- HTML: https://affpapa.org/en/nevibecode/skills/keeping-one-source-of-truth

## What it does

The skill encodes a rule: every fact about the system has one owner, and the rest of the code reads it there. Its trigger is the moment copying a value feels faster than pointing at the source, or when two copies already disagree.

Seven points make up the doctrine. First, find whoever owns the data and extend that owner instead of starting a rival. Derive the value at read time when the platform or an existing source can answer, and fold in duplicates you pass on the way. A missing entry must fail loud rather than fall back to a silent default. Generated artifacts are marked as such and never hand-edited. Identifiers and states that code branches on are constants or enums, not free strings. When two sources conflict, the skill says to surface the contradiction first, establish which value is live, collapse to one source and delete the loser. Do not quietly follow whichever one you read first — that cements the error.

The skill lists `principal-engineering` as required background. Caches and read models are allowed as derived copies when the refresh is automatic and staleness stays bounded and visible; fixtures may freeze a copy of reality on purpose. Without the base skill in place, references in the text lead nowhere.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add riekelt/principal-engineer --skill keeping-one-source-of-truth -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/keeping-one-source-of-truth/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/keeping-one-source-of-truth/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add riekelt/principal-engineer --skill keeping-one-source-of-truth -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/keeping-one-source-of-truth/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add riekelt/principal-engineer --skill keeping-one-source-of-truth -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/keeping-one-source-of-truth/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install riekelt/principal-engineer keeping-one-source-of-truth
```

2. **Manually: put the files in place**
- File: `.github/skills/keeping-one-source-of-truth/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add riekelt/principal-engineer --skill keeping-one-source-of-truth -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/riekelt/principal-engineer --path plugins/principal-engineer/skills/keeping-one-source-of-truth
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/keeping-one-source-of-truth/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add riekelt/principal-engineer --skill keeping-one-source-of-truth -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/riekelt/principal-engineer/tree/HEAD/plugins/principal-engineer/skills/keeping-one-source-of-truth/SKILL.md

## When to use it
- locate the existing owner before adding a new field
- read a value from the platform instead of keeping a second copy
- merge a duplicate found while editing old code
- turn string identifiers into constants or enums
- settle a conflict between two sources and keep one

## Example prompts
- I'm about to add a timeout limit to the config — check who already owns that value instead of creating a second one
- \`settings.py` and `service.yaml` disagree on the retry threshold: work out which value is live and leave one source
- Replace the status strings in both services with a shared enum type

## Similar
- [setup-matt-pocock-skills](https://affpapa.org/en/nevibecode/skills/setup-matt-pocock-skills.md) — skill · 1052851 installs
- [ask-matt](https://affpapa.org/en/nevibecode/skills/ask-matt.md) — skill · 766587 installs
- [to-tickets](https://affpapa.org/en/nevibecode/skills/to-tickets.md) — skill · 711230 installs
- [writing-plans](https://affpapa.org/en/nevibecode/skills/writing-plans.md) — skill · 282859 installs
- [caveman-review](https://affpapa.org/en/nevibecode/skills/caveman-review.md) — skill · 411800 installs
- [caveman-compress](https://affpapa.org/en/nevibecode/skills/caveman-compress.md) — skill · 411500 installs

From the same set: [riekelt/principal-engineer](https://affpapa.org/en/nevibecode/by/riekelt/principal-engineer.md) — 5 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
