=== status before a sync
--- stdout
user scope:
  · skills/web-skill @web
  · agents/rev @loc
  · rules/style @loc
  * skills/* @loc (0 installed)
project scope:
--- stderr
--- exit 0
=== sync
--- stdout
skilletor: user scope
  + agents/rev (active after /reload-plugins or restart)
  + rules/style (active after /reload-plugins or restart)
  + skills/hello (active now)
  + skills/tpl (active now)
  warning: source web: url source https://127.0.0.1:1/skills.tar.gz failed: fetch failed
--- stderr
--- exit 0
=== files after the sync
./.claude.json
./.claude/agents/.local.rev.md
./.claude/rules/.local.style.md
./.claude/skilletor.json
./.claude/skilletor.lock.json
./.claude/skills/hello/.gitignore
./.claude/skills/hello/SKILL.md
./.claude/skills/hello/docs/ref.md
./.claude/skills/tpl/.gitignore
./.claude/skills/tpl/SKILL.md
./extra-src/skills/extra/SKILL.md
./src/agents/rev.md
./src/rules/style.md
./src/skilletor.json
./src/skills/hello/SKILL.md
./src/skills/hello/docs/ref.md
./src/skills/tpl/SKILL.md.njk
=== the rendered template: .claude/skills/tpl/SKILL.md
---
name: tpl
description: Greets world
---
Hello WORLD from loc (claude, user).
=== check after a sync (the url source never synced: changed)
--- stdout
changed
--- stderr
--- exit 1
=== check --json
--- stdout
{
  "changed": true,
  "sources": [
    {
      "name": "loc",
      "scope": "user",
      "changed": true
    }
  ],
  "warnings": [
    "source web: fetch failed"
  ],
  "declaredChanged": [
    "user"
  ],
  "varsChanged": [
    "user"
  ]
}
--- stderr
--- exit 1
=== status after a sync
--- stdout
user scope:
  · skills/web-skill @web
  ✓ agents/rev @loc
  ✓ rules/style @loc
  ✓ skills/hello @loc via *@loc
  ✓ skills/tpl @loc via *@loc
  * skills/* @loc (2 installed)
project scope:
--- stderr
--- exit 0
=== status --json
--- stdout
{
  "scopes": [
    {
      "scope": "user",
      "targets": [
        "claude"
      ],
      "declared": [
        {
          "key": "skills/web-skill",
          "source": "web",
          "installed": false
        },
        {
          "key": "agents/rev",
          "source": "loc",
          "installed": true
        },
        {
          "key": "rules/style",
          "source": "loc",
          "installed": true
        },
        {
          "key": "skills/hello",
          "source": "loc",
          "installed": true,
          "via": "*@loc"
        },
        {
          "key": "skills/tpl",
          "source": "loc",
          "installed": true,
          "via": "*@loc"
        }
      ],
      "orphans": [],
      "wildcards": [
        {
          "type": "skill",
          "source": "loc",
          "entry": "*@loc",
          "installed": 2
        }
      ],
      "bundles": [],
      "trustRequests": [],
      "sourceVersions": {
        "loc": "local"
      }
    },
    {
      "scope": "project",
      "targets": [
        "claude"
      ],
      "declared": [],
      "orphans": [],
      "wildcards": [],
      "bundles": [],
      "trustRequests": [],
      "sourceVersions": {}
    }
  ]
}
--- stderr
--- exit 0
=== sync again
--- stdout
skilletor: user scope
  warning: source web: url source https://127.0.0.1:1/skills.tar.gz failed: fetch failed
--- stderr
--- exit 0
=== sync --json again
--- stdout
{
  "scopes": [
    {
      "scope": "user",
      "added": [],
      "updated": [],
      "removed": [],
      "unchanged": [
        {
          "key": "agents/rev",
          "type": "agent",
          "name": "rev",
          "source": "loc"
        },
        {
          "key": "rules/style",
          "type": "rule",
          "name": "style",
          "source": "loc"
        },
        {
          "key": "skills/hello",
          "type": "skill",
          "name": "hello",
          "source": "loc"
        },
        {
          "key": "skills/tpl",
          "type": "skill",
          "name": "tpl",
          "source": "loc"
        }
      ],
      "skipped": [],
      "conflicts": [],
      "overwritten": [],
      "warnings": [
        "source web: url source https://127.0.0.1:1/skills.tar.gz failed: fetch failed"
      ],
      "trustRequests": []
    },
    {
      "scope": "project",
      "added": [],
      "updated": [],
      "removed": [],
      "unchanged": [],
      "skipped": [],
      "conflicts": [],
      "overwritten": [],
      "warnings": [],
      "trustRequests": []
    }
  ]
}
--- stderr
--- exit 0
=== an option sync does not take (exit 2)
--- stdout
--- stderr
skilletor: unknown option for sync: --bogus (run skilletor --help)
--- exit 2
=== add a local source
--- stdout
added source extra ({"local":"<work>/home/extra-src"})
skilletor: user scope
  warning: source web: url source https://127.0.0.1:1/skills.tar.gz failed: fetch failed
--- stderr
--- exit 0
=== trust an existing source
--- stdout
trusted source loc (local <work>/home/src)
--- stderr
--- exit 0
=== trust state after add and trust
{
  "extra": {
    "kind": "local",
    "address": "<work>/home/extra-src"
  },
  "loc": {
    "kind": "local",
    "address": "<work>/home/src"
  }
}
=== source list after add
--- stdout
loc [user] {"local":"~/src"}
web [user] {"url":"https://127.0.0.1:1/skills.tar.gz"}
extra [user] {"local":"<work>/home/extra-src"}
--- stderr
--- exit 0
=== available from the added source
--- stdout
  skill extra@extra — Extra smoke skill
--- stderr
--- exit 0
=== install from the added source
--- stdout
skilletor: user scope
  + skills/extra (active now)
  warning: source web: url source https://127.0.0.1:1/skills.tar.gz failed: fetch failed
--- stderr
--- exit 0
=== installed extra skill: .claude/skills/extra/SKILL.md
---
name: extra
description: Extra smoke skill
---
Extra smoke body.
=== uninstall from the added source
--- stdout
skilletor: user scope
  - skills/extra (removed)
  warning: source web: url source https://127.0.0.1:1/skills.tar.gz failed: fetch failed
--- stderr
--- exit 0
=== extra skill after uninstall
(absent)
=== remove the added source
--- stdout
skilletor: user scope
  warning: source web: url source https://127.0.0.1:1/skills.tar.gz failed: fetch failed
--- stderr
--- exit 0
=== source extra after removal
(absent)
=== hook session-start (the check says changed: a sync, the url source's warning)
--- stdout
{"systemMessage":"skilletor: 1 warning(s)","hookSpecificOutput":{"hookEventName":"SessionStart","additionalContext":"- warning: source web: url source https://127.0.0.1:1/skills.tar.gz failed: fetch failed"}}
--- stderr
--- exit 0
=== hook user-prompt-submit (checked at the session start: nothing due)
--- stdout
--- stderr
--- exit 0
=== hook user-prompt-submit in a checkout never checked (due: the background sync starts)
--- stdout
--- stderr
--- exit 0
=== the next prompt there: the background sync's pending report
--- stdout
{"systemMessage":"skilletor: 1 item(s) updated, 1 warning(s), .claude/.gitignore, .worktreeinclude updated — commit them","hookSpecificOutput":{"hookEventName":"UserPromptSubmit","additionalContext":"skilletor synced items:\n- skill hello@loc: active now\n- warning: source web: url source https://127.0.0.1:1/skills.tar.gz failed: fetch failed\n- .claude/.gitignore updated — commit it\n- .worktreeinclude updated — commit it"}}
--- stderr
--- exit 0
=== hook cwd-changed (into a checkout whose lock does not match its config: synced)
--- stdout
{"systemMessage":"skilletor: 1 item(s) updated, .claude/.gitignore, .worktreeinclude updated — commit them in <work>/checkouts/cwd-changed"}
--- stderr
--- exit 0
=== hook post-tool-use (a cd from the session's start into another checkout: synced)
--- stdout
{"systemMessage":"skilletor: 1 item(s) updated, .claude/.gitignore, .worktreeinclude updated — commit them in <work>/checkouts/post-tool-use","hookSpecificOutput":{"hookEventName":"PostToolUse","additionalContext":"skilletor: in <work>/checkouts/post-tool-use:\nskilletor synced items:\n- skill hello@loc: active now\n- .claude/.gitignore updated — commit it\n- .worktreeinclude updated — commit it"}}
--- stderr
--- exit 0
=== hook post-tool-use again (the session's cwd as recorded: nothing to do)
--- stdout
--- stderr
--- exit 0
=== files at the end
./.claude.json
./.claude/agents/.local.rev.md
./.claude/rules/.local.style.md
./.claude/skilletor.json
./.claude/skilletor.lock.json
./.claude/skills/hello/.gitignore
./.claude/skills/hello/SKILL.md
./.claude/skills/hello/docs/ref.md
./.claude/skills/tpl/.gitignore
./.claude/skills/tpl/SKILL.md
./extra-src/skills/extra/SKILL.md
./src/agents/rev.md
./src/rules/style.md
./src/skilletor.json
./src/skills/hello/SKILL.md
./src/skills/hello/docs/ref.md
./src/skills/tpl/SKILL.md.njk
=== files of the checkouts at the end
./cwd-changed/.claude/.gitignore
./cwd-changed/.claude/skilletor.json
./cwd-changed/.claude/skilletor.lock.json
./cwd-changed/.claude/skills/hello/.gitignore
./cwd-changed/.claude/skills/hello/SKILL.md
./cwd-changed/.claude/skills/hello/docs/ref.md
./cwd-changed/.worktreeinclude
./post-tool-use/.claude/.gitignore
./post-tool-use/.claude/skilletor.json
./post-tool-use/.claude/skilletor.lock.json
./post-tool-use/.claude/skills/hello/.gitignore
./post-tool-use/.claude/skills/hello/SKILL.md
./post-tool-use/.claude/skills/hello/docs/ref.md
./post-tool-use/.worktreeinclude
./prompted/.claude/.gitignore
./prompted/.claude/skilletor.json
./prompted/.claude/skilletor.lock.json
./prompted/.claude/skills/hello/.gitignore
./prompted/.claude/skills/hello/SKILL.md
./prompted/.claude/skills/hello/docs/ref.md
./prompted/.worktreeinclude
