Back to Skills

llm-docs-optimizer

verified

Optimize documentation for AI coding assistants and LLMs. Improves docs for Claude, Copilot, and other AI tools through c7score optimization, llms.txt generation, question-driven restructuring, and automated quality scoring. Use when asked to improve, optimize, or enhance documentation for AI assistants, LLMs, c7score, Context7, or when creating llms.txt files. Also use for documentation quality analysis, README optimization, or ensuring docs follow best practices for LLM retrieval systems.

View on GitHub

Marketplace

llm-docs-optimizer-marketplace

alonw0/llm-docs-optimizer

Plugin

llm-docs-optimizer

Repository

alonw0/llm-docs-optimizer
38stars

skills/llm-docs-optimizer/SKILL.md

Last Verified

January 18, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/alonw0/llm-docs-optimizer/blob/main/skills/llm-docs-optimizer/SKILL.md -a claude-code --skill llm-docs-optimizer

Installation paths:

Claude
.claude/skills/llm-docs-optimizer/
Powered by add-skill CLI

Instructions

# LLM Docs Optimizer

This skill optimizes project documentation and README files for AI coding assistants and LLMs like Claude, GitHub Copilot, and others. It improves documentation quality through multiple approaches: c7score optimization (Context7's quality benchmark), llms.txt file generation for LLM navigation, question-driven content restructuring, and automated quality scoring across 5 key metrics.

**Version:** 1.3.0

## Understanding C7Score

C7score evaluates documentation using 5 metrics across two categories:

**LLM Analysis (85% of score):**
1. **Question-Snippet Comparison (80%)**: How well snippets answer common developer questions
2. **LLM Evaluation (5%)**: Relevancy, clarity, correctness, and uniqueness

**Text Analysis (15% of score):**
3. **Formatting (5%)**: Proper structure and language tags
4. **Project Metadata (5%)**: Absence of irrelevant content
5. **Initialization (5%)**: Not just imports/installations

For detailed information on each metric, read `references/c7score_metrics.md`.

## Core Workflow

### Step 0: Ask About llms.txt Generation (C7Score Optimization Only)

**IMPORTANT**: When the user requests c7score documentation optimization, ALWAYS ask if they also want an llms.txt file:

Use the `AskUserQuestion` tool with this question:

```
Question: "Would you also like me to generate an llms.txt file for your project?"
Header: "llms.txt"
Options:
  - "Yes, create both optimized docs and llms.txt"
    Description: "Optimize documentation for c7score AND generate an llms.txt navigation file"
  - "No, just optimize the documentation"
    Description: "Only perform c7score optimization without llms.txt generation"
```

**If user chooses "Yes"**:
- Proceed with c7score optimization workflow (Steps 1-5)
- Then follow the llms.txt generation workflow
- Provide both optimized documentation AND llms.txt file

**If user chooses "No"**:
- Proceed with c7score optimization workflow only (Steps 1-5)

**Note**: If the user explicitly requests ONLY

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
20743 chars