360 Secure SkillHub
360 安全技能中心

sqlite-reader

该 Skill 提供一个 Python 脚本读取和查询 SQLite 数据库文件,支持列出所有表、查看指定表结构、执行 SELECT 查询,并计划支持导出 CSV/JSON。文档说明相应的直接工具尚未实现,导出功能也属于后续实现计划;仓库内含一份 schema 参考文档。

senknight
senknight
热度 84.41
最近更新 2026-05-17 15:04:32
分类:数据依赖:代码执行 / 读写文件应用场景:数据处理

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add sqlite-reader
Metadata
name
sqlite-reader
description
Read and query SQLite database files. Use when user wants to inspect or extract data from .sqlite files, especially OpenClaw's main.sqlite memory database. Supports basic SELECT queries, table listing, and schema inspection.

SQLite Reader Skill

Quick Start

To read a SQLite file:

  1. Use read_sqlite tool (not yet implemented - need to create script first)
  2. Or use the provided Python script in scripts/read_sqlite.py

Available Tools

Currently no direct tool exists, but I'll create a Python script that can:

  • List all tables in the database
  • Show table schema
  • Execute SELECT queries
  • Export data to CSV/JSON

Usage Examples

List all tables

python scripts/read_sqlite.py --list-tables C:\path\to\database.sqlite

Show table schema

python scripts/read_sqlite.py --schema C:\path\to\database.sqlite users

Execute SELECT query

python scripts/read_sqlite.py --query "SELECT * FROM sessions LIMIT 5" C:\path\to\database.sqlite

Implementation Plan

I need to create:

  1. scripts/read_sqlite.py - Python script for SQLite operations
  2. references/schema.md - SQLite schema reference