Back to list
synaptiai

repo-config

by synaptiai

The Synapti Marketplace is a curated collection of Claude Code plugins designed for AI-augmented development + advanced analytical and research tasks. Each plugin provides specialized agents, skills, and commands that extend Claude Code's capabilities in specific domains.

0🍴 0📅 Jan 25, 2026

SKILL.md


name: repo-config description: Use when needing to get the default branch, detect repository settings, fetch available labels, get repo info for API calls, or when any gh-workflow command needs dynamic repository configuration instead of hardcoded values. version: 1.0.0

Repository Configuration

This skill provides dynamic repository configuration for all gh-workflow commands, auto-detecting settings so commands work in any repository without hardcoding.

Use TodoWrite to track these mandatory steps:

Quick Reference

Get Repository Info

# Full repository details
gh repo view --json name,owner,defaultBranchRef,url,description

# Just the default branch
gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name'

# Repository owner/name
gh repo view --json nameWithOwner --jq '.nameWithOwner'

Get Labels

# List all labels (always fetch dynamically, never hardcode)
gh label list

# Check if specific label exists
gh label list --search "bug"

Detect Branch Naming Convention

# Analyze existing branches for patterns
git branch -r --list 'origin/feature/*' | head -5
git branch -r --list 'origin/fix/*' | head -5

# Check recent branch names
git for-each-ref --sort=-committerdate --format='%(refname:short)' refs/remotes/origin/ | head -10

Detect Commit Convention

# Analyze recent commits for patterns
git log --oneline -20 | head -20

Configuration Detection

Default Branch

Always detect dynamically:

DEFAULT_BRANCH=$(gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name')

Common values: main, master, develop

Repository Identification

# Get owner/repo for API calls
REPO=$(gh repo view --json nameWithOwner --jq '.nameWithOwner')

# Use in gh api calls
gh api repos/$REPO/pulls/123/comments

Label Strategy

Never hardcode labels. Always fetch dynamically:

# Get available labels
gh label list

# Present to user with AskUserQuestion tool
# Let user select from actual available labels

Branch Naming Patterns

Detect from existing branches or use defaults:

TypePatternExample
Featurefeature/issue-{N}-{desc}feature/issue-42-add-login
Fixfix/issue-{N}-{desc}fix/issue-13-typo
Docsdocs/issue-{N}-{desc}docs/issue-7-readme

Commit Conventions

Detect or default to conventional commits:

PrefixUsage
feat:New features
fix:Bug fixes
docs:Documentation
refactor:Code refactoring
test:Test changes
chore:Maintenance

Usage in Commands

Before Any Repository Operation

# Step 1: Get repo info
REPO_INFO=$(gh repo view --json nameWithOwner,defaultBranchRef)
REPO=$(echo $REPO_INFO | jq -r '.nameWithOwner')
DEFAULT_BRANCH=$(echo $REPO_INFO | jq -r '.defaultBranchRef.name')

# Step 2: Use detected values
gh pr create --base $DEFAULT_BRANCH ...
gh api repos/$REPO/pulls/123/comments

For Label Operations

# Step 1: Fetch available labels
gh label list

# Step 2: Use AskUserQuestion tool to let user select
# Step 3: Apply selected labels
gh issue create --label "selected-label"

Best Practices

Integration Points

All gh-workflow commands should:

  1. Reference this skill for configuration patterns
  2. Use dynamic detection instead of hardcoded values
  3. Fall back to sensible defaults if detection fails
  4. Use the AskUserQuestion tool when user input is needed

Grep Patterns

To find configuration usage in the codebase:

# Find hardcoded branch references
grep -r "main\|master" --include="*.md" plugins/

# Find label references
grep -r "label" --include="*.md" plugins/

# Find gh repo commands
grep -r "gh repo\|gh issue\|gh pr" --include="*.md" plugins/

Error Handling

If gh commands fail, check:

  • Is the user authenticated? gh auth status
  • Is this a git repository? git rev-parse --git-dir
  • Does the repository have a GitHub remote? git remote -v

Report clear, actionable error messages.

Score

Total Score

60/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

+10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon