ln-113-backend-docs-creator
Creates 2 backend docs (api_spec.md, database_schema.md). Invoked when hasBackend or hasDatabase detected.
- License 许可
- MIT
- 最近更新
- 2026-05-02
- Stars
- ★ 3
- Forks
- 1
01 前言 Front Matter
- name
- ln-113-backend-docs-creator
- license
- MIT
- description
- Creates 2 backend docs (api_spec.md, database_schema.md). Invoked when hasBackend or hasDatabase detected.
02 资源文件 3
- 参考文档references/questions_backend.md3.5 KB
- 参考文档references/templates/api_spec_template.md9.7 KB
- 参考文档references/templates/database_schema_template.md9.4 KB
03 SKILL.md 正文
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 directoryflags: { 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
- Parse flags from coordinator
- If
!hasBackend && !hasDatabase: return early with empty result - Determine which documents to create
Phase 2: Create Documents
For each applicable document:
- Check if file exists (idempotent)
- If exists: skip with log
- 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
- Check SCOPE tag
- Validate format:
- api_spec.md: endpoint table, request/response examples
- database_schema.md: ER diagram, table definitions
- Check Maintenance section
Phase 4: Return Status
{
"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
04 同仓库更多 Skills
zarr-python
Chunked N-D arrays for cloud storage. Compressed arrays, parallel I/O, S3/GCS integration, NumPy/Dask/Xarray compatible, for large-scale scientific computing pipelines.
zabbix
Zabbix monitoring system automation via API and Python. Use when: (1) Managing hosts, templates, items, triggers, or host groups, (2) Automating monitoring configuration, (3) Sending data via Zabbix trapper/sender, (4) Querying historical data or events, (5) Bulk operations on Zabbix objects, (6) Maintenance window management, (7) User/permission management
x-twitter-growth
X/Twitter growth engine for building audience, crafting viral content, and analyzing engagement. Use when the user wants to grow on X/Twitter, write tweets or threads, analyze their X profile, research competitors on X, plan a posting strategy, or optimize engagement. Complements social-content (generic multi-platform) with X-specific depth: algorithm mechanics, thread engineering, reply strategy, profile optimization, and competitive intelligence via web search.
what-if-oracle
Run structured What-If scenario analysis with multi-branch possibility exploration. Use this skill when the user asks speculative questions like "what if...", "what would happen if...", "what are the possibilities", "explore scenarios", "scenario analysis", "possibility space", "what could go wrong", "best case / worst case", "risk analysis", "contingency planning", "strategic options", or any question about uncertain futures. Also trigger when the user faces a fork-in-the-road decision, wants to stress-test an idea, or needs to think through consequences before committing.
vercel-react-best-practices
React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.
venue-templates
Access comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.