Skip to content
Back to skills

Doc Engine

ASecurity

Generate documentation for Snowflake objects. Runs SQL to extract column metadata, creates a data dictionary, and builds a lineage diagram. Usage: $doc run [schema.table] or $doc run (for all accessible tables).

  • 724 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added June 5, 2026
ai-agentssqldocumentation

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned June 5, 2026

npx -y skills add Snowflake-Labs/cocoplus --skill doc-engine --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Doc Engine?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Doc Engine
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/snowflake-labs-doc-engine/badge)](https://www.skillsdirectory.com/skills/snowflake-labs-doc-engine)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: "doc-run"
description: "Generate documentation for Snowflake objects. Runs SQL to extract column metadata, creates a data dictionary, and builds a lineage diagram. Usage: $doc run [schema.table] or $doc run (for all accessible tables)."
version: "1.0.0"
author: "CocoPlus"
tags:
  - cocoplus
  - doc-engine
---

Your objective is to generate documentation for Snowflake objects.

Before proceeding, verify that `.cocoplus/` exists.
If not: output "CocoPlus not initialized in this directory. Run `$pod init` to begin." Then stop.

Parse argument: `$doc run [schema.table]`
If no argument: document all accessible tables (use SHOW TABLES to enumerate).

## For Each Table

Execute:

```sql
DESCRIBE TABLE [schema].[table];
```

Capture: column name, data type, nullable, default, comment.

Then execute for lineage:
```sql
SELECT *
FROM SNOWFLAKE.ACCOUNT_USAGE.OBJECT_DEPENDENCIES
WHERE REFERENCED_OBJECT_NAME = '[table]'
   OR REFERENCING_OBJECT_NAME = '[table]'
LIMIT 100;
```

## Generate Data Dictionary

Write `.cocoplus/docs/[schema]-[table]-datadict.md`:

```markdown
# Data Dictionary: [schema].[table]

**Generated:** [ISO 8601 timestamp]
**Schema:** [schema]
**Table:** [table]

## Columns

| Column | Type | Nullable | Default | Description |
|--------|------|----------|---------|-------------|
[one row per column — use existing comment as description, or "(no description)" if empty]

## Lineage
**Upstream (depends on):**
[list of tables this table reads from]

**Downstream (consumed by):**
[list of tables/views/procedures that reference this table]
```

Write `.cocoplus/docs/schema-lineage.md` with a summary of all lineage relationships.

Output: "Documentation generated. [N] tables documented. Files written to .cocoplus/docs/."

## Anti-Rationalization

| Shortcut / Temptation | Why It Fails |
|-----------------------|--------------|
| Leave column Description blank instead of using "(no description)" | Blank descriptions make the data dictionary look incomplete and fail table formatting |
| Skip the lineage query if it returns no rows | An empty lineage section is valid and informative — it means the table has no upstream/downstream dependencies |
| Document only the first 10 tables when scanning all | Partial documentation is worse than none because it creates a false sense of completeness |

## Exit Criteria

- [ ] A `.cocoplus/docs/[schema]-[table]-datadict.md` file exists for each documented table with a `## Columns` table
- [ ] Each data dictionary has a `## Lineage` section (even if empty, labeled "No upstream/downstream dependencies found")
- [ ] `.cocoplus/docs/schema-lineage.md` exists with a summary of all lineage relationships
- [ ] Output reports the count of tables documented

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…