update-markdown-file-index — GitHub Copilot skill: files index
Updates a Markdown list or table with files from a selected folder. Use it to keep a project directory index in sync with its contents.
npx skills add github/awesome-copilot --skill update-markdown-file-indexWhat update-markdown-file-index does
The skill reads a target Markdown file, finds files in a specified folder that match a pattern, then updates the relevant index section. If there is no section to update, it adds one. The format depends on the file types and the document structure: a list, a table, or groups by category.
Entries can include a filename, type, and description. Descriptions come from a comment or heading when available; file size and modification date are optional. The skill sorts files alphabetically, uses relative paths, and validates the Markdown syntax. Install it when you want an agent to maintain a directory index; it is unnecessary for a one-off file list that does not need to go into a document.
What it helps with
- refresh a file table after folder changes
- add a list of Markdown files to a README
- group directory contents by file type
- replace outdated links in an index section
Example prompts for the agent
- Update the file index in `README.md` for the `docs` folder using the `*.md` pattern.
- Find files in `src` and update the relevant section in `CONTRIBUTING.md`.
- Add a table of files from `scripts` to `README.md` using the `*.py` pattern.
How to install update-markdown-file-index
1Skills CLI (Vercel)
npx skills add github/awesome-copilot --skill update-markdown-file-index2GitHub CLI
gh skill install github/awesome-copilot update-markdown-file-index3Manually: put the files in place
.github/skills/update-markdown-file-index/SKILL.md1Skills CLI (Vercel)
npx skills add github/awesome-copilot --skill update-markdown-file-index -a claude-code2Manually: put the files in place
~/.claude/skills/update-markdown-file-index/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/update-markdown-file-index/
Manually: put the files in place
.agents/skills/update-markdown-file-index/SKILL.mdFor all projects use ~/.agents/skills/
Manually: put the files in place
.cursor/skills/update-markdown-file-index/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
Platform CLI
gemini skills install https://github.com/github/awesome-copilot --path skills/update-markdown-file-indexManually: put the files in place
.devin/skills/update-markdown-file-index/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
From the same set554
The whole set →Similar
Questions about update-markdown-file-index
How do I install update-markdown-file-index in GitHub Copilot?
Run npx skills add github/awesome-copilot --skill update-markdown-file-index or gh skill install github/awesome-copilot update-markdown-file-index.
What does update-markdown-file-index do?
It scans a chosen folder and creates or updates a file index in a Markdown document, as a list, table, or set of category groups.
How does the skill choose the index format?
It uses the file types and existing document structure to choose between a simple list, a table, or category groups.
Source text
SKILL.md · MIT
---
name: update-markdown-file-index
description: 'Update a markdown file section with an index/table of files from a specified folder.'
---
# 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
```markdown
## Files in ${folder}
- [filename.ext](path/to/filename.ext) - Description
- [filename2.ext](path/to/filename2.ext) - Description
```
### Option 2: Detailed Table
```markdown
| 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
© github · MIT · github/awesome-copilot