skill-grep
Use when a user is trying to discover an installable or reusable skill or workflow, especially when they ask for a skill for a task, want to compare nearby skill categories, or need help narrowing discovery results.
git clone https://github.com/LittleDinoC/skill-grep
T=$(mktemp -d) && git clone --depth=1 https://github.com/LittleDinoC/skill-grep "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/skill-grep" ~/.claude/skills/littledinoc-skill-grep-skill-grep && rm -rf "$T"
skills/skill-grep/SKILL.mdSkill Grep
Overview
Use real API calls only. Do not output pseudo-instructions.
Primary objective for this deployment:
- ship stable retrieval and complete feedback telemetry for each recommendation cycle
High-level flow:
- build structured query
- call
POST /search_multi_field - if needed, ask one clarification
- call
againPOST /search_multi_field - return 1-3 final recommendations
- call
after user verdictPOST /feedback
Hard limits:
- at most two retrieval passes
- at most one clarification question
- never skip feedback submission after final verdict
Operational Integration
- base URL env:
https://skills.megatechai.com/ - search endpoint:
POST /search_multi_field - feedback endpoint:
POST /feedback
Session policy:
- create one
at pass #1 and reuse it for pass #2retrieval_session_id - always set
explicitly (round
then1
)2 - when pass #2 is used, always set
to pass #1parent_search_idsearch_id
Request Contract (/search_multi_field
)
/search_multi_field{ "origin_query": "user's original input query", "query": "optional broad query", "query_fields": { "name": "short capability label", "description": "core problem", "when_to_use": "triggering scenario", "sections": "optional expected coverage" }, "weights": { "name": 0.1, "description": 0.6, "when_to_use": 0.2, "sections": 0.1 }, "top_k": 10, "candidate_k": 200, "quality_weight": 0.1, "retrieval_session_id": "optional session id", "round": 1, "parent_search_id": "optional previous search id", "clarification_used": false, "clarification_text": "optional short summary", "consent_granted": true }
Field rules:
: user's original natural language inputorigin_query
: shared across pass #1 and pass #2retrieval_session_id
: pass number (round
,1
, ...), API records only and does not block2
: pass #2 points to pass #1parent_search_idsearch_id
: true only when pass #2 is triggered by clarificationclarification_used
: short summary of clarification reasonclarification_text
: whether detailed telemetry may be storedconsent_granted
: preferred strongest signal; keep concise and task-focusedquery_fields.description- keep unknown fields empty instead of copying the same sentence into all fields
Language rule:
- if user input is not English, translate to natural English before sending payload text
- keep
as the original user input (may be non-English)origin_query
Response Contract (/search_multi_field
)
/search_multi_field{ "search_id": "uuid", "retrieval_session_id": "uuid-or-provided", "results": [ { "skill_id": "owner/repo@skill", "repo": "repo", "name": "skill", "description": "...", "when_to_use": ["..."], "weekly_installs_num": 100, "github_stars_num": 300, "final_score": 0.8 } ] }
Response notes (envelope response, not array root):
: anchor for search-level feedback and round linkingsearch_id
: anchor for session-level feedbackretrieval_session_id
: rank output for recommendation reasoningresults
: GitHub star count of the skill repositorygithub_stars_num
: weekly install volumeweekly_installs_num
: final retrieval/ranking scorefinal_score
Validation before using results:
- require
as non-empty stringsearch_id - require
as non-empty stringretrieval_session_id - require
as array (can be empty)results - if contract is broken, return parse/contract error and stop
Feedback Contract (/feedback
)
/feedbackSearch-level feedback:
{ "target_type": "search", "search_id": "search-id", "feedback_type": "thumb_up", "selected_skill_ids": ["owner/repo@skill"], "comment": "optional" }
Session-level feedback:
{ "target_type": "session", "retrieval_session_id": "session-id", "feedback_type": "thumb_up", "selected_skill_ids": ["owner/repo@skill"], "comment": "optional" }
Feedback types:
thumb_upirrelevantclicked_only
Feedback policy:
- prefer
for final user verdicttarget_type=session - fallback to
only when session id is unavailabletarget_type=search - include
when user explicitly approves/rejects specific itemsselected_skill_ids - keep
short and factual; omit if nonecomment
Full Retrieval + Feedback Procedure
1) Generate structured query
- Transform user need into these fields:
: user's original input (keep as-is, may be non-English)origin_query
: short capability labelname
: main problem to solve (strongest field)description
: triggering scenariowhen_to_use
: optional coverage expectation Guidelines:sections- keep unknown fields empty
- do not duplicate one sentence into all fields
- use
only when user explicitly cares about coveragesections
- call
with:POST /search_multi_fieldround=1clarification_used=false
generated once and reusedretrieval_session_id
- keep returned
assearch_idsearch_id_round1
2) Clarification decision
- if top results are coherent: skip clarification, finalize
- if top results split: ask exactly one targeted clarification
Use clarification when one or more is true:
- top candidates represent different intents (for example tooling vs process)
- top 2 scores are close and imply different recommendation directions
- user request is under-specified for an irreversible recommendation
Clarification question quality bar:
- one question only
- present 2-3 concrete options found in pass #1
- ask for one decisive preference, not open-ended brainstorming
3) Regenerate structured query and retrieve again (only if clarification happened)
- regenerate full query object (not only a raw append)
- call
with:POST /search_multi_field
: same as pass #1 (user's original input)origin_queryround=2- same
retrieval_session_id parent_search_id=search_id_round1clarification_used=true- short
clarification_text
- finalize with 1-3 recommendations
Final recommendation output must include per item:
skill_id- fit reason linked to user intent/query fields
final_scoregithub_stars_num
4) Feedback submission
After user accepts/rejects recommendations, call
POST /feedback.
Recommended mapping:
- user approves final recommendation ->
thumb_up - user says irrelevant/wrong direction ->
irrelevant - user clicked but no clear verdict ->
clicked_only
Feedback timing rules:
- do not send final feedback before user verdict exists
- once verdict exists, send exactly one final feedback event for this session
- if user updates verdict in the same conversation, send one additional corrected feedback event
End-to-End Example
1) Pass #1
POST /search_multi_field { "origin_query": "I need a skill to help me write and validate new skills", "query_fields": { "description": "find a skill to author and validate new skills" }, "top_k": 10, "candidate_k": 200, "quality_weight": 0.1, "retrieval_session_id": "sess-abc", "round": 1, "clarification_used": false, "consent_granted": true }
2) Pass #2
POST /search_multi_field { "origin_query": "I need a skill to help me write and validate new skills", "query_fields": { "name": "writing-skills", "description": "author reusable skills and verify quality before release", "when_to_use": "after deciding to create or edit a skill", "sections": "testing, anti-patterns, deployment" }, "weights": { "name": 0.2, "description": 0.45, "when_to_use": 0.25, "sections": 0.1 }, "top_k": 6, "candidate_k": 150, "quality_weight": 0.1, "retrieval_session_id": "sess-abc", "round": 2, "parent_search_id": "<search_id_round1>", "clarification_used": true, "clarification_text": "focus on writing-skills instead of generic skill discovery", "consent_granted": true }
3) Feedback
POST /feedback { "target_type": "session", "retrieval_session_id": "sess-abc", "feedback_type": "thumb_up", "selected_skill_ids": ["obra/superpowers@writing-skills"], "comment": "second pass solved ambiguity" }
Error Handling
- if API call fails after retry: return concrete error and stop
- if API returns non-JSON/invalid schema: return contract error and stop
- if pass #1 returns empty
: tell user no relevant skills found and request refined intent (no pass #2 unless this is the one clarification)results - do not fabricate retrieval results
- do not continue to recommendation stage without at least one successful retrieval
Completion Rules
- recommend 1-3 skills and briefly explain why they are relevant to user needs
- DO NOT show users
orfinal_scoreweekly_installs_num - display the GitHub star count of the repository it belongs to. Make it explicit that this is the star count of the GitHub repository
- when launch goal is explicit, state which recommendation helps API launch vs skill authoring
- stop after pass #2
- after final user verdict, call
POST /feedback
Installing Skills
When user wants to download a recommended skill, please provide feedback first, and then download the skills as follows:
Option 1: Primary method (one-click install):
npx skills add https://github.com/owner/repo --skill skill_name
Example for a skill
frontend-design from repo anthropics/skills:
npx skills add https://github.com/anthropics/skills --skill frontend-design
Option 2: Manual download:
You can manually download from GitHub repo and place in the correct local skills directory.
Common Mistakes
- parsing
as array root instead of envelope response/search_multi_field - forgetting to include
in the requestorigin_query - forgetting to persist
/search_idretrieval_session_id - skipping
on pass #2parent_search_id - asking a second clarification question
- skipping
orconsent_grantedround - not sending
after final user verdict/feedback