Database Credential Security (Zero-Exposure Edition)
БесплатноЗапускает вложенные скриптыНе проверенSecure database credential management, analysis-script execution and multi-step data analysis workflows using MGC Blackbox 1.5.4. Supports MySQL, PostgreSQL…
от zkeviny1 345 установок в других каталогахОб этом скилле
1. Overview
This skill covers three layers of database work on MGC Blackbox 1.5.4. It supports MySQL, PostgreSQL, SQLite, MariaDB, SQL Server and other databases.
| Layer | What it covers | MGC mechanism |
|---|---|---|
| L1 — Credentials | Storing, rotating, revoking and deleting database secrets | mgc_save with info_type="config" |
| L2 — Analysis scripts | Running one parameterised script that queries a database and writes a result file | mgc_save with info_type="script" + mgc_run |
| L3 — Data analysis workflows | Multi-step pipelines where scripts call each other | mgc_save_file (folder) + ext08 call graph |
The core design is a two-party split, applied at every layer:
- MGC holds the credential, encrypted at rest.
- The script holds the logic, and pulls the credential at runtime over the localhost REST API.
AI agents never hold credential plaintext. The AI supplies SQL and connection intent; the script resolves the secret inside the MGC execution boundary and writes only the result.
This skill contains no executable code and is safe for automatic approval.
2. The Zero-Exposure Contract
2.1 Wrong way — breaks zero-exposure
AI → mgc_get(config, my_mysql_prod) → returns plaintext JSON including password
→ password now sits in the AI context window, the transcript and the log
2.2 Right way — 1.5.4 zero-exposure
User → mgc_save(info_type="config", info_owner="my_mysql_prod", content=<credentials>)
User → mgc_save(info_type="script", info_owner="mysql_query_v1", ext01="python", content=<script>)
AI → mgc_run(info_owner="mysql_query_v1", diff_3="mysql_query_v1", ext02='["--sql", "SELECT 1"]')
└─ MGC executes the script inside the encrypted boundary
└─ script reads credentials over the localhost REST API
└─ script connects to the database and runs the SQL
└─ script writes the result to a file and prints its path
AI → reads the result file → sees SQL output only, never the password
2.3 The one rule that governs everything
Never call
mgc_geton a credential entry from AI.mgc_getreturns plaintext and destroys the zero-exposure guarantee.The single exception is the node public key:
mgc_get(info_type="__NODE_PUB__", info_owner="__NODE_PUB__")returns a public key, which is not a secret, and is required before any p2p-mode sealing.
3. When to Use This Skill
3.1 Must use cases
- Production environments — any production database access needs secure credential management.
- Automation — scheduled scripts, CI/CD jobs and cron jobs that need database access.
- Multi-node collaboration — Node A authors the database script, Node B executes it under its own key.
- AI-assisted database work — the AI issues SQL but must never see passwords.
- Multi-step analysis — extract, clean and analyse are three scripts that call each other; a folder workflow keeps them consistent.
3.2 Example triggers
- "Connect to MySQL securely without exposing the password"
- "Run this SQL through the blackbox"
- "Create a scheduled PostgreSQL backup script"
- "Run database migrations safely"
- "Hand a database script to another node"
- "Chain these three query scripts into one analysis pipeline"
3.3 When NOT to use
- Unauthenticated databases — no credential to protect.
- Disposable local development databases — no sensitive data.
- Interactive manual access — DBeaver, MySQL Workbench and similar GUIs.
4. Prerequisites
Install MGC Blackbox 1.5.4 or later:
pip install mgc-blackbox>=1.5.4Start MGC —
mgc. REST API athttp://127.0.0.1:57219, WebUI athttp://127.0.0.18.Token file —
~/.mgc/database/mgc_black_box/.mgc_token.Database driver installed —
mysql-connector-python,psycopg2-binary,pymysqland so on. MGC never installs dependencies for you; it only reports what is missing.
Sandbox note. When MGC runs inside a sandbox agent, install it in the system environment, or call the FastAPI endpoint directly.
5. Layer 1 — Credentials
Credentials are stored by the user through the WebUI (mgc_open_webui) or by AI on explicit user instruction. AI never reads them back.
5.1 Store the credentials
MySQL
Tool: mgc_save
Parameters:
info_type: "config"
info_owner: "my_mysql_prod"
content: "{\"host\": \"db.example.com\", \"port\": 3306, \"database\": \"production_db\", \"user\": \"app_user\", \"password\": \"<user supplied>\"}"
PostgreSQL
Tool: mgc_save
Parameters:
info_type: "config"
info_owner: "my_postgres_prod"
content: "{\"host\": \"db.example.com\", \"port\": 5432, \"database\": \"production_db\", \"user\": \"app_user\", \"password\": \"<user supplied>\", \"sslmode\": \"require\"}"
SQL Server
Tool: mgc_save
Parameters:
info_type: "config"
info_own
Установить Database Credential Security (Zero-Exposure Edition) в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл Database Credential Security (Zero-Exposure Edition)?
Secure database credential management, analysis-script execution and multi-step data analysis workflows using MGC Blackbox 1.5.4. Supports MySQL, PostgreSQL, SQLite, MariaDB, SQL Server and other databases. Credentials are stored encrypted and retrieved by local scripts over the localhost REST API at runtime, so AI agents never touch credential plaintext. Also covers parameterised analysis scripts, folder-based data analysis workflows with auto-recognised cross-script call graphs, 1.5.4 dual-mode sealing, link authorization, capsule import, credential rotation and deletion, and runtime dependency advisories.
Как установить скилл Database Credential Security (Zero-Exposure Edition)?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Database Credential Security (Zero-Exposure Edition) запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic