Home / All Skills / Workflow & Core Tools / dbs-save
Workflow & Core Tools · dontbesilent2025/dbskill

dbs-save

Save key states of the current diagnosis locally, and view or configure the archive location. Used when users request saving conclusions, resuming across sessions, or modifying the archive path.

L2 Local · Restricted workspaceV1 Commit-PinnedWrite FileDual-pass Audit
Author dontbesilent2025GitHub dontbesilent2025/dbskill ↗Stars 10121License CC BY-NC 4.0(仓库根 LICENSE:Attribution-NonCommercial 4.0 International (CC BY-NC 4.0);署名 + 禁止商业使用;Copyright (c) 2026 dontbesilent)Commit 8b8e33f1ec
Control levels describe skill capabilities and suggested control measures; they do not represent quality or safety certifications, nor do they dictate usability. Usage decisions rest entirely with users and administrators. Different agent hosts apply varying constraints; do not assume hosts provide automatic protection. Third-party skill copyrights belong to their original authors. Use at your own risk.

1How It Works & Mechanism

A pure prompt-orchestrated 'writer' that persists conversation state into recoverable markdown using fixed file formats and path rules; responsibilities are strictly separated—record only, do not diagnose.

skills/dbs-save/SKILL.md
**你不做诊断。** 诊断是别的 skill 的事,你只做记录。
Artifact = YAML frontmatter (slug/timestamp/title/source_skill/status/next_skill) + a fixed 6-section body.

The archive root directory is determined by the project's .dbs/config.json with three modes (default ~/.dbs/, project current dir .dbs/, and custom designated dir), serving as the single source of truth for configuration (dbs-restore/dbs-report resolve following the same rules).

skills/dbs-save/SKILL.md
没有配置文件时,继续使用默认位置,不创建配置文件。
Custom mode supports cloud sync directories (e.g., iCloud Drive paths) and mandates expanding leading ~.

Fail fast on configuration anomalies: unparseable / unsupported mode / empty root / path pointing to /, home dir, or project root → abort and explain the issue; silently falling back to the default location is prohibited.

skills/dbs-save/SKILL.md
配置无法解析、`mode` 不受支持、`root` 为空,或路径指向 `/`、用户家目录、当前项目根目录时,停止操作并说明配置问题。不要静默退回默认位置。
This prevents silent failures such as 'believing it was saved to ~/.dbs while written elsewhere' or 'using the home directory as the archive root'.

Writing configurations requires secondary confirmation: only written when the user explicitly uses the location subcommand, and the resolved absolute path must be shown and confirmed beforehand.

skills/dbs-save/SKILL.md
写入前说明最终解析出的绝对路径,并要求用户确认;用户确认后再创建或更新 `.dbs/config.json`。
In contrast, `/dbs-save location` is read-only and does not write files.

Determine if there is 'anything worth saving' before writing: refuse to save empty files if there is no diagnostic process, and provide the correct path prompt.

skills/dbs-save/SKILL.md
- 切换位置不会自动搬动旧存档。需要迁移时,先展示来源与目标,得到用户确认后复制;保留原文件。 `/dbs-save location` 只显示当前模式、配置文件位置和解析后的存档根目录,不写文件。 --- ## 工作流程 ### Step 1:判断现在能不能存 存之前先看对话里有没有真正可记的东西。如果用户刚说了一句「保存」但前面没做过任何诊断,你应该说: > 现在没有可存的结论。输入 `/dbs` 开始处理一个真实任务;形成结论后,再明确告诉我需要保存。 不要存空文件。 ### Step 2:自动提取或确认标题 从对话里提取一句话作为标题(不超过 20 字,名词性短语)。例如: - 「卖什么没想清楚」 - 「找到了对标但学不来」 - 「定价偏低,需要拉到 10 倍价差」 如果用户用 `/dbs-save <title>` 显式指定了,用用户的。 ### Step
Corresponds to the fixed prompt in Step 1: There are currently no conclusions to save... Type /dbs to start processing a real task.

Project isolation relies on slug: defaults to sanitized basename $(pwd), falls back to default in home directories or non-project scenarios, and allows explicit user specification via --slug.

skills/dbs-save/SKILL.md
**默认项目名**:取自 `basename $(pwd)`,把所有非 `[a-z0-9-]` 字符替换成 `-`。
Externally referred to uniformly as 'project' instead of slug—technical identifiers do not appear in user conversations.

Privacy notice is a one-time alert upon first entering project/custom mode, covering 'local unencrypted plaintext', 'recommending adding .dbs/ to .gitignore (requires confirmation before modification)', and 'changing locations does not automatically migrate existing archives'.

skills/dbs-save/SKILL.md
如果当前项目使用 Git,建议把 `.dbs/` 加入 `.gitignore`。修改 `.gitignore` 前必须得到用户确认。
Accompanying original text: '`.dbs/` and archive directories may contain revenue, client, and commercial secrets. Files are stored as local unencrypted plaintext.'

The next_skill field enforces a 'leave empty rather than guess' discipline to avoid feeding wrong directions for dbs-restore automatic resumption.

skills/dbs-save/SKILL.md
不要瞎猜——这个字段是给 dbs-restore 自动接续用的,错了比空更糟。
Similarly, status defaults to in-progress when uncertain.

2Core Capabilities

01Archive writing: Persist to {archive_root}/sessions/{slug}/{YYYYMMDD-HHMMSS}-{title-slug}.md; create directory with mkdir -p if it does not exist
02Fixed 6-section structure: User Chief Complaint / Reached Conclusions / Discarded Directions by User / Hypotheses to Validate / Confirmed Next Steps / Notes
03Automatic title extraction (noun phrase ≤20 characters) or explicit user designation via /dbs-save <title>
04List mode: List project-internal archives according to current configuration path with localized status, without mixing other locations
05Tri-state location viewing/switching (default/project/custom <path>) + explanation of resolution rules
06Conflict self-resolution: Append a 4-digit random suffix for same-second same-title conflicts; allow consecutive saves of the same state (different timestamps do not conflict)
07Strict tri-value semantics for status field, translated to user locale during display
08Ultra-minimalist receipt: One-line path + count + usage instructions for next time, without repeating archive contents

4Recommended Governance & Evidence

Suggested Controls for Safe Operation
For Agent Runtime
Restrict working directory
For Administrators
Retain operation logs
Evidence & Triggers (File Paths & Excerpts)
  • 本地工作目录: File I/O and artifact output: {archive_root}/sessions/{slug}/{YYYYMMDD-HHMMSS}-{title-slug}.md (diagnostic archive containing chief complaint, conclusions, discarded directions...)
Audit Notes: Evaluation target is the skill's own directory: no scripts, no network endpoints, no credential access, but SKILL.md explicitly instructs the agent to persist diagnostic states locally ({archive_root}/sessions/…md, defaults to ~/.dbs/, can point to cloud sync paths) and writes .dbs/config.json upon user confirmation, falling under 'local I/O only, no external transmission'. Risks reside in data rather than code: archives may contain revenue, client, and trade secrets in unencrypted plaintext; the skill integrates warnings, .gitignore advice, path confirmations, and prevents silent fallbacks into its workflow, but encryption and data masking are beyond its capabilities.

5Second-Pass Verification

  • [ok] 外部资源/工具:是否存在未声明的依赖 — 无 URL、无包、无 CLI;目录内仅 SKILL.md + agents/openai.yaml。external_deps 空数组成立(文中出现的 python3 datetime 命令只是 timestamp 生成建议,不构成依赖)。
  • [ok] 安全结论:写入是否可能落到危险位置 — 配置解析显式拒绝 path 指向 /、家目录、项目根的场景并停机(「不要静默退回默认位置」);config 写入有绝对路径确认;存档写入固定在 {存档根目录}/sessions/ 下,无删除操作。除用户自定义 root 外,默认落点为 ~/.dbs/。
  • [ok] 实现原理是否成立:跨会话可恢复是否真由本 skill 保证 — 四要素齐备:确定路径规则、含时间戳文件名(供 dbs-restore 排序)、固定 frontmatter 字段(供解析)、固定 body 六段(供报告搬运),并规定 source_skill/next_skill 的填写纪律。恢复端(dbs-restore)的读取假设与本端写入格式逐条对应。
  • [ok] 功能声明 vs 实际能力:description 声称的「查看或设置存档位置」 — 对应 location 子命令三态(查看 / default / project / custom <路径>)与「只读显示不写文件」的区分,实现与声明相符。
  • [unlocatable] 证据定位:仓库级元数据(stars/last_push)与 installs — stars=10121、last_push=2026-09-07 来自站点池 data/pool.json(GitHub API 采集),pin 源码内无法逐字定位;installs 未采集记 null。license 可在仓库根 LICENSE 逐字命中。

6Verdict & Scenarios

  • Turns 'cross-session memory' into verifiable engineering conventions: fixed paths + timestamped filenames + fixed frontmatter/body, enabling restore and reporting ends to rely strictly on format rather than model memory
  • Restrained configuration subsystem design: creates no config files by default, aborts and reports on anomalies, requires path confirmation before writing—eliminating long-term risks like 'thought it was saved but was not' and 'silent location shifts'
  • Proactive and specific privacy alerts (local unencrypted plaintext, .gitignore recommendations, no auto-migration across locations)—a rare honest disclosure in diagnostic skills
  • Responsible to downstream consumers: empty rather than guessing for next_skill, default to in-progress for status, upholding 'wrong is worse than empty' to protect dbs-restore's auto-resume
  • Strict output discipline: one-line receipt, no content regurgitation, bans exclamation marks and cheerleading within archives, keeping archives as neutral state files rather than emotional journals
  • Best for: Ideal for users dealing with the same set of business problems long-term who need cross-session cumulative judgment (consultative self-diagnosis, parallel businesses/projects). It serves as the write-end upgrading dbskill from a 'one-time consultation' to a 'personal physician', paired with dbs-restore (read-back) and dbs-report (aggregation); also suitable for users who want to solidify AI conversation conclusions into local searchable files.
    Not for: Not suitable for scenarios where local traces are unwanted—its entire value lies in local persistence; not suitable for sensitive data requiring encryption or permission isolation (plain text); not suitable as a general note-taking/journaling tool (does not diagnose, rejects empty files, requires 6-section structure and frontmatter fields); not suitable for sharing an archive pool across multiple machines without a sync mechanism (fixed locations, no auto-migration).
    Install Agent-Ready
    ① Verified Mirror 2026-09-15
    Option A · Direct DownloadDownload dbs-save.tar.gz
    sha256: b6062f2bb252be4a…
    Option B · Copy Guide for Agent
    install.json
    Agents automatically download and verify mirrors from this JSON guide.
    ② Upstream GitHub
    GitHub Repo ↗
    Pinned to commit 8b8e33f1ec.