Query database structure and business rules. Auto-documents new findings.
This skill inherits all available tools. When active, it can use any tool Claude has access to.
User: "расскажи про таблицу dostavkaRN"
↓
1. Search database/descriptions/dostavkaRN.md
↓
Found? → Return with DDL from db-agent
↓
Not found? → Query db-agent, CREATE new file, return
DB_AGENT="/mnt/windows-c/Users/IuriiPurych/DataGripProjects/DCLG/b2b/BMPI-1797-Orders/sql/db-agent"
# Table structure
$DB_AGENT --action ddl --table "TableName"
# SQL query
$DB_AGENT --action query "SELECT TOP 10 * FROM TableName"
# Indexes
$DB_AGENT --action indexes --table "TableName"
Use mcp__db__* tools directly.
Create/Update: database/descriptions/<table_name>.md
# <TableName>
> Auto-documented: YYYY-MM-DD
## Purpose
<What this table stores, one sentence>
## Key Fields
| Field | Type | Business Meaning |
|-------|------|------------------|
| field1 | int | Description |
## Important Notes
- <business rules, gotchas, tips>
Update: database/relations/<domain>.md
## <Table1> ↔ <Table2>
- **Link:** Table1.field → Table2.field
- **Type:** 1:1 / 1:N / N:M
- **Notes:** <when/why this relation is used>
Create/Update: domains/<domain>/<topic>.md
# <Topic>
## Rule
<clear statement of the rule>
## Applies To
- Tables: X, Y, Z
- Procedures: A, B
## Examples
<concrete examples>
database/descriptions/<table_lowercase>.mddatabase/relations/<domain>.md (orders, dropshipping, warehouse)database/dictionaries/<name>.mddomains/<domain>/<topic>.md| Env | Server | Database | Default |
|---|---|---|---|
| DEV | 192.168.3.227 | skl2008_dev | ✓ |
| PROD | 192.168.3.231 | skl2008 |
Always return: