db-accessor
Skill0 starsChanged 2 months agoMITView on GitHub
This skill enables the LLM to execute SQL queries against a SAP HANA database by understanding the user's intent and producing a strictly-formatted JSON output that describes the query to run. The JSON output is then parsed by the db_accessor skill to connect to the database and return the result set. Invoke this skill whenever the user's request implies querying a database, running SQL, fetching data, or executing a stored procedure. Look for phrases such as: Do NOT use this…
In this repository14 other files it gives its agents.
- cmd-runnerSkill
- code-runnerSkill
- curlSkill
- file-changerSkill
- file-creatorSkill
- file-finderSkill
- file-grepSkill
- file-listSkill
- file-readerSkill
- folder-creatorSkill
- folder-finderSkill
- folder-listSkill
- scpSkill
- sshSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 4 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
Do NOT use this skill when the user wants to:
- Very specific: line 23
Read a file → use file-reader.
- Very specific: line 24
Create a file → use file-creator.
- Distinctive: line 29
When the skill is triggered, the LLM must:
- Very specific: line 81
All string values must properly escape special characters (", \, newline as \n, tab as \t).
- Very specific: line 82
Do NOT emit multiple access_db payloads in a single response.
- Very specific: line 196
Never allow destructive SQL statements (DROP, TRUNCATE, DELETE, ALTER, UPDATE, INSERT) by default unless allowModification is explicitly …
- Distinctive: line 200
Always echo the JSON payload so the user can review before execution.
- Distinctive: line 202
Do not expose the password in logs or error messages.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
🗄️ Database Query Skill (db_accessor)
Overview
This skill enables the LLM to execute SQL queries against a SAP HANA database by understanding the user's intent and producing a strictly-formatted JSON output that describes the query to run. The JSON output is then parsed by the db_accessor skill to connect to the database and return the result set.
Skill Name
db_accessor
When to Use This Skill
Invoke this skill whenever the user's request implies querying a database, running SQL, fetching data, or executing a stored procedure. Look for phrases such as:
- "run a query ..."
- "execute SQL ..."
- "select from ..."
- "fetch data from database ..."
- "get records ..."
- "query the database ..."
Do NOT use this skill when the user wants to:
- Read a file → use
file-reader. - Create a file → use
file-creator. - Make HTTP requests → use
curl.
What the LLM Must Do
When the skill is triggered, the LLM must:
- Extract the following from the user's request (asking clarifying questions only if truly ambiguous):
- sql (required): The SQL statement to execute.
- timeout (optional): Maximum execution time in seconds. Defaults to
30. - allowModification (optional): Whether to allow INSERT/UPDATE/DELETE/ALTER/DROP/TRUNCATE. Defaults to
false. - max_rows (optional): Maximun rows shown to user. Defaults to
100. - description (optional): One-line summary of the query.
- database (required): Database name described in the local configuration.
- sequential (optional): If the result set is needed as input for a follow-up AI task.
- prompt (optional): Follow-up prompt for all following tasks when
sequentialis set.
- Produce a response containing a single pure JSON object that STRICTLY follows the schema below. No code fences, no extra prose.
Required JSON Output Schema
The LLM's response MUST be a pure JSON string with no code blocks.
{
"action": "access_db",
"thinking": "<ai-thinking-trace>",
"sequential": {
"prompt": ""
},
"properties": [
{"name": "database", "value": "mysqllocall"},
{ "name": "sql", "value": "SELECT * FROM TABLE" },
{ "name": "timeout", "value": "30" },
{ "name": "allowModification", "value": "false" }
]
}Field Rules
| Field | Type | Required | Notes |
action | string | Yes | Must be exactly "access_db". |
sql | string | Yes | The SQL statement to execute. Must be non-empty. |
timeout | string | No | Timeout in seconds as string. Default "30". |
driver | string | Yes | Database driver identifier (e.g., hdbcli). |
allowModification | string | No | "true" or "false". Default "false". |
max_rows | string | No | default to 100 |
description | string | No | Human-readable purpose of the query. |
database | string | Yes | Database name in the local configuration. |
sequential | object | No | If the result should feed a follow-up AI task. |
prompt | string | No | Follow-up prompt when sequential is present. |
Formatting Requirements
- The JSON output must be valid JSON (parseable by
json.loads). - All string values must properly escape special characters (
",\, newline as\n, tab as\t). - Do NOT emit multiple
access_dbpayloads in a single response.
Database Connection Configuration
The database configuration should always be in .axle in the working directory Sample configuration:
{
{
"skill_configs": [
{
"skill": "access_db",
"config_items": [
{
"name": "database name",
"value": {
"db_name": "database name",
"port": "50000",
"host": "db address",
"user_name": "user",
"pass": "password",
"type": "mysql",
"driver": "db_driver"
}
},
{
"name": "database name2",
"value": {
"port": "40000",
"address": "db address",
"user_name": "user",
"pass": "password",
"type": "mysql",
"driver": "db_driver"
}
}
]
}
]
}
}Response Pattern for the LLM
A typical assistant reply should look like the following. No other output is needed. Output must be in pure JSON format.
{ "action": "access_db", "thinking": "User wants to fetch all customers.", "properties": [ { "name": "sql", "value": "SELECT * FROM CUSTOMERS" }, { "name": "timeout", "value": "30" }, { "name": "database", "value": "mysqllocal" }, { "name": "driver", "value": "hdbcli" }, { "name": "allowModification", "value": "false" }, { "name": "max_rows", "value": "100" }, { "name": "description", "value": "Fetch all customers" } ] }
Decision Logic
User Prompt
|
+-- Does the request imply executing a database query?
| |
| +-- YES --> Extract sql/params/flags --> Emit ONE `access_db` JSON payload
| |
| +-- NO --> Do not use this skillExamples
Example 1: Simple SELECT query
User: "Run SELECT * FROM USERS on the HANA database."
LLM emits:
{
"action": "access_db",
"thinking": "User wants to select all users from the database.",
"properties": [
{ "name": "database", "value": "mysql.local" },
{ "name": "driver", "value": "mysql.driver" },
{ "name": "sql", "value": "SELECT * FROM USERS" },
{ "name": "timeout", "value": "30" },
{ "name": "allowModification", "value": "false" }
{ "name": "max_rows", "value": "100" }
]
}Example 2: Query with explicit allowModification
User: "Insert a record into the LOG table. It's safe to modify."
LLM emits:
{
"action": "access_db",
"thinking": "User explicitly allows modification, so allowModification is true.",
"properties": [
{ "name": "database", "value": "mysql.local" },
{ "name": "driver", "value": "mysql.driver" },
{ "name": "sql", "value": "INSERT INTO LOG VALUES ('test')" },
{ "name": "timeout", "value": "30" },
{ "name": "allowModification", "value": "true" }
]
}Safety Guidelines
- Never allow destructive SQL statements (DROP, TRUNCATE, DELETE, ALTER, UPDATE, INSERT) by default unless
allowModificationis explicitly set totrue. - Refuse SQL that attempts to access system tables (e.g.,
SYS.*,_SYS_*) or sensitive data. - Enforce a reasonable timeout (default 30s, max 120s).
- Limit the result set size to prevent excessive output (e.g., 10,000 rows max).
- Always echo the JSON payload so the user can review before execution.
- The connection details (host, port, user, password, database) must be provided in the properties; do not read them from external files without explicit user consent.
- Do not expose the password in logs or error messages; mask it if shown.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

