Skip to content
Back to skills

Ln 113 Backend Docs Creator

ASecurity

Creates 2 backend docs (api_spec.md, database_schema.md). Invoked when hasBackend or hasDatabase detected.

  • 3 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 7, 2026
databasespythongosqlnodeexpressfastapiapidatabasebackenddocumentation

Works with

  • api

Security analysis

A100/100

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

Scanned September 7, 2026

npx -y skills add levalencia/agent-god-mode --skill ln-113-backend-docs-creator --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Ln 113 Backend Docs Creator?

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

Security grade badge for Ln 113 Backend Docs Creator
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/levalencia-ln-113-backend-docs-creator/badge)](https://www.skillsdirectory.com/skills/levalencia-ln-113-backend-docs-creator)

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: ln-113-backend-docs-creator
description: Creates 2 backend docs (api_spec.md, database_schema.md). Invoked when hasBackend or hasDatabase detected.
license: MIT
---

> **Paths:** File paths (`shared/`, `references/`, `../ln-*`) are relative to skills repo root. If not found at CWD, locate this SKILL.md directory and go up one level for repo root.

# Backend Documentation Creator

L3 Worker that creates 2 backend documentation files. CONDITIONAL - only invoked when project has backend or database.

## Purpose & Scope
- Creates api_spec.md (if hasBackend)
- Creates database_schema.md (if hasDatabase)
- Receives Context Store from ln-110-project-docs-coordinator
- OpenAPI 3.0 compliant API specification
- ER diagrams in Mermaid for database schema
- Never gathers context itself; uses coordinator input

## Invocation (who/when)
- **ln-110-project-docs-coordinator:** CONDITIONALLY invoked when:
  - `hasBackend=true` (express, fastify, nestjs, fastapi detected)
  - `hasDatabase=true` (pg, mongoose, prisma, sequelize detected)
- Never called directly by users

## Inputs
From coordinator:
- `contextStore`: Context Store with backend-specific data
  - API_TYPE (REST, GraphQL, gRPC)
  - API_ENDPOINTS (from route scan)
  - AUTH_SCHEME (JWT, OAuth2, API keys)
  - DATABASE_TYPE (PostgreSQL, MongoDB, MySQL)
  - SCHEMA_OVERVIEW (from migrations/models)
  - ER_DIAGRAM (generated from schema)
- `targetDir`: Project root directory
- `flags`: { hasBackend, hasDatabase }

## Documents Created (2, conditional)

| File | Condition | Questions | Auto-Discovery |
|------|-----------|-----------|----------------|
| docs/project/api_spec.md | hasBackend | Q39-Q40 | Medium |
| docs/project/database_schema.md | hasDatabase | Q41-Q42 | High |

## Workflow

### Phase 1: Check Conditions
1. Parse flags from coordinator
2. If `!hasBackend && !hasDatabase`: return early with empty result
3. Determine which documents to create

### Phase 2: Create Documents
For each applicable document:
1. Check if file exists (idempotent)
2. If exists: skip with log
3. If not exists:
   - Copy template
   - Replace placeholders with Context Store values
   - Generate ER diagram for database_schema.md
   - Mark `[TBD: X]` for missing data

### Phase 3: Self-Validate
1. Check SCOPE tag
2. Validate format:
   - api_spec.md: endpoint table, request/response examples
   - database_schema.md: ER diagram, table definitions
3. Check Maintenance section

### Phase 4: Return Status
```json
{
  "created": ["docs/project/api_spec.md"],
  "skipped": ["docs/project/database_schema.md"],
  "tbd_count": 2,
  "validation": "OK"
}
```

## Critical Notes
- **Conditional:** Skip entirely if no backend/database detected
- **OpenAPI compliant:** api_spec.md follows OpenAPI 3.0 structure
- **ER diagrams:** Generated in Mermaid erDiagram format
- **Idempotent:** Never overwrite existing files

### NO_CODE_EXAMPLES Rule (MANDATORY)
API spec documents **contracts**, NOT implementations:
- **ALLOWED in api_spec.md:** JSON request/response schemas (this IS the API contract), endpoint tables
- **FORBIDDEN:** Controller implementations, validation classes, service code, middleware examples
- **TEMPLATE RULE:** api_spec_template.md includes `<!-- NO_CODE_EXAMPLES: ... -->` tag - FOLLOW IT

### Stack Adaptation Rule (MANDATORY)
- Links must reference stack-appropriate docs (Microsoft for .NET, MDN for JS)
- API examples must match project stack (Express for Node.js, FastAPI for Python)

### Format Priority (MANDATORY)
Tables (endpoints, schemas) > Mermaid (ER diagrams) > Lists > Text

## Definition of Done
- Conditions checked (hasBackend, hasDatabase)
- Applicable documents created
- ER diagram generated (if database_schema.md created)
- Self-validation passed
- **Actuality verified:** all document facts match current code (paths, functions, APIs, configs exist and are accurate)
- Status returned to coordinator

## Reference Files
- Templates: `references/templates/api_spec_template.md`, `database_schema_template.md`
- Questions: `references/questions_backend.md` (Q39-Q42)

---
**Version:** 1.2.0
**Last Updated:** 2025-01-12

Files in this skill

  • SKILL.md4 KB
  • references/questions_backend.md3.5 KB
  • references/templates/api_spec_template.md9.7 KB
  • references/templates/database_schema_template.md9.4 KB

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…