skillshare icon indicating copy to clipboard operation
skillshare copied to clipboard

Project mode: skills: section in config.yaml is silently stripped, no committable way to share project skills

Open dotned opened this issue 6 months ago β€’ 2 comments

Summary

The project setup docs say that skills: in config.yaml is how you declare which remote skills a project needs, and that teammates can run skillshare install -p to install them. In practice, the skills: section gets silently stripped the moment any skillshare command runs, and nothing committable replaces it.

What the docs say

The project setup guide describes this workflow:

  1. Install remote skills with skillshare install <source> -p
  2. Skills are "Recorded in .skillshare/config.yaml under skills:" (Step 3)
  3. Commit .skillshare/: ".skillshare/config.yaml β”œΓΆβ”œΓ§β”œΓ‚ targets and remote skill list" (Step 5)
  4. New team member clones and runs skillshare install -p which "reads .skillshare/config.yaml and installs all listed remote skills automatically"

The full config example shows:

targets:
  - claude
  - cursor
skills:
  - name: pdf
    source: anthropic/skills/pdf

Reading this, you'd reasonably assume: put your skills in config.yaml, commit it, teammates run skillshare install -p, done.

What actually happens

Test 1: skills: in config.yaml

mkdir test-project && cd test-project
git init
skillshare init -p --targets copilot

# Add skills to config as the docs suggest
cat > .skillshare/config.yaml << 'EOF'
targets:
  - copilot
skills:
  - name: next-best-practices
    source: vercel-labs/next-skills/next-best-practices
audit:
  block_threshold: CRITICAL
EOF

# Run ANY command, even just status
skillshare status -p

cat .skillshare/config.yaml
# skills: section is gone. Only targets + audit remain.

Test 2: manually created registry.yaml

# Create registry.yaml (what the migration code is supposed to produce)
cat > .skillshare/registry.yaml << 'EOF'
skills:
  - name: next-best-practices
    source: vercel-labs/next-skills/next-best-practices
EOF

skillshare install -p --force
# Skills install fine, but registry.yaml is deleted afterwards.

Root cause

We dug through the source code. Three separate mechanisms destroy the skill list:

  1. migrateProjectSkillsToRegistry() in internal/config/project.go: runs on every LoadProject() call, strips skills: from config.yaml. The ProjectConfig struct no longer has a Skills field, so the data can never round-trip back into config.

  2. migrateRegistryEntries() in internal/install/metadata_migrate.go: reads registry.yaml and merges entries into .metadata.json.

  3. cleanupOldRegistry() in internal/install/metadata_migrate.go: unconditionally deletes registry.yaml:

    func cleanupOldRegistry(dir string) {
        os.Remove(filepath.Join(dir, "registry.yaml"))
    }
    

So the chain is: skills: in config gets stripped, written to registry.yaml, merged into .metadata.json, then registry.yaml is deleted. The only thing left standing is .metadata.json.

Why .metadata.json doesn't work for this

.metadata.json is the only surviving record, but:

  • Skillshare auto-adds skills/.metadata.json to the managed .gitignore block
  • It contains installed_at timestamps, commit hashes, and file hashes that change on every install, so even if you un-gitignore it, you'd get constant noise in diffs

The result

There is no committable file that says "this project needs these skills". The workflow the docs describe (declare skills in config, commit, teammates install from config) breaks silently because the config gets stripped before anyone else can use it.

Current workaround

List manual skillshare install <source> -p commands in the project README.

For reference, the project setup docs describe life without skillshare as: "Read the README to find which skills to install... Manually copy or install each skill... Hope you didn't miss anything."

Environment

  • skillshare v0.19.11
  • Windows 11 + PowerShell 7
  • Confirmed by reading the Go source directly

Suggested fix

Stop stripping skills: from project config.yaml. The documentation already describes it as the declarative source of truth, so the code should treat it that way.

dotned avatar May 14 '26 13:05 dotned

Thanks for the incredibly thorough write-up β€” the root-cause trace was spot-on.

Fixed in v0.19.12.

What changed:

  • ProjectConfig now has a Skills field β€” skills: in config.yaml survives LoadProject() β†’ Save() round-trips
  • Removed migrateProjectSkillsToRegistry() β€” the migration that was stripping skills: and funneling it through registry.yaml β†’ .metadata.json β†’ deletion
  • skillshare install <source> -p automatically adds the skill to config.yaml
  • skillshare install -p (no args) reads from config.yaml skills:, not .metadata.json
  • .metadata.json remains for runtime tracking (hashes, timestamps) β€” gitignored as before

The workflow described in the docs now works as intended:

# .skillshare/config.yaml β€” commit this
targets:
  - copilot
skills:
  - name: next-best-practices
    source: vercel-labs/next-skills/next-best-practices
# teammate clones and runs:
skillshare install -p && skillshare sync

runkids avatar May 14 '26 16:05 runkids

No problem, glad it helped, and I don't mind the odd bug hunt. Thanks for the quick fix, really liking the project.

dotned avatar May 14 '26 18:05 dotned