github-clone

A command for copying GitHub repositories into a local workspace. It accepts a repository name, URL, or SSH address, and can clone repositories across an organization.

In plain words
What is it for?
Use it to add one repository or bulk-clone repositories from a GitHub organization into the workspace.
Why use it?
You need a local copy of a repository before working with its files, but adding many repositories manually is repetitive. Already-cloned repositories are skipped.

Command

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 commands/anton-abyzov/specweave/github-clone
Clone the repo
git clone --depth 1 https://github.com/anton-abyzov/specweave
Per session 66 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,863 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 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.00066 $0.04863
Opus 5 $0.00033 $0.02431
Sonnet 5 $0.00013 $0.00973
Haiku 4.5 $0.00007 $0.00486

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

Security

Grade A, and why

github-clone scanned grade A 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 yesterday.

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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

const { execSync } = await import('child_process');
plugins/specweave/commands/github-clone.md · 635 lines

How it starts

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

Clone GitHub Repositories Command

You are a GitHub repository cloning expert. Help users clone repositories from GitHub organizations to their local workspace.

Activation & Parameter Extraction

Activate this skill when the user's intent involves any of:

  • "clone a repo", "clone this repo", "clone owner/repo"
  • "add a repository", "add repo X to the workspace"
  • "get a repo", "get me owner/repo", "pull down a repo"
  • "fetch repo X", "I need repo X cloned"
  • Any message containing a GitHub URL (https://github.com/..., [email protected]:...) with clone intent
  • Any owner/repo shorthand when the context is about adding repos to the workspace

Extract --repo from natural language: When the user mentions a specific repository identifier in their prompt, extract it as the --repo value. Examples:

Extract --org from natural language: When the user mentions an organization without a specific repo:

  • "clone all repos from mycompany" → --org "mycompany"
  • "get the acme-corp repos" → --org "acme-corp"

Detect --dry-run: "preview", "what would happen", "show me what would be cloned" → add --dry-run

Purpose

This command clones GitHub repositories after initial SpecWeave setup (specweave init). Use when:

  • Adding a single repo with --repo owner/repo (any URL format supported)
  • User skipped cloning during init
  • Resuming interrupted cloning (already-cloned repos are skipped!)
  • Adding repositories from organization
  • Selective cloning with pattern filtering
  • Retrying after partial failures

CRITICAL: NEVER-STOP BEHAVIOR

This command NEVER stops on individual repo failures!

  • Each repo failure is logged but cloning continues
  • Already-cloned repos are automatically skipped (resume = re-run!)
  • Final status: completed (all success) or completed_with_warnings (some failed)
  • Failed repos are listed in result.json for easy retry

Read the full file on GitHub · 635 lines

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. yesterday First seen · 635 lines · 66 tokens per session scan A 4d6a2977a166

Subscribe to this mod's changes

github-clone is a command published in the GitHub repository anton-abyzov/specweave (159 stars, last pushed 2d ago), licensed MIT. It adds 66 tokens to every session and 4,863 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.