Skip to content

ThinkInAIXYZ/deepchat / .agents/skills/deepchat-data-import

deepchat-data-import

Verified

Help developers build third-party tools that import, inspect, migrate, or analyze DeepChat data. Use when Codex needs to work with DeepChat provider configuration, model configuration, MCP/app settings, sessions, messages, legacy chat data, `agent.db`, `chat.db`, SQLCipher encrypted SQLite, Electron safeStorage wrapped passwords, Tauri importers, or native macOS/Windows/Linux data access.

FileKindSize
SKILL.mdskill md2.9 KB
agents/openai.yamlconfig280 B
references/data-locations.mdmarkdown2.5 KB
references/import-recipes.mdmarkdown4.5 KB
references/schema-reference.mdmarkdown7.6 KB
references/sqlite-access.mdmarkdown4.8 KB

references/data-locations.md

View on GitHub
# Data Locations

Use this reference when an importer must locate DeepChat data on disk or inside a backup.

## Primary Files

DeepChat stores the current main database at:

```text
<electron userData>/app_db/agent.db
<electron userData>/app_db/agent.db-wal
<electron userData>/app_db/agent.db-shm
```

The legacy database, when present, is:

```text
<electron userData>/app_db/chat.db
```

Database encryption metadata is outside SQLite:

```text
<electron userData>/database-security.json
```

The file is an ElectronStore JSON file. The relevant shape is:

```json
{
  "metadata": {
    "version": 1,
    "enabled": true,
    "cipher": "sqlcipher",
    "passwordStorage": "safeStorage",
    "wrappedPassword": "base64-electron-safeStorage-blob",
    "safeStorageBackend": "basic_text",
    "lastMigrationAt": 1770000000000,
    "lastMigrationDirection": "enable"
  }
}
```

`passwordStorage` can be `safeStorage`, `manual`, or `none`. If `enabled` is false, open
`agent.db` as normal SQLite.

## Default UserData Paths

Electron derives the profile path from the packaged product name `DeepChat` unless the runtime
overrides `app.getPath('userData')`.

```text
macOS:   ~/Library/Application Support/DeepChat
Windows: %APPDATA%\DeepChat
Linux:   ~/.config/DeepChat
```

Treat these as defaults. Portable builds, development builds, tests, or user overrides can point
elsewhere.

## Sync Backup Layout

DeepChat sync backups use `database/agent.db` as the primary database payload in current backup
versions. Some compatibility backups may also contain `database/chat.db` or old JSON settings. When
both `agent.db` and `chat.db` exist, prefer `agent.db`.

## Snapshot Rules

- If DeepChat is running, copy `agent.db`, `agent.db-wal`, and `agent.db-shm` together.
- If DeepChat is closed, `agent.db` alone is usually enough, but copying sidecars is still harmless.
- For high-integrity import, open a read-only source connection and run a SQLite backup into a temp
  file, then import from the temp file.
- Do not delete `*.migration-tmp`, `*.migration-rollback`, `agent.db-wal`, or `agent.db-shm` from a
  user profile. DeepChat owns those lifecycle decisions.

## Related Files Still Outside Agent.db

Most sensitive configuration has moved into SQLite. Some lightweight or compatibility JSON files may
still exist in userData, including:

- `app-settings.json`
- `custom_prompts.json`
- `system_prompts.json`
- `mcp-settings.json`

Prefer SQLite tables for current provider, MCP, app setting, prompt, and knowledge config imports.
Use JSON files only as legacy fallback.
deprecation-and-migrationaddyosmani/agent-skillsManages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when migrating a database schema in production, such as renaming or dropping a column without downtime (expand/contract). Use when deciding whether to maintain or sunset existing code.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
performance-optimizationaddyosmani/agent-skillsOptimizes application performance across frontend, backend, queries, and databases. Use when performance requirements exist, when you suspect performance regressions, when Core Web Vitals or load times need improvement, when N+1 query patterns need fixing, or when profiling reveals bottlenecks.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
agent-cost-reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json.Stars: 118kUpdated Claude CodeCodexVerifiedInstall
agent-cost-reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json.Stars: 118kUpdated Claude CodeCodexVerifiedInstall