Index of every page on this site: llms.txt
All skills
github avatar

/update-markdown-file-index

@f10fdb8 official
by githubgithub/awesome-copilot42k stars
5,426
Run it yourself

Update a markdown file section with an index/table of files from a specified folder.

Use this Skill: https://skilld.dev/gh/github/awesome-copilot/update-markdown-file-index

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈28 tokens for metadata: the name and description. ≈634 when used: this file.

Description uses 1.4% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈113 characters, or 1.4%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

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

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts1mo5 checks · Risk SAFE
  • Gen Agent Trust Hub2mo

    The skill is functional for updating markdown file indexes but contains a vulnerability to indirect prompt injection. By extracting and processing file descriptions from the contents of local files without sanitization or boundary markers, a malicious file could potentially influence the agent's behavior during the indexing process.

  • Socket1mo

    No alerts

  • Snyk1mo

    Risk: LOW · No issues

  • Runlayer9mo

    1 file scanned · No issues

  • ZeroLeaks7mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at f10fdb8. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 4 days ago.

Activeupdated 4 months ago
  • Documentation
  • markdown
  • index
  • file-listing
  • table-generation
  • automation

README badge

README badge for github/awesome-copilot/update-markdown-file-index

Generates or updates a markdown file index by scanning a specified folder, extracting file metadata, and inserting a formatted table or list into the target markdown. Useful for maintaining auto-generated file listings in README files or documentation indexes.

Generated from the current SKILL.md.

What markdown file does this skill update?
The skill updates a markdown file you specify via `${file}`, scanning it first to find an existing index/table section or creating a new one if none exists.
How does the skill decide between list, table, or categorized format?
The skill chooses the format based on file types discovered and existing content structure in the target markdown file — it aims to match or improve upon what's already there.
What file metadata does the skill extract?
The skill extracts filename, file type/extension, description (from first-line comments or headers), and optionally file size and modification date.
Does this skill handle special characters in filenames?
Yes. The skill is designed to handle special characters in filenames and will validate markdown syntax after generation.
Can I filter which files get indexed?
Yes. You specify a folder via `${input:folder}` and optionally a file pattern via `${input:pattern}` to control which files are discovered and included.

Generated from the current SKILL.md. These answers refresh after source changes.