haven-db

GitHub

管理 haven 栈数据库(Postgres/ClickHouse/Redis)的初始化、重置、种子数据填充、状态查看及清理。提供连接字符串,强调执行破坏性操作前需用户确认。

.claude/skills/haven-db/SKILL.md langwatch/langwatch

Trigger Scenarios

haven db reset the database drop the database reseed in place db preset database url connection string for postgres haven db prune haven seed haven db status haven db logins stray test databases clickhouse url the api refuses because the database is below the LTS floor

Install

npx skills add langwatch/langwatch --skill haven-db -g -y
More Options

Non-standard path

npx skills add https://github.com/langwatch/langwatch/tree/main/.claude/skills/haven-db -g -y

Use without installing

npx skills use langwatch/langwatch@haven-db

指定 Agent (Claude Code)

npx skills add langwatch/langwatch --skill haven-db -a claude-code -g -y

安装 repo 全部 skill

npx skills add langwatch/langwatch --all -g -y

预览 repo 内 skill

npx skills add langwatch/langwatch --list

SKILL.md

Frontmatter
{
    "name": "haven-db",
    "description": "Reset, reseed, locate and prune a haven stack's databases with `haven db`, and know which verbs destroy data. Use when someone says 'haven db', 'reset the database', 'drop the database', 'reseed in place', 'db preset', 'demo preset', 'database url', 'connection string for postgres', 'haven db prune', 'haven seed', 'haven db status', 'haven db logins', 'stray test databases', 'clickhouse url', or 'the api refuses because the database is below the LTS floor'.",
    "argument-hint": "<reset|seed|url|prune|status|logins> [preset|engine] [--yes]",
    "user-invocable": true
}

haven db

haven db is the one noun for this stack's data (its own Postgres database, ClickHouse database and Redis db). haven obs query is not SQL: it reads the stack's telemetry (see haven-logs).

Verb Effect Destroys data
haven db reset [preset] drops and recreates this stack's databases, migrates, then seeds yes
haven db seed [preset] idempotent upsert of the preset's content; drops nothing no
haven db url [postgres|clickhouse|redis] prints the real loopback connection string(s), engine optional no
haven db status connection URLs, the last seed run and its preset, the migration state (was haven seed status) no
haven db logins [--reveal] prints the seeded logins, credentials masked unless --reveal no
haven db prune [--dry-run|--yes] lists (dry run, the default) or drops stray test databases older than HAVEN_DB_TTL with --yes

Presets: bare, demo, onboarding, post-onboarding (haven db with no verb lists them; haven help db does not). demo maps to haven db seed --size tiny --persona startup (haven-seed).

Destructive: ask first

haven db reset and haven down --destroy --stack <slug> drop data, and haven db prune --yes drops databases. An agent asks the user before running any of them, naming the database. As an agent, haven refuses without --yes; adding --yes is the user's decision, not yours.

  • reset on the shared main database (the one every worktree without its own falls back to) is louder: a person must type the database's name; --yes still works and says what it drops.
  • haven down --destroy --stack <slug> --yes stops a stack by slug and drops its databases (haven-lifecycle).
  • db seed refuses --yes (nothing to confirm). db url refuses it too.
  • haven db reset migrates and seeds exactly the databases it dropped.
  • The seed guard refuses when a database URL points anywhere but local dev.

Connection strings

haven db url postgres prints the real connection string, credentials included. Treat it as a secret: use it in a shell, never paste it into an issue. Plain haven env masks it (haven-env). Postgres has no hostname; ClickHouse does (clickhouse.<slug>.langwatch.localhost, HTTP).

Version History

  • c0c14dc Current 2026-10-19 19:33

Same Skill Collection

.claude/skills/analyticssim/SKILL.md
.claude/skills/browser-pair/SKILL.md
.claude/skills/browser-test/SKILL.md
.claude/skills/chakra-ui-builder/SKILL.md
.claude/skills/chakra-ui-refactor/SKILL.md
.claude/skills/code-review/SKILL.md
.claude/skills/code-search/SKILL.md
.claude/skills/feature-map/SKILL.md
.claude/skills/githubsim/SKILL.md
.claude/skills/haven-auth/SKILL.md
.claude/skills/haven-orb/SKILL.md
.claude/skills/haven-play/SKILL.md
.claude/skills/haven-seed/SKILL.md
.claude/skills/haven-setup/SKILL.md
.claude/skills/idpsim/SKILL.md
.claude/skills/lambdasim/SKILL.md
.claude/skills/langwatch-kanban/SKILL.md
.claude/skills/llmsim/SKILL.md
.claude/skills/mailsim/SKILL.md
.claude/skills/module/SKILL.md
.claude/skills/outboundsim/SKILL.md
.claude/skills/ownership/SKILL.md
.claude/skills/repo-tree/SKILL.md
.claude/skills/storagesim/SKILL.md
.claude/skills/voicesim/SKILL.md
plugins/langwatch/skills/langwatch/SKILL.md
services/langy-agent/skills/github/SKILL.md
skills/_compiled/native/agent-best-practices/SKILL.md
skills/_compiled/native/agent-performance/SKILL.md
skills/_compiled/native/automations/SKILL.md
skills/_compiled/native/code-changes/SKILL.md
skills/_compiled/native/context-sweet-spot/SKILL.md
skills/_compiled/native/daily-insights/SKILL.md
skills/_compiled/native/dashboard-widgets/SKILL.md
skills/_compiled/native/datasets/SKILL.md
skills/_compiled/native/debug-instrumentation/SKILL.md
skills/_compiled/native/debug-with-langwatch/SKILL.md
skills/_compiled/native/drive-the-ui/SKILL.md
skills/_compiled/native/eval-triage/SKILL.md
skills/_compiled/native/evaluate-multimodal/SKILL.md
skills/_compiled/native/evaluations/SKILL.md
skills/_compiled/native/experiments/SKILL.md
skills/_compiled/native/find-traces/SKILL.md
skills/_compiled/native/generate-rag-dataset/SKILL.md
skills/_compiled/native/github/SKILL.md
skills/_compiled/native/guided-onboarding/SKILL.md
skills/_compiled/native/level-up/SKILL.md
skills/_compiled/native/lwql-charts/SKILL.md
skills/_compiled/native/online-evaluations/SKILL.md

Metadata

Files
0
Version
c0c14dc
Hash
938c4af9
Indexed
2026-10-19 19:33

Home - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-10-19 23:23
浙ICP备14020137号-1