Skillex indexing and resolution
Build a local skill registry and retrieve guidance for a specific workspace context.
Registry construction
Skillex indexes repository skills, installed package exports, and project-local packs in SQLite. A refresh rebuilds the registry from the workspace state. Queries use that local index; initial installation may need release downloads.
Package boundaries connect guidance to the dependency version installed for the active scope. Public consumer instructions and private contributor instructions have distinct visibility.
Applicability as a resolution problem
A workspace may contain guidance for several packages, versions, roles, and kinds of work. A useful resolver needs the context in which an actor will apply it: the active project, target path, dependency boundary, and task topic. Authored metadata connects a skill to those conditions.
A package’s consumer instructions can apply to an application that installs it. Contributor instructions apply to work inside the package itself. Version information matters because instructions for another API revision may be misleading even when the package name matches. These boundaries give resolution a defined subject.
The result is guidance to inspect and apply. Retrieving a skill does not execute its instructions or grant authority. The actor needs to read the selected material, assess its relevance to the request, and act within the user’s authorization.
Discovery without a complete inventory in context
The registry retains the larger inventory outside the model’s immediate working context. Queries identify relevant entries; reads bring the selected guidance into the task. This allows a workspace to carry more knowledge than every task needs to consume.
The useful measure is whether the right guidance reaches the actor at the right boundary. Measure selection quality, missing guidance, incorrect scope, stale metadata, and context consumed. A short result is useful only when it retains what the task requires.
Authoring and resolution share a contract
A resolver depends on the quality of its inputs. Clear scope, meaningful topics, version boundaries, and concise instructions make a skill easier to retrieve and use. Broad or inaccurate metadata can activate guidance in the wrong context; overly narrow metadata can hide necessary instructions.
Packs make related capabilities and activation conditions explicit. They allow repository-local knowledge and distributed package guidance to enter a common registry. Detector output is evidence for applicability, with the pack’s declared rules determining its role.
Query and read
After installing Skillex, initialize and refresh the registry:
npx skillex init
npx skillex refresh
npx skillex query --path src/auth.ts
npx skillex query --topic error-handling
Replace the path with a file in your workspace. A query can narrow by path, package, topic, tags, or keyword search. Read the selected skills before acting; their applicability depends on their authored metadata and the workspace context.
MCP clients use the server’s skill query and read tools. The bootstrap tells an agent how to retrieve guidance without placing a complete skill inventory in its conversation.
Example: consuming or changing a package
This hypothetical workspace contains an application using @company/auth at version 3.2 and the package’s contributor source. The table makes the expected scope distinction explicit; it is not a captured query result.
| Task context | Applicable guidance | Excluded guidance |
|---|---|---|
| Configure the provider API from the application | Public consumer skills from the installed 3.2 package, plus application-scoped skills | Private package contributor skills and another application’s version |
| Change the provider abstraction in the package source | Contributor architecture, fixtures, and testing skills for that package | Consumer instructions from an unrelated installed version |
An incorrect path or incomplete metadata can change the selection. Inspect the query result and registry inputs when expected guidance is missing.
Packs
Projects can commit skillex/pack.yaml or manifests under skillex/packs/. Packs describe skills, detectors, activation rules, and scope. Packages and Go modules can distribute manifests alongside their code. Detector-driven activation extends discovery beyond a fixed Node package catalog.
The Packs guide explains both local activation and authorized registry distribution: publisher identity, reviewed versions, signed manifests, content hashes, and revocation. Registry consumer integration is still being completed; local activation does not itself verify a signed release.
Maintaining the index
Refresh after changing dependencies, exports, packs, or skills. skillex refresh --check can detect a stale registry in CI. Query-time resolution does not substitute for authoring accurate scope and version metadata.