SkillNet icon indicating copy to clipboard operation
SkillNet copied to clipboard

client.download() fails for GitHub tree URL: "No matching files found or API error." (blob and tree both fail)

Open Ruofei-personal opened this issue 8 months ago • 1 comments

Environment

  • skillnet-ai version: 0.0.13 (or run pip show skillnet-ai for your version)
  • Python: 3.x
  • OS: macOS

Description

When calling SkillNetClient().download() with a valid GitHub tree URL (directory link), the call fails with an internal message "No matching files found or API error." and then raises SkillNetError: Download returned None. Check URL validity or permissions. The same URL opens correctly in the browser. Using a blob URL for the same path fails the same way.

So the failure is not specific to blob vs tree: even the documented tree format does not work for this repository/path.

Steps to reproduce

from skillnet_ai import SkillNetClient

client = SkillNetClient()

# 1) blob URL (e.g. copied from browser)
blob_url = "https://github.com/openclaw/skills/blob/679eb130055ea10e255d133355c698f4b93edcea/skills/panniantong/agent-reach"
result_blob = client.download(url=blob_url, target_dir="./test_blob")
# Fails: "No matching files found or API error." → SkillNetError

# 2) tree URL (documented format)
tree_url = "https://github.com/openclaw/skills/tree/679eb130055ea10e255d133355c698f4b93edcea/skills/panniantong/agent-reach"
result_tree = client.download(url=tree_url, target_dir="./test_tree")
# Also fails: "No matching files found or API error." → SkillNetError

Expected

Either the skill is downloaded and download() returns the local path, or The failure reason is clear: e.g. "only skills from SkillNet index are supported" or "GitHub API error: ..." instead of a generic "Download returned None" after "No matching files found or API error."

Ruofei-personal avatar Mar 17 '26 11:03 Ruofei-personal

Hello @Ruofei-personal,

Thank you for reporting this issue.

We have identified that the root cause was related to the GitHub Tree API's truncation limits when dealing with large repositories (like openclaw/skills). We have since refactored the SkillDownloader to solve such problem.

Resolution

Please upgrade to the latest version of skillnet-ai to apply the fix:

pip install -U skillnet-ai

Troubleshooting & Performance

If you still encounter issues after upgrading, we recommend checking the following:

  1. Network Connectivity: Ensure your environment can successfully connect to GitHub API and there are no proxy/network issues preventing access.
  2. Rate Limiting (Recommended): If you hit GitHub's anonymous rate limit (GitHub API Error [403]: API rate limit exceeded for IP_ADRESS), we highly recommend setting a GITHUB_TOKEN:
    from skillnet_ai import SkillNetClient
    client = SkillNetClient(github_token="your_personal_access_token")
    

Please let us know if this resolves the issue on your end. We welcome any further feedback or suggestions!

Best regards, The SkillNet Team

LiamLYYY avatar Mar 17 '26 13:03 LiamLYYY