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.
npx skills add LeeYudok/doksam-skills --skill yd-db-expertgit clone --depth 1 https://github.com/LeeYudok/doksam-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/leeyudok/doksam-skills/yd-db-expert)<a href="https://agentmods.dev/skills/leeyudok/doksam-skills/yd-db-expert"><img src="https://agentmods.dev/badge/skills/leeyudok/doksam-skills/yd-db-expert/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/leeyudok/doksam-skills/yd-db-expert"><img src="https://agentmods.dev/badge/skills/leeyudok/doksam-skills/yd-db-expert.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00129 | $0.02565 |
| Opus 5.5 | $0.00052 | $0.01026 |
| Sonnet 5.5 | $0.00026 | $0.00513 |
| Haiku 4.5 | $0.00013 | $0.00257 |
Grade A, and why
yd-db-expert 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 14d ago.
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.
This is a copy
98% identical to yd-db-expert — 2 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 133 lines — stays where its author put it; the contents beside it link to each section on GitHub.
yd-db-expert
엔진과 무관한 관계형 설계가 대상이다. 잠금·테이블 재작성·실행계획 읽는 법·타입 세부처럼
엔진마다 다른 동작은 엔진 스킬이 맡는다 — PostgreSQL 은 yd-pg-expert, Oracle 은
yd-oracle-expert, SQLite 파일은 yd-sqlite-expert. 애플리케이션 코드는 각 언어 스킬이 맡는다.
아래 단언 가운데 SQL 의미론에 관한 것은 scripts/verify_db_claims.py 가 SQLite 로
재현한다(8장). 같은 의미론은 표준 SQL 이라 PostgreSQL·Oracle 에서도 같다. 엔진마다 갈리는
지점은 본문에 적었다.
1. 스키마 설계 — 판단 기준
정규화는 목적이 아니라 이상현상(anomaly)을 없애는 수단이다. 3NF 를 기본으로 두고, 역정규화는 측정된 병목이 있을 때만, 그리고 갱신 경로를 하나로 유지할 수 있을 때만.
설계하기 전에 스스로 답한다:
- 이 테이블의 한 행은 무엇 하나인가 — 한 문장으로 안 되면 쪼갤 신호다.
- 자연키인가 대리키인가 — 사업자번호·사번처럼 외부가 소유한 값은 바뀐다. 대리키(식별자)를 두고 자연키에는 유니크 제약을 건다.
- 이 컬럼이 NULL 일 수 있는 실제 상황은 무엇인가 — 답이 없으면
NOT NULL. NULL 은 "모름"이지 "없음"이나 "0"이 아니다. - 삭제하면 무엇이 같이 사라져야 하는가 — FK 의
ON DELETE를 의도적으로 정한다. 기본값에 맡기지 않는다.
제약은 애플리케이션이 아니라 DB 에 건다
NOT NULL·UNIQUE·CHECK·FOREIGN KEY 는 마지막 방어선이다. 애플리케이션 검증은
사용자 경험용이고, 데이터 무결성은 DB 가 보장한다. 버그·수동 작업·다른 클라이언트는
애플리케이션을 우회한다. 제약이 없는 테이블에 수동 SQL 세 줄을 넣으면 NULL·중복·음수 잔액이
그대로 들어가고, 제약이 있는 테이블은 셋 다 거부한다.
NULL 의 의미론
NULL = NULL은 참이 아니라 NULL 이다.WHERE col = NULL은 아무 행도 고르지 못한다.IS NULL을 쓴다.col <> 'x'도 NULL 인 행을 고르지 않는다.NOT IN서브쿼리에 NULL 이 하나라도 있으면 결과가 통째로 빈다. 오류도 경고도 없다. 서브쿼리 컬럼이 NULL 을 허용하면NOT EXISTS를 쓴다.UNIQUE는 NULL 끼리 같다고 보지 않는다. NULL 행이 여러 개여도 통과한다. "값이 하나뿐" 이 규칙이면NOT NULL을 함께 건다. NULL 도 하나만 허용하는 방법은 엔진마다 다르다.
시간과 통화
- 시각은 타임존이 붙은 형식으로 저장한다. 저장은 UTC, 표시에서 변환한다. 엔진별 타입 선택은
엔진 스킬이 맡는다. 사용자 표기는
YYYY-MM-DD HH:MM:SS.mmm(KST 가정). - 돈은 고정소수점(
numeric/decimal)이나 최소 단위 정수(원·센트)로 저장한다. 부동소수점 금지.
소프트 삭제
deleted_at 을 도입하면 모든 조회에 조건이 붙는다. 빠뜨린 한 곳이 사고가 된다.
정말 필요하면 뷰나 행 수준 보안으로 강제하고, 아니면 이력 테이블로 옮기는 편이 낫다.
일반 UNIQUE 는 탈퇴한 이메일의 재가입을 막는다. 삭제 표시만 한 행이 값을 쥐고 있어서다.
살아 있는 행에만 거는 부분 유니크 인덱스(WHERE deleted_at IS NULL)는 재가입을 허용하고
활성 중복은 막는다. 부분 인덱스가 없는 엔진은 엔진 스킬에서 대안을 찾는다.
2. 인덱스
- WHERE·JOIN·ORDER BY 에 쓰이는 컬럼이 후보다. 전부 만들지 않는다 — 인덱스는 쓰기 비용과 저장공간을 먹는다.
- 복합 인덱스는 앞 컬럼부터 쓰인다. 등호 조건 컬럼을 앞에, 범위 조건 컬럼을 뒤에 둔다.
- FK 를 선언해도 자식 컬럼 인덱스는 생기지 않는다 (PostgreSQL·SQLite 실측). 부모를 지우거나 부모 기준으로 자식을 찾을 때 자식 테이블 전체를 훑으므로 직접 만든다.
- 함수를 씌운 조건은 컬럼 인덱스를 못 탄다.
WHERE lower(name) = ...는name인덱스를 쓰지 않는다. 쿼리를 바꾸거나 표현식 인덱스를 만든다. - 인덱스를 추가하기 전에 쿼리를 고칠 수 있는지 먼저 본다. 판단은 추측이 아니라 실행계획으로 하고, 실행계획 읽는 법은 엔진 스킬을 따른다.
What ships with it
7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 14d ago Changed 984d204859a7
- 20d ago First seen · 133 lines · 129 tokens per session scan A c39aa89bd823
yd-db-expert is a skill published in the GitHub repository LeeYudok/doksam-skills (14 stars, last pushed 7d ago), licensed MIT. It adds 129 tokens to every session and 2,565 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 98% identical to yd-db-expert, differing in 2 lines, and is treated as a copy.
Other skills, from other repositories
access-matrix
Access matrix of role-by-module permissions, with per-role scope, confidentiality level and SME tier, as CSV, SQL, JSON Schema or Notion on request. Use for access reviews.
admin-access-register
Admin account register: system, main and backup admin, seats, plan, 2FA, shared logins and access-review dates, as CSV, SQL, JSON Schema or Notion on request. Use for access reviews.
advanced-analytics-dashboard
Dashboard metric register: metric, source module, formula, period, value, target, trend, owner and last-updated, as CSV, SQL, JSON Schema or Notion on request. Use for KPI dashboards.
alumni-re-hire-tracker
Alumni and re-hire register: former role, last working day, re-hire eligibility, current employer and re-engagement date, as CSV, SQL, JSON Schema or Notion on request. Use for alumni outreach.
database-migration
Execute database migrations across ORMs and platforms with zero-downtime strategies, data transformation, and rollback procedures. Use when migrating databases, changing schemas, performing data transformations, or implementing zero-downtime deployment strategies.
database-migrations-migration-observability
Migration monitoring, CDC, and observability infrastructure.