Db Docs
Generate comprehensive database documentation from existing schemas
- Type
- Slash Command
- Repository
- jeremylongshore/tons-of-skills-marketplace
- GitHub stars
- 2.8k
- License
- MIT
- Repo last updated
- Sep 27, 2026
What Db Docs is
Db Docs is a slash command published in the jeremylongshore/tons-of-skills-marketplace repository on GitHub, which has about 2.8k stars. The repository describes itself as: “Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com.”
A slash command is a reusable prompt saved as a markdown file and run by typing its name after a slash. In Claude Code, custom commands have been merged into skills: a file in .claude/commands/ and a skill folder in .claude/skills/ both create the same kind of command, and existing command files keep working.
Db Docs gives you a repeatable way to run the same instructions without retyping them, optionally with arguments.
How to install Db Docs
Claude Code
- Download db-docs.md from the repository.
- Save it to ~/.claude/commands/ (all projects) or .claude/commands/ (one project). As a skill, you can instead save it as ~/.claude/skills/<name>/SKILL.md.
- Run it by typing / followed by its name.
Claude Cowork
- Turn the command into a skill: create a folder with the file saved as SKILL.md and zip it.
- In Customize → Skills, click +, then upload the ZIP.
- Run it from any task with / and the skill name.
New to extending Cowork? Our plugins guide and Customize guide explain how skills, plugins, and connectors fit together.
Inside the source file
An excerpt from plugins/database/database-documentation-gen/commands/db-docs.md, shared under the repository's MIT license. Read the full file on GitHub.
Automatically generate comprehensive database documentation including ERD diagrams, table relationships, column descriptions, indexes, triggers, stored procedures, and interactive HTML documentation from your existing database schemas across multiple database engines.
When to Use This Command
Use /db-docs when you need to:
- Document existing database schemas for team onboarding
- Generate ERD diagrams for architectural reviews
- Create data dictionaries for compliance requirements
- Build interactive database documentation websites
- Document relationships and foreign key constraints
- Generate migration guides between schema versions
- Create developer reference documentation
- Export schema documentation for audits
- Build database catalogs for data governance
- Generate test data documentation
DON'T use this when:
- Database is still in early design phase (use /design-schema instead)
- You only need query optimization docs (use /optimize-query)
- Working with NoSQL databases without fixed schemas
- Database has no meaningful structure to document
Design Decisions
This command implements SchemaSpy with PlantUML as the primary approach because:
- Supports 30+ database types out of the box
- Generates interactive HTML with JavaScript navigation
- Creates high-quality vector ERD diagrams
- Analyzes implicit relationships via naming conventions
- Produces detailed table and column documentation
- Open-source with active community support
Alternative considered: dbdocs.io
- Cloud-based with collaboration features
- DBML (Database Markup Language) based
- Requires internet connection
- Recommended for team collaboration needs
Alternative considered: SQL Server Data Tools
- Excellent for SQL Server specifically
- Visual Studio integration
- Platform-specific limitation
- Recommended for pure Microsoft stacks
Prerequisites
Before running this command:
- Database connection credentials with schema read access
- JDBC driver for your database type
- Java Runtime Environment (JRE) 8+
- GraphViz installed for diagram generation
- Sufficient disk space for generated documentation
Implementation Process
Step 1: Database Introspection
Connect to database and extract complete schema metadata including tables, views, procedures, and relationships.
Step 2: Relationship Analysis
Identify explicit foreign keys and implicit relationships based on naming patterns and data types.
Step 3: ERD Generation
Create entity-relationship diagrams at multiple levels: full schema, per-module, and neighborhood views.
Step 4: Documentation Generation
Generate HTML documentation with search, filtering, and interactive navigation features.
Step 5: Export and Publishing
Package documentation for distribution via static hosting, PDF export, or integration with existing docs.
Output Format
The command generates:
- index.html - Main documentation entry point
- diagrams/ - ERD diagrams in multiple formats
- schema.svg - Complete database diagram
- relationships.png - Relationship overview
- tables/*.svg - Individual table diagrams
- tables/ - Individual table documentation
- columns.html - Searchable column index
- constraints.html - All constraints documentation
- routines.html - Stored procedures/functions
- orphans.html - Tables without relationships
- anomalies.html - Schema issues and warnings
- metrics.json - Database metrics and statistics
Code Examples
Example 1: Comprehensive Database Documentation Generator
// database-doc-generator.js
const { exec } = require('child_process');
const fs = require('fs').promises;
const path = require('path');
const mysql = require('mysql2/promise');
const { Client: PgClient } = require('pg');
const oracledb = require('oracledb');
const sql = require('mssql');
const ejs = require('ejs');
const marked = require('marked');
const plantuml = require('node-plantuml');
class DatabaseDocumentationGenerator {
constructor(config) {
this.config = {
type: config.type || 'mysql', // mysql, postgresql, mssql, oracle
host: config.host || 'localhost',
port: config.port,
…Example 2: Python Database Documentation Generator with SchemaSpy Integration
# database_doc_generator.py
import os
import json
import subprocess
import sqlite3
import psycopg2
import mysql.connector
import pymongo
from pathlib import Path
from typing import Dict, List, Any, Optional
from datetime import datetime
from jinja2 import Template
import graphviz
import yaml
from dataclasses import dataclass, asdict
import pandas as pd
@dataclass
… Before you install
- Read the whole file first. Skills, commands, and subagents are instructions Claude will follow, so make sure they match what you want.
- Check which tools, scripts, or MCP servers it uses. Local servers and scripts run with your permissions.
- Try it in a test project or a copy of your files before pointing it at real work.
- Pin the version you tested, and review changes before updating.
- Watch for instructions that fetch web content or run shell commands; those are where prompt injection risks start. See our prompt injection guide.
FAQ
What is Db Docs?
Db Docs is a slash command for Claude Code and Claude Cowork from the jeremylongshore/tons-of-skills-marketplace repository on GitHub. Generate comprehensive database documentation from existing schemas
How do I install Db Docs in Claude Code?
Download db-docs.md from the repository. Save it to ~/.claude/commands/ (all projects) or .claude/commands/ (one project). As a skill, you can instead save it as ~/.claude/skills/<name>/SKILL.md. Run it by typing / followed by its name.
Can I use Db Docs in Claude Cowork?
Turn the command into a skill: create a folder with the file saved as SKILL.md and zip it. In Customize → Skills, click +, then upload the ZIP. Run it from any task with / and the skill name.
Is Db Docs safe to install?
It is a third-party community resource, not reviewed by Anthropic or this site. Read the source file first, check which tools and connectors it uses, and install only from sources you trust.
Similar resources
- Gen Report Generate comprehensive test reports with coverage and trends Slash Command · jeremylongshore/tons-of-skills-marketplace
- Gen Doubles Generate test doubles (mocks, stubs, spies, fakes) for unit testing Slash Command · jeremylongshore/tons-of-skills-marketplace
- Generate Api Docs Generate comprehensive OpenAPI/Swagger documentation from existing APIs Slash Command · jeremylongshore/tons-of-skills-marketplace
- Generate Contract Generate comprehensive API contracts for consumer-driven contract testing Slash Command · jeremylongshore/tons-of-skills-marketplace
- Db Test Database testing with test data setup, transaction rollback, and schema Slash Command · jeremylongshore/tons-of-skills-marketplace
- Db Diff Compare database schemas and generate safe migration scripts with rollback Slash Command · jeremylongshore/tons-of-skills-marketplace
- Deadlock Detect and resolve database deadlocks with automated monitoring Slash Command · jeremylongshore/tons-of-skills-marketplace
- Daily Health Check Execute SOP-101 Morning Health Check Routine for all FairDB VPS instances Slash Command · jeremylongshore/tons-of-skills-marketplace