Update markdown file index

From mouadja02/skills · View interactive version

Update markdown file index is an AI agent skill from the GitHub repository mouadja02/skills. Updates a section of a Markdown file with an index or table of the files in a given folder. Use when a README or docs page should list the files in a directory and stay current.

How to use this skill

Skill file

Attribution: Sourced from github/awesome-copilot by GitHub Community, licensed MIT. Modified for this collection.

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:

Table Structure Options

Choose format based on file types and existing content:

Option 1: Simple List

## Files in ${folder}

- [SKILL.md](SKILL.md) - Instructions
- [LICENSE](LICENSE) - License terms

Option 2: Detailed Table

| File | Type | Description |

|------|------|-------------|

| SKILL.md | Markdown | Instructions |

| LICENSE | Text | License terms |

Option 3: Categorized Sections

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

Update Strategy

Section Identification

Look for existing sections with these patterns:

Requirements

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.