code-to-doc

Generates Markdown documentation of database interactions from PHP code.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/octkp/base --skill code-to-doc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-to-doc
Source: https://github.com/octkp/base/tree/main/dotfiles/claude/skills/code-to-doc
Command: npx skills add https://github.com/octkp/base --skill code-to-doc

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill automates the creation of functional documentation for code, specifically focusing on database interactions, saving developers significant time and ensuring consistency.

Core Features & Use Cases

  • Code Analysis: Parses specified code files, line ranges, or methods to identify database tables, data operations, and control flow.
  • Automated Documentation Generation: Creates structured Markdown documentation detailing database schemas, data manipulation (INSERT, UPDATE, DELETE), and processing logic.
  • Use Case: When a new feature involving complex data writes is implemented, use this Skill to automatically generate a clear, up-to-date document explaining the database changes and their purpose.

Quick Start

Use the code-to-doc skill to document the database operations in the file '/src/path/to/file.php' between lines 100 and 200.

Frequently Asked Questions about code-to-doc

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate database documentation for PHP code automatically?

To generate database documentation for PHP code automatically, you can use a tool that parses specified files or line ranges to identify tables and data operations, then structures the extracted database interactions into detailed Markdown files.

Can I generate Markdown docs for specific methods that use ORM patterns?

Yes, you can generate Markdown documentation for specific methods using ORM patterns by specifying the code file and line range, allowing the parser to identify database operations and output structured functional documentation.

What is the best way to document complex data manipulation logic in PHP?

The best way to document complex data manipulation logic in PHP is to automate the extraction of INSERT, UPDATE, and DELETE operations from the code, structuring the database schema changes and processing logic into a clear Markdown document.

Does code-to-doc work with Laravel DB facades and ORM connections?

Yes, the documentation generator works with PHP code that contains explicit DB facades or ORM patterns, analyzing the provided connection details and data manipulation operations to create structured Markdown documentation.

What are the limitations of automated code analysis for database interactions?

The limitations of automated code analysis for database interactions include relying on explicit DB or ORM patterns in PHP code to accurately identify tables and operations, meaning unstated or dynamic database interactions may not be fully documented.