Token导航 LogoToken导航

Agent Skill · 开发

deepbase(deepbase 命令行)

deepbase 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

deepbase 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证信息还不明确,第三方扫描已通过,按安装量在开发类的 21,746 个 Skill 里排第 19,957。

总安装 245周安装 10GitHub Stars 3下载 78核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:deepbase(deepbase 命令行)
来源仓库:https://github.com/clasen/deepbase
仓库路径:skills/deepbase
安装命令:
npx skills add https://github.com/clasen/deepbase --skill deepbase
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/clasen/deepbase --skill deepbase

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

deepbase 是 Node.js 的多驱动持久化系统,提供 JSON/SQLite/MongoDB/Redis 的统一存储 API。适用于需要在不同存储后端间切换或组合使用、实现自动故障转移的数据持久化场景。支持嵌套对象路径访问与任意 deepbase 驱动包集成,无需修改应用层代码逻辑。

使用前需确认 Node.js 环境及目标数据库连接权限,注意不支持非 Node.js 运行时直接使用。deepbase 属于开发类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/deepbase

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/clasen/deepbase --skill deepbase;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

deepbase 怎么安装?

在终端执行 npx skills add https://github.com/clasen/deepbase --skill deepbase。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

deepbase 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

deepbase 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

deepbase 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

deepbase 用的人多吗?

公开数据是累计安装 245 次,近一周安装 10 次,下载 78 次,GitHub 3 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

deepbase 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
deepbase

deepbase 命令行 · 本页

2453接触敏感数据未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

DeepBase

Overview

DeepBase is a multi-driver persistence system for Node.js that provides a unified API across storage backends (JSON, SQLite, MongoDB, Redis, IndexedDB). It allows switching or combining backends without changing application code.

Use this skill when:

  • Adding or integrating persistence into a Node.js project
  • Setting up multi-backend storage with automatic failover
  • Migrating data between storage drivers
  • Working with nested object paths for data access
  • Integrating any DeepBase driver package (deepbase, deepbase-sqlite, deepbase-mongodb, etc.)

Do NOT use this skill when:

  • The project needs a full ORM or relational query builder (use Prisma, Drizzle, etc.)
  • The project requires SQL queries, joins, or complex aggregations
  • The task is about browser-only storage without DeepBase (use raw IndexedDB/localStorage)

Quick Start

Step 1: Install

# Core package (includes JSON driver by default)
npm install deepbase

# Optional drivers — install only what you need
npm install deepbase-sqlite       # SQLite (better-sqlite3)
npm install deepbase-mongodb      # MongoDB
npm install deepbase-redis        # Redis (vanilla)
npm install deepbase-redis-json   # Redis Stack (RedisJSON)
npm install deepbase-indexeddb    # Browser IndexedDB

Check package.json first — avoid reinstalling if deepbase is already listed.

Step 2: Create and use a store

import DeepBase from 'deepbase';

const db = new DeepBase({ path: './data', name: 'app' });
// No need to call connect() — lazy connect handles it automatically

await db.set('config', 'theme', 'dark');
const theme = await db.get('config', 'theme'); // 'dark'

await db.disconnect(); // Always disconnect on shutdown

Step 3: Go multi-driver (when resilience is needed)

import DeepBase from 'deepbase';
import { JsonDriver } from 'deepbase-json';
import { MongoDriver } from 'deepbase-mongodb';

const db = new DeepBase([
  new MongoDriver({ url: process.env.MONGO_URL, database: 'myapp', collection: 'data' }),
  new JsonDriver({ path: './backup', name: 'fallback' })
], {
  writeAll: true,            // Write to all drivers (default: true)
  readFirst: true,           // Read from first available (default: true)
  failOnPrimaryError: false  // Continue if primary fails
});

Imports

// ES Modules (recommended)
import DeepBase from 'deepbase';
import { DeepBase, DeepBaseDriver } from 'deepbase';

// CommonJS
const { DeepBase } = require('deepbase');

// Individual drivers
import { JsonDriver } from 'deepbase-json';
import { MongoDriver } from 'deepbase-mongodb';
import { SqliteDriver } from 'deepbase-sqlite'; // pragma: 'none'|'safe'|'balanced'(default)|'fast'
import { RedisDriver } from 'deepbase-redis';
import { RedisDriver as RedisJsonDriver } from 'deepbase-redis-json';
import { IndexedDBDriver } from 'deepbase-indexeddb';

API Reference

All methods are async. Path arguments are variadic strings representing nested keys.

Data operations

MethodSignatureDescription
getget(...path)Get value at path. Returns null if not found.
setset(...path, value)Set value at path. Last argument is the value.
deldel(...path)Delete value at path.
incinc(...path, amount)Increment numeric value.
decdec(...path, amount)Decrement numeric value.
addadd(...path, value)Add item with auto-generated ID. Returns full path array.
updupd(...path, fn)Atomic update — passes current value to fn, stores the return value.

Query operations

MethodSignatureDescription
keyskeys(...path)Get keys at path (array of strings).
valuesvalues(...path)Get values at path.
entriesentries(...path)Get [key, value] pairs at path.
poppop(...path)Remove and return the last item.
shiftshift(...path)Remove and return the first item.

Connection

MethodDescription
connect()Connect all drivers. Returns {connected, total}.
disconnect()Disconnect all drivers.

Driver access

MethodDescription
getDriver(index)Get driver instance by index (default: 0).
getDrivers()Get array of all driver instances.

Migration

// Migrate data from driver 0 to driver 1
await db.migrate(0, 1, {
  clear: true,       // Clear target first (default: true)
  batchSize: 100,    // Progress callback interval
  onProgress: ({ migrated, errors, current }) => console.log(`${migrated} items`)
});

// Sync primary (index 0) to all other drivers
await db.syncAll({ clear: true });

Constructor Options

new DeepBase(drivers, {
  writeAll: true,              // Write to all drivers
  readFirst: true,             // Read from first available driver in order
  failOnPrimaryError: true,    // Throw if primary driver (index 0) fails
  lazyConnect: true,           // Auto-connect on first operation
  timeout: 0,                  // Global timeout in ms (0 = disabled)
  readTimeout: 0,              // Override for read operations
  writeTimeout: 0,             // Override for write operations
  connectTimeout: 0            // Override for connect
});

Driver Configuration

DriverKey Options
JsonDriverpath (directory), name (filename), stringify / parse (custom serialization)
SqliteDriverpath (directory), name (database filename), pragma ('none' \'safe' \'balanced' \'fast', default 'balanced')
MongoDriverurl, database, collection
RedisDriverurl, prefix
RedisJsonDriverurl, prefix (requires Redis Stack with RedisJSON module)
IndexedDBDrivername, version

Rules for Agents

Follow these rules when generating DeepBase code:

  1. Check before installing. Verify package.json for existing deepbase dependency before running npm install.
  2. Use the official API. Never manipulate driver internals or the underlying JSON/SQLite/Mongo storage directly. Always go through db.get(), db.set(), etc.
  3. Prefer lazy connect. Do not call db.connect() explicitly unless you need the {connected, total} result. Lazy connect handles it automatically.
  4. Always disconnect() on shutdown. Especially important for MongoDB and Redis drivers to release connections.
  5. Use add() for auto-IDs. Do not manually generate IDs with nanoid/uuid — add() returns the full path array including the generated ID.
  6. Spread the path from add(). The return value is an array: use await db.get(...userPath) to retrieve the added item.
  7. Use upd() for atomic changes. When modifying existing values based on their current state, use upd() instead of get() + set() to avoid race conditions.
  8. Set failOnPrimaryError: false for resilient setups. When using multi-driver for fault tolerance, disable this so operations continue via fallback drivers.
  9. Use environment variables for connection strings. Never hardcode MongoDB URLs or Redis URLs in source code.
  10. Prefer deepbase-redis-json over deepbase-redis when working with Redis Stack, as it supports native JSON operations.

Examples

Example 1: Adding a simple persistent store to a new project User says: "I need to persist user settings in my Node.js app." Actions: Install deepbase, create a DeepBase instance with JsonDriver, use set/get for nested keys. Result: A ./data/settings.json file managed transparently via the DeepBase API.

Example 2: Multi-driver setup with MongoDB primary and JSON fallback User says: "I want MongoDB as my main database but with a local JSON backup in case it goes down." Actions: Create DeepBase with [MongoDriver, JsonDriver], set writeAll: true and failOnPrimaryError: false. Use process.env.MONGO_URL. Result: All writes go to both drivers; reads use MongoDB first and fall back to JSON silently.

Example 3: Migrating data from JSON to SQLite User says: "I want to move my existing JSON data into SQLite." Actions: Create DeepBase with both drivers loaded, call db.migrate(0, 1, {clear: true}). Result: All data is transferred from the JSON file to the SQLite database.

Example 4: Auto-ID collection User says: "I want to store multiple users with unique IDs automatically." Actions: Use db.add('users', {name, email}), capture the returned path array, use db.get(...path) to retrieve. Result: Each user gets a nanoid-based key under users.

Common Tasks

Store and retrieve nested data

await db.set('users', 'alice', { name: 'Alice', age: 30 });
await db.set('users', 'alice', 'email', 'alice@example.com');
const user = await db.get('users', 'alice');
// { name: 'Alice', age: 30, email: 'alice@example.com' }

Add items with auto-generated IDs

const userPath = await db.add('users', { name: 'Bob', email: 'bob@example.com' });
// userPath = ['users', 'aB3xK9mL2n']
const user = await db.get(...userPath);

Increment/decrement counters

await db.set('stats', 'views', 0);
await db.inc('stats', 'views');      // 1
await db.inc('stats', 'views', 10);  // 11
await db.dec('stats', 'views', 5);   // 6

Atomic update

await db.upd('user', 'name', name => name.toUpperCase());

Iterate over collections

const userKeys = await db.keys('users');
const userList = await db.values('users');
const userEntries = await db.entries('users'); // [[id, data], ...]

Pop/shift from collections

const last = await db.pop('queue');    // Remove and return last item
const first = await db.shift('queue'); // Remove and return first item

Custom JSON serialization (circular references)

import { JsonDriver } from 'deepbase-json';
import { stringify, parse } from 'flatted';

const db = new DeepBase(new JsonDriver({
  path: './data',
  name: 'circular',
  stringify,
  parse
}));

Three-tier architecture

const db = new DeepBase([
  new MongoDriver({ url: process.env.MONGO_URL, database: 'app' }),
  new JsonDriver({ path: './backup' }),
  new RedisDriver({ url: process.env.REDIS_URL })
], { writeAll: true, failOnPrimaryError: false });

Extend with a custom driver

import { DeepBaseDriver } from 'deepbase';

class MyDriver extends DeepBaseDriver {
  async connect() { /* ... */ this._connected = true; }
  async disconnect() { /* ... */ }
  async get(...args) { /* ... */ }
  async set(...args) { /* ... */ }
  async del(...args) { /* ... */ }
  async inc(...args) { /* ... */ }
  async dec(...args) { /* ... */ }
  async add(...args) { /* ... */ }
  async upd(...args) { /* ... */ }
}

All methods listed in DeepBaseDriver must be implemented. keys(), values(), entries() have default implementations that call get().

Troubleshooting

  • All drivers must extend DeepBaseDriver — Ensure all drivers in the array are proper driver instances, not plain objects.
  • Operation timed out — Increase timeout, readTimeout, or writeTimeout in the constructor options.
  • MongoDB/Redis connection fails silently — Set failOnPrimaryError: true (default) to surface connection errors, or check connect() return value for {connected, total}.
  • Data not synced across drivers — Ensure writeAll: true (default). For existing data, use db.migrate() or db.syncAll().
  • Stale reads after failover — The fallback driver may have older data. Use db.syncAll() after the primary recovers.

SqliteDriver Pragma Modes

SqliteDriver accepts a pragma option that controls performance vs. durability:

ModeWhen to use
noneOpening a database created by an older version of the driver (no WAL, no WITHOUT ROWID)
safeApps where data integrity matters more than speed (WAL + synchronous=FULL)
balanced *(default)*Recommended for most apps — fast writes with WAL + synchronous=NORMAL
fastMaximum throughput — risk of data loss on OS crash (synchronous=OFF)
// Default (balanced) — just omit pragma
new SqliteDriver({ path: './data', name: 'app' })

// Explicit mode
new SqliteDriver({ path: './data', name: 'app', pragma: 'fast' })

Benchmark gains of balanced vs none: +1772% write, +2187% batch write, 29% smaller disk (compacted). All modes pass the full test suite.

References

平台分布

Codex

37.39%
按下载量换算29

Claude

30.63%
按下载量换算24

Cursor

18.8%
按下载量换算15

Gemini CLI

9.62%
按下载量换算8

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills