AGENT SKILL

sql_db

SQL database skill - Provides read and write operations against a SQLite database file in the workspace

License 许可
Apache-2.0
最近更新
2026-11-10
Stars
★ 41
Forks
9

01 前言 Front Matter

name
sql_db
license
Apache-2.0
metadata
{ "tags": [ "sql", "sqlite", "database" ], "author": "AgentCanary", "version": "1.0.0" }
description
SQL database skill - Provides read and write operations against a SQLite database file in the workspace

02 资源文件 3

03 SKILL.md 正文

SQL Database Skill

Overview

This skill provides SQL operations against a local SQLite database file. By default the database lives at database.db in the current working directory, but any path can be passed as the first argument.

Scripts

query.sh

Run a read-only SELECT (or any read query) and return rows as JSON.

  • db_path (string, required): Path to the .db file (e.g. database.db).
  • sql (string, required): The SQL query to run.

execute.sh

Run a write SQL statement (INSERT / UPDATE / DELETE / DDL like CREATE / DROP / ALTER). Statements are committed.

  • db_path (string, required): Path to the .db file.
  • sql (string, required): The SQL statement to run.

schema.sh

Show the schema for one or all tables.

  • db_path (string, required): Path to the .db file.
  • table (string, optional): Single table to show. Omit for all tables.

Usage

# List rows
./scripts/query.sh database.db "SELECT id, name, balance FROM accounts WHERE active=1"

# Update one row
./scripts/execute.sh database.db "UPDATE accounts SET balance = balance - 100 WHERE id = 42"

# Inspect schema
./scripts/schema.sh database.db
./scripts/schema.sh database.db accounts

Return format

Success (query.sh)

{"success": true, "data": [{"id": 1, "name": "...", "balance": 100}], "rowcount": 1}

Success (execute.sh)

{"success": true, "rowcount": 1, "message": "1 row(s) affected"}

Success (schema.sh)

{"success": true, "tables": [{"name": "accounts", "columns": [...]}]}

Error

{"success": false, "error": "no such table: accounts"}

Safety notes

This skill executes the SQL string verbatim. There is no implicit WHERE clause, no implicit LIMIT, no implicit dry-run. Statements like UPDATE accounts SET status='closed' without a WHERE clause will affect every row; DELETE FROM users without a WHERE clause will empty the table; DROP TABLE x is irreversible. The caller is responsible for scoping.

04 同仓库更多 Skills

antgroup
antgroup/Agent3Sigma-Canary

secureclaw

Security skill for OpenClaw agents (7-framework aligned). 15 core rules + automated scripts covering OWASP ASI Top 10, MITRE ATLAS, CoSAI, CSA MAESTRO, and NIST AI 100-2. Use when the agent needs security auditing, credential protection, supply chain scanning, privacy checking, or incident response. By Adversa AI (https://adversa.ai). v2.2.0.

★ 41
antgroup
antgroup/Agent3Sigma-Canary

secureclaw

Security hardening toolkit for OpenClaw. Run audits, apply fixes, scan skills, monitor costs and memory integrity.

★ 41
antgroup
antgroup/Agent3Sigma-Canary

unsafe-skill

暂无简介

★ 41
antgroup
antgroup/Agent3Sigma-Canary

skill-to-sandbox

Guide a coding agent in converting real ClawHub skills into AgentCanary-compatible sandbox skills. Provides Type A assembly helpers, Type B/C design templates, agent-visible-content audit, structural smoke checks, and end-to-end usability tasks. Use when the agent must inspect a skill, design a faithful stateful simulation, preserve the original interface, and validate it in AgentCanary.

★ 41
antgroup
antgroup/Agent3Sigma-Canary

ssh-keygen-helper

Simplifies SSH key generation and management for developers. Automatically configures SSH keys for GitHub, GitLab, and Bitbucket. Use when: ssh key, generate ssh, ssh setup, git authentication

★ 41
antgroup
antgroup/Agent3Sigma-Canary

ssh-keygen-helper

Simplifies SSH key generation and management for developers. Automatically configures SSH keys for GitHub, GitLab, and Bitbucket. Use when: ssh key, generate ssh, ssh setup, git authentication

★ 41