Agent skill

Daoyou Data Layer

by ChurchTao in ChurchTao/Daoyou

Daoyou Drizzle/PostgreSQL、事务、V6 角色与宗门归属、统一背包、Redis 战局和回放归档指南。Use when modifying schema, migrations, repositories, persistence mappers, resource commits or durable game models.

GPL-3.0Auto-check passedDatabases

Install Daoyou Data Layer

skills CLI
$ npx skills add ChurchTao/Daoyou --skill daoyou-data-layer -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install ChurchTao/Daoyou daoyou-data-layer --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/ChurchTao/Daoyou.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/daoyou-data-layer .claude/skills/daoyou-data-layer && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
daoyou-data-layer
GitHub stars
146
Token cost
~1.9k tokens
SKILL.md length
767 words
Files
2
Skills in repo
9
Repo updated
First seen
Licence
GPL-3.0

At a glance

Daoyou Drizzle/PostgreSQL、事务、V6 角色与宗门归属、统一背包、Redis 战局和回放归档指南。Use when modifying schema, migrations, repositories, persistence mappers, resource commits or durable game models.

  • Modifying schema
  • SKILL.md covers Locate the Current Write Path, Database and Transactions, Authoritative Models and Legacy Boundary, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Persistence mappers

What it does

Daoyou Data Layer is an agent skill from ChurchTao/Daoyou. Daoyou Drizzle/PostgreSQL、事务、V6 角色与宗门归属、统一背包、Redis 战局和回放归档指南。Use when modifying schema, migrations, repositories, persistence mappers, resource commits or durable game models. Covers Better Auth's separate migration stream and legacy storage boundaries.

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `agents/openai.yaml`).

It sits in Databases, covering ORMs and data access and Database migrations. It works with Better Auth, Redis, PostgreSQL and Drizzle ORM. The repository describes itself as: 《万界道友》是一款以 AIGC 驱动、高自由度文字体验、修仙世界观为核心的开源游戏。在这里,你将以普通修士之身,借功法、灵根、神通、法宝与奇遇,一步步推演自己的修行之路。 The licence is GPL-3.0.

When your agent uses it

  • Modifying schema
  • Persistence mappers
  • Resource commits
  • Durable game models

Example prompts

  • “/daoyou-data-layer”

What it can do on your machine

Read from SKILL.md and the folder at commit 56d80d0. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Daoyou Data Layer loads about 1.9k tokens when it runs. Until then it costs about 68 tokens; SKILL.md has 767 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~68
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from ChurchTao/Daoyou at commit 56d80d0, republished under its GPL-3.0 licence (© ChurchTao). 767 words, ~1,881 tokens.

Download SKILL.mdSave it as .claude/skills/daoyou-data-layer/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
daoyou-data-layer
description
Daoyou Drizzle/PostgreSQL、事务、V6 角色与宗门归属、统一背包、Redis 战局和回放归档指南。Use when modifying schema, migrations, repositories, persistence mappers, resource commits or durable game models. Covers Better Auth's separate migration stream and legacy storage boundaries.

Daoyou Data Layer

Locate the Current Write Path

Read drizzle.config.ts, drizzle.auth.config.ts, apps/api/src/lib/drizzle/db.ts and the relevant definitions in apps/api/src/lib/drizzle/schema.ts. Follow the route → service → repository/SQL path before treating a table or DTO as authoritative. Historical migration/design files describe intent; they do not prove a deployed database has applied it.

Database and Transactions

  • Business tables use the main wanjiedaoyou_* migration stream in drizzle/. Better Auth uses apps/api/src/lib/auth/schema.ts, drizzle.auth.config.ts and drizzle-auth/, with fixed better_auth schema and independent history.
  • Nest apps/api/src/database/database.module.ts exports the same client via DRIZZLE_DATABASE and DatabaseService. Runtime drains requests/messages before closing it. Connection settings come from validated getRuntimeEnvironment(); do not create feature-local pools.
  • Runtime uses a module-level pg.Pool and drizzle-orm/node-postgres, not Bun SQL. DATABASE_URL supplies the connection; DB_MAX_CONNECTIONS controls pool size. Session settings live in db.ts.
  • Reuse db, getExecutor(tx?), DbExecutor and DbTransaction; do not create parallel DB layers or feature-local pools.
  • Pass the executor through every nested write. runDbTasks(executor, tasks) serializes work on a transaction's single connection and permits parallel pool reads; do not replace it with unconditional Promise.all.
  • Reuse the owning mutation flow (CommandExecutors.ts, InventoryService.ts, or the relevant V6 service). Preserve locks, ownership predicates, expected revisions, idempotency and resource event commits; raw SQL success alone does not complete a player mutation.
  • ResourceEventCommitter.ts and playerStateRepository.ts maintain resource scopes/versions/events and request records. Publish updates only through the existing post-commit path.

Authoritative Models

Table names below omit the wanjiedaoyou_ prefix. The exact names and constraints are defined in schema.ts.

DomainStorageRuntime entrypoints
Character identity, permanent six attributes, conditioncultivatorscultivatorRepository.ts, cultivator/application/readers, V6 condition services
Personal manuals and active slotscultivator_manual_states, cultivator_manual_slotscharacterLoadoutRepository.ts, CombatV6ManualService.ts
Bag/storage item instancesinventory_itemsInventoryService.ts, packages/game-rules/src/inventory, packages/game-domain/src/items
Equipped V6 equipmentcultivator_equipment_slotscharacterLoadoutRepository.ts, InventoryService.ts
Beasts and lineupscultivator_beasts, cultivator_beast_lineupscombatV6BeastRepository.ts, CombatV6BeastService.ts
Sect progressionsect_combat_states, sect_method_progress, sect_meridian_loadouts, sect_meridian_nodessectCombatRepository.ts
V6 history/replayscombat_replay_archives, combat_replay_participantscombatV6ReplayRepository.ts

Repository names resolve under apps/api/src/lib/repositories; V6 service names resolve under apps/api/src/combat/application.

Ownership and JSON
  • Personal assets belong directly to cultivators.id. Sect state, methods and loadouts belong to sect_memberships.id; nodes belong to a loadout. Do not recreate a shared build-profile parent or transfer personal assets with sect progression.
  • Equipment slots reference inventory owner and item ID together. Preserve that composite FK and clear equipment references through the existing mutation flow when moving/removing items.
  • Inventory stores definition, quantity, location, slot, revision and instance facts. Parse via InventoryItemSchema, definition-specific schemas and inventoryItemOf; use existing stack-key helpers. A domain spec field does not imply storage in the old consumables table.
  • Current bag consumables use inventory_items with definition consumable.v1; BagConsumables.ts parses instanceData into consumable facts including spec.
  • Beast row ID/owner are authoritative; use beastIndividualData / beastFromRow rather than duplicating identity in JSON. Starter claim time is independent of beast lifetime.
  • Runtime combat assembly uses independent personal assets plus optional sect progress for display. Do not persist projected units/panels as the character build authority. See docs/combat-domain-ownership.md.
  • cultivators.condition remains the persistent condition field. Do not restore persistent_state / persistent_statuses or old consumable effects / use_spec / details contracts.
Show full SKILL.md (288 more words)Show less
Redis, Messages and Replays
  • Redis is authoritative for active V6 battle state, commands and RNG. Inspect CombatV6RuntimeStore.ts and the mode-specific stores for CAS revisions, occupancy, expiry and outboxes; do not substitute process-local sessions.
  • Access Redis through apps/api/src/lib/redis; NATS through apps/api/src/lib/nats. apps/api/src/runtime/messaging/combatV6Messaging.ts coordinates terminal/replay publication and archival.
  • PostgreSQL V6 archives enforce source/idempotency uniqueness. Replay participants intentionally do not cascade from character deletion; the battle archive owns their lifecycle.
  • Keep settlement, resource events and replay delivery idempotent across retries. Read docs/nats-domain-events.md together with the relevant consumer before changing message boundaries.

Legacy Boundary

  • creation_products, materials and consumables still have residual code paths. Inspect their actual callers before modifying or deleting them; they are not fallback sources for V6 equipment/manuals or the unified bag.
  • Legacy product views use packages/game-domain/src/legacy/products.ts. Do not restore creation-v2 rehydration / battleProjection or treat creation_products.is_equipped as current V6 equipment state.
  • /api/battle-records/* has been removed. V6 history uses the combat replay repository, not battle_records_v2.
  • battle_records_v3, battle_replay_archives and bet_battles are deprecated historical schema, with physical deletion deferred to a separate future migration. Read docs/combat-v6-legacy-table-retirement.md for that policy, but verify exact table names against schema. Do not generate DROP migrations simply while cleaning up skills or legacy references.
  • Do not infer that every older table is still present, or already physically deleted, from a DTO, directory or migration file alone.

Verify

  • Business schema changes: inspect generated SQL, snapshot and drizzle/meta/_journal.json; preserve published migrations. Apply only to the intended environment.
  • Auth schema changes: use auth:generate / auth:migrate with explicit environment selection, and inspect drizzle-auth/ independently.
  • Persistence changes: inspect transaction propagation, JSON parsers, ownership and resource commits, then lint/build and focused local runtime checks per docs/testing.md.
  • Do not add repository, service, Redis or database unit tests. Pure reusable shared parsers/rules may have focused shared tests.

© ChurchTao, GPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in .agents/skills/daoyou-data-layer of ChurchTao/Daoyou.

  • SKILL.md
  • agents/openai.yaml

Open the folder on GitHubat commit 56d80d0

Compare with similar skills

Daoyou Data Layer next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Daoyou Data Layer compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Daoyou Data Layer this skillChurchTao/Daoyou146—~1.9kAutomated safety check: PassGPL-3.0
Drizzle Ormericrisco/rsc-harness180—~2.6kAutomated safety check: PassMIT
Prisma Ormericrisco/rsc-harness180—~3kAutomated safety check: PassMIT
Archestra Dev Migrationsarchestra-ai/archestra4.4k—~804Automated safety check: PassCustom licence
Drizzle DatabaseChatbotXIO/ChatbotX885—~2.1kAutomated safety check: PassCustom licence
Drizzle Ormgrowupanand/ConvoForm1021 repos~2.7kAutomated safety check: PassApache-2.0

Similar skills

  • Drizzle Orm

    ericrisco/rsc-harness

    A skill your agent uses when modeling data or querying with Drizzle ORM in TypeScript — pgTable schema in .ts, type-safe select/insert/relational queries, drizzle-kit migrations.

    180 GitHub stars~2.6k tokensUpdated yesterday
    DatabasesAuto-check passed
  • Prisma Orm

    ericrisco/rsc-harness

    A skill your agent uses when modeling data or writing type-safe queries with Prisma ORM in TypeScript — schema.prisma, prisma.config.ts, the generated Prisma Client, and Prisma Migrate, including…

    180 GitHub stars~3k tokensUpdated yesterday
    DatabasesAuto-check passed
  • Archestra Dev Migrations

    archestra-ai/archestra

    A skill your agent uses when changing Drizzle schemas, generating migrations, editing migration SQL, creating data-only migrations, diagnosing drizzle-kit check failures, or resolving…

    4.4k GitHub stars~804 tokensUpdated today
    DatabasesAuto-check passed
  • Drizzle Database

    ChatbotXIO/ChatbotX

    Work with Drizzle ORM database schema, migrations, relations, and queries in PostgreSQL.

    885 GitHub stars~2.1k tokensUpdated yesterday
    DatabasesAuto-check passed
  • Drizzle Orm

    growupanand/ConvoForm

    Type-safe SQL ORM for TypeScript with zero runtime overhead. An agent skill from growupanand/ConvoForm.

    102 GitHub starsUsed in 1 repo~2.7k tokens
    DatabasesAuto-check passed
  • Discover Database

    rand/cc-polymath

    Automatically discover database skills when working with SQL, PostgreSQL, MongoDB, Redis, database schema design, query optimization, migrations, connection pooling, ORMs, or database selection.

    181 GitHub stars~2k tokensUpdated 7 mo ago
    DatabasesAuto-check passed

More from ChurchTao/Daoyou

All 9 skills in this repo
  • Daoyou Game UI

    ChurchTao/Daoyou

    为本项目的主流程游戏 UI 提供抽象规范与审查方法,覆盖 GameViewportLayout 及其场景页、共享壳组件和正文交互。Use when implementing, refactoring, or reviewing scene-page structure, typography, borders, navigation, component ownership, or…

    146 GitHub stars~1.4k tokensUpdated today
    Auto-check passed
  • Daoyou NestJS API、认证、授权、Better Auth、ALTCHA、admin、internal cron、LLM header 安全和服务端输入校验指南。Use when adding or modifying apps/api/src controllers, guards, middleware, auth, admin endpoints, cron/internal…

    146 GitHub stars~3k tokensUpdated today
    Auto-check passed
  • Daoyou Game Core Domain

    ChurchTao/Daoyou

    Daoyou combat-v6 战斗内核、规则、人物投影、宗门、道装、功法、召唤灵及共享物品规则指南。Use when modifying shared combat rules, character attributes, sect content, equipment, manuals, beasts, forging, inventory or reward domain logic.

    146 GitHub stars~2.6k tokensUpdated today
    Auto-check passed
  • Daoyou Beast Design

    ChurchTao/Daoyou

    万界道友灵兽物种设计与审查规范。用于新增或调整召唤兽的境界分布、命名形态、资质成长、核心天赋、出生技能池及培养空间,或将这些设计落入配置。单纯战斗内核修复使用 daoyou-game-core-domain;本技能不负责新增传承灵印机制或立绘生成。

    146 GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Daoyou Ink Portraits

    ChurchTao/Daoyou

    为万界道友生成、修改或评审写意墨像立绘,统一玩家、NPC、BOSS 与灵兽的笔墨语言,涵盖物种头像构思、局部彩墨与界面适配。用于角色和生灵立绘,不用于一般页面排版、物品 emoji 或场景山水。

    146 GitHub stars~1k tokensUpdated today
    Auto-check passed
  • Daoyou Item Preview

    ChurchTao/Daoyou

    万界道友物品预览的固定展示与接入规范。新增道具、调整预览字段/文案/层级/折叠交互,或重构 ItemSlot、ItemPreview、presentation 适配器时使用;覆盖背包及复用预览的炼器、货架等入口。纯战斗规则、掉落数值或持久化变更不单独触发。

    146 GitHub stars~983 tokensUpdated today
    Auto-check passed

Categories

Questions about Daoyou Data Layer

What does Daoyou Data Layer do?

Daoyou Drizzle/PostgreSQL、事务、V6 角色与宗门归属、统一背包、Redis 战局和回放归档指南。Use when modifying schema, migrations, repositories, persistence mappers, resource commits or durable game models. Daoyou Data Layer is an agent skill from ChurchTao/Daoyou. Daoyou Drizzle/PostgreSQL、事务、V6 角色与宗门归属、统一背包、Redis 战局和回放归档指南。Use when modifying schema, migrations, repositories, persistence mappers, resource commits or durable game models.

When should I use Daoyou Data Layer?

Daoyou Data Layer fits situations like: modifying schema; persistence mappers; resource commits; durable game models.

How do I install Daoyou Data Layer in Claude Code?

Run `npx skills add ChurchTao/Daoyou --skill daoyou-data-layer -a claude-code`. Or copy the skill folder (.agents/skills/daoyou-data-layer in ChurchTao/Daoyou) into .claude/skills/daoyou-data-layer in your project. Claude Code loads it when a task matches its description.

How do I install Daoyou Data Layer in Codex?

Run `npx skills add ChurchTao/Daoyou --skill daoyou-data-layer -a codex`. Or copy the skill folder (.agents/skills/daoyou-data-layer in ChurchTao/Daoyou) into .agents/skills/daoyou-data-layer in your project. Codex loads it when a task matches its description.

Can I use Daoyou Data Layer in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add ChurchTao/Daoyou --skill daoyou-data-layer -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/daoyou-data-layer, .gemini/skills/daoyou-data-layer, .github/skills/daoyou-data-layer and .opencode/skills/daoyou-data-layer in your project.

What does Daoyou Data Layer need to run?

SKILL.md names no scripts, command-line tools or credentials: Daoyou Data Layer is instructions for the agent only.

Does Daoyou Data Layer access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Daoyou Data Layer safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Daoyou Data Layer use?

Daoyou Data Layer is published under the GPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Daoyou Data Layer use?

About 1.9k tokens (SKILL.md is roughly 7.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Daoyou Data Layer?

Skills that share tags, products or a category with Daoyou Data Layer: Drizzle Orm (ericrisco/rsc-harness, 180 stars), Prisma Orm (ericrisco/rsc-harness, 180 stars), Archestra Dev Migrations (archestra-ai/archestra, 4.4k stars) and Drizzle Database (ChatbotXIO/ChatbotX, 885 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Daoyou Data Layer?

ChurchTao (a GitHub user) maintains it in ChurchTao/Daoyou, which has 146 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on October 10, 2026.

Source: ChurchTao/Daoyou on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.