Add, remove, or update a repository in your AgentDef configuration (org/agents/<name>.md frontmatter). Write a JSON file and call happyranch manage-repo --from-file to keep the invocation single-line.
Resources
1Install
npx skillscat add t-benze/happyranch/manage-repo Install via the SkillsCat registry.
manage-repo
Manage the repositories cloned into your repos/ directory. You can add a new repo, remove an existing one, or update the URL of an existing repo (which deletes the old clone and re-clones from the new URL).
Usage
Write a JSON file to
/tmp/manage-repo-<unique>.jsonusing the Write tool:Add a repo:
{ "action": "add", "agent": "<your_agent_name>", "repo_name": "web-app", "url": "https://github.com/t-benze/web-app.git" }Remove a repo:
{ "action": "remove", "agent": "<your_agent_name>", "repo_name": "web-app" }Update a repo URL:
{ "action": "update", "agent": "<your_agent_name>", "repo_name": "web-app", "url": "https://github.com/t-benze/new-web-app.git" }Invoke as a single-line command:
happyranch manage-repo --org {ORG_SLUG} --from-file /tmp/manage-repo-<unique>.jsonThe
--from-fileform is mandatory for agent sessions. In Claude sessions,
multi-line bash commands are rejected by theBash(happyranch:*)permission rule
because newlines count as command separators.
What happens
- add: writes the entry to your
org/agents/<name>.mdfrontmatter (AgentDef.repos), clones the repo intorepos/<name>/(orgit pull --ff-onlyif a clone already exists), and refreshes executor workspace metadata. Repo freshness is daemon-side (THR-103): the session-spawnrefresh_workspace_reposfast-forward-pull covers the new repo automatically — no per-workspace git-pull hook is emitted. - remove: deletes the entry from your
org/agents/<name>.mdfrontmatter, removes therepos/<name>/directory, and refreshes executor workspace metadata. - update: updates the URL in your
org/agents/<name>.mdfrontmatter, deletes the old clone, re-clones from the new URL, and refreshes executor workspace metadata.
Error handling
- If
happyranchreturns non-zero, retry once after 1 second. 409(duplicate repo on add) and404(repo not found on remove/update) are not retryable — check yourorg/agents/<name>.mdfrontmatter and adjust.