vc-context-discovery

Discovers and loads repository context files by frontmatter routing and keyword matching.

2|Updated Sep 15, 2025
One-click install
npx skills add https://github.com/marsley01/Marsley-Portfolio-Web --skill vc-context-discovery-marsley01
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vc-context-discovery
Source: https://github.com/marsley01/Marsley-Portfolio-Web/tree/main/.agents/skills/vc-context-discovery
Command: npx skills add https://github.com/marsley01/Marsley-Portfolio-Web --skill vc-context-discovery-marsley01

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Agents starting a session often miss the right documentation because context files are scattered across process/context/, development-protocols/, and feature folders. This Skill deterministically discovers every relevant file, extracts only its YAML frontmatter, and routes the agent to the correct domain docs without loading entire files into context. ## Core Features & Use Cases - Frontmatter-only discovery: The discover-context.mjs script walks context, protocol, plan, and feature directories and extracts only leading YAML frontmatter blocks, keeping context windows small. - Keyword-based routing: The --match flag tokenizes a task description and ranks context docs by overlap with their frontmatter keywords, then appends related sibling docs for cross-domain tasks. - Generated routing tables: The --emit-routing and --check-routing flags regenerate and lint the routing tables in all-context.md so the index never drifts from the actual files. - Use Case: At the start of a planning session for an authentication change, run the script with --match "update the user ORM model" to get a ranked list of context docs to read instead of guessing which files apply. ## Quick Start Ask the agent to run node .claude/skills/vc-context-discovery/scripts/discover-context.mjs with your task description to load the relevant context files for this session.

Frequently Asked Questions about vc-context-discovery

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

FAQPage Schema
How do I load the right context files at the start of an agent session?

Run discover-context.mjs with no arguments to list all context, protocol, and plan files with their frontmatter, or pass --feature <name> to include a feature folder. Read only the files the routing output identifies for your task domain.

How do I find context docs when the task does not match the routing table?

Use the --match flag with a natural-language task description, for example --match "update the user ORM model". The script tokenizes the query, ranks docs by frontmatter keyword overlap, and appends related sibling docs.

What frontmatter fields do context files need for routing to work?

Context files need name, description, and a non-empty comma-separated keywords field, plus an optional related list of sibling context slugs. Weak or missing keywords are the main reason a relevant doc never gets routed to.

How do I keep the routing table in all-context.md in sync?

Run discover-context.mjs --emit-routing after any context reorganization to regenerate the tables between the GENERATED:routing markers. Use --check-routing in lint to fail when the block is stale.

What happens if the process/context directory does not exist?

The script never throws on a missing root; it returns empty results and exits 0. It only exits with code 2 for unknown flags or missing flag values.