New to Claude Skills? Learn how to install them β†’

github on GitHub

Update Markdown File Index

OfficialFree

Automatically generate file indexes in markdown.

by github37.7k stars on github/awesome-copilot
1 views
Updated Aug 10, 2026
Get this skill

Free Β· Opens the source repo

What Update Markdown File Index does

The Update Markdown File Index skill provides a streamlined way to enhance your markdown documentation by automatically generating an index or table of files from a specified folder. This skill is particularly useful for developers and designers who maintain projects with multiple files and need to keep their documentation organized and up-to-date. By scanning the target markdown file and the specified folder, the skill identifies existing structures and updates them accordingly or creates new sections as necessary.

The process begins with scanning the target markdown file to understand its existing structure. It then discovers all files in the specified folder that match a given pattern. The skill analyzes whether an index or table section already exists and updates it if found, or creates a new one if not. The generated table or list will include relevant details such as file name, type, description, size, and last modified date, ensuring that users have a comprehensive view of their project files at a glance.

Users can choose from various table structures, including a simple list, a detailed table, or categorized sections based on file types. This flexibility allows for tailored documentation that meets specific project needs. The skill also ensures that markdown syntax is valid and formatting is consistent, preserving the integrity of the documentation throughout the update process.

This skill is ideal for anyone who regularly updates markdown documentation and wants to automate the tedious task of maintaining file indexes. By using this skill, users can save time and reduce the risk of errors, allowing them to focus on more critical aspects of their projects.

When to use it

Use this skill when you need to maintain an up-to-date index of files in a markdown document, especially in projects with many files.

When not to use it

This skill may not be suitable for projects without markdown documentation or for users who prefer manual control over their documentation structure.

What you can build with it

Documenting a Large Project

When managing a large codebase, use this skill to keep your markdown documentation updated with the latest file changes.

Creating a New Documentation Section

If you're starting a new project and need to establish an index from scratch, this skill can create a well-structured file list for you.

Maintaining Consistency in Documentation

For teams working collaboratively, this skill helps maintain consistent documentation by automatically updating file indexes as files are added or removed.

How to install Update Markdown File Index

View source

1. Install with the skills CLI

npx skills add github/awesome-copilot/update-markdown-file-index --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by github

Update Markdown File Index

Update markdown file ${file} with an index/table of files from folder ${input:folder}.

Process

  1. Scan: Read the target markdown file ${file} to understand existing structure
  2. Discover: List all files in the specified folder ${input:folder} matching pattern ${input:pattern}
  3. Analyze: Identify if an existing table/index section exists to update, or create new structure
  4. Structure: Generate appropriate table/list format based on file types and existing content
  5. Update: Replace existing section or add new section with file index
  6. Validate: Ensure markdown syntax is valid and formatting is consistent

File Analysis

For each discovered file, extract:

  • Name: Filename with or without extension based on context
  • Type: File extension and category (e.g., .md, .js, .py)
  • Description: First line comment, header, or inferred purpose
  • Size: File size for reference (optional)
  • Modified: Last modified date (optional)

Table Structure Options

Choose format based on file types and existing content:

Option 1: Simple List

## Files in ${folder}

- [filename.ext](path/to/filename.ext) - Description
- [filename2.ext](path/to/filename2.ext) - Description

Option 2: Detailed Table

| File | Type | Description |
|------|------|-------------|
| [filename.ext](path/to/filename.ext) | Extension | Description |
| [filename2.ext](path/to/filename2.ext) | Extension | Description |

Option 3: Categorized Sections

Group files by type/category with separate sections or sub-tables.

Update Strategy

  • πŸ”„ Update existing: If table/index section exists, replace content while preserving structure
  • βž• Add new: If no existing section, create new section using best-fit format
  • πŸ“‹ Preserve: Maintain existing markdown formatting, heading levels, and document flow
  • πŸ”— Links: Use relative paths for file links within the repository

Section Identification

Look for existing sections with these patterns:

  • Headings containing: "index", "files", "contents", "directory", "list"
  • Tables with file-related columns
  • Lists with file links
  • HTML comments marking file index sections

Requirements

  • Preserve existing markdown structure and formatting
  • Use relative paths for file links
  • Include file descriptions when available
  • Sort files alphabetically by default
  • Handle special characters in filenames
  • Validate all generated markdown syntax

Frequently asked questions about Update Markdown File Index

Similar skills