update-markdown-file-index
What it does
This tool automatically creates a list or table of files from a specific folder within a text document (Markdown file). It organizes the files, showing their names, types, and descriptions.
When to use it
- ✓When you want to list all project files in a document.
- ✓When creating a README to organize directory documentation.
- ✓To generate an index of code examples in a notes file.
Skill link
https://github.com/github/awesome-copilot/blob/main/skills/update-markdown-file-index/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Create an index of files from the 'documents' folder in my 'README.md' file.”
5 new skills a week. 1 minute to read.
How it works
The AI reads your main file, looks for the folder you specified, lists the files inside it, and creates an organized list or table with information about each file, inserting it into your document.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Update Markdown File Index
Update markdown file ${file} with an index/table of files from folder ${input:folder}.
Process
- Scan: Read the target markdown file
${file}to understand existing structure - Discover: List all files in the specified folder
${input:folder}matching pattern${input:pattern} - Analyze: Identify if an existing table/index section exists to update, or create new structure
- Structure: Generate appropriate table/list format based on file types and existing content
- Update: Replace existing section or add new section with file index
- 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
FAQ
What is a Markdown file?
Markdown is a simple text format that allows you to format text using special characters, like asterisks for bold or lists. It's widely used for documentation on the internet.
How does the AI know which files to list?
You tell the AI which folder to look in. It can also use a 'pattern' to filter which file types to include, such as only '.txt' or '.py' files.
Will the AI delete existing content in my file?
No, the AI tries to be smart. If a file list already exists, it updates that list. If it doesn't exist, it creates a new section for the list without messing up the rest of your document.
Details
Original description by the author
Update a markdown file section with an index/table of files from a specified folder.
repo: github/awesome-copilot
Popularity
- GitHub stars
- 40k
- Ranking position
- #7465
- License
- MIT
- Updated
- 10/15/2026
Comments
- …
More skills from this repository
acquire-codebase-knowledge
40kHelps your agent understand and document an existing code project. It's useful for onboarding new people or getting an overview of the architecture.
acreadiness-assess
40kEnables your agent to assess a project's readiness for AI and generate a report. It's useful for understanding how well a project is prepared to use AI tools.
acreadiness-generate-instructions
40kHelps your agent create instructions for AI tools based on an assessment. It's useful for improving how AI interacts with code and closing identified gaps.
acreadiness-policy
40kEnables your agent to help define or apply policies for AI project assessment. It's useful for standardizing how projects are evaluated and ensuring compliance.
Similar skills
obsidian-vault-maintainer
394kHelps your agent keep an Obsidian-friendly memory vault tidy, with working wiki links, consistent properties, and safe generated sections.
wiki-maintainer
394kHelps your agent maintain an OpenClaw memory wiki with repeatable pages, safe managed blocks, and checks for contradictions or gaps.
obsidian
394kLets your agent read, search, create, and edit Obsidian notes, tasks, links, and properties using the official Obsidian command line.