agentleFS
vladcheckvladcheck/agentic/skills/create-glossary/SKILL.md

create-glossary

Skill1 starsChanged 10 days agoMITView on GitHub

Use this skill when you want to create a glossary of files in current working directory

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Not for: API docs (use doc generators) or cases where plain tree output suffices.

    line 17
  2. Distinctive:

    Verifying one link in a browser: Run the decode-and-exists script over ALL hrefs.

    line 54
  3. Distinctive:

    Every href percent-encoded and mechanically verified (0 broken).

    line 60

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Create Glossary

Overview

Build a single self-contained HTML page listing links to all content files in the working directory, recursively, grouped by folder and in reading order. Links must actually resolve — a glossary with broken links is worse than none.

When to Use

  • User asks for a "glossary", "index", "contents page", or "список ссылок" of files/folders
  • Course repos, lesson dumps, document collections needing a navigable index

Not for: API docs (use doc generators) or cases where plain tree output suffices.

Core Pattern

  1. Scan recursively. Include content files (.html, .pdf, .mp4); exclude the glossary file itself, dotfiles (.DS_Store), and junk. Add supplementary files (code snippets, zips) only if asked.
  2. Order numerically, not lexicographically. Sort by the integer in each filename, so 1, 2, 10 never becomes 1, 10, 2. Don't rely on zero-padding.
  3. Group by top-level folder (h2), then subfolder (h3). Use <ol> for ordered items.
  4. Clean display titles: strip vendor prefixes ([Brand] ), the numeric sort key, extension, trailing spaces. Clean group headings too.
  5. Percent-encode every href with a script, never by hand. Python: urllib.parse.quote(path, safe='/') — encodes spaces (%20) and brackets (%5B %5D), keeps Cyrillic literal. Raw spaces/brackets in href are invalid HTML; browsers tolerate them on file://, but parsers and copied links break.
  6. Verify mechanically, not by eye. Decode every href and assert the file exists:
import re, urllib.parse, pathlib, sys
root = pathlib.Path('.')
html = (root / 'glossary.html').read_text(encoding='utf-8')
hrefs = [h for h in re.findall(r'href="([^"]+)"', html) if not h.startswith('#')]
broken = [h for h in hrefs if not (root / urllib.parse.unquote(h)).exists()]
print(f'{len(hrefs)} links, {len(broken)} broken')
sys.exit(1 if broken else 0)  # fix and re-run until 0 broken
  1. Relative paths only — the glossary must survive the folder being moved or zipped.

Quick Reference

ProblemFix
Link 404s after clickhref not encoded — rebuild with urllib.parse.quote
1, 10, 2 ordersort by integer from filename, not string
Glossary lists itselfexclude output filename during scan
Ugly titlesstrip prefix + number + extension + trailing space

Common Mistakes

  • Raw hrefs with spaces/brackets. [Course] 01 Intro .html as a literal href is invalid HTML — encode: %5BCourse%5D%2001%20Intro%20.html. Note the trailing space before .html: encode it (%20.html), never trim the filename.
  • Lexicographic sort. String sort puts 10 before 2. Parse the number.
  • Listing the glossary itself on re-runs, plus dotfiles like .DS_Store. Filter by extension allowlist and output-name exclusion.
  • Verifying one link in a browser. Run the decode-and-exists script over ALL hrefs; one broken out of a hundred is still a failure.
  • Absolute paths (/Users/..., file://) — break when the folder moves.
  • Guessing filenames instead of scanning. Real dumps have inconsistent naming (QA-сессия vs QA - сессия, stray double spaces). Read the filesystem, never retype names.

Definition of Done

Every href percent-encoded and mechanically verified (0 broken); groups in folder order, items in numeric order, titles cleaned; single self-contained file, relative links only.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.