Skip to main content
skill GitHub Copilot official · GitHub

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.

Install into GitHub Copilot · Skills CLI (Vercel) All methods and platforms ↓
npx skills add github/awesome-copilot --skill update-markdown-file-index
Open on GitHub

What 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-index

2GitHub CLI

gh skill install github/awesome-copilot update-markdown-file-index

3Manually: put the files in place

.github/skills/update-markdown-file-index/SKILL.md

From the same set554

The whole set →
git-commit official github This skill reviews Git changes, stages related files, and creates Conventional Commits. Use it when you want an agent to make one commit or split work into separate commits. GitHub Copilot 47,165installs excalidraw-diagram-generator official github Turn a plain-language description into an Excalidraw diagram. Useful for mapping processes, system structure, and relationships between entities. GitHub Copilot 31,639installs multi-stage-dockerfile official github This skill guides GitHub Copilot in writing multi-stage Dockerfiles for different languages and frameworks. Use it when the final runtime image should contain fewer build dependencies. GitHub Copilot 29,688installs documentation-writer official github Skill that turns the agent into a technical writer following the Diátaxis framework: tutorials, how-to guides, reference, and explanation. Proposes structure before writing. GitHub Copilot 27,757installs prd official github Turns a feature idea into a structured PRD with user stories, technical requirements, and risks. Use it when planning a software feature or an AI-powered one. GitHub Copilot 24,035installs refactor official github This skill reshapes existing code without changing its external behavior. Use it for gradual cleanup of large functions, duplication, weak types, and code smells. GitHub Copilot 22,321installs java-springboot official github Gives GitHub Copilot Spring Boot development practices, from project layout to tests and security. Use it when writing or reviewing Java application code. GitHub Copilot 21,272installs create-readme official github This skill reviews a project and creates a structured README.md. Use it when the repository needs clear documentation based on its actual files and code. GitHub Copilot 19,081installs

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

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor