vlt / docs

  • PricingBenchmarks (opens in new window)Community (opens in new window)Feedback
  • Overview
  • Attribute Selectors
  • Combinators
  • ID Selectors
  • Security Insights
    • Overview
    • :attr()
    • :has()
    • :dist()
    • :host()
    • :is()
    • :not()
    • :outdated()
    • :published()
    • :semver()
    • :spec()
    • :path()
    • :type()
    • :diff()
    • :hostname()
    • :registry()
    • :skill()
  • Syntax
  • Parameters
  • How it works
  • Examples
  • See also
  1. Client
  2. /
  3. Selectors
  4. /
  5. Pseudo-classes
  6. /
  7. :skill()

:skill()

The :skill() pseudo-class picks agent skills by name from the packages its selector matched. It only works in --allow-skills and vlt skills.

Syntax

Text
<selector>:skill(<pattern>[, <pattern>…])

Parameters

ParameterDescription
patternName (find-skills), quoted name ("my skill") or glob (vercel*, *-x)

How it works

  • The selector picks packages as usual. :skill() picks skills inside them and never filters packages.
  • A pattern matches the skill name or the name in its SKILL.md, ignoring case. * matches any run of characters. Quote names with spaces, with double quotes only.
  • A selector without :skill() picks every skill of its packages, the same as :skill(*).
  • :skill(x) alone is *:skill(x). #a :skill(x) picks skill x of every descendant of a; use #a > :skill(x) for its direct dependencies only.
  • It must end a top-level selector: #a:skill(x) > *, #a:skill(x):prod and :not(#a:skill(x)) are errors.
  • Comma lists are a union. :root > *, #skills:skill(find-skills) picks every skill of every direct dependency, skills included. The narrow form is :root > *:not(#skills), #skills:skill(find-skills).
  • A pattern that matches no skill prints a warning; the install still succeeds.
  • Anywhere else (vlt query, vlt ls, --allow-scripts, …) it is an error. Preview a query with vlt skills list '<query>'.
  • :skills (no ()) matches packages that ship skills. :skills(x) is an error (did you mean :skill(x)?) on its own, and matches nothing inside a comma list.

Examples

Link the agent-browser skill of the agent-browser package:

Terminal
$ vlt install --allow-skills='#agent-browser:skill(agent-browser)'

List the matching skills of every direct dependency:

Terminal
$ vlt skills list ':root > *:skill(vercel*, *-review)'

Link skills by glob and by a quoted name:

Terminal
$ vlt skills link '#agent-skills:skill(react*, "my skill")'

See also

  • vlt skills — manage agent skills
  • :not() — exclude packages
  • :skills — packages that ship skills

Previous:registry()NextOverview

On this page

  • Syntax
  • Parameters
  • How it works
  • Examples
  • See also
Edit this page

Deploy your package on vlt.io

Publish scoped and private packages, manage organizations and access, and give every developer and CI environment a consistent source for public and private JavaScript dependencies.

Publish now