Skip to content

[Feature] Support sharing project-scoped skills across worktrees within the same Git repository #8591

Open

Description

@ZaynQuinn

I use multiple worktrees within the same Git repository for parallel development and would like project-scoped skills such as loopx-change-quality to be installed and updated consistently across the repository.

Currently, running project-skill install in worktree A copies the skill into A's host-native directory. A sibling worktree B, or a worktree created later, requires a separate installation. As the number of worktrees grows, installation and updates must be repeated, and different worktrees can end up using different versions.

I would like to propose an explicitly enabled repository-wide sharing scope, allowing users who want a consistent configuration to share an installation within one repository while retaining the existing worktree-local installation option.

The desired behavior is:

  1. After a user selects a shared installation in one worktree, other worktrees in the same Git repository can discover and use that skill.
  2. Updating the shared version makes the same content available to every worktree, and the skill remains available after ordinary branch switches.
  3. Newly created worktrees can join automatically, or the host can connect them when creating or opening a worktree.
  4. Status and uninstall operations clearly show their scope of impact and protect skills that users have modified or maintain themselves.
  5. Sharing is limited to the same Git repository, and capability activation remains independently controlled for each Goal.

I have built a local feasibility prototype based on upstream main at 72d5bce. It uses the existing project-skill-delivery capability, stores a managed copy in Git's common directory, and exposes it through symbolic links in each worktree's host-native skill directory.

The prototype provides an explicit sharing option and a synchronization command. It also explores an optional post-checkout hook that adds the links automatically after an ordinary git worktree add. I would like to hear the maintainers' thoughts on this approach before preparing a PR.

Local validation results:

  • 115 related tests passed and 2 were skipped, covering shared installation, updates, branch switches, new-worktree integration, uninstall, isolation between separate clones, protection of local modifications, concurrent writes, and rollback on exceptions.
  • Ruff, mypy for the changed implementation files, and the patch application check passed.
  • Using the real Codex CLI 0.153.0 app-server on macOS to query skills/list, both an existing worktree and a newly created worktree discovered one enabled loopx-change-quality skill with scope repo. This discovery check made no model requests.

The current validation covers the POSIX symbolic-link approach. Windows, restricted host permissions, compatibility with existing Git hooks, crash recovery, and reader behavior during updates still need further validation. The prototype's hook refuses to overwrite an existing hook or modify core.hooksPath, and it depends on the recorded Python environment remaining available.

I would first like to ask the maintainers:

  • Would you accept adding an explicit repository-wide sharing scope for project-scoped skills?
  • For new-worktree integration, would you prefer an optional Git hook, or synchronization performed by supported hosts when creating or opening a worktree?

If this direction fits the project roadmap, I would be happy to continue preparing the implementation, documentation, and tests.

Activity

  1. Duang777 commented on Dec 2, 2026

    @Duang777
    Collaborator

    @ZaynQuinn this is still unaddressed on main@5f51b79ac: loopx/capabilities/project_skill_delivery/ has no worktree handling, so each worktree installs and updates its own copy. AGENTS.md asks contributors to work in dedicated worktrees, so the drift you describe hits the repository's own workflow too.

    Maintainers, could you confirm whether an explicit, opt-in repository-wide scope is wanted? I'd suggest keeping the first slice small:

    • managed copy under the Git common directory, exposed to each worktree's host-native skill directory by symlink;
    • an explicit sync that links existing and new worktrees;
    • status/uninstall that report every affected worktree and refuse to overwrite locally modified skills;
    • no post-checkout hook in the first slice (hook ownership and Windows symlink behavior need their own decision).

    If that direction is accepted, I'm happy to review your prototype or help carry it to a PR, whichever you prefer.

  2. ZaynQuinn commented on Dec 5, 2026

    @ZaynQuinn
    ContributorAuthor

    @Duang777 Thanks for the suggestion! I implemented the first version following your advice. New worktrees join through an explicit sync, and we can discuss Git hook integration later. Here's the PR. Would you be able to review it when you have a chance?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions