Writes data from MATLAB to relational databases and performs database operations.
SkillScore95Maintained
Automatic
◆Data Engineer pack
Last verified 8/16/2026
What it changes
Passed 21 of 22 test cases with the skill, and 11 of 22 without it.
Without skill50%
With skill95%
Checks it passed that the model alone missed
Uses execute to run DDL SQL statements.
Retrieves database password using getSecret.
Uses bindParamValues to bind values to parameters.
and 12 more in the full report
10 fixed11 passed either way1 still failing0 broke
Pass-rate lift
+45 pp
Tokens
+125%
Agent turns
0%
Response time
-42%
Model gemini-3.6-flashMeasured 8/16/2026v121 of 22 cases passed with skill
Tokens, turns and time describe resource use, not a dollar price.
See it in action
One of 10 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 10
Prompt
I am connected to a PostgreSQL database using MATLAB's native PostgreSQL connection syntax. I need to call a simple stored procedure `refresh_summary()` that returns a result set without requiring typed output parameters. Which execution function should I call?
What was checked, without and with the skill
Checked
Without skill
With skill
Uses execute with a CALL statement for simple stored procedure execution.
Missed
Passed
Avoids runstoredprocedure on native database connections.
Passed
Passed
case-10 · gemini-3.6-flash · 8/16/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md226 linessingle file
MATLAB Database Export Architect
Use when writing data to relational databases, executing SQL statements, managing transactions, running stored procedures, or using SQL prepared statements. Covers all Database Toolbox operations that modify the database.
When to Use This Skill
Writing/inserting MATLAB data into a database table
Updating existing rows in a database table
Deleting data from a database
Executing arbitrary SQL statements (DDL, DML)
Running stored procedures or custom database functions
Managing transactions (commit/rollback)
Using SQL prepared statements for parameterized queries
Reading/importing data from a database — use sqlread/fetch with RowFilter and databaseImportOptions
Object-oriented writes with class mapping — use ORM (ormwrite/ormupdate with Mappable classes)
MongoDB, Cassandra, or Neo4j writes — these have their own document/graph-specific write interfaces
Large data that doesn't fit in memory — use DatabaseDatastore + chunked processing for reads, or chunked sqlwrite loops for writes
Critical Rules
Credential Security
NEVER hardcode passwords or credentials in generated code.
ALWAYS use setSecret / getSecret (R2024a+) for credential storage.
Database Connection
ALWAYS establish and verify a connection before any export operation. Check isopen(conn) after connecting.
ALWAYS close connections with close(conn) when done.
Transaction Safety
ALWAYS set AutoCommit to off when using commit / rollback for transaction control.
ALWAYS wrap multi-statement operations in a transaction when atomicity is required.
ALWAYS use rollback in error-handling blocks to undo partial changes on failure.
Destructive Operations
ALWAYS ask the user for explicit confirmation before executing any SQL that could irreversibly destroy or alter data. This includes: DROP, TRUNCATE, DELETE, and ALTER statements that remove columns or modify constraints.
Writes MATLAB performance tests using the matlab.perftest.TestCase framework. Use when asked to write, create, or add performance tests for MATLAB code, benchmark functions, measure execution time with statistical rigor, or use runperf.