manage-markdown-docs
Standardize markdown document creation and updates with proper headers and footers. Use when creating OR updating any markdown file that is NOT a subagent, command, or skill definition. Ensures consistent metadata, classification, and change tracking.
$ 安裝
git clone https://github.com/rayk/lucid-toolkit /tmp/lucid-toolkit && cp -r /tmp/lucid-toolkit/plugins/luc/skills/manage-markdown-docs ~/.claude/skills/lucid-toolkit// tip: Run this command in your terminal to install the skill
name: manage-markdown-docs description: Standardize markdown document creation and updates with proper headers and footers. Use when creating OR updating any markdown file that is NOT a subagent, command, or skill definition. Ensures consistent metadata, classification, and change tracking.
<does_not_apply_to>
- Subagent definitions (agents/*.md)
- Slash commands (commands/*.md)
- Skills (SKILL.md files)
- README.md files (these have their own conventions)
- CLAUDE.md files
- CHANGELOG.md files </does_not_apply_to>
<quick_start> <workflow_new_document> When CREATING a new markdown file:
- Check if document type is excluded (subagent, command, skill) → MUST stop if excluded
- If path provided by user, use it; otherwise determine appropriate location
- Classify document type
- Generate header with required metadata
- Write document content
- Add footer with change history (initial creation entry) </workflow_new_document>
<workflow_update_document> When UPDATING an existing markdown file:
- Check if document type is excluded (subagent, command, skill) → MUST stop if excluded
- If document lacks proper header/footer, add them
- Make the requested content changes
- Update the Change History table in footer with new entry </workflow_update_document>
<quality_requirements> Markdown Lint Compliance:
- All produced markdown must be free from lint errors
- Use consistent heading levels (no skipping levels)
- Blank lines before and after headings, code blocks, and lists
- No trailing whitespace
- Single blank line at end of file
- Properly closed code fences with language specifier
Diagrams:
- All diagrams MUST use Mermaid format
- Use fenced code blocks with
mermaidlanguage identifier - Supported diagram types: flowchart, sequence, class, state, ER, gantt, pie, mindmap
Example:
flowchart TD
A[Start] --> B{Decision}
B -->|Yes| C[Action]
B -->|No| D[End]
</quality_requirements>
<path_behavior> If user provides a specific file path:
- MUST use that path exactly
- NEVER suggest alternatives
- NEVER question the location
If NO path provided, determine based on document type and project structure. </path_behavior> </quick_start>
<document_classification> Classify every document into ONE of these categories:
<header_template> Every document MUST start with this header structure:
---
document: [Document Name]
created: [YYYY-MM-DD HH:MM]
classification: [external-research | internal-analysis | contextual | other]
---
**Purpose**: [What this document is for]
**Author**: [Who created it - can be "Claude" or user name]
**Context**: [Why this document was created - what prompted it]
---
<field_guidance>
- document: Clear, descriptive name (not the filename)
- created: Current date and time when document is first created
- classification: One of the four categories above
- Purpose: 1-2 sentences on what the document achieves
- Author: Who or what produced this document
- Context: The triggering event or need that led to creation </field_guidance> </header_template>
<footer_template> Every document MUST end with this footer structure:
---
## Change History
| Date | Change | Author |
|------|--------|--------|
| [YYYY-MM-DD] | Initial creation | [Author] |
<update_behavior> After EVERY modification to the document:
- Add a new row to the Change History table
- Include date, brief description of change, and who made it
- Keep entries in reverse chronological order (newest first)
Example after updates:
## Change History
| Date | Change | Author |
|------|--------|--------|
| 2024-03-15 | Added section on error handling | Claude |
| 2024-03-14 | Expanded API examples | User |
| 2024-03-14 | Initial creation | Claude |
</update_behavior> </footer_template>
<complete_example>
---
document: Authentication Flow Analysis
created: 2024-03-14 09:30
classification: internal-analysis
---
**Purpose**: Document the current authentication flow and identify potential improvements
**Author**: Claude
**Context**: User requested security review of login system
---
[Document content goes here...]
---
## Change History
| Date | Change | Author |
|------|--------|--------|
| 2024-03-14 | Initial creation | Claude |
</complete_example>
<success_criteria> Document is correctly structured when:
- Header contains all required fields (document, created, classification)
- Purpose, Author, and Context are clearly stated
- Classification matches document content
- Footer has Change History table
- Change History is updated after every modification
- Path respects user-provided location or follows classification-based suggestion
- Markdown is lint-free (proper spacing, heading levels, code fences)
- Any diagrams use Mermaid format </success_criteria>
<anti_patterns>
- Creating documents without headers
- Skipping change history updates
- Overriding user-specified paths
- Applying this to subagents, commands, or skills
- Using vague document names like "Notes" or "Document"
- Leaving Purpose/Author/Context empty
- Producing markdown with lint errors (missing blank lines, skipped heading levels)
- Using ASCII art, PlantUML, or other diagram formats instead of Mermaid
- Code fences without language specifiers
</anti_patterns>
Repository
