Skip to content

Consider extracting git-repo-agent into standalone repository #1017

@laurigates

Description

@laurigates

Summary

git-repo-agent is a standalone Claude Agent SDK CLI tool that lives in this monorepo but is not a Claude Code plugin (not in marketplace.json or release-please). Extracting it into its own repo would:

  • Enable clean uvx git-repo-agent and uv tool install git-repo-agent workflows
  • Provide clearer separation of concerns
  • Simplify independent versioning and release management

Current Coupling

The only coupling to this monorepo is compiler.py, which reads 35 SKILL.md files from 8 sibling plugins at runtime to build subagent prompts. The compiled output is 7 files totaling ~328KB.

Speculative Approach: Pre-compiled prompts with optional live compilation

Ship pre-compiled prompt files in the package. When running inside the monorepo (dev mode), compile fresh from SKILL.md sources. When installed standalone, read from the generated/ directory. The generated files are derived artifacts, not source duplication.

Why not alternatives

  • Git submodule: uv/uvx does clone submodules (with absolute URLs), but it would pull in the entire claude-plugins monorepo — heavyweight for 328KB of derived content
  • Separate PyPI package for prompts: over-engineered for 328KB of static markdown
  • Runtime download: adds network dependency and failure modes to CLI startup

Key changes

  1. Modify compiler.py — add fallback to read from generated/ when plugin sources aren't available:

    @lru_cache(maxsize=None)
    def get_compiled_prompt(subagent_name: str) -> str:
        skill_paths = SUBAGENT_SKILLS.get(subagent_name)
        if not skill_paths:
            return ""
    
        # Live compilation when running inside claude-plugins monorepo
        if _PLUGINS_ROOT.is_dir() and any(
            (_PLUGINS_ROOT / p).exists() for p in skill_paths
        ):
            return compile_subagent(subagent_name, skill_paths)
    
        # Standalone mode: read pre-compiled generated files
        generated = _MODULE_DIR / "generated" / f"{subagent_name}_skills.md"
        if generated.exists():
            return generated.read_text(encoding="utf-8")
    
        return ""
  2. Create laurigates/git-repo-agent repo with contents of claude-plugins/git-repo-agent/ as root

  3. Update pyproject.toml with license, readme, repository URL for PyPI publishing

  4. Cross-repo prompt updates — GitHub Actions workflow in claude-plugins triggered on SKILL.md changes that opens a PR on the git-repo-agent repo with regenerated files:

    on:
      push:
        branches: [main]
        paths:
          - 'blueprint-plugin/skills/*/SKILL.md'
          - 'configure-plugin/skills/*/SKILL.md'
          - 'code-quality-plugin/skills/*/SKILL.md'
          - 'testing-plugin/skills/*/SKILL.md'
          - 'git-plugin/skills/*/SKILL.md'
          - 'github-actions-plugin/skills/*/SKILL.md'
          - 'kubernetes-plugin/skills/*/SKILL.md'
  5. Clean up monorepo — replace git-repo-agent/ directory with a README pointing to the new repo, update references in codebase-attributes-plugin/README.md

Verification

  • uv tool install . from the new repo should work without claude-plugins present
  • compile_prompts.py --check should pass in both monorepo and standalone contexts
  • Subagent behavior should be identical between monorepo and standalone installs

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions