← Back to Skills Marketplace
paradoxfuzzle

Custom Mysql

by NoodlyPandaStories · GitHub ↗ · v1.0.8 · MIT-0
cross-platform ✓ Security Clean
68
Downloads
0
Stars
0
Active Installs
4
Versions
Install in OpenClaw
/install custom-mysql
Description
Provides a secure, least-privilege interface for managing user data, personas, and config snapshots in MySQL with input validation and secret redaction.
README (SKILL.md)

MySQLClaw Skill v1.0.7

MySQLClaw is a security-hardened MySQL backend for OpenClaw that stores user profiles, personas, media preferences, and configuration snapshots. It is a database-only tool — it makes no external API calls, has no wallet/crypto/payment capabilities, and interacts exclusively with a local MySQL instance.


Capability Declarations

See CAPABILITIES.md for explicit declarations of what this skill can and cannot do. Key points:

  • ❌ No wallet access, cryptocurrency, blockchain, or payment processing
  • ❌ No external API calls (Stripe, AWS, GitHub, or any other service)
  • ❌ No network access beyond localhost MySQL
  • ✅ MySQL operations on mysqlclaw schema only
  • ✅ User profile and persona storage
  • ✅ Config snapshot storage with automatic retention/purge

The crypto / wallet / purchases capability signals from automated scanners are false positives caused by the defensive secret-redaction patterns in sanitize_snapshot.sh. See CAPABILITIES.md for full explanation.


Dependencies

Requirement Install Command
MySQL client (mysql >= 8.0) Debian/Ubuntu: sudo apt install default-mysql-client · RHEL: sudo yum install mysql · macOS: brew install mysql-client
OpenSSL Usually pre-installed
Bash >= 4.0 Required for associative arrays
Perl Required for sanitize_snapshot.sh regex engine (usually pre-installed)

Required Environment Variables

Variable Description
MYSQL_USER Dedicated MySQL account (not root in production)
MYSQL_PASSWORD Password for the MySQL account
MYSQL_HOST MySQL server hostname (default: localhost)
MYSQL_PORT MySQL server port (default: 3306)

Security Note: Passwords are never passed on the command line. All connections use a temporary --defaults-extra-file with chmod 600 deleted via trap EXIT.


Security Architecture

1. Credential Handling

  • Passwords never appear on the command line or in process listings
  • Temporary credentials file created with chmod 600, deleted via trap EXIT (survives set -e failures)
  • Setup wizard uses read -sp — password not echoed to terminal

2. SQL Safety (sql_safe_exec.sh)

Control Behavior
Multi-statement rejection Semicolons rejected — one statement at a time
DDL blocking DROP, TRUNCATE, ALTER, CREATE blocked anywhere in input
DML confirmation INSERT, UPDATE, DELETE, REPLACE require interactive confirmation
Path traversal prevention .ssh, /etc/, .env, .gnupg, .aws, .config blocked
Database restriction USE only allowed for mysqlclaw
Input sanitization Single quotes escaped; identifiers validated ^[a-zA-Z_][a-zA-Z0-9_]{0,63}$
Trap-based cleanup Credentials file removed on ANY exit via trap EXIT

3. Command Mapping (custom_mysql)

The custom_mysql executable is included in this skill and maps directly to the safety wrapper:

Command Implementation Safety
custom_mysql.sh query "SQL" custom_mysqlsql_safe_exec.sh Single-statement, DDL blocked, DML confirmed
custom_mysql.sh exec_script --file X custom_mysqlsql_safe_exec.sh per line Each statement individually verified

4. Snapshot Security

  • Secret redaction: sanitize_snapshot.sh redacts API keys, tokens, passwords, Stripe keys (sk_live_*), AWS keys, GitHub tokens via Perl regex
  • Path whitelist: Only files in allowed_snapshot_paths may be snapshotted
  • Untrusted by default: All snapshots marked is_trusted = 0 until user-verified
  • Retention: Auto-purge via MySQL event (default 30 days). Manual: CALL sp_purge_snapshots(N);

Installation

cp -r custom_mysql /home/noodly/.openclaw/workspace/skills/
cd /home/noodly/.openclaw/workspace/skills/custom_mysql
./setup_wizard.sh

Creating a Least-Privilege MySQL User

CREATE USER 'mysqlclaw'@'localhost' IDENTIFIED BY 'strong_password';
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, INDEX, EVENT, EXECUTE
    ON mysqlclaw.* TO 'mysqlclaw'@'localhost';
FLUSH PRIVILEGES;

Files

File Purpose
SKILL.md This file — skill documentation
CAPABILITIES.md Explicit capability declarations (addresses scanner false positives)
custom_mysql Agent-facing command wrapper (query / exec_script)
sql_safe_exec.sh Safe SQL execution engine
setup_wizard.sh Interactive setup wizard
sanitize_snapshot.sh Secret redaction before DB storage
create_user_tables.sql Schema for user profiles, personas, snapshots
cleanup_snapshots.sql Retention policy (auto-purge event + manual procedure)
changelog.md Version history

Changelog

See changelog.md for full version history.

Usage Guidance
This skill is reasonable for local MySQL-backed profile and snapshot storage. Before installing, make sure MYSQL_HOST points only to a trusted database, create a dedicated mysqlclaw MySQL user with limited privileges, review any SQL scripts before execution, and decide whether automatic snapshot purging and persistent profile/config storage are acceptable.
Capability Analysis
Type: OpenClaw Skill Name: custom-mysql Version: 1.0.8 The MySQLClaw skill bundle is a security-hardened database interface for OpenClaw agents, focusing on local MySQL operations for user profiles and personas. It implements multiple layers of protection, including credential handling via temporary files with trap-based cleanup (setup_wizard.sh, sql_safe_exec.sh), multi-statement SQL rejection, DDL blocking, and mandatory interactive confirmation for data-modifying queries. The bundle also includes a defensive redaction script (sanitize_snapshot.sh) using Perl regex to strip secrets like API keys and tokens before storage, and the documentation (CAPABILITIES.md) proactively addresses potential security scanner false positives related to these patterns.
Capability Tags
cryptorequires-walletcan-make-purchasesrequires-sensitive-credentials
Capability Assessment
Purpose & Capability
The stated purpose and source are coherent: managing user profiles, personas, and config snapshots in MySQL. No wallet, payment, blockchain, or external API code is evident, but the skill intentionally persists personal/configuration data.
Instruction Scope
The agent-facing wrapper allows raw SQL and SQL-file execution through a safety wrapper with DDL blocking and DML confirmation, so users should still review SQL before allowing changes.
Install Mechanism
There is no automated install spec; setup is user-directed. Registry metadata under-declares dependencies and environment variables that the SKILL.md and scripts require.
Credentials
The default target is a local mysqlclaw schema and the docs recommend least privilege, but MYSQL_HOST and MySQL credentials can point to any user-configured MySQL account/server.
Persistence & Privilege
The skill creates persistent MySQL tables for profile/config history and a daily MySQL purge event for old snapshots. This is disclosed and purpose-aligned, but affects retention and deletion.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install custom-mysql
  3. After installation, invoke the skill by name or use /custom-mysql
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.8
- Added new executable script: custom_mysql.sh. - Updated documentation to reference custom_mysql.sh instead of custom_mysql for command usage. - No functional changes to security architecture or dependencies. - Files list and example commands now align with the presence of custom_mysql.sh.
v1.0.7
**Skill version 1.0.7 highlights stricter capability documentation and clarifies security design.** - Added `CAPABILITIES.md` for explicit declarations of allowed and disallowed actions, to address false "crypto/wallet/payment" capability scanner signals. - Updated `SKILL.md` with a new, greatly clarified capability scope section and references to `CAPABILITIES.md`. - Emphasized that the skill performs only local MySQL database operations, with no wallet, crypto, payment, or external API access. - Polished documentation: reorganized and condensed sections, clarified security features and expected environment. - No functional or code logic changes; this is a documentation and transparency release.
v1.0.6
- Added an explicit "Capability Scope" section clarifying that the skill does not interact with wallets, cryptocurrencies, or payment systems; redaction of such secrets is purely defensive. - Updated dependencies: Perl is now required for advanced regex redaction in `sanitize_snapshot.sh`. - Strengthened documentation of script execution (`exec_script`): all statements are run individually through the SQL safety wrapper, and only reviewed/bundled scripts should be used. - Enhanced documentation for clarity around installation, input validation, and security controls.
v1.0.4
MySQLClaw Skill v1.0.4 delivers security-focused MySQL management features for OpenClaw agents. - Strengthened credential handling: passwords never appear in process listings, credentials file auto-deleted on exit. - Enhanced SQL execution safety: rejects multi-statements, blocks DDL, requires confirmation for DML, enforces input sanitization. - Snapshot management: secrets automatically redacted, files tightly whitelisted, auto-purge after 30 days. - Strict input validation: all identifiers and database user input checked by regex. - Setup wizard and commands streamlined for user safety and ease of use.
Metadata
Slug custom-mysql
Version 1.0.8
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 4
Frequently Asked Questions

What is Custom Mysql?

Provides a secure, least-privilege interface for managing user data, personas, and config snapshots in MySQL with input validation and secret redaction. It is an AI Agent Skill for Claude Code / OpenClaw, with 68 downloads so far.

How do I install Custom Mysql?

Run "/install custom-mysql" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Custom Mysql free?

Yes, Custom Mysql is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Custom Mysql support?

Custom Mysql is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Custom Mysql?

It is built and maintained by NoodlyPandaStories (@paradoxfuzzle); the current version is v1.0.8.

💬 Comments