{"id":"e0c9ecf2-f695-43c5-a1ff-f0a30e8e5ca9","entityType":"agent","slug":"clawhub-openlark-sqlite-client","name":"Sqlite Client","canonicalUrl":"https://www.xpersona.co/agent/clawhub-openlark-sqlite-client","canonicalPath":"/agent/clawhub-openlark-sqlite-client","generatedAt":"2026-10-10T14:42:29.022Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"editorial-content","verified":true,"confidence":"high","updatedAt":"2026-10-10T12:04:23.519Z","emptyReason":null},"description":"SQLite database operations. Use this skill when users need to create, read, query, or modify SQLite databases (.db files). Skill: Sqlite Client Owner: openlark Summary: SQLite database operations. Use this skill when users need to create, read, query, or modify SQLite databases (.db files). Tags: latest:1.0.0 Version history: v1.0.0 | 2026-04-21T01:28:33.191Z | user Initial release of sqlite-client - Provides async/await APIs to create, read, query, and modify SQLite (.db) databases using sqlite and sqlite3. - Supports core operations: c","descriptionLabel":"Technical summary","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 1.4K downloads reported by the source. Last updated 10/10/2026.","installCommand":"clawhub skill install s1727wv2g20pc729snzcm4nf8183hy72:sqlite-client","sourceUrl":"https://clawhub.ai/openlark/sqlite-client","homepage":"https://clawhub.ai/openlark/skills/sqlite-client","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/openlark/sqlite-client","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/openlark/skills/sqlite-client","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":63,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"SQLite database operations. Use this skill when users need to create, read, query, or modify SQLite databases (.db files). Skill: Sqlite Client Owner: openlark "},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-10T12:04:23.519Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T12:04:23.519Z","emptyReason":null},"stars":null,"forks":null,"downloads":1445,"packageName":null,"latestVersion":"1.0.0","tractionLabel":"1.4K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-10T12:04:23.519Z","emptyReason":null},"lastUpdatedAt":"2026-10-10T12:04:23.519Z","lastCrawledAt":"2026-10-10T12:04:23.519Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-11T12:04:23.519Z","lastVerifiedAt":null,"highlights":[{"version":"1.0.0","createdAt":"2026-04-21T01:28:33.191Z","changelog":"Initial release of sqlite-client - Provides async/await APIs to create, read, query, and modify SQLite (.db) databases using `sqlite` and `sqlite3`. - Supports core operations: creating tables, executing SQL queries, inserting/updating/deleting rows, prepared statements, and named parameters. - Includes migration support and utility patterns for schema inspection and row counting. - Offers example code for caching, in-memory databases, and debugging. - All methods return Promises and support modern ES6+ JavaScript.","fileCount":6,"zipByteSize":8554}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s1727wv2g20pc729snzcm4nf8183hy72:sqlite-client","setupComplexity":"low","setupSteps":["Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.","Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-openlark-sqlite-client/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-openlark-sqlite-client/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-openlark-sqlite-client/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-openlark-sqlite-client/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-openlark-sqlite-client/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-openlark-sqlite-client/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-10T14:42:29.022Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-openlark-sqlite-client/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-openlark-sqlite-client/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-openlark-sqlite-client/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-openlark-sqlite-client/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"high","updatedAt":"2026-10-10T12:04:23.519Z","emptyReason":null},"readme":"Skill: Sqlite Client\n\nOwner: openlark\n\nSummary: SQLite database operations. Use this skill when users need to create, read, query, or modify SQLite databases (.db files).\n\nTags: latest:1.0.0\n\nVersion history:\n\nv1.0.0 | 2026-04-21T01:28:33.191Z | user\n\nInitial release of sqlite-client\n\n- Provides async/await APIs to create, read, query, and modify SQLite (.db) databases using `sqlite` and `sqlite3`.\n- Supports core operations: creating tables, executing SQL queries, inserting/updating/deleting rows, prepared statements, and named parameters.\n- Includes migration support and utility patterns for schema inspection and row counting.\n- Offers example code for caching, in-memory databases, and debugging.\n- All methods return Promises and support modern ES6+ JavaScript.\n\nArchive index:\n\nArchive v1.0.0: 6 files, 8554 bytes\n\nFiles: references/api.md (5369b), scripts/inspect.js (3745b), scripts/query.js (2848b), skill-card.md (2062b), SKILL.md (4699b), _meta.json (132b)\n\nFile v1.0.0:SKILL.md\n\n---\nname: sqlite-client\ndescription: SQLite database operations. Use this skill when users need to create, read, query, or modify SQLite databases (.db files).\n---\n\n# SQLite Client\n\nUse the `sqlite` (v5+) + `sqlite3` libraries to operate SQLite databases. All APIs return ES6 Promises and support async/await.\n\n## Use Cases\n\n- Creating SQLite databases and tables\n- Executing SQL queries (SELECT/INSERT/UPDATE/DELETE)\n- Database migrations\n- Reading or analyzing the contents of .db files\n- Importing/exporting data to/from SQLite\n- Using in-memory databases for rapid prototyping\n\n## Prerequisites\n\nBefore performing any database operations, ensure dependencies are installed in the project:\n\n```bash\nnpm install sqlite3 sqlite\n```\n\n## Quick Start\n\n### Opening a Database\n\n```js\nconst sqlite3 = require('sqlite3')\nconst { open } = require('sqlite')\n\nasync function getDb() {\n  return open({\n    filename: './data.db',       // File path, or ':memory:' for in-memory database\n    driver: sqlite3.Database\n  })\n}\n```\n\n### Using Cached Instances\n\n```js\ndriver: sqlite3.cached.Database  // Reuse connections for the same file\n```\n\n### Closing the Database\n\n```js\nawait db.close()\n```\n\n## Core Operations\n\n### Creating Tables & Inserting Data\n\n```js\nawait db.exec('CREATE TABLE IF NOT EXISTS users (id INTEGER PRIMARY KEY, name TEXT, email TEXT)')\nawait db.exec(`INSERT INTO users (name, email) VALUES ('Alice', 'alice@example.com')`)\n```\n\n### Querying a Single Row\n\n```js\nconst row = await db.get('SELECT * FROM users WHERE id = ?', [1])\n// row = { id: 1, name: 'Alice', email: 'alice@example.com' } or undefined\n```\n\n### Querying Multiple Rows\n\n```js\nconst rows = await db.all('SELECT * FROM users WHERE name LIKE ?', ['%li%'])\n// rows = [{ id: 1, name: 'Alice', ... }]\n```\n\n### Inserting a Row\n\n```js\nconst result = await db.run('INSERT INTO users (name, email) VALUES (?, ?)', ['Bob', 'bob@example.com'])\n// result.lastID → New row ID\n// result.changes → Number of rows affected\n```\n\n### Updating / Deleting Rows\n\n```js\nconst result = await db.run('UPDATE users SET name = ? WHERE id = ?', ['Bob Updated', 2])\n// result.changes → Number of rows affected\n\nawait db.run('DELETE FROM users WHERE id = ?', [2])\n```\n\n### Named Parameters\n\n```js\nawait db.get('SELECT * FROM users WHERE name = :name', { ':name': 'Alice' })\nawait db.run('INSERT INTO users (name, email) VALUES (:name, :email)', { ':name': 'Carol', ':email': 'carol@example.com' })\n```\n\n### Prepared Statements\n\n```js\nconst stmt = await db.prepare('INSERT INTO users (name, email) VALUES (?, ?)')\nawait stmt.run('Dave', 'dave@example.com')\nawait stmt.run('Eve', 'eve@example.com')\nawait stmt.finalize()  // Must finalize after use\n```\n\n### Iterating Row by Row (each)\n\n```js\nconst rowCount = await db.each(\n  'SELECT * FROM users',\n  [],\n  (err, row) => {\n    if (err) throw err\n    console.log(row.name)\n  }\n)\n// rowCount → Total number of rows processed\n```\n\n## Migrations\n\nCreate a `migrations/` folder in the project directory, name SQL files sequentially (e.g., `001-init.sql`), and then execute:\n\n```js\nawait db.migrate({\n  force: false,                    // true to rollback and reapply the latest migration\n  table: 'migrations',             // Name of the migration record table\n  migrationsPath: './migrations'   // Path to migration files\n})\n```\n\nExample migration file `migrations/001-init.sql`:\n\n```sql\nCREATE TABLE users (\n  id INTEGER PRIMARY KEY AUTOINCREMENT,\n  name TEXT NOT NULL,\n  email TEXT UNIQUE NOT NULL,\n  created_at DATETIME DEFAULT CURRENT_TIMESTAMP\n);\n```\n\n## Utility Functions\n\nCommon patterns for reading the contents of a `.db` file:\n\n```js\n// List all tables\nconst tables = await db.all(\"SELECT name FROM sqlite_master WHERE type='table'\")\n\n// Get table schema\nconst info = await db.all(`PRAGMA table_info(${tableName})`)\n\n// Get row count\nconst { count } = await db.get(`SELECT COUNT(*) as count FROM ${tableName}`)\n```\n\n## Debugging\n\n```js\nconst sqlite3 = require('sqlite3')\nsqlite3.verbose()  // Enable verbose logging\n\ndb.on('trace', (sql) => {\n  console.log('SQL:', sql)\n})\n```\n\n## Notes\n\n- The `db` object returned by `open()` wraps `sqlite3.Database`; all methods return Promises.\n- `db.exec()` is used for executing multiple SQL statements (no return value); `db.run()` is for single write operations.\n- Prepared statements must be `finalize()`d after use to prevent memory leaks.\n- SQLite supports a maximum database file size of 281 TB, with a maximum row size of approximately 1 GB.\n- For concurrent writes, use WAL mode: `await db.exec('PRAGMA journal_mode=WAL')`\n\n## Advanced Reference\n\nFor detailed API documentation and more usage patterns, see [references/api.md](references/api.md).\n\nFile v1.0.0:_meta.json\n\n{\n  \"ownerId\": \"kn75qrtb885pznwsjwsh18dvf1813bv0\",\n  \"slug\": \"sqlite-client\",\n  \"version\": \"1.0.0\",\n  \"publishedAt\": 1776734913191\n}\n\nFile v1.0.0:references/api.md\n\n# SQLite Client API Reference\n\n## open() Configuration Parameters\n\n```typescript\nconst db = await open({\n  filename: string,   // File path, ':memory:' for anonymous in-memory database, '' for anonymous disk database\n  mode?: number,      // sqlite3.OPEN_READONLY | OPEN_READWRITE | OPEN_CREATE, default READWRITE | CREATE\n  driver: any         // sqlite3.Database or compatible driver\n})\n```\n\n### Custom Driver\n\nAny library conforming to the sqlite3 API can be used as a driver:\n\n```js\nconst sqlite3Offline = require('sqlite3-offline-next')\nconst db = await open({\n  filename: './data.db',\n  driver: sqlite3Offline.Database\n})\n```\n\n### Opening Multiple Databases\n\n```js\nconst [db1, db2] = await Promise.all([\n  open({ filename: './db1.db', driver: sqlite3.Database }),\n  open({ filename: './db2.db', driver: sqlite3.Database })\n])\n```\n\n## Database Methods\n\n### db.get(sql, [...params])\n\nReturns the first matching row, or `undefined` if no match.\n\n```js\nconst row = await db.get('SELECT * FROM users WHERE id = ?', 1)\nconst row2 = await db.get('SELECT * FROM users WHERE id = ?', [1])\nconst row3 = await db.get('SELECT * FROM users WHERE id = :id', { ':id': 1 })\n```\n\n### db.all(sql, [...params])\n\nReturns an array of all matching rows.\n\n```js\nconst rows = await db.all('SELECT * FROM users LIMIT ?', [100])\n```\n\n### db.run(sql, [...params])\n\nExecutes a write operation, returning `{ lastID, changes, stmt }`.\n\n```js\nconst { lastID, changes } = await db.run('INSERT INTO users (name) VALUES (?)', 'Alice')\nconst { changes: updated } = await db.run('UPDATE users SET name = ? WHERE id = ?', 'Bob', 1)\n```\n\n### db.exec(sql)\n\nExecutes multiple SQL statements (no return value). Suitable for creating tables, batch inserts, etc.\n\n```js\nawait db.exec(`\n  CREATE TABLE IF NOT EXISTS users (id INTEGER PRIMARY KEY, name TEXT);\n  INSERT INTO users (name) VALUES ('Alice');\n  INSERT INTO users (name) VALUES ('Bob');\n`)\n```\n\n### db.each(sql, [...params], callback)\n\nProcesses rows one by one with a callback. `callback(err, row)` is triggered once per row; the Promise resolves to the total row count.\n\n```js\nconst count = await db.each('SELECT * FROM users', [], (err, row) => {\n  if (err) throw err\n  console.log(row)\n})\nconsole.log(`Processed ${count} rows`)\n```\n\n### db.prepare(sql, [...params])\n\nCreates a prepared statement, returning a Statement object.\n\n```js\nconst stmt = await db.prepare('INSERT INTO users (name) VALUES (?)')\nawait stmt.run('Alice')\nawait stmt.run('Bob')\nawait stmt.finalize()\n```\n\n### db.migrate(config)\n\nRuns SQL migration files.\n\n```js\nawait db.migrate({\n  force?: boolean,            // Force rollback and re-run latest migration\n  table?: string,             // Migration record table name, default 'migrations'\n  migrationsPath?: string     // Migration directory, default cwd + '/migrations'\n})\n```\n\n### db.close()\n\nCloses the database connection.\n\n```js\nawait db.close()\n```\n\n### db.getDatabaseInstance()\n\nGets the underlying sqlite3 driver instance for calling unwrapped methods.\n\n```js\nconst rawDb = db.getDatabaseInstance()\n```\n\n## Statement Methods\n\n### stmt.run([...params])\n\nExecutes the prepared statement, returning the same structure as `db.run()`.\n\n### stmt.get([...params])\n\nReturns the first matching row.\n\n### stmt.all([...params])\n\nReturns all matching rows.\n\n### stmt.bind([...params])\n\nBinds parameters to an already prepared statement.\n\n```js\nconst stmt = await db.prepare('SELECT * FROM users WHERE id = ? AND name = ?')\nawait stmt.bind([1, 'Alice'])\nconst row = await stmt.get()\n```\n\n### stmt.finalize()\n\nReleases prepared statement resources. **Must be called** to prevent memory leaks.\n\n### stmt.getStatementInstance()\n\nGets the underlying sqlite3 Statement instance.\n\n## Compatibility with sql-template-strings\n\n```js\nconst SQL = require('sql-template-strings')\n\nconst book = 'harry potter'\nconst data = await db.all(SQL`SELECT * FROM books WHERE name = ${book}`)\n```\n\n## TypeScript Generics\n\n```typescript\ninterface User { id: number; name: string; email: string }\n\nconst row = await db.get<User>('SELECT * FROM users WHERE id = ?', 1)\n// row: User | undefined\n\nconst rows = await db.all<User[]>('SELECT * FROM users')\n// rows: User[]\n```\n\n## Common PRAGMAs\n\n```js\nawait db.exec('PRAGMA journal_mode=WAL')      // Optimize for concurrent writes\nawait db.exec('PRAGMA foreign_keys=ON')       // Enable foreign key constraints\nawait db.exec('PRAGMA busy_timeout=5000')     // Lock wait timeout in ms\nconst info = await db.all('PRAGMA table_info(users)')  // Table schema\nconst indexList = await db.all('PRAGMA index_list(users)')  // Index list\n```\n\n## FAQ\n\n### SQLITE_BUSY Error\n\nMultiple writers conflicting. Solutions:\n1. Set `PRAGMA busy_timeout=5000`\n2. Use WAL mode `PRAGMA journal_mode=WAL`\n3. Serialize write operations\n\n### Database File Locked\n\nEnsure all `db` connections are closed after use with `await db.close()`. For long-running processes, consider using a connection pool pattern.\n\n### Performance Optimization\n\n- Wrap batch inserts in a transaction using `db.exec()`:\n  ```js\n  await db.exec('BEGIN')\n  for (const item of items) {\n    await db.run('INSERT INTO tbl VALUES (?, ?)', item.a, item.b)\n  }\n  await db.exec('COMMIT')\n  ```\n- Use `db.each()` to process large datasets row by row, avoiding loading everything into memory\n- Use prepared statements `db.prepare()` for frequently executed queries\n\nFile v1.0.0:skill-card.md\n\n## Description:\n\nSQLite database operations. Use this skill when users need to create, read, query, or modify SQLite databases (.db files).\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[openlark](https://clawhub.ai/user/openlark)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nDevelopers and engineers use this skill to inspect, query, create, and modify SQLite database files from agent workflows. It supports common sqlite/sqlite3 patterns including table creation, reads, writes, prepared statements, migrations, and database inspection.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Write-capable SQLite operations can alter or delete records, especially during migrations or UPDATE/DELETE queries.\n\nMitigation: Use read-only copies for inspection, review write and migration SQL before execution, and back up databases before allowing write-capable operations.\n\nRisk: Database inspection can expose sample rows from production or sensitive databases in agent output or logs.\n\nMitigation: Avoid running row-preview inspection on sensitive databases unless those records are acceptable to disclose; use sanitized copies when possible.\n\n## Reference(s):\n\n- [SQLite Client API Reference](references/api.md)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, code, shell commands, configuration, guidance]\n\n**Output Format:** [Markdown guidance with JavaScript and shell command examples; helper scripts can emit plain text tables or JSON.]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Outputs may include SQLite query results, schema summaries, row counts, sample rows, migration patterns, and sqlite/sqlite3 configuration guidance.]\n\n## Skill Version(s):\n\n1.0.0 (source: server release evidence)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.","readmeExcerpt":"Skill: Sqlite Client Owner: openlark Summary: SQLite database operations. Use this skill when users need to create, read, query, or modify SQLite databases (.db files). Tags: latest:1.0.0 Version history: v1.0.0 | 2026-04-21T01:28:33.191Z | user Initial release of sqlite-client - Provides async/await APIs to create, read, query, and modify SQLite (.db) databases using sqlite and sqlite3. - Supports core operations: c","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"npm install sqlite3 sqlite"},{"language":"js","snippet":"const sqlite3 = require('sqlite3')\nconst { open } = require('sqlite')\n\nasync function getDb() {\n  return open({\n    filename: './data.db',       // File path, or ':memory:' for in-memory database\n    driver: sqlite3.Database\n  })\n}"},{"language":"js","snippet":"driver: sqlite3.cached.Database  // Reuse connections for the same file"},{"language":"js","snippet":"await db.close()"},{"language":"js","snippet":"await db.exec('CREATE TABLE IF NOT EXISTS users (id INTEGER PRIMARY KEY, name TEXT, email TEXT)')\nawait db.exec(`INSERT INTO users (name, email) VALUES ('Alice', 'alice@example.com')`)"},{"language":"js","snippet":"const row = await db.get('SELECT * FROM users WHERE id = ?', [1])\n// row = { id: 1, name: 'Alice', email: 'alice@example.com' } or undefined"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: sqlite-client\ndescription: SQLite database operations. Use this skill when users need to create, read, query, or modify SQLite databases (.db files).\n---\n\n# SQLite Client\n\nUse the `sqlite` (v5+) + `sqlite3` libraries to operate SQLite databases. All APIs return ES6 Promises and support async/await.\n\n## Use Cases\n\n- Creating SQLite databases and tables\n- Executing SQL queries (SELECT/INSERT/UPDATE/DELETE)\n- Database migrations\n- Reading or analyzing the contents of .db files\n- Importing/exporting data to/from SQLite\n- Using in-memory databases for rapid prototyping\n\n## Prerequisites\n\nBefore performing any database operations, ensure dependencies are installed in the project:\n\n```bash\nnpm install sqlite3 sqlite\n```\n\n## Quick Start\n\n### Opening a Database\n\n```js\nconst sqlite3 = require('sqlite3')\nconst { open } = require('sqlite')\n\nasync function getDb() {\n  return open({\n    filename: './data.db',       // File path, or ':memory:' for in-memory database\n    driver: sqlite3.Database\n  })\n}\n```\n\n### Using Cached Instances\n\n```js\ndriver: sqlite3.cached.Database  // Reuse connections for the same file\n```\n\n### Closing the Database\n\n```js\nawait db.close()\n```\n\n## Core Operations\n\n### Creating Tables & Inserting Data\n\n```js\nawait db.exec('CREATE TABLE IF NOT EXISTS users (id INTEGER PRIMARY KEY, name TEXT, email TEXT)')\nawait db.exec(`INSERT INTO users (name, email) VALUES ('Alice', 'alice@example.com')`)\n```\n\n### Querying a Single Row\n\n```js\nconst row = await db.get('SELECT * FROM users WHERE id = ?', [1])\n// row = { id: 1, name: 'Alice', email: 'alice@example.com' } or undefined\n```\n\n### Querying Multiple Rows\n\n```js\nconst rows = await db.all('SELECT * FROM users WHERE name LIKE ?', ['%li%'])\n// rows = [{ id: 1, name: 'Alice', ... }]\n```\n\n### Inserting a Row\n\n```js\nconst result = await db.run('INSERT INTO users (name, email) VALUES (?, ?)', ['Bob', 'bob@example.com'])\n// result.lastID → New row ID\n// result.changes → Number of rows affected\n```\n\n### Updating / Deleting Rows\n\n```js\nconst result = await db.run('UPDATE users SET name = ? WHERE id = ?', ['Bob Updated', 2])\n// result.changes → Number of rows affected\n\nawait db.run('DELETE FROM users WHERE id = ?', [2])\n```\n\n### Named Parameters\n\n```js\nawait db.get('SELECT * FROM users WHERE name = :name', { ':name': 'Alice' })\nawait db.run('INSERT INTO users (name, email) VALUES (:name, :email)', { ':name': 'Carol', ':email': 'carol@example.com' })\n```\n\n### Prepared Statements\n\n```js\nconst stmt = await db.prepare('INSERT INTO users (name, email) VALUES (?, ?)')\nawait stmt.run('Dave', 'dave@example.com')\nawait stmt.run('Eve', 'eve@example.com')\nawait stmt.finalize()  // Must finalize after use\n```\n\n### Iterating Row by Row (each)\n\n```js\nconst rowCount = await db.each(\n  'SELECT * FROM users',\n  [],\n  (err, row) => {\n    if (err) throw err\n    console.log(row.name)\n  }\n)\n// rowCount → Total number of rows processed\n```\n\n## Migrations\n\nCreate a `migrations/` folder in the project directory, name SQL "},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn75qrtb885pznwsjwsh18dvf1813bv0\",\n  \"slug\": \"sqlite-client\",\n  \"version\": \"1.0.0\",\n  \"publishedAt\": 1776734913191\n}"},{"path":"references/api.md","content":"# SQLite Client API Reference\n\n## open() Configuration Parameters\n\n```typescript\nconst db = await open({\n  filename: string,   // File path, ':memory:' for anonymous in-memory database, '' for anonymous disk database\n  mode?: number,      // sqlite3.OPEN_READONLY | OPEN_READWRITE | OPEN_CREATE, default READWRITE | CREATE\n  driver: any         // sqlite3.Database or compatible driver\n})\n```\n\n### Custom Driver\n\nAny library conforming to the sqlite3 API can be used as a driver:\n\n```js\nconst sqlite3Offline = require('sqlite3-offline-next')\nconst db = await open({\n  filename: './data.db',\n  driver: sqlite3Offline.Database\n})\n```\n\n### Opening Multiple Databases\n\n```js\nconst [db1, db2] = await Promise.all([\n  open({ filename: './db1.db', driver: sqlite3.Database }),\n  open({ filename: './db2.db', driver: sqlite3.Database })\n])\n```\n\n## Database Methods\n\n### db.get(sql, [...params])\n\nReturns the first matching row, or `undefined` if no match.\n\n```js\nconst row = await db.get('SELECT * FROM users WHERE id = ?', 1)\nconst row2 = await db.get('SELECT * FROM users WHERE id = ?', [1])\nconst row3 = await db.get('SELECT * FROM users WHERE id = :id', { ':id': 1 })\n```\n\n### db.all(sql, [...params])\n\nReturns an array of all matching rows.\n\n```js\nconst rows = await db.all('SELECT * FROM users LIMIT ?', [100])\n```\n\n### db.run(sql, [...params])\n\nExecutes a write operation, returning `{ lastID, changes, stmt }`.\n\n```js\nconst { lastID, changes } = await db.run('INSERT INTO users (name) VALUES (?)', 'Alice')\nconst { changes: updated } = await db.run('UPDATE users SET name = ? WHERE id = ?', 'Bob', 1)\n```\n\n### db.exec(sql)\n\nExecutes multiple SQL statements (no return value). Suitable for creating tables, batch inserts, etc.\n\n```js\nawait db.exec(`\n  CREATE TABLE IF NOT EXISTS users (id INTEGER PRIMARY KEY, name TEXT);\n  INSERT INTO users (name) VALUES ('Alice');\n  INSERT INTO users (name) VALUES ('Bob');\n`)\n```\n\n### db.each(sql, [...params], callback)\n\nProcesses rows one by one with a callback. `callback(err, row)` is triggered once per row; the Promise resolves to the total row count.\n\n```js\nconst count = await db.each('SELECT * FROM users', [], (err, row) => {\n  if (err) throw err\n  console.log(row)\n})\nconsole.log(`Processed ${count} rows`)\n```\n\n### db.prepare(sql, [...params])\n\nCreates a prepared statement, returning a Statement object.\n\n```js\nconst stmt = await db.prepare('INSERT INTO users (name) VALUES (?)')\nawait stmt.run('Alice')\nawait stmt.run('Bob')\nawait stmt.finalize()\n```\n\n### db.migrate(config)\n\nRuns SQL migration files.\n\n```js\nawait db.migrate({\n  force?: boolean,            // Force rollback and re-run latest migration\n  table?: string,             // Migration record table name, default 'migrations'\n  migrationsPath?: string     // Migration directory, default cwd + '/migrations'\n})\n```\n\n### db.close()\n\nCloses the database connection.\n\n```js\nawait db.close()\n```\n\n### db.getDatabaseInstance()\n\nGets the underlying sqlite3 driver instance for calling unwrapped "},{"path":"skill-card.md","content":"## Description:\n\nSQLite database operations. Use this skill when users need to create, read, query, or modify SQLite databases (.db files).\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[openlark](https://clawhub.ai/user/openlark)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nDevelopers and engineers use this skill to inspect, query, create, and modify SQLite database files from agent workflows. It supports common sqlite/sqlite3 patterns including table creation, reads, writes, prepared statements, migrations, and database inspection.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Write-capable SQLite operations can alter or delete records, especially during migrations or UPDATE/DELETE queries.\n\nMitigation: Use read-only copies for inspection, review write and migration SQL before execution, and back up databases before allowing write-capable operations.\n\nRisk: Database inspection can expose sample rows from production or sensitive databases in agent output or logs.\n\nMitigation: Avoid running row-preview inspection on sensitive databases unless those records are acceptable to disclose; use sanitized copies when possible.\n\n## Reference(s):\n\n- [SQLite Client API Reference](references/api.md)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, code, shell commands, configuration, guidance]\n\n**Output Format:** [Markdown guidance with JavaScript and shell command examples; helper scripts can emit plain text tables or JSON.]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Outputs may include SQLite query results, schema summaries, row counts, sample rows, migration patterns, and sqlite/sqlite3 configuration guidance.]\n\n## Skill Version(s):\n\n1.0.0 (source: server release evidence)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment."}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":"SQLite database operations. Use this skill when users need to create, read, query, or modify SQLite databases (.db files). Skill: Sqlite Client Owner: openlark Summary: SQLite database operations. Use this skill when users need to create, read, query, or modify SQLite databases (.db files). Tags: latest:1.0.0 Version history: v1.0.0 | 2026-04-21T01:28:33.191Z | user Initial release of sqlite-client - Provides async/await APIs to create, read, query, and modify SQLite (.db) databases using sqlite and sqlite3. - Supports core operations: c","editorialQuality":{"score":100,"threshold":65,"status":"ready","wordCount":1006,"uniquenessScore":52,"reasons":[]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-10T12:04:23.519Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-10T12:04:23.519Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-10T14:42:29.022Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}