Sqlite Client
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
Rank
62
Safety
84
Downloads
1.4k
Updated
Oct 10, 2026
Version
1.0.0
Source
CLAWHUB
About
What it does, and when to use it.
Capability contract not published. No trust telemetry is available yet. 1.4K downloads reported by the source. Last updated 10/10/2026.
Avoid when
- Contract metadata is missing or unavailable for deterministic execution.
Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing
Public facts
Every fact links back to the source it came from.
- Vendor
- Clawhubvendor · observed Oct 10, 2026
- Protocol compatibility
- OpenClawcompatibility · observed Oct 10, 2026
- Adoption signal
- 1.4K downloadsadoption · observed Oct 10, 2026
- Latest release
- 1.0.0release · observed Apr 21, 2026
- Handshake status
- UNKNOWNsecurity
Install and run
Setup complexity: low.
clawhub skill install s1727wv2g20pc729snzcm4nf8183hy72:sqlite-client- 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: missing
curl -s "https://www.xpersona.co/api/v1/agents/clawhub-openlark-sqlite-client/snapshot"
Documentation
CLAWHUB
13,339 characters of source documentation, loaded on request.
Extracted files
4 files captured from the source.
SKILL.md
---
name: sqlite-client
description: SQLite database operations. Use this skill when users need to create, read, query, or modify SQLite databases (.db files).
---
# SQLite Client
Use the `sqlite` (v5+) + `sqlite3` libraries to operate SQLite databases. All APIs return ES6 Promises and support async/await.
## Use Cases
- Creating SQLite databases and tables
- Executing SQL queries (SELECT/INSERT/UPDATE/DELETE)
- Database migrations
- Reading or analyzing the contents of .db files
- Importing/exporting data to/from SQLite
- Using in-memory databases for rapid prototyping
## Prerequisites
Before performing any database operations, ensure dependencies are installed in the project:
```bash
npm install sqlite3 sqlite
```
## Quick Start
### Opening a Database
```js
const sqlite3 = require('sqlite3')
const { open } = require('sqlite')
async function getDb() {
return open({
filename: './data.db', // File path, or ':memory:' for in-memory database
driver: sqlite3.Database
})
}
```
### Using Cached Instances
```js
driver: sqlite3.cached.Database // Reuse connections for the same file
```
### Closing the Database
```js
await db.close()
```
## Core Operations
### Creating Tables & Inserting Data
```js
await db.exec('CREATE TABLE IF NOT EXISTS users (id INTEGER PRIMARY KEY, name TEXT, email TEXT)')
await db.exec(`INSERT INTO users (name, email) VALUES ('Alice', '[email protected]')`)
```
### Querying a Single Row
```js
const row = await db.get('SELECT * FROM users WHERE id = ?', [1])
// row = { id: 1, name: 'Alice', email: '[email protected]' } or undefined
```
### Querying Multiple Rows
```js
const rows = await db.all('SELECT * FROM users WHERE name LIKE ?', ['%li%'])
// rows = [{ id: 1, name: 'Alice', ... }]
```
### Inserting a Row
```js
const result = await db.run('INSERT INTO users (name, email) VALUES (?, ?)', ['Bob', '[email protected]'])
// result.lastID → New row ID
// result.changes → Number of rows affected
```
### Updating / Deleting Rows
```js
const result = await db.run('UPDATE users SET name = ? WHERE id = ?', ['Bob Updated', 2])
// result.changes → Number of rows affected
await db.run('DELETE FROM users WHERE id = ?', [2])
```
### Named Parameters
```js
await db.get('SELECT * FROM users WHERE name = :name', { ':name': 'Alice' })
await db.run('INSERT INTO users (name, email) VALUES (:name, :email)', { ':name': 'Carol', ':email': '[email protected]' })
```
### Prepared Statements
```js
const stmt = await db.prepare('INSERT INTO users (name, email) VALUES (?, ?)')
await stmt.run('Dave', '[email protected]')
await stmt.run('Eve', '[email protected]')
await stmt.finalize() // Must finalize after use
```
### Iterating Row by Row (each)
```js
const rowCount = await db.each(
'SELECT * FROM users',
[],
(err, row) => {
if (err) throw err
console.log(row.name)
}
)
// rowCount → Total number of rows processed
```
## Migrations
Create a `migrations/` folder in the project directory, name SQL _meta.json
{
"ownerId": "kn75qrtb885pznwsjwsh18dvf1813bv0",
"slug": "sqlite-client",
"version": "1.0.0",
"publishedAt": 1776734913191
}references/api.md
# SQLite Client API Reference
## open() Configuration Parameters
```typescript
const db = await open({
filename: string, // File path, ':memory:' for anonymous in-memory database, '' for anonymous disk database
mode?: number, // sqlite3.OPEN_READONLY | OPEN_READWRITE | OPEN_CREATE, default READWRITE | CREATE
driver: any // sqlite3.Database or compatible driver
})
```
### Custom Driver
Any library conforming to the sqlite3 API can be used as a driver:
```js
const sqlite3Offline = require('sqlite3-offline-next')
const db = await open({
filename: './data.db',
driver: sqlite3Offline.Database
})
```
### Opening Multiple Databases
```js
const [db1, db2] = await Promise.all([
open({ filename: './db1.db', driver: sqlite3.Database }),
open({ filename: './db2.db', driver: sqlite3.Database })
])
```
## Database Methods
### db.get(sql, [...params])
Returns the first matching row, or `undefined` if no match.
```js
const row = await db.get('SELECT * FROM users WHERE id = ?', 1)
const row2 = await db.get('SELECT * FROM users WHERE id = ?', [1])
const row3 = await db.get('SELECT * FROM users WHERE id = :id', { ':id': 1 })
```
### db.all(sql, [...params])
Returns an array of all matching rows.
```js
const rows = await db.all('SELECT * FROM users LIMIT ?', [100])
```
### db.run(sql, [...params])
Executes a write operation, returning `{ lastID, changes, stmt }`.
```js
const { lastID, changes } = await db.run('INSERT INTO users (name) VALUES (?)', 'Alice')
const { changes: updated } = await db.run('UPDATE users SET name = ? WHERE id = ?', 'Bob', 1)
```
### db.exec(sql)
Executes multiple SQL statements (no return value). Suitable for creating tables, batch inserts, etc.
```js
await db.exec(`
CREATE TABLE IF NOT EXISTS users (id INTEGER PRIMARY KEY, name TEXT);
INSERT INTO users (name) VALUES ('Alice');
INSERT INTO users (name) VALUES ('Bob');
`)
```
### db.each(sql, [...params], callback)
Processes rows one by one with a callback. `callback(err, row)` is triggered once per row; the Promise resolves to the total row count.
```js
const count = await db.each('SELECT * FROM users', [], (err, row) => {
if (err) throw err
console.log(row)
})
console.log(`Processed ${count} rows`)
```
### db.prepare(sql, [...params])
Creates a prepared statement, returning a Statement object.
```js
const stmt = await db.prepare('INSERT INTO users (name) VALUES (?)')
await stmt.run('Alice')
await stmt.run('Bob')
await stmt.finalize()
```
### db.migrate(config)
Runs SQL migration files.
```js
await db.migrate({
force?: boolean, // Force rollback and re-run latest migration
table?: string, // Migration record table name, default 'migrations'
migrationsPath?: string // Migration directory, default cwd + '/migrations'
})
```
### db.close()
Closes the database connection.
```js
await db.close()
```
### db.getDatabaseInstance()
Gets the underlying sqlite3 driver instance for calling unwrapped skill-card.md
## Description: SQLite database operations. Use this skill when users need to create, read, query, or modify SQLite databases (.db files). This skill is ready for commercial/non-commercial use. ## Publisher: [openlark](https://clawhub.ai/user/openlark) ### License/Terms of Use: MIT-0 ## Use Case: Developers 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. ### Deployment Geography for Use: Global ## Known Risks and Mitigations: Risk: Write-capable SQLite operations can alter or delete records, especially during migrations or UPDATE/DELETE queries. Mitigation: Use read-only copies for inspection, review write and migration SQL before execution, and back up databases before allowing write-capable operations. Risk: Database inspection can expose sample rows from production or sensitive databases in agent output or logs. Mitigation: Avoid running row-preview inspection on sensitive databases unless those records are acceptable to disclose; use sanitized copies when possible. ## Reference(s): - [SQLite Client API Reference](references/api.md) ## Skill Output: **Output Type(s):** [text, markdown, code, shell commands, configuration, guidance] **Output Format:** [Markdown guidance with JavaScript and shell command examples; helper scripts can emit plain text tables or JSON.] **Output Parameters:** [1D] **Other Properties Related to Output:** [Outputs may include SQLite query results, schema summaries, row counts, sample rows, migration patterns, and sqlite/sqlite3 configuration guidance.] ## Skill Version(s): 1.0.0 (source: server release evidence) ## Ethical Considerations: Users 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.
AionUi
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!
activepieces
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
cherry-studio
AI productivity studio with smart chat, autonomous agents, and 300+ assistants.
CopilotKit
The Frontend for Agents & Generative UI. React + Angular
Machine-readable data
The same record, as JSON, for agents and crawlers.
{
"facts": [
{
"factKey": "vendor",
"category": "vendor",
"label": "Vendor",
"value": "Clawhub",
"href": "https://clawhub.ai/openlark/skills/sqlite-client",
"sourceUrl": "https://clawhub.ai/openlark/skills/sqlite-client",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-10T12:04:23.519Z",
"isPublic": true
},
{
"factKey": "protocols",
"category": "compatibility",
"label": "Protocol compatibility",
"value": "OpenClaw",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-openlark-sqlite-client/contract",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-openlark-sqlite-client/contract",
"sourceType": "contract",
"confidence": "medium",
"observedAt": "2026-10-10T12:04:23.519Z",
"isPublic": true
},
{
"factKey": "traction",
"category": "adoption",
"label": "Adoption signal",
"value": "1.4K downloads",
"href": "https://clawhub.ai/openlark/sqlite-client",
"sourceUrl": "https://clawhub.ai/openlark/sqlite-client",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-10T12:04:23.519Z",
"isPublic": true
},
{
"factKey": "latest_release",
"category": "release",
"label": "Latest release",
"value": "1.0.0",
"href": "https://clawhub.ai/openlark/sqlite-client",
"sourceUrl": "https://clawhub.ai/openlark/sqlite-client",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-04-21T01:28:33.191Z",
"isPublic": true
},
{
"factKey": "handshake_status",
"category": "security",
"label": "Handshake status",
"value": "UNKNOWN",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-openlark-sqlite-client/trust",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-openlark-sqlite-client/trust",
"sourceType": "trust",
"confidence": "medium",
"observedAt": null,
"isPublic": true
}
],
"events": [
{
"eventType": "release",
"title": "Release 1.0.0",
"description": "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.",
"href": "https://clawhub.ai/openlark/sqlite-client",
"sourceUrl": "https://clawhub.ai/openlark/sqlite-client",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-04-21T01:28:33.191Z",
"isPublic": true
}
]
}Record generated Oct 10, 2026.
