Skip to content
Back to skills

Extend Before Adding

ASecurity

Decide where a new fact is stored by finding where it, or its closest relative, already lives and extending that, before any new data structure is added; a new one is proposed only with every rejected candidate and the human's approval. Use before adding a database table or column, a JSON field, a metric series, a cache or queue key, a storage prefix, a message or event type, or a config file, and when reviewing a change that does.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 3, 2026
databasesgodatabasedocumentation

Security analysis

A100/100

Scanned December 3, 2026

npx -y skills add onprem-ai/platform --skill extend-before-adding --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Extend Before Adding?

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

Security grade badge for Extend Before Adding
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/onprem-ai-extend-before-adding/badge)](https://www.skillsdirectory.com/skills/onprem-ai-extend-before-adding)

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: extend-before-adding
description: Decide where a new fact is stored by finding where it, or its closest relative, already lives and extending that, before any new data structure is added; a new one is proposed only with every rejected candidate and the human's approval. Use before adding a database table or column, a JSON field, a metric series, a cache or queue key, a storage prefix, a message or event type, or a config file, and when reviewing a change that does.
---

# Extend before adding

Every fact has one home. A new table, series, or key is easy to add and
expensive to own: it is migrated, backed up, documented, and kept consistent
with every other place that holds a related fact, forever. A second copy of a
fact drifts from the first, and nobody can tell which one is true.

The project's own instructions name where its facts live (models, migrations,
data documentation, contracts) and which structures need approval. Read them
first; where they are silent, every kind listed in this skill's description
counts.

## 1. Find the fact

Before writing anything, state the fact in one sentence ("when an operator last
restarted a model", "which users may sign in to an instance"). Then search for
where it, or its closest relative, is already recorded:

- the schema: models, migrations, `CREATE TABLE` statements;
- the data documentation, if the project has one;
- metric series, audit or event vocabularies, message contracts;
- caches, queues and storage prefixes;
- configuration files.

Search by meaning, not only by the name you had in mind: the same fact often
lives under another word, or as a by-product written for a different reader.
A fact written for one reader is often exactly what a second reader needs.

## 2. Read it where it lives

If the fact exists, the new feature reads it there, even when the existing home
is less convenient than a new one would be. Inconvenience is not a reason for a
copy.

## 3. Extend the owner

If the fact is missing but belongs to a concept that already has a home, extend
that home within its own rules:

- a nullable column on the table that owns the concept;
- a value in the existing closed vocabulary (enum, check constraint);
- a label on the existing series;
- a field on the existing message.

Give a new column the typed native type that fits its value: a string or enum
with a check constraint, a boolean, a timestamp, a numeric type, a text array
for a list of strings. Never JSON for a value code reads back and acts on.

Respect each structure's purpose. An audit log is write-only history, not a
record to query for decisions. A metric store is trend history, and a sample
may be lost. A cache or notification bus is never authoritative. The database
of record is the record. Extending a structure against its purpose is a new
structure in disguise.

## 4. Ask, and stop

Only when no existing structure fits: propose the new one to the human and wait
for an explicit yes. Do not build it first.

The proposal names:

- the fact, in one sentence;
- every candidate from step 1, and for each the specific purpose or rule the
  fact would violate there. "It was easier" or "it is cleaner" is not a
  conflict;
- the new structure, its one purpose, and who reads and writes it.

## Review test

For any change that stores something: does it store a fact some other structure
already stores? If yes, it is a duplicate, whatever its shape, and the change
goes back to step 2.

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.

View all in databases →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.