Repo
DevelopmentrepoRepo is an Agent Skill for development published in the x-cmd/x-cmd repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Convention + tooling for where agent-cloned repos live. Default `~/.x-repo/<provider>/<owner>/<name>`, discovered via `x repo ls`. Use for "where to clone", "git clone path", "workspace layout", "shared repos between agents".
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/x-cmd/x-cmd/blob/HEAD/mod/skill0/lib/skill0/skills/repo/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/repo, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
repo
x repo defines the default clone location for AI agents: ~/.x-repo/<provider>/<owner>/<name>. Place new clones there unless the user names a different path or an existing convention applies.
Default layout
~/.x-repo/
github.com/
x-bash/skill0
x-bash/repo
gitlab.com/
my-team/internal-tool
gitee.com/
some-user/demo
provider— host domain (github.com,gitlab.com,gitee.com, …)owner— user or orgname— repo basename
Override the root with X_REPO_ROOT (when the default ~/.x-repo is unsuitable, e.g. small home disk or a shared network mount):
export X_REPO_ROOT="$HOME/agents/repo"
Why this layout
- Shared across agents — every agent sees the same tree
- Discoverable —
x repo lsfinds anything already cloned - Reusable clones — re-cloning the same repo into a different path is wasteful
- Ready for sync / shared cache — upcoming
x repofeatures (push, sync, cache) assume this layout
Discover what's already cloned
x repo ls --raw # provider/owner/name (scriptable)
x repo ls --tsv # provider, owner, name, filepath (with header)
Default is interactive (csv app) on a TTY, TSV when piped. Use --raw when scripting.
Clone to the convention
url="https://github.com/x-bash/skill0"
provider="$(printf '%s' "$url" | awk -F/ '{print $3}')"
path="${X_REPO_ROOT:-$HOME/.x-repo}/$provider/x-bash/skill0"
mkdir -p "$(dirname "$path")"
git clone "$url" "$path"
If x repo ls --raw already lists the target, cd into the existing clone instead.
Rules
- MUST default new clones to
~/.x-repo/<provider>/<owner>/<name>unless the user names a different path. - MUST re-use an existing clone (
x repo ls --raw) instead of cloning a second copy. - MUST NOT invent a new path layout (e.g.
~/projects/<repo>,~/work/<repo>) when this convention applies. - MUST honor
X_REPO_ROOTwhen set — it is authoritative.
For more information
x repo --help— subcommand reference