SkillNet icon indicating copy to clipboard operation
SkillNet copied to clipboard

/v1/search returns duplicate skill_name rows for the same skill across repos

Open ether-btc opened this issue 2 months ago • 3 comments

Summary

/v1/search returns multiple rows for the same skill name in a single page, pointing at different repositories and carrying different stars values. A caller that treats the page as a ranked list of distinct skills gets duplicates it cannot distinguish without fetching each URL.

Reproducible: q=backtesting&mode=keyword&limit=20 returns 20 rows with 20 distinct URLs, but backtesting-frameworks appears twice as the top two results, with stars 32682 and 29553.

Steps to reproduce

curl -s "http://api-skillnet.openkg.cn/v1/search?q=backtesting&mode=keyword&limit=20"

Rows 1 and 2:

{"skill_name":"backtesting-frameworks","stars":32682,
 "skill_url":"https://github.com/wshobson/agents/blob/87231b8.../plugins/quantitative-trading/skills/backtesting-frameworks"}
{"skill_name":"backtesting-frameworks","stars":29553,
 "skill_url":"https://github.com/sickn33/antigravity-awesome-skills/blob/418982e.../skills/backtesting-frameworks"}

Second reproduction, different query:

curl -s "http://api-skillnet.openkg.cn/v1/search?q=prompt+injection&mode=keyword&limit=20"

PromptInjection appears twice (stars=9762 both times) at two paths within the same Security skill tree.

If the index is intentionally repo-scoped — i.e. one row per (skill, repo) pair, which is reasonable — then this is working as designed and the issue is that the response does not expose that. A consumer has no field to group or dedupe on beyond the raw name string.

Expected behavior

Either:

  • rows are unique per skill (one canonical entry per skill_name), or
  • the response makes repo-scoping explicit (e.g. a repo field, or a documented statement in the API reference that skill_name is not unique and callers should dedupe on skill_name + repository).

The second is a documentation change; the first is a backend dedupe.

Actual behavior

Duplicate skill_name values within one page of results, with conflicting stars. A consumer picking "the top result" and a consumer picking "the top distinct skill" get different answers from the same response.

Why this is not a config artifact

Default settings, min_stars=0, sort_by=stars, page=1, unauthenticated, no model key. Repeating the identical request returns a byte-identical body (sha256 prefix f95b5ffbe3f080d5 across two runs), so it is deterministic, not a transient or load artifact.

Correction to a claim I nearly filed

An earlier draft of this report claimed a single repository filled 15 of 20 rows. On re-checking with a strict distinct-URL count, all 20 returned rows have distinct skill_url values. That claim was wrong and has been removed. The real, verified defect is the duplicate skill_name above, which is narrower but reproducible.

Additional observations from the same sweep

Not blockers, but possibly useful:

  1. Vector mode is intermittently unavailable. Across three identical vector requests I got 504 once and 200 twice. The SDK and CLI surface this correctly as an error (raise_for_status() → SkillNetError → _fail), so it is not a silent-failure issue — it reads as backend capacity behind nginx. Related to the earlier 502 reports (#28, #31).

  2. No license field in the response. Rows are {author, category, evaluation, skill_description, skill_name, skill_url, stars}. For a discovery surface feeding an install decision, license is fairly load-bearing. Happy to file separately if you'd prefer it tracked on its own.

  3. Ranking is star-ordered, not relevance-ordered. With sort_by=stars, a very popular but off-topic repo outranks on-topic lower-star skills. Long natural-language queries ("walk-forward backtesting with transaction cost accounting") returned almost entirely off-topic rows, while short keyword queries for the same capabilities returned on-topic results (backtesting-frameworks, backtests). This reads as expected keyword-search behavior rather than a bug, so I am not filing it as one — but callers should use short keywords, and the docs may be worth a note.

Environment

  • zjunlp/SkillNet @ b67c88a8942958c36bcf6baedbd47f303be9998d
  • skillnet-ai 0.1.2 (pyproject.toml)
  • Unauthenticated public search, no LLM key configured
  • No SDK install; all reproduction via curl against the public endpoint

ether-btc avatar Sep 25 '26 16:09 ether-btc

Thanks for the detailed report and helpful suggestions! We’ve reproduced the behavior and are working on addressing it. We appreciate your feedback and will post an update here once the changes are ready.

Icarus-Chen avatar Sep 25 '26 16:09 Icarus-Chen

Thanks for the detailed report and helpful suggestions! We’ve deployed an update to make the source of each search result clearer:

  • API: responses now include repo_name and skill_dir, identifying the source repository and directory.
  • SDK/CLI: skillnet-ai 0.1.3 preserves these fields in Python and JSON output, and the CLI displays the repository and directory beneath each skill name.

We verified both examples: the two backtesting-frameworks entries can now be distinguished by repository, and the two PromptInjection entries by version directory. The search docs also explain these fields and clarify that stars reflect the source repository’s star count at collection time.

Distinct source entries remain separate, and no new request parameters are needed. To upgrade:

pip install -U skillnet-ai

Thanks again for helping us improve SkillNet!

Icarus-Chen avatar Sep 26 '26 07:09 Icarus-Chen

hi do you have any further issue?

zxlzr avatar Sep 26 '26 13:09 zxlzr