feat(skill-search): gh parity — stars, interactive install, sort, limit fix#400
Merged
Conversation
…it fix
- Add `stars` field to `SkillSearchItem` by batch-fetching `/repos/{owner}/{repo}`
in parallel after code search; sorted descending so popular skills rank first
- Add interactive install mode in TTY: filter-as-you-type autocomplete lets users
narrow results and install a selected plugin without leaving the CLI
- Fix final output limit: `--limit` now caps total merged results (previously it
only capped per-query results, so 4 queries × 30 = ~120 raw items could appear)
- Change default limit from 30 to 15 to match gh
- Fix case-insensitive SKILL.md detection in `parseSkillPath` so `skill.md`,
`SKILL.MD`, etc. don't leak into skill names as false path segments
- Update metadata: description, expectedOutput, outputSchema (add stars/namespace),
default limit doc
- Update test fake-fetch helper to handle `/repos/` star-fetch calls (returns 0
by default so existing assertions are unchanged)
Investigation: allagents returns more results than gh because it runs up to 4
parallel Code Search queries (path, hyphen, owner, content) while gh uses a single
query. The multi-query strategy surfaces path-nested skills (cargowise use case)
but also brings in false positives from content-only matches. Star sorting
de-prioritizes low-quality results; the limit cap contains total output size.
Deploying allagents with
|
| Latest commit: |
11a5c05
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://bf35e88a.allagents.pages.dev |
| Branch Preview URL: | https://feat-400-skill-search-gh-par.allagents.pages.dev |
…pace extraction Workspace repos that commit synced skill files to .agents/skills/ and .copilot/skills/ output directories appeared as duplicate results in content search (identical SKILL.md content to the originals). - Post-dedup filter drops any result whose path starts with a hidden directory segment (`.agents`, `.copilot`, etc.) - parseSkillPath nsFromPlugin guard now requires `parts[skillsIdx-2] === 'plugins'` before using the pre-skills segment as a namespace, so `.agents` and `.copilot` no longer leak as namespace values
gh skill search always runs four query buckets in order: P1 path: filename:SKILL.md path:<hyphenated> P2 hyphen: filename:SKILL.md <hyphenated> (multi-word only) P3 owner: filename:SKILL.md user:<query> (owner-like query only) P4 primary: filename:SKILL.md <query> Our previous code had removed the path query entirely and placed primary at P1. Restore the path: query as P1 and demote primary to P4. The path query is what surfaces skills like plugins/cargowise/skills/cw-yard/SKILL.md when searching "cargowise" even if the SKILL.md body never mentions "cargowise".
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.
Summary
SkillSearchItemnow includesstars: numberfetched in parallel via/repos/{owner}/{repo}after code search (GitHub Code Search API does not returnstargazers_countin repository objects)gh skill searchbehaviourallagents skill search <query>shows a filter-as-you-type autocomplete after displaying results; selecting a skill prompts for install scope and runs the install + sync inline--limit Nnow caps total merged output. Default changed from 30 → 15 to matchghplugins/cargowise/skills/cw-deploy/SKILL.mdnow correctly yields namespacecargowise(not empty). Guard requiresparts[skillsIdx-2] === 'plugins'before using the pre-skillssegment as namespace.agents/skills/and.copilot/skills/output directories were appearing as duplicate results. Post-dedup filter drops any result whose path starts with a hidden directory segmentInvestigation: why allagents returned workspace repos
Repos that use
allagentscommit synced skill files to.agents/skills/<name>/SKILL.mdand.copilot/skills/<name>/SKILL.md. GitHub Code Search found these because their SKILL.md content is identical to the originals. PreviouslyWiseTechGlobal/KH2_WorkSpaceandWiseTechGlobal/cargowise-ct-linkappeared in results forcw-code-complexity.Fix: post-dedup filter drops items where the first path segment starts with
..Test plan
Green E2E (local build from this branch)