From buehler
Set up buehler for a repository — interactive config wizard, preflight checks, drift detection, and model-driven remediation
How this skill is triggered — by the user, by Claude, or both
Slash command
/buehler:setupThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
**Type:** Adaptive. Conversational when creating config, silent when checking drift.
Type: Adaptive. Conversational when creating config, silent when checking drift.
.github/buehler.yamlYou MUST create a task for each of these items and complete them in order:
Auto-detect owner/repo from git remote:
gh repo view --json owner,name --jq '.owner.login + "/" + .name'
Also detect the default branch:
git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@' || echo "main"
Check if .github/buehler.yaml exists:
Present recommended defaults section by section. For each section, show the default and ask: "Looks good, or want to change anything?"
Section order:
Project identity
project:
owner: {detected}
repo: {detected}
base_branch: {detected}
Project board — create or reuse a GitHub Project board for visual tracking.
gh project list --owner {owner} --format jsongh project create --owner {owner} --title "{title}" --format json — extract numbergh project view {number} --owner {owner} --format json --jq '.id'gh api graphql -f query='{ repository(owner: "{owner}", name: "{repo}") { id } }' --jq '.data.repository.id'mutation { linkProjectV2ToRepository(input: { projectId: "{project_node_id}", repositoryId: "{repo_node_id}" }) { clientMutationId } }
board_number and board_title in configgh api users/{owner} --jq '.type' (returns "User" or "Organization")"First, update the board's Status field options. Open this URL:"
https://github.com/{users|orgs}/{owner}/projects/{number}/settings/fieldsEdit the Status field and ensure these options exist (rename or add as needed):
- Ready
- In Progress
- In Review
- Blocked
- Done
Let me know when you've updated the Status field.
"Now configure the board's automation. Open this URL:"
https://github.com/{users|orgs}/{owner}/projects/{number}/settings/workflowsEnable these workflows:
- Item added to project → Set status to "Ready"
- Item closed → Set status to "Done"
- Item reopened → Set status to "Ready"
Also set the default view to Board layout grouped by Status.
Let me know when you've done this.
Sizing buckets
sizing:
metric: tokens
buckets:
xs: { lower: 1000, upper: 10000, description: "Trivial change, single file" }
s: { lower: 10000, upper: 50000, description: "Small feature, few files" }
m: { lower: 50000, upper: 200000, description: "Moderate feature, multiple files" }
l: { lower: 200000, upper: 500000, description: "Large feature, significant scope" }
xl: { lower: 500000, upper: null, description: "Must be split" }
Wiki settings
wiki:
directory: .wiki
auto_clone: true
Labels — show the full default taxonomy:
Approval gates — these control where buehler pauses to ask for your permission. Present as a checklist of plain-language descriptions (not raw YAML). Default is fully autonomous (no gates enabled):
Ask: "These are all off by default, meaning buehler will run autonomously. Want to enable any of these checkpoints?"
Map selections back to approval_gates keys in the generated YAML:
approval_gates:
before_dispatch: false # "Pause before dispatching agents"
before_merge: false # "Pause before merging PRs"
before_close_milestone: false # "Pause before closing milestones"
before_wiki_update: false # "Pause before updating wiki"
Subagent permissions — buehler agents need shell access to run git, tests, and linting.
Auto-detect the project's stack using the same heuristics as build command detection:
Bash(git:*), Bash(gh:*), Bash(gh issue *)package.json exists → add Bash(npm:*), Bash(npx:*), Bash(node:*)Cargo.toml exists → add Bash(cargo:*)pyproject.toml exists → add Bash(python3:*), Bash(pytest:*), Bash(ruff:*)go.mod exists → add Bash(go:*)Makefile exists → add Bash(make:*)Present the proposed permissions:
buehler agents need shell access to run git, tests, and linting in parallel.
Based on your project, here are the permissions I'd add to .claude/settings.json:
- Bash(git:*)
- Bash(gh:*)
- Bash(gh issue *)
- Bash(npm:*) <- detected from package.json
- Bash(npx:*)
- Bash(node:*)
Looks good, or want to change anything?
After confirmation, read .claude/settings.json if it exists, merge the new permissions into the permissions.allow array (preserving existing entries), and write it back using the Write tool.
CODEOWNERS — buehler requires human review approval before merging PRs (review.require_codeowners defaults to true). This means a CODEOWNERS file must exist.
Check for existing CODEOWNERS in standard locations (CODEOWNERS, .github/CODEOWNERS, docs/CODEOWNERS):
gh api repos/{owner}/{repo} --jq '.owner.login'.github/CODEOWNERS:
# Default: repo owner is responsible for all files
* @{owner}
.github/CODEOWNERS using the Write toolIf the user explicitly opts out of CODEOWNERS, set review.require_codeowners: false in the config and warn: "Without CODEOWNERS, buehler may self-merge PRs without human review."
Remaining config sections (branches, worktrees, commands, epics, validation, review) use sensible defaults and can be customized by editing .github/buehler.yaml directly after setup completes.
After all sections are confirmed, write .github/buehler.yaml using the Write tool directly (do NOT run mkdir first — Write creates parent directories automatically, and a separate mkdir triggers an unnecessary permission prompt).
Run preflight silently:
{PLUGIN_ROOT}/scripts/preflight-checks/runner.sh
Parse the JSONL output. Three outcomes:
Run the full preflight suite:
{PLUGIN_ROOT}/scripts/preflight-checks/runner.sh
Parse each JSONL line. Present results grouped by category:
## Preflight Results
### Environment
- [pass] gh 2.45.0 authenticated as {user}
- [pass] Inside a git repository
- [pass] GitHub remote found
### Repository Capabilities
- [pass] Wiki is enabled
- [warn] Issue Types API not available — will use type: labels
- [pass] Sub-issues API available
### Configuration
- [pass] Config file found
- [pass] YAML syntax valid
### Labels
- [fail] Missing label: priority:critical
- [fail] Missing label: status:ready
- [pass] Label exists: size:m
{...}
### Wiki
- [pass] Wiki repo is cloneable
- [fail] Home.md does not exist
- [warn] _Meta-Template.md does not exist yet
If any failures, proceed to Step 6. If all pass, report success and stop.
Read each failed check's fix field. Decide per-check:
Model can execute directly:
gh label create commands from the fix fieldsmerge key in config → suggest removing it: "The merge section is no longer used — merge strategy is now hardcoded. Remove the merge: block from your .github/buehler.yaml."linkProjectV2ToRepository GraphQL mutation.wiki/ (or configured wiki.directory value) to .gitignore.claude/settings.json, merge required Bash permissions into permissions.allow, write back.github/CODEOWNERS with * @{owner} as default, confirm with userbash scripts/create-stabilization-ticket.sh --owner {owner} --repo {repo} --milestone-title '{title}' --milestone-number {number} for each flagged milestoneNeeds human action:
gh auth login and let me know when done."git remote add origin https://github.com/{owner}/{repo}.git"After executing all model-fixable items and confirming human-fixable items, proceed to Step 7.
Re-run the preflight to confirm all checks now pass:
{PLUGIN_ROOT}/scripts/preflight-checks/runner.sh
superpowers:brainstorming to create a PRD), or if you already have a PRD, run /structure to convert it into GitHub issues and a milestone."fix suggestions: delimiter — never /buehler:{skill} formatFetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.
Applies a firm's KYC/AML rules grid to parsed onboarding records: assigns risk rating, checks required documents, outputs rule outcomes with citations, and routes for escalation.
Generates daily or weekly digests of activity from connected sources (chat, email, docs, tasks, CRM), highlighting action items, decisions, mentions, and project updates.
npx claudepluginhub corrigantj/buehler --plugin buehler