gh-setup

gh-setup is a command for Claude Code from synaptiai/synapti-marketplace. It costs 31 tokens per session (6,556 once invoked), scanned B, original, Apache-2.0.

A repository setup command that examines a code project, finds its tools and working conventions, and creates or updates GitHub workflow instructions.

In plain words
What is it for?
Use it to configure branch and commit rules, list available workflow commands, and add a technology-specific quality checklist. It can also update an existing setup after backing up and preserving its files.
Why use it?
It avoids writing workflow rules by hand and reduces the risk of replacing existing project guidance or losing custom changes.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths; mentions CLAUDE.md; names the AskUserQuestion tool.

Part of the gh-workflow plugin — 4 skills, 5 commands shipped together

Good fit Use it to configure branch and commit rules, list available workflow commands, and add a technology-specific quality checklist. It can also update an existing setup after backing up and preserving its files.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/synaptiai/synapti-marketplace/gh-setup
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.

Clone the repo
git clone --depth 1 https://github.com/synaptiai/synapti-marketplace

Made for: Claude Code.

Or install gh-workflow, the plugin that ships this one along with the rest of its 4 skills, 5 commands.

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 gh-setup

README.md
[![agentmods](https://agentmods.dev/badge/commands/synaptiai/synapti-marketplace/gh-setup/github.svg)](https://agentmods.dev/commands/synaptiai/synapti-marketplace/gh-setup)
Your own site
<a href="https://agentmods.dev/commands/synaptiai/synapti-marketplace/gh-setup"><img src="https://agentmods.dev/badge/commands/synaptiai/synapti-marketplace/gh-setup/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for gh-setup

Your own site · 80×15
<a href="https://agentmods.dev/commands/synaptiai/synapti-marketplace/gh-setup"><img src="https://agentmods.dev/badge/commands/synaptiai/synapti-marketplace/gh-setup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 31 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 6,556 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00031 $0.06556
Opus 5 $0.00015 $0.03278
Sonnet 5 $0.00006 $0.01311
Haiku 4.5 $0.00003 $0.00656

Measured today against content hash 893f52d35caa, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade B, and why

gh-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 today.

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.

grep '<!-- gh-workflow:' .claude/CLAUDE.md 2>/dev/null || echo "No version marker found"
plugins/gh-workflow/commands/gh-setup.md · 709 lines

How it starts

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

Setup / Update GitHub Workflow

Analyze the current repository and generate customized GitHub workflow configuration. If gh-workflow is already configured, detect the existing version and offer to update it with new commands and features while preserving customizations.

Tool Usage: This workflow uses the AskUserQuestion tool extensively to gather preferences, confirm detected conventions, and approve generated configurations.

Contract

GOAL: Project-specific workflow configuration generated, applied, or updated based on detected tech stack and conventions. Testable: .claude/CLAUDE.md contains workflow section with correct branch/commit conventions, all current gh-workflow commands listed, and version marker reflecting current plugin version ($PLUGIN_VERSION from plugin.json).

CONSTRAINTS:

  • Never overwrite existing CLAUDE.md - merge or append the workflow section
  • Always create backup before modifying existing files
  • Always confirm detected patterns with user before applying

FORMAT: Generated CLAUDE.md workflow section with branching strategy, commit conventions, commands table, and tech-stack-specific quality checklist.

FAILURE CONDITIONS (output is unacceptable if any apply):

  • Existing CLAUDE.md overwritten without backup
  • Wrong tech stack detected (e.g., Python project identified as Go)
  • Configuration applied without user preview and approval
  • Generated conventions conflict with existing project conventions
  • Existing customizations lost during update (branch naming, labels, checklists)

Purpose

This command analyzes your codebase and generates:

  1. A .claude/CLAUDE.md section with GitHub workflow documentation
  2. Optionally, local command overrides for project-specific customizations
  3. Recommendations for labels to create

Phase 0: Installation Detection

Before performing any analysis, read the plugin version and detect whether gh-workflow is already configured.

  1. Read plugin version (single source of truth):
    # Try known plugin locations (marketplace source, then cache, then local dev)
    PLUGIN_VERSION=""
    # Marketplace source (unversioned, always matches installed version)
    for MARKET in "$HOME/.claude/plugins/marketplaces"/*/plugins/gh-workflow/.claude-plugin/plugin.json; do
      [ -f "$MARKET" ] && { PLUGIN_VERSION=$(jq -r '.version' "$MARKET"); break; }
    done
    # Cache (versioned dirs — take the latest)
    if [ -z "$PLUGIN_VERSION" ]; then
      LATEST=$(ls -d "$HOME/.claude/plugins/cache"/*/gh-workflow/*/.claude-plugin/plugin.json 2>/dev/null | sort -V | tail -1)
      [ -n "$LATEST" ] && PLUGIN_VERSION=$(jq -r '.version' "$LATEST")
    fi
    # Local development (running from marketplace repo)
    [ -z "$PLUGIN_VERSION" ] && [ -f "plugins/gh-workflow/.claude-plugin/plugin.json" ] && \
      PLUGIN_VERSION=$(jq -r '.version' "plugins/gh-workflow/.claude-plugin/plugin.json")
    [ -z "$PLUGIN_VERSION" ] && PLUGIN_VERSION="unknown"
    echo "gh-workflow version: $PLUGIN_VERSION"
    

Read the full file on GitHub · 709 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. today First seen · 709 lines · 31 tokens per session scan B 893f52d35caa

Subscribe to this mod's changes

gh-setup is a command published in the GitHub repository synaptiai/synapti-marketplace (6 stars, last pushed today), licensed Apache-2.0. It adds 31 tokens to every session and 6,556 once invoked, about $0.0002 per session on Opus 5. 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-09-10.