
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.
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:
| Type | Pattern | Example |
|---|---|---|
| Feature | feature/issue-{N}-{desc} | feature/issue-42-add-login |
| Fix | fix/issue-{N}-{desc} | fix/issue-13-typo |
| Docs | docs/issue-{N}-{desc} | docs/issue-7-readme |
Commit Conventions
Detect or default to conventional commits:
| Prefix | Usage |
|---|---|
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:
- Reference this skill for configuration patterns
- Use dynamic detection instead of hardcoded values
- Fall back to sensible defaults if detection fails
- 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.
スコア
総合スコア
リポジトリの品質指標に基づく評価
SKILL.mdファイルが含まれている
ライセンスが設定されている
100文字以上の説明がある
GitHub Stars 100以上
3ヶ月以内に更新がある
10回以上フォークされている
オープンIssueが50未満
プログラミング言語が設定されている
1つ以上のタグが設定されている
レビュー
レビュー機能は近日公開予定です