Skills Management · recorded 2026-08-29 · applies to 1 tool(s) ✓ Verified

Problem: Official CLI install fails: GitHub clone reset/stuck (common in CN) —— Trove problem library

Verified 2026-08-29official CLI install fails on GitHub clone reset — use option B: fetch the codeload tarball via gh-proxy and copy manually (works in China, tested).

Quick fix

# One-liner: method B (recommended in CN, measured working) — pull the codeload tarball via gh-proxy, extract, copy by hand
curl -sL https://gh-proxy.com/https://codeload.github.com/addyosmani/agent-skills/tar.gz/refs/tags/0.6.7 | tar xz && cp -r agent-skills-0.6.7/skills ~/.claude/skills/agent-skills

0.6.7 is the currently recorded version; swap the tag when upgrading.

What you will run into

Running npx -y skills add addyosmani/agent-skills --yes --global hangs at "Cloning repository…" and then fails with fatal: unable to access ... Connection reset by peer / "Installation failed".

The trap: the CLI still exits with code 0 on failure, so checking the return value alone makes you think it worked.

Why this happens

The skills CLI install flow depends on git clone https://github.com/addyosmani/agent-skills.git (direct connection).

Direct GitHub access from CN networks is unstable (this marketplace's connectivity baseline: direct GitHub is slow / gets reset), so a larger clone gets reset.

"Install failed but exit code is 0" is a common error-reporting gap in CLI tools. The exit code only reflects whether the main flow ran to the end — not whether every substep succeeded.

This CLI treats a failed clone as a recoverable intermediate step, swallows the error, and still exits 0. So "judge success by exit code" is unreliable in toolchains.

Judge by the final artifact — the command's goal is "24 skill directories in place", so check the directory. That is the "trust the artifact" principle: an install command's contract is "the artifact it promises exists", not "it returned 0".

Another trait of this class of CLI is network steps embedded in the install flow (clone is part of the flow), so a broken network stalls/fails the whole flow — but network steps are replaceable:

method B (codeload tarball) swaps "clone the source repo" for "download an archive", same artifact, stabler channel.

The diagnostic path is fixed: error text Connection reset by peer = direct-channel problem -> switch channels (method B) -> verify by artifact (directory in place), not by exit code.

CheckpointMeaning
Error textConnection reset by peer = direct connection dropped, not a command typo
Exit code❌ Failure still returns 0, never use it as the success signal
Success criteria24 skill directories in place (under skills/)

Step by step

1. Confirm the failure mode — Required

If you see Recv failure: Connection reset by peer it is a direct-connection problem; you can also give the CLI proxy env vars (git goes through the proxy) and retry method A.

2. Method B: tarball + manual copy — Required

curl -sL https://gh-proxy.com/https://codeload.github.com/addyosmani/agent-skills/tar.gz/refs/tags/0.6.7 | tar xz

Measured: the 277KB codeload tarball via gh-proxy completes in seconds.

3. Copy the skills directory — Required

cp -r agent-skills-0.6.7/skills ~/.claude/skills/agent-skills

4. Judge success by output, not exit code — Required

ls ~/.claude/skills/agent-skills | head

How to confirm it works

The skills directory is in place (measured output shape):

ls ~/.claude/skills/agent-skills
→ 24 subdirectories + 24 SKILL.md files all present

Don't rely on the command exit code (it is 0 even on failure).

Other environments

EnvironmentNotes
Direct GitHubConnection reset (measured: CLI download succeeded but clone was reset)
Via gh-proxycodeload tarball 277KB completes in seconds (measured)
With a proxyConfigure git/CLI proxy env vars, then retry method A
Windows / macOSSame tarball flow; ~/.claude/skills/ maps to each platform's user directory
UpgradingSwap the tag (0.6.7 → new version) and re-fetch

Symptom

npx -y skills add addyosmani/agent-skills --yes --global hangs at "Cloning repository…" then reports fatal: unable to access ... Connection reset by peer / "Installation failed".

Cause

The skills CLI install flow depends on git clone https://github.com/addyosmani/agent-skills.git (direct connection); direct GitHub access from CN networks is unstable (this marketplace's connectivity baseline: direct GitHub is slow/reset). Note: the CLI exits 0 even on failure, so the return value alone misleads.

Solution

  1. Method B (recommended in CN, measured working): codeload tarball + manual copy — curl -sL https://gh-proxy.com/https://codeload.github.com/addyosmani/agent-skills/tar.gz/refs/tags/0.6.7 | tar xz, then cp -r agent-skills-0.6.7/skills ~/.claude/skills/agent-skills (0.6.7 is the currently recorded version; swap the tag when upgrading).
  2. Or give the CLI proxy env vars (git through the proxy) and retry method A.
  3. Judge success by output (24 skill directories in place), not the exit code.
Verification Evidence

Local verification record(2026-08-28)

Applicable tools (1)

This problem is linked from the tool pages below — reachable from either side.

agent-skills

Source & evidence

Recorded Verified ✓ VerifiedApplies to 1 tool(s)
Entries contain locally measured or reviewable-source solutions; unmeasured items are explicitly labeled.

← Skills Management domain | Problem Catalog Experience | Facing another issue? Go to the Helpdesk