agentleFS
pr-pmpr-pm/prpm/.claude/skills/osgrep-skill/SKILL.md

osgrep

Skill124 starsChanged 8 months agoMITView on GitHub

Semantic code search using natural language queries. Use when users ask "where is X implemented", "how does Y work", "find the logic for Z", or need to locate code by concept rather than exact text. Returns file paths with line numbers and code snippets.

We split this skill into the rules it gives an agent

14 rules. About 0 are common, 12 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈12

    Distinctive · estimate

    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 to find code by concept or behavior (e.g., "where is auth validated", "how are plugins loaded").

    line 8
  2. Distinctive:

    Search Broadly First: Use a conceptual query to map the landscape.

    line 20
  3. Distinctive:

    Survey the Results: Look for patterns across multiple files:

    line 22
  4. Distinctive:

    Do file paths suggest different layers (gateway, handlers, utils)?

    line 24
  5. Distinctive:

    Read the main entry point

    line 26
  6. Distinctive:

    Read representative middleware/util files

    line 27
  7. Distinctive:

    Follow imports if architecture is unclear

    line 28
  8. Distinctive:

    Refine with Specific Searches: If one aspect is unclear:

    line 29
  9. Distinctive:

    Search Specifically: Ask about the precise logic.

    line 34
  10. Very specific:

    Crucial: If it ends in ... or cuts off mid-logic, read the file.

    line 38
  11. Distinctive:

    One Search, One Read: Use osgrep to pinpoint the best file, then read it fully.

    line 39
  12. Distinctive:

    Watch for Distributed Patterns: If results span 5+ files in different directories, the feature is likely architectural—survey before diving …

    line 51
  13. Very specific:

    Scope When Possible: Use path constraints to focus: osgrep "auth" src/server/

    line 52
  14. Distinctive:

    "Still Indexing...": If you see this, please stop, alert the user that the index is ongoing and ask them if they wish to proceed.

    line 54

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 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

When to Use

Use this to find code by concept or behavior (e.g., "where is auth validated", "how are plugins loaded"). Note: This tool prioritizes finding the right files and locations in the code. Snippets are truncated (max 16 lines) and are often just previews.

Example:

osgrep "how are plugins loaded"
osgrep "how are plugins loaded" packages/transformers.js/src

Strategy for Different Query Types

For Architectural/System-Level Questions (auth, LSP integration, file watching)

  1. Search Broadly First: Use a conceptual query to map the landscape.
    • osgrep "authentication authorization checks"
  2. Survey the Results: Look for patterns across multiple files:
    • Are checks in middleware? Decorators? Multiple services?
    • Do file paths suggest different layers (gateway, handlers, utils)?
  3. Read Strategically: Pick 2-4 files that represent different aspects:
    • Read the main entry point
    • Read representative middleware/util files
    • Follow imports if architecture is unclear
  4. Refine with Specific Searches: If one aspect is unclear:
    • osgrep "session validation logic"
    • osgrep "API authentication middleware"

For Targeted Implementation Details (specific function, algorithm)

  1. Search Specifically: Ask about the precise logic.
    • osgrep "logic for merging user and default configuration"
  2. Evaluate the Semantic Match:
    • Does the snippet look relevant?
    • Crucial: If it ends in ... or cuts off mid-logic, read the file.
  3. One Search, One Read: Use osgrep to pinpoint the best file, then read it fully.

Output Format

Returns: path/to/file:line [Tags] Code Snippet

  • [Definition]: Semantic search detected a class/function here. High relevance.
  • ...: Truncation Marker. Snippet is incomplete—use read_file for full context.

Tips

  • Trust the Semantics: You don't need exact names. osgrep "how does the server start" works better than guessing osgrep "server.init".
  • Watch for Distributed Patterns: If results span 5+ files in different directories, the feature is likely architectural—survey before diving deep.
  • Scope When Possible: Use path constraints to focus: osgrep "auth" src/server/
  • Don't Over-Rely on Snippets: For architectural questions, snippets are signposts, not answers. Read the key files.
  • "Still Indexing...": If you see this, please stop, alert the user that the index is ongoing and ask them if they wish to proceed. Results will be partial until the index is complete.

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.