context-index

Regenerate and validate a YAML index of .context Markdown files from their frontmatter.

Updated Apr 9, 2014
One-click install
npx skills add https://github.com/thoroc/thoroc.github.io --skill context-index-thoroc
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: context-index
Source: https://github.com/thoroc/thoroc.github.io/tree/main/.agents/skills/context-index
Command: npx skills add https://github.com/thoroc/thoroc.github.io --skill context-index-thoroc

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve? Teams keeping plans, findings, and analyses as Markdown files under .context/ lose track of what exists as the folder grows, and pre-commit hooks fail when files lack required YAML frontmatter. This Skill rebuilds .context/index.yaml from the frontmatter of every .context//*.md file and reports files with missing or malformed metadata. ## Core Features & Use Cases - Index regeneration: Scans all .context//*.md files, parses title/type/status/date/related frontmatter, and writes a grouped, sorted index.yaml. - Frontmatter validation: check-context-frontmatter.sh and validate-context-frontmatter.sh detect missing or schema-invalid frontmatter before commits. - Staleness and naming checks: Advisory scripts flag active plans older than a threshold and enforce date-first filename conventions. - Use Case: After adding two new finding files, run the regenerate script so agents querying "what plans exist?" see a complete, current index with zero warnings. ## Quick Start Ask the agent to regenerate the context index and fix any files reported as missing frontmatter.

Frequently Asked Questions about context-index

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I regenerate the .context index after adding new files?▼

Run scripts/regenerate-context-index.sh from the repository root. It scans all .context/**/*.md files, parses their frontmatter, and rewrites .context/index.yaml grouped by type. Files with missing frontmatter are listed on stderr and excluded.

How do I find Markdown files missing YAML frontmatter before committing?▼

Run scripts/check-context-frontmatter.sh with the target files, for example .context/**/*.md. It exits non-zero and lists every file whose first line is not an opening --- delimiter, so you can add the required title, type, status, and date fields.

Can I edit .context/index.yaml by hand to fix an entry?▼

No. The index is fully regenerated by regenerate-context-index.sh, so manual edits are overwritten on the next run. Fix the frontmatter in the source .md file instead, then regenerate the index.

Why are some .context files missing from the generated index?▼

Files with missing or malformed frontmatter are excluded and reported on stderr during regeneration. Run check-context-frontmatter.sh to identify them, add the required fields, then regenerate for a complete index.

What frontmatter fields are required for .context Markdown files?▼

Each file needs title, type, status, and date in its YAML frontmatter, with an optional related list. Type must be one of plan, finding, analysis, follow-up, learning, or handover, and date uses YYYY-MM-DD format.