跳到正文
cccskills
免费在 GitHub 公开

superior-database

Design, implement, review, or repair database schemas, queries, indexes, transactions, migrations, and backfills with explicit integrity and rollout constraints. Use when the datastore behavior or data lifecycle is a primary part of the task. Do not use for routine persistence calls whose schema and consistency contracts are unchanged.

中文简介正在准备中。当前显示原文说明。

KodekaTeam/superior-skills星标 23(GitHub 23 + cccskills 0)

实测评分 未实测

查看安装方法

包含的文件(4)

  • SKILL.md5.8 KB
  • references/safe-migrations-and-backfills.md3.1 KB
  • references/schema-query-and-index-design.md3.1 KB
  • references/transactions-and-consistency.md2.9 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Superior Database

Make data changes correct for the actual datastore, workload, and rollout environment. Preserve established migration tools and ownership boundaries; do not import generic database conventions without verifying engine behavior and repository practice.

Establish the data contract

Before changing a schema, query, or migration, determine:

  • datastore engine, version, topology, and relevant extensions;
  • authoritative schema and migration history;
  • entity ownership, identifiers, relationships, and tenant boundaries;
  • invariants that must hold at write time and read time;
  • expected cardinality, access patterns, ordering, and retention;
  • compatibility window across application versions, workers, and replicas;
  • data volume, traffic shape, lock sensitivity, and recovery expectations.

Inspect effective production constraints only through authorized, non-sensitive evidence. Do not assume local fixtures represent production volume, skew, nullability, or legacy states.

Design schema and queries together

Read references/schema-query-and-index-design.md when adding or changing tables, collections, fields, relationships, indexes, query shapes, pagination, or retention behavior.

  • Encode durable invariants in the datastore when the engine and rollout permit it.
  • Keep application validation for user feedback, but do not rely on it as the sole protection against concurrent or alternate writers.
  • Select indexes from real predicates, joins, ordering, uniqueness, and cardinality rather than indexing every filtered field.
  • Verify query semantics for nulls, collation, timezones, ordering ties, and empty sets.
  • Bound result sets and write batches; avoid hidden full scans, unbounded fan-out, and per-row queries.

Do not denormalize, partition, shard, or introduce a cache without demonstrated workload pressure and a clear consistency owner.

Preserve transactional truth

Read references/transactions-and-consistency.md when work spans related writes, concurrent actors, replicas, queues, caches, idempotency, or cross-service workflows.

  • Define the invariant and the exact boundary that must be atomic.
  • Use datastore guarantees deliberately; do not infer serialization from application request order.
  • Keep transactions short and avoid remote calls while holding locks unless the established architecture proves it safe.
  • Make retryable operations idempotent and distinguish transaction retry from business-operation replay.
  • Treat cache invalidation, replica lag, and event publication as explicit consistency contracts.

Plan migrations as deployments

Read references/safe-migrations-and-backfills.md for production-facing schema changes, constraint introduction, type changes, table rewrites, backfills, data repair, or removal of old representations.

  • Prefer compatibility-first expand, migrate, verify, and contract phases when multiple application versions may coexist.
  • Identify locks, rewrites, validation cost, replication impact, and failure recovery before execution.
  • Make backfills bounded, observable, resumable, and idempotent where practical.
  • Define verification and rollback or forward-recovery behavior before destructive or irreversible steps.
  • Never run a production migration, destructive query, broad data correction, or shared-environment load test without explicit authorization and the intended environment.

A migration file compiling locally is not evidence that its production execution is safe.

Verify the result

Use the repository's existing database and test tooling. Verify proportionately:

  • migration applies from the supported previous state and reaches the intended schema;
  • rollback works when it is promised and semantically possible;
  • old and new application versions behave according to the compatibility plan;
  • constraints reject invalid states and preserve valid legacy data;
  • representative queries return correct results with stable ordering;
  • query plans and runtime behavior are checked against representative shape and scale when performance is in scope;
  • backfill counts, checkpoints, error handling, and reruns preserve invariants.

Report commands actually run, datastore/version used, data scale represented, and conditions not exercised. Never claim zero downtime without evidence for the relevant engine, topology, workload, and deployment sequence.

Combine skills narrowly

  • Use superior-logic for domain behavior, API contracts, and application orchestration around persistence.
  • Use superior-testing when migration, integration, compatibility, or concurrency test design is a primary concern.
  • Use superior-debugging when a data symptom exists but its causal mechanism is uncertain.
  • Use superior-performance when representative query, capacity, resource, or latency measurement is a primary concern.
  • Use superior-reliability when replication, availability, failover, backup objectives, or recovery readiness is primary.
  • Use superior-delivery when migrations must be coordinated with artifact promotion, rollout, or rollback.
  • Use superior-api-security for tenant isolation, unsafe query construction, sensitive-data exposure, or abuse-driven resource controls.
  • Use superior-docs after verified schema, migration, recovery, or operational procedure changes.

Do not broaden a focused database change into a datastore replacement, ORM rewrite, or infrastructure migration without explicit scope.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Review or implement interface accessibility for semantics, keyboard operation, focus, contrast, status communication, zoom, and assistive technology. Use when accessibility is explicitly requested, required by the product contract, or a changed interaction creates substantial accessibility risk. Do not activate for every visual edit or use it as a generic design audit.

中文简介正在准备中。当前显示原文说明。

KodekaTeam/superior-skills232026年10月29日 更新

Implement, harden, or review defensive security controls for REST APIs, including authentication and authorization boundaries, validation, rate limiting, abuse prevention, resource limits, SSRF defenses, safe errors, logging, and security tests. Use when API security, endpoint hardening, threat review, rate limiting, token handling, or sensitive business-flow protection is an explicit concern. Do not use for ordinary endpoint logic without meaningful security scope or for offensive exploitation.

中文简介正在准备中。当前显示原文说明。

KodekaTeam/superior-skills232026年10月29日 更新

Design, implement, or assess project structure, module ownership, dependency boundaries, and safe file or folder organization. Use when project architecture, feature placement, separation of responsibilities, or architectural refactoring is a primary concern, including new framework projects. For a read-only assessment, do not modify files unless the user also requests changes; do not activate merely because ordinary feature work adds a file.

中文简介正在准备中。当前显示原文说明。

KodekaTeam/superior-skills232026年10月29日 更新

Review a code change, diff, commit, branch, or pull request for actionable defects, regressions, security risks, compatibility breaks, and missing verification. Use when code review is the primary requested outcome. Keep the review read-only unless the user explicitly asks to implement fixes; do not use as a substitute for implementation or a specialized visual audit.

中文简介正在准备中。当前显示原文说明。

KodekaTeam/superior-skills232026年10月29日 更新

Add, revise, or remove source-code comments while preserving executable behavior. Use for comment-only cleanup, documentation comments, TODO quality, and reducing narration. Do not use when the requested change modifies logic.

中文简介正在准备中。当前显示原文说明。

KodekaTeam/superior-skills232026年10月29日 更新

Write or revise user-facing product and marketing copy with a specific voice, verifiable claims, natural rhythm, and useful actions. Use for interface labels, onboarding, landing pages, help text, and product messaging. Do not use for code comments or neutral technical documentation unless tone editing is requested.

中文简介正在准备中。当前显示原文说明。

KodekaTeam/superior-skills232026年10月29日 更新

查看 KodekaTeam 的全部技能

报告此技能的问题