agentscope-extensions-skill-git-repository treats a remote Git repo as a skill repository. It runs a lightweight remote-ref check on each read and only pulls when the remote HEAD changes — near-zero overhead at idle.
When to use
- You want Git to manage versioning and review of skill content.
- You want to share a single skill set across multiple projects.
- You don’t want to embed a database or config center in production.
Add the dependency
Quickstart
Pin branch / use a fixed local path
Auth for private repos
GitSkillRepository reuses system-level Git config; it doesn’t manage credentials in Java:
- HTTPS: uses the credential helper from
~/.gitconfig(osxkeychain, libsecret, …). - SSH: uses keys under
~/.ssh/andssh-agent.
Auto-sync vs. manual sync
autoSync=true(default): every read first runsls-remote; pull happens only if the remote moved.autoSync=false: never pulls automatically; callrepo.sync()to refresh.
Operational notes
- Hold the repo as a singleton Spring Bean; close it once during shutdown.
- The temp directory has a JVM shutdown hook, but force-killed processes may leave residue — clean up externally if needed.
- Multi-instance deployments each maintain their own clone; no lock contention.