Sponsor Suno AI Music arrow_forward
Slash Command

Db Docs

Generate comprehensive database documentation from existing schemas

Type
Slash Command
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

  1. Download db-docs.md from the repository.
  2. 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.
  3. Run it by typing / followed by its name.

Claude Cowork

  1. Turn the command into a skill: create a folder with the file saved as SKILL.md and zip it.
  2. In Customize → Skills, click +, then upload the ZIP.
  3. 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:

  1. Database connection credentials with schema read access
  2. JDBC driver for your database type
  3. Java Runtime Environment (JRE) 8+
  4. GraphViz installed for diagram generation
  5. 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

Browse all skills, subagents, and plugins →

Listing data comes from the public GitHub repository and was last checked in September 2026. Excerpts are © their authors and shared under MIT. This directory is independent and not affiliated with Anthropic or the resource's authors.