agentleFS
AI-ModConAI-ModCon/genesis-skills/skill-search/SKILL.md

skill-search

Skill30 starsChanged 49 days agoBSD-2-ClauseView on GitHub

Load or search a centrally managed skills catalog plus optional user-provided skills. Use when an agent needs either the full list of available skills up front or an iterative search tool for multi-turn discovery without loading the whole catalog into context.

4 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

5 rules. 0 are common, 3 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this helper when an agent needs one of two discovery strategies:

    line 9
  2. Distinctive:

    Use when the agent should search on demand rather than hold the full catalog in context:

    line 22
  3. Very specific:

    Use when the agent should receive the full menu upfront and pick without needing a query.

    line 41
  4. Distinctive:

    After loading the index, load a selected skill's body via the Python API:

    line 53
  5. Very specific:

    If the agent runtime can import Python packages directly, the skill_search package provides:

    line 68

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “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

Skill Search

Use this helper when an agent needs one of two discovery strategies:

  1. Skill search — accept a query and return only the top-k keyword matches. Keeps the full catalog out of context; scales to large catalogs.
  2. Standard progressive disclosure — return a compact index of every skill (name, description, path) upfront, then load the full SKILL.md body for whichever skill the agent selects.

Configuration

  • my_skills_path: optional user-managed skills root. Repeat if more than one user root is needed.

The helper resolves the central catalog in this order: the --central-root flag, then the SKILL_SEARCH_CENTRAL_ROOT environment variable, then a sibling ../skills directory. To make this skill expose the Genesis catalog, symlink skill-search/ into your agent's skills dir and (if it isn't beside skills/) point one of those at the catalog. The alternative — flattening every skill into a client skills directory for direct discovery — is handled by the repo's unpack.sh (./unpack.sh --help).

Skill search

Use when the agent should search on demand rather than hold the full catalog in context:

python scripts/skill_search.py --query "draft a Slurm batch script for a four-GPU job"

With a user-provided skills path and a custom result limit:

python scripts/skill_search.py \
  --query "validate Croissant metadata for an ML dataset" \
  --top-k 3 \
  --my-skills-path /path/to/my/skills

Scoring weights name token matches (×2) over description token matches (×1), with substring bonuses for closer matches. Results with a score below --min-score (default 1) are excluded.

Standard progressive disclosure

Use when the agent should receive the full menu upfront and pick without needing a query. The compact index (names + descriptions + paths, no bodies) is loaded first; the full SKILL.md body is loaded on demand for the selected skill.

python scripts/skill_search.py --load-all

With a user-provided skills path:

python scripts/skill_search.py --load-all --my-skills-path /path/to/my/skills

After loading the index, load a selected skill's body via the Python API:

from skill_search import load_skill_body
body = load_skill_body(selected_skill)

Pass --include-prompt to also receive a pre-formatted <available_skills> XML block suitable for injection into an agent system prompt.

Output

The script returns machine-readable JSON so it can be called directly by agents or host tools. Unreadable catalog entries appear in the skipped array and as warnings on stderr; stdout remains valid JSON.

Python API

If the agent runtime can import Python packages directly, the skill_search package provides:

  • search_payload(query, top_k, min_score, ...) — skill search: returns top-k scored matches
  • progressive_disclosure_payload(...) — standard progressive disclosure: returns compact index of all skills
  • load_skill_body(skill) — load the full SKILL.md body for a selected skill
  • discover_skills(paths) — discover all skills from one or more roots
  • to_prompt(skills) — generate an <available_skills> XML block
  • build_search_callable() — create a reusable search function with pre-configured roots

See README.md for details.

Related Files

  • scripts/skill_search.py
  • README.md

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.