repo

repo is a skill for Claude Code, Codex from x-cmd/x-cmd. It costs 110 tokens per session (702 once invoked), scanned C, original, Apache-2.0.

A convention for storing Git repositories and their worktrees, which are separate working folders linked to one repository. It keeps a shared bare repository under ~/.x-repo and places normal and named workspaces beside it.

In plain words
What is it for?
It helps decide where to clone repositories, locate existing clones, create or manage linked worktrees, and share repository layouts across agents, containers, and continuous-integration jobs.
Why use it?
It gives agents, developers, and automated jobs predictable repository paths and makes related repositories easy to find. The separate repository storage also reduces the chance that removing one worktree removes the shared Git data.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/x-cmd/x-cmd/repo
Any agent
npx skills add x-cmd/x-cmd --skill repo
Clone the repo
git clone --depth 1 https://github.com/x-cmd/x-cmd

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for repo

README.md
[![agentmods](https://agentmods.dev/badge/skills/x-cmd/x-cmd/repo.svg)](https://agentmods.dev/skills/x-cmd/x-cmd/repo)
Your own site
<a href="https://agentmods.dev/skills/x-cmd/x-cmd/repo"><img src="https://agentmods.dev/badge/skills/x-cmd/x-cmd/repo.svg" alt="Measured on agentmods" height="20"></a>
Per session 110 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 702 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00110 $0.00702
Opus 5 $0.00055 $0.00351
Sonnet 5 $0.00022 $0.00140
Haiku 4.5 $0.00011 $0.00070

Measured 4d ago against content hash 662770c7d024, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

repo scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

By default, repos are bare with linked worktrees — the bare in `.bare/`, a separate directory from the worktrees, so `rm -rf` of one wt can't reach it. Plain `git clone` is also accepted (`x repo ls/which/update` see it)
mod/skill0/lib/skill0/core/repo/SKILL.md · 45 lines

How it starts

The opening of the file, as written. The whole thing — 45 lines — stays where its author put it; the contents beside it link to each section on GitHub.

repo

Why

All clones converge at ~/.x-repo/<provider>/<owner>/<name>. Same path for every agent, human, CI — mountable into containers or agent sandboxes so they share without re-cloning. One root to back up; discoverable via x repo ls. Layout mirrors github paths so ../<sibling> from any worktree resolves to that sibling's default worktree — configs and scripts that reference siblings work uniformly across wts and agents.

Path layout

  • bare: ~/.x-repo/.bare/<provider>/<owner>/<name>.git
  • default wt: ~/.x-repo/<provider>/<owner>/<name>
  • designed wt: ~/.x-repo/<provider>/<owner>/<name>@<wtname>

@<wtname> — wtname is any identifier for this workspace: agent/worker name, branch name, tag, short SHA, issue id, free-form string. / in wtname encodes to ~.

By default, repos are bare with linked worktrees — the bare in .bare/, a separate directory from the worktrees, so rm -rf of one wt can't reach it. Plain git clone is also accepted (x repo ls/which/update see it) but without geometric protection. Please be careful in that case: don't rm -rf, prefer git worktree remove, and avoid cleanup heuristics that target .git/. Mid-task work lost this way can't be realigned with the original repo.

Commands

x repo <id>                      # cd to default wt (auto-clones if missing)
x repo wt <id> <wtname>          # attach to existing branch, or create new from HEAD
x repo wt ls <id>                # list wts
x repo wt rm <id> <wtname>       # graceful remove (use this, not rm -rf)
x repo update <id>               # refresh default wt after upstream changes
x repo ls [--raw|--tsv]          # discover what's cloned
x repo which <id>[@<wtname>]     # resolve id to absolute path

Don't

  • rm -rf a designed worktree. It leaves stale entries in the bare's worktrees/ registry. Use x repo wt rm. If you must, run git -C <bare> worktree prune afterwards.

Read the full file on GitHub · 45 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 45 lines · 110 tokens per session scan C 662770c7d024

Subscribe to this mod's changes

repo is a skill published in the GitHub repository x-cmd/x-cmd (4,637 stars, last pushed yesterday), licensed Apache-2.0. It adds 110 tokens to every session and 702 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

terraform-skill

Use when working with Terraform or OpenTofu - creating modules, writing tests (native test framework, Terratest), setting up CI/CD pipelines, reviewing configurations, choosing between testing approaches, debugging state issues, implementing security scanning (trivy, checkov), or making infrastructure-as-code…

agentscope-ai/QwenPaw · 62 tokens

alicloud_cli

阿里云 CLI 中文文档镜像检索与命令辅助:先走章节索引,再下钻正文页面,给出命令前必须有本地文档证据。.

agentscope-ai/QwenPaw · 45 tokens

deploy-open-harness

Guides a user through collecting the credentials needed to deploy their own copy of Open Harness, deploying this repo on Vercel, and completing first-run setup. Use for requests about deploying, self-hosting, configuring credentials, or getting started with a fork of this app.

vercel-labs/open-agents · 60 tokens

terraform-cli-setup

Terraform CLI 安装与初始化技能。当用户本地未安装 Terraform 时自动完成安装,确保 terraform 命令可用并能执行 init/validate。不负责 Provider 凭证配置,凭证在实际使用时由 terraform-skill 引导。.

agentscope-ai/QwenPaw · 58 tokens

artifact-deploy

One-click deploy a user's pre-built app/artifact into their OWN AWS account and get a global public HTTPS link (Vercel-like), with a default TTL and promote-to-persistent. Use when the user says "deploy this", "ship this demo", "give me a public link", "share this externally", or "deploy to AWS".

kirodotdev/KiroCrew · 74 tokens

cross-platform-cloud-verification

Orchestrates cost-conscious cloud verification across available operating-system and architecture runners after cheaper checks pass. Use whenever a code change, bug fix, build, packaging flow, native dependency, UI behavior, filesystem behavior, or test has material cross-platform implications, even if the user only…

warpdotdev/warp · 92 tokens