agentleFS
siculosiculo/okf-skills/skills/okf-skill-search/SKILL.md

okf:search

Skill2 starsChanged 5 months agoUnlicenseView on GitHub

Search concepts in an OKF bundle by query, type, tags, or full-text. Usage: /okf:search <query> [type:<Type>] [tags:<tag>,<tag>] [bundle:<path>] [in:title|description|body|all]

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 4 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If $ARGUMENTS is empty, ask the user for a query before proceeding.

    line 19
  2. Very specific:

    Use the bundle: argument if provided, otherwise the current working directory.

    line 29
  3. Very specific:

    Follow okf:_okf-skill-scan-bundle.

    line 33
  4. Distinctive:

    If there are no results:

    line 76
  5. Distinctive:

    After displaying results, offer these actions the user can take:

    line 87
  6. Distinctive:

    Related concepts: if the user selects a result, show its cross-links as further exploration paths.

    line 90
  7. Distinctive:

    If the user selects a result by number, read and display the full concept file (frontmatter + body), formatted as readable markdown.

    line 92

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “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

You are searching an OKF (Open Knowledge Format) bundle for concepts matching the user's query.

1. Parse arguments

$ARGUMENTS may contain, in any order:

  • A free-text query string (the main search terms).
  • type:<value> — filter by exact or partial type match (case-insensitive).
  • tags:<tag1>,<tag2> — filter to concepts that have ALL the listed tags.
  • bundle:<path> — path to the bundle root (default: current working directory).
  • in:title / in:description / in:body / in:all — scope of text search (default: in:all).

If $ARGUMENTS is empty, ask the user for a query before proceeding.

Examples:

  • /okf:search orders — full-text search for "orders"
  • /okf:search revenue type:Metric — find Metrics mentioning revenue
  • /okf:search tags:sales,orders — all concepts tagged both "sales" and "orders"
  • /okf:search freshness in:body bundle:./my-bundle — body-only search in a specific bundle

2. Locate the bundle

Use the bundle: argument if provided, otherwise the current working directory. Verify it is an OKF bundle by checking for at least one .md file with frontmatter.

3. Build the search index

Follow okf:_okf-skill-scan-bundle. Use the returned index as the search index. Do not index index.md or log.md as searchable concepts.

4. Score and rank results

For each concept, compute a relevance score based on:

Match locationWeight
title exact matchHighest
title partial matchHigh
description matchHigh
tags matchMedium
type matchMedium
Body text matchLower

Apply filters first (type:, tags:, in:), then rank by score. Return all matches above a relevance threshold; if no matches exceed the threshold, return the top 5 regardless and note low confidence.

For semantic relevance (e.g., "revenue" matching a concept about "income"), use your language understanding — OKF search is agent-native and does not require exact string matching.

In two-pass mode: score all concepts on frontmatter fields first (Pass 1). Then, for concepts that pass type/tags/title/description filters and may have body matches, read their full body before computing final body-text scores (Pass 2).

5. Display results

Print results in this format:

OKF Search: "<query>"
Bundle: <path>  |  Scanned: <N> concepts
─────────────────────────────────────────
<rank>. [<title>](<bundle-relative path>)
   Type: <type>  |  Tags: <tags>
   <description>
   Match: <where the match was found and a short excerpt>

<rank>. [<title>](<bundle-relative path>)
   …

─────────────────────────────────────────
<N> result(s)  |  Filters: <active filters or "none">
Bundle mode: <full / two-pass (N concepts, threshold 50)>
Skill version : 1.0

If there are no results:

No results for "<query>" in <N> concepts.
Suggestions:
  - Try broader terms
  - Available types: <list all distinct type values in the bundle>
  - Available tags: <list all distinct tags in the bundle>

6. Follow-up

After displaying results, offer these actions the user can take:

  • Open a result: "Type the number of a result to read the full concept."
  • Refine search: "Add type:X or tags:Y to narrow results."
  • Related concepts: if the user selects a result, show its cross-links as further exploration paths.

If the user selects a result by number, read and display the full concept file (frontmatter + body), formatted as readable markdown. Then offer to open related concepts reachable via its cross-links.

7. Write invocation log

Follow okf:_okf-skill-write-log with:

  • skill: okf:search, version: 1.0
  • bundle: absolute path to the bundle root used for this search
  • outcome: success
  • concepts_added: null
  • concepts_updated: null
  • concepts_split: null
  • conflicts: null
  • note: "<N> result(s) for query" using the result count from step 5

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.