Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Is that skill safe to install?
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
Are you the author of Setup?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/jskswamy-setup-c10fad67)
---
name: gate-setup
description: "Use when scaffolding or updating optional repo-local gate rules (\"gate setup\", \"configure gate\", \"create .gate.md\", \"add custom gate reviewer\"); interviews for verification commands, trust boundaries, doc-sync pairs, and optional custom reviewers."
argument-hint: "[--format gate|greptile]"
disable-model-invocation: true
metadata:
short-description: "Scaffold optional repo-local gate rules (.gate.md or .greptile/). [--format gate|greptile]"
---
# Gate Setup Skill
Optional interactive scaffolder for repo-local `/gate-check` configuration. `/gate-check` works zero-config without running this skill; run `/skill:gate-setup` when you want repo-specific verification commands, trust boundaries, doc-sync pairs, built-in reviewer overrides, or custom additional reviewers.
## Arguments
- `--format gate|greptile`: Optional target format (`gate` writes `.gate.md`; `greptile` writes `.greptile/rules.md` + `.greptile/skills/threat-model.md`). Reject any other `--format` value with a clear usage error.
## Execution Flow
### Step 1: Validate Arguments and Inspect Repository
1. If `--format` is passed, verify it is strictly `gate` or `greptile` (fail fast on invalid value).
2. Inspect existing repository signals without modifying files: `AGENTS.md`, `CLAUDE.md`, `DESIGN.md`, `README.md`, `.pre-commit-config.yaml`, `Makefile`, `package.json`, `Cargo.toml`, `go.mod`, `pyproject.toml`, `.greptile/`, `greptile.json`, and `.gate.md`.
### Step 2: Resolve Target Format
- **`--format gate`:** Target `.gate.md`. If `.greptile/` already exists, note clearly that `.gate.md` coexists with `.greptile/` without duplicating Greptile's shared rules.
- **`--format greptile`:** Target `.greptile/rules.md` and `.greptile/skills/threat-model.md` (and ask if the user also wants `.gate.md` for local Phase 0 verification commands so shell commands stay out of `.greptile/`).
- **`--format` omitted:** Ask whether to write `.gate.md` (recommended for local gate configuration; coexists cleanly with `.greptile/`) or `.greptile/` (shared with GitHub Greptile).
### Step 3: Four-Question Interview (All Optional)
Pre-populate every question with detected repo defaults and let the user skip any item:
1. **Verification commands:** Deterministic Phase 0 build/lint/test commands to run before reviewers (or leave empty to keep auto-detected defaults).
2. **Trust boundaries:** External inputs, auth/secrets, exec/sandbox, network/SSRF, or filesystem boundaries requiring threat modeling.
3. **Doc-sync pairs:** `code-glob -> doc-path` mappings that should trigger `gate-doc-auditor`.
4. **Reviewers and custom additional reviewers:**
- Override built-in reviewer modes/triggers (`threat-modeler` supports `auto | always`, never `off`; `logic-reviewer`, `hygiene-reviewer`, `doc-auditor` support `auto | always | off`; custom `triggers` append to defaults).
- Optionally declare up to 4 repo-specific custom reviewers (e.g., SQL migrations, K8s/Helm charts, Terraform/IaC, API compatibility) with a lowercase-hyphen `name`, non-empty `triggers` globs, and a repo-relative `.md` `rubric` path (or inline bullets). Custom reviewers always run in a generic read-only subagent or inline lens.
### Step 4: Scaffold or Non-Destructively Merge
1. Read `references/templates.md` and render only the sections the user selected.
2. If any target file already exists, **never overwrite existing custom rules silently**: show a concise diff of the proposed additions/changes and ask for confirmation before writing.
3. Print a concise summary of created/updated files and remind the user to run `/gate-check` to test the configuration.