Skip to content

fix: skillnet-ai 0.1.x compatibility (JSON output, download layout, analyze flags) - #1

Merged
fatihmert merged 1 commit into
mainfrom
fix/skillnet-ai-0.1
Sep 26, 2026
Merged

fatihmert merged 1 commit into
mainfrom
fix/skillnet-ai-0.1

Conversation

@fatihmert

Copy link
Copy Markdown
Contributor

Summary

skillnet-ai 0.1.x changed the CLI in ways that break several tools. This PR adapts the server to 0.1.2:

  • Search and download: results are read from --json ({ok, data, error}) instead of regex-scraping the rich table. CLI errors now come back with their message and hint (e.g. Destination exists; use --overwrite).
  • import_best_skill / get_skill_rules: the CLI writes a skill to <target>/<skill-name>/, so both tools listed the target directory, found no SKILL.md, and answered "No .md documentation found". They now use the path the download reports, and existing caches are resolved the same way.
  • analyze_skills: --save/--no-save were removed in 0.1.x, so the tool now takes output_dir and force.
  • download_skill: new overwrite option. The token is now handed over as GITHUB_TOKEN instead of -t <token>, which keeps it out of the process list (the CLI's own help recommends this).
  • health_check: uses skillnet doctor --json and reports the CLI version. A new SKILLNET_BIN variable points at a CLI outside PATH, e.g. a uv tool install.
  • Version 1.4.0. The lockfile's stale root metadata (1.0.0/ISC) now matches package.json.

Testing

  • npm test: 19 passed. New tests cover JSON parsing, result formatting and skill-folder resolution. Command-builder expectations are updated.
  • Stdio smoke test against the real CLI (skillnet-ai 0.1.2):
    • health_check and search_skills succeed.
    • import_best_skill and get_skill_rules with topic pdf download to .temp_skills/pdf/summarize/SKILL.md and return its content. Before this change they returned "No .md documentation found".
  • Known upstream issue, not fixed here: for some topics the top-ranked skill lives in a repository that has since moved. The CLI does not follow GitHub's 301 and fails with GitHub API Error [301]. The tool now reports that error cleanly.

🤖 Generated with Claude Code

- Read search/download results from --json ({ok, data, error}) instead of scraping the table
- import_best_skill/get_skill_rules: use the downloaded path (<target>/<skill-name>/) so SKILL.md is found
- analyze_skills: replace removed --save/--no-save with output_dir and force
- download_skill: overwrite option; token passed as GITHUB_TOKEN, not on the command line
- health_check via `skillnet doctor --json`; SKILLNET_BIN for CLIs outside PATH

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@fatihmert
fatihmert merged commit 36a57a9 into main Sep 26, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants