Skip to content

plugin add/update -g replaces a symlinked config.yaml and ignores preserve_tilde_on_save #460

Closed

Description

@salmonumbrella

The situation

I share one global config across machines the way the docs suggest for dotfiles: ~/.config/skillshare/config.yaml is a symlink to a file in a synced folder, with preserve_tilde_on_save: true. The MCP docs also say "A symlinked Skillshare config.yaml is written through to its target."

Plugin commands break that. After skillshare plugin add|update -g, config.yaml is no longer a symlink. It's a standalone copy holding the new plugins: entry, and the shared file never gets it. That machine silently forks: its changes never reach the shared file, and later edits to the shared file never reach it. I only noticed because a target I'd added to the shared file never showed up on that machine.

The plugin source in that copy is also saved as an absolute /Users/<me>/... path, even with preserve_tilde_on_save: true.

Repro (v0.25.0, also v0.24.6)

mkdir -p ~/.config/skillshare ~/dotfiles ~/demo-plugin/.claude-plugin
printf '{"name":"demo-plugin","version":"0.1.0","description":"demo"}\n' \
  > ~/demo-plugin/.claude-plugin/plugin.json
printf 'sources:\n  skills: ~/skills\npreserve_tilde_on_save: true\ntargets: {}\n' \
  > ~/dotfiles/skillshare.yaml
ln -sf ~/dotfiles/skillshare.yaml ~/.config/skillshare/config.yaml

skillshare plugin add "$HOME/demo-plugin" -g --no-tui
# ✓ demo-plugin  skillshare · saved

test -L ~/.config/skillshare/config.yaml || echo "symlink replaced"
grep -c plugins: ~/dotfiles/skillshare.yaml     # 0
grep 'source:' ~/.config/skillshare/config.yaml  # absolute path, not ~/demo-plugin

I ran this in a throwaway HOME. My real config broke the same way, at the time a plugin update -g ran.

Cause

internal/plugin/config.go (main at 3ad4b68) saves the plugins: section through its own writer: os.CreateTemp(filepath.Dir(s.ConfigPath), ".plugins-*") (L134), then os.Rename(f.Name(), s.ConfigPath) (L156). A rename onto the symlink path replaces the link itself. That writer also marshals the YAML node directly, so it never goes through cloneForSave().

Config.Save() in internal/config/config.go uses os.WriteFile(path, ...) (L776), which follows the link, and folds $HOME with cloneForSave() (L769). So ordinary config saves keep the link and the tildes. The plugin writer is the one I hit; the one-time legacy target migration in internal/config/config.go (L696-698) also writes path + ".tmp" and renames it over the path, so it would replace the link the same way.

Ask

  • Make the plugin writer resolve a symlinked config.yaml before the temp+rename (filepath.EvalSymlinks, then create the temp file next to the real target), so the link survives and the shared file gets the change. Same for any other temp+rename writer of config.yaml, if there is one.
  • Apply preserve_tilde_on_save to plugin source paths (package and bindings), same as the rest of the config.

Workaround for now: after any global plugin command, copy the new plugins: block back into the shared file by hand, fix the paths to ~/, and recreate the symlink.

Activity

  1. self-assigned this
    on Oct 7, 2026
  2. added
    bug
    on Oct 7, 2026
  3. runkids commented on Oct 7, 2026

    @runkids
    Owner

    Thanks for the thorough report and repro! Fixed in v0.25.1.

    • plugin add / plugin update now write through a symlinked config.yaml (including a link whose target doesn't exist yet), so the shared file gets the change. The one-time legacy migrations do the same.
    • Plugin source paths follow preserve_tilde_on_save.

    If a machine already forked, copy its plugins: block back into the shared file and recreate the link once. Let me know if anything still breaks the link.

  4. added
    awaiting-reply
    on Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

awaiting-replybug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions