setup

A setup command that checks whether the project is ready for the KAS workflow. It verifies prerequisites such as the GitHub command-line tool, its version, authentication, and repository permissions.

In plain words
What is it for?
Use it at the beginning of a KAS workflow to validate the GitHub CLI installation, login state, and required repository access.
Why use it?
It identifies missing or invalid environment requirements before later workflow steps fail. Failed prerequisite checks block setup; warnings do not.

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/kastheco/claude-plugins/setup
Clone the repo
git clone --depth 1 https://github.com/kastheco/claude-plugins
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,643 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 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.00000 $0.01643
Opus 5 $0.00000 $0.00822
Sonnet 5 $0.00000 $0.00329
Haiku 4.5 $0.00000 $0.00164

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

Security

Grade B, and why

setup scanned grade B 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

SETTINGS_FILE="$REPO_ROOT/.claude/settings.json"
plugins/kas/commands/setup.md · 193 lines

How it starts

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

/kas:setup - Prepare Project for KAS Workflow

Validate prerequisites and verify the environment is ready.

Workflow

Execute these steps in order. Track results as PASS, FAIL (blocker), or WARN (non-blocking).

1. Check Prerequisites

Prerequisites are BLOCKERS - setup cannot continue if any fail.

1.1 Check GitHub CLI (gh)
# Check installed
if ! command -v gh &>/dev/null; then
  echo "[FAIL] gh not found"
  echo "  Install: https://cli.github.com/"
  # BLOCKER
fi

# Check version >= 2.0.0
GH_VERSION=$(gh --version 2>/dev/null | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1)
GH_MAJOR=$(echo "$GH_VERSION" | cut -d. -f1)
GH_MAJOR=${GH_MAJOR:-0}
if [[ "$GH_MAJOR" -lt 2 ]]; then
  echo "[FAIL] gh version $GH_VERSION < 2.0.0"
  echo "  Upgrade: https://cli.github.com/"
  # BLOCKER
fi

# Check authenticated
if ! gh auth status &>/dev/null; then
  echo "[FAIL] gh not authenticated"
  echo "  Run: gh auth login"
  # BLOCKER
fi

# Check repo scope
GH_SCOPES=$(gh auth status 2>&1 | grep -i "token scopes" || true)
if [[ -z "$GH_SCOPES" ]] || ! echo "$GH_SCOPES" | grep -qi "repo"; then
  echo "[FAIL] gh missing 'repo' scope"
  echo "  Run: gh auth refresh -s repo"
  # BLOCKER
else
  echo "[PASS] gh $GH_VERSION (authenticated, repo scope)"
fi
1.2 Check Git Configuration
# Check version >= 2.20.0
GIT_VERSION=$(git --version 2>/dev/null | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1)
GIT_MAJOR=$(echo "$GIT_VERSION" | cut -d. -f1)
GIT_MINOR=$(echo "$GIT_VERSION" | cut -d. -f2)
GIT_MAJOR=${GIT_MAJOR:-0}
GIT_MINOR=${GIT_MINOR:-0}
if [[ "$GIT_MAJOR" -lt 2 ]] || [[ "$GIT_MAJOR" -eq 2 && "$GIT_MINOR" -lt 20 ]]; then
  echo "[FAIL] git version $GIT_VERSION < 2.20.0"
  # BLOCKER
fi

# Check user.name configured
GIT_NAME=$(git config --get user.name || true)
if [[ -z "$GIT_NAME" ]]; then
  echo "[FAIL] git user.name not configured"
  echo "  Run: git config --global user.name \"Your Name\""
  # BLOCKER
fi

# Check user.email configured
GIT_EMAIL=$(git config --get user.email || true)
if [[ -z "$GIT_EMAIL" ]]; then
  echo "[FAIL] git user.email not configured"
  echo "  Run: git config --global user.email \"[email protected]\""
  # BLOCKER
else
  echo "[PASS] git $GIT_VERSION (user: $GIT_NAME <$GIT_EMAIL>)"
fi

Read the full file on GitHub · 193 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 · 193 lines · 0 tokens per session scan B 28e52a5b8be9

Subscribe to this mod's changes

setup is a command published in the GitHub repository kastheco/claude-plugins (2 stars, last pushed 4mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,643 tokens. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.