Repository navigation
feat(search): answer intents and repositories in the search box - #440
Merged
Merged
Conversation
The search box promises skills or repos, but a repo ref fell through to a semantic search and called its own Skills loose matches, and a sentence was searched word by word. A new internal /api/skills/search classifies the query first: a URL or owner/repo answers with that Repository and its Skills, @login with that owner, and a sentence passes through a small Workers AI model that turns it into search terms and soft boosts before the existing hybrid search. The model is cached per normalised query for a month, abandoned after 800ms, skipped for names, refs and URLs, and gated by the guest rate limiter. The frozen v1 skills.search answer is unchanged.
Each Skill row now carries its run chip, and a Repository the registry holds gets its own row, so the box answers both halves of its placeholder. The panel becomes a grid because an option cannot contain a control: arrow right moves to the run chip and Enter copies it. The hero and header boxes share one composable for keys, selection and navigation, so they stop disagreeing about what Enter does. The header field widens while open, rows keep their names readable at phone width, and the preview pane with its empty half is gone.
COPY.md bans AI as a modifier on skilld. The search box now sends sentences to this mode, so its label says what the mode does.
Contributor
🤖 MERGED
GitHub merged this pull request.
Review completed. No finding above 80/100. Selected findings run after merge and open separate pull requests. |
Collaborator
Author
This was referenced Oct 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.






🔗 Linked issue
None.
❓ Type of change
📚 Description
The search box says "Search skills or repos", but it handled neither repos nor intent well.
vercel-labs/agent-skillscame back as "Loose matches: No skill contains those words", although the registry holds that Repository. A pasted GitHub URL only offered to index the repo again. A sentence such as "write a postgres migration" was searched as separate words.The box now calls a new internal
GET /api/skills/search, which classifies the query before it searches:owner/repoanswers with a Repository row and its Skills. A Repository the registry does not hold gets the existing index flow.@loginlists that owner's Skills. A single word runs the existing hybrid search unchanged.@cf/meta/llama-3.1-8b-instruct-fastonce. The model returns search terms plus a track, a framework and an author. The hybrid search then runs on the typed words and the terms. Track and framework only lift near ties. They never filter.Guardrails on the model call:
edge-cache. A reply the model cannot parse is cached as "none" for a day.API_GUEST_RATE_LIMITbinding under asearch-intent:key. Over the limit, search runs on the typed words.The public
skills.searchv1 answer and the MCP tools are unchanged.In the panel, each Skill row shows its
RunChipcompact, and a Repository gets its own row with its Skill count. A name also shows matching Repositories from the typeahead index the browser already holds. The panel is now a grid, because an ARIA option cannot contain a button: Right moves to the run chip and Enter copies it.HomeSearch(the hero from #437) andSkillSearchTriggershareuseSkillSearchBox, so Enter means the same in both: open a row selected with the keyboard, otherwise submit. The header field widens while open, the half-empty preview pane is gone, and owner paths truncate instead of crushing Skill names at phone width."See all results" for a sentence opens
/skillswith its meaning search on. That mode was labelled "Ask AI" and "AI search", whichCOPY.mdbans, so it now reads "Search by meaning" and "Results by meaning".Stage 2, not built
An agent loop could answer what a one-shot rewrite cannot. "stop memory leaks in node" still returns Godot and Tokio Skills, because the embeddings rank them first.
mcpToolsfromlayers/mcp/shared/mcp-tools.tsas its tools (search_skills,get_skill,get_collection). Cap it at 4 turns and let it return Skill refs only.send-digests.ts). A $10 top-up covers about 400 to 650 questions.