/go-specialist:gen-github-dir [--force] [--minimal] [--dry-run]from go-specialist
Generates a complete .github directory for Go projects with mise-based CI/CD workflows, Dependabot config, and funding setup.
Ships in go-specialist. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Instantly create a complete .github directory structure for Go projects with production-ready, mise-based GitHub Actions workflows, Dependabot configuration, and sponsorship setup.
Problem: Setting up CI/CD for Go projects requires manually creating multiple workflow files, understanding GitHub Actions syntax, and keeping tool versions in sync between local development and CI - a 30-60 minute process.
Solution: One-command generation that:
.github directory (6 files): FUNDING, dependabot, and the linter/coverage/snapshot/release workflowsjdx/mise-action@v3 then runs a task …, so CI uses the exact versions pinned in mise.tomlmise.toml exists at the repo root (creates one with detected versions if missing) — the single source of truth shared with local devCRITICAL: When generating any content (workflow files, commit messages, or any other output):
Critical checks before proceeding:
Validate Git repository:
git rev-parse --git-dir
Validate Go project:
test -f go.mod
Check existing .github directory:
test -d .github
existingGithubDir = trueexistingGithubDir = falseVerify skill assets directory:
${CLAUDE_PLUGIN_ROOT}/assets/github-workflows/FUNDING.yml exists${CLAUDE_PLUGIN_ROOT}/assets/mise/mise.toml existsCheck existing mise.toml:
test -f mise.toml
existingMise = true|false. The workflows depend on mise.toml; if it
is missing this skill will create one (Phase 3.5). An existing mise.toml
is always preserved.Parse skill arguments from $argument string:
Supported flags:
--force: Skip confirmation for existing .github directory--minimal: Generate only essential files (3 files: linter.yml, release.yml, dependabot.yml)--dry-run: Show preview without writing filesParsing logic:
arguments = split($argument by space)
for each arg in arguments:
if arg == "--force": set forceMode = true
if arg == "--minimal": set minimalMode = true
if arg == "--dry-run": set dryRunMode = true
File Selection:
Standard mode (default): All 6 files
Minimal mode (--minimal): 3 essential files
Read all template files from skill assets directory:
Files to read:
FUNDING.yml
${CLAUDE_PLUGIN_ROOT}/assets/github-workflows/FUNDING.yml.github/FUNDING.ymldependabot.yml
${CLAUDE_PLUGIN_ROOT}/assets/github-workflows/dependabot.yml.github/dependabot.ymlworkflows/linter.yml
${CLAUDE_PLUGIN_ROOT}/assets/github-workflows/workflows/linter.yml.github/workflows/linter.ymlworkflows/coverage.yml [Skip if minimal mode]
${CLAUDE_PLUGIN_ROOT}/assets/github-workflows/workflows/coverage.yml.github/workflows/coverage.ymlworkflows/snapshot.yml [Skip if minimal mode]
${CLAUDE_PLUGIN_ROOT}/assets/github-workflows/workflows/snapshot.yml.github/workflows/snapshot.ymlworkflows/release.yml
${CLAUDE_PLUGIN_ROOT}/assets/github-workflows/workflows/release.yml.github/workflows/release.ymlmise.toml [Only if existingMise == false]
${CLAUDE_PLUGIN_ROOT}/assets/mise/mise.tomlmise.toml (repo root)Template handling:
jdx/mise-action@v3 and run task …. No per-project substitution is needed.# CUSTOMIZE: commentsError handling:
Detection Function Library: Use the shared detection functions from ${CLAUDE_PLUGIN_ROOT}/assets/detection-functions.md. Read that file to get the bash detection functions (detect_git_owner, detect_go_version, detect_golangci_lint_version, detect_goreleaser_version, strip_leading_v, substitute_version_placeholders).
Detection Workflow:
Detect GitHub username:
GITHUB_USERNAME=$(detect_git_owner)
Substitute in FUNDING.yml template (only if not in minimal mode):
if [[ "$minimalMode" != "true" ]]; then
funding_template=$(echo "$funding_template" | sed "s|\[GITHUB_USERNAME\]|${GITHUB_USERNAME}|g")
fi
GITHUB_USERNAME is empty: Preserve [GITHUB_USERNAME] placeholder with warning (non-blocking)Workflow templates need no substitution. They are static and reference
jdx/mise-action@v3 + task …. All tool versioning lives in mise.toml.
Ensure mise.toml exists (create if missing):
mise.toml. If the repo has no
mise.toml, create one from the asset with detected versions:if [[ "$existingMise" != "true" ]]; then
GO_VERSION=$(detect_go_version)
GOLANGCI_LINT_VERSION=$(detect_golangci_lint_version)
GORELEASER_VERSION=$(detect_goreleaser_version)
GOLANGCI_LINT_VERSION_BARE=$(strip_leading_v "${GOLANGCI_LINT_VERSION:-v2.2.2}")
mise_template=$(substitute_version_placeholders "$mise_template" \
"GO_VERSION=${GO_VERSION:-1.25}" \
"GOLANGCI_LINT_VERSION_BARE=${GOLANGCI_LINT_VERSION_BARE:-2.2.2}" \
"GORELEASER_VERSION=${GORELEASER_VERSION:-v2.12.0}")
# Written in Phase 5.
fi
existingMise == true: do NOT modify the existing mise.toml; note it in
the report. (Prefer /gen-taskfiles to manage tool versions.)Build preview summary:
Files to be created:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[If standard mode:]
✅ .github/FUNDING.yml
✅ .github/dependabot.yml
✅ .github/workflows/linter.yml
✅ .github/workflows/coverage.yml
✅ .github/workflows/snapshot.yml
✅ .github/workflows/release.yml
Total: 6 files
[If minimal mode:]
✅ .github/dependabot.yml
✅ .github/workflows/linter.yml
✅ .github/workflows/release.yml
Total: 3 files
[If existingMise == false:]
✅ mise.toml (created — pins go/task/golangci-lint/goreleaser for dev + CI)
[If existingMise == true:]
ℹ️ mise.toml already exists — preserved (workflows will use it as-is)
[If standard mode and GITHUB_USERNAME detected:]
✅ Auto-detected Configuration
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
GitHub Settings:
• GitHub username: <GITHUB_USERNAME> (from git remote)
• Tool versions (mise.toml): Go <GO_VERSION>, golangci-lint <GOLANGCI_LINT_VERSION_BARE>, goreleaser <GORELEASER_VERSION>
[If existingGithubDir == true:]
⚠️ WARNING: .github directory already exists
[List existing files that will be overwritten:]
- .github/workflows/linter.yml (will be overwritten)
- .github/workflows/release.yml (will be overwritten)
Dry run mode:
If dryRunMode == true:
Confirmation logic:
If --force flag provided: Skip confirmation, proceed to Phase 5
If existing .github without --force:
Use AskUserQuestion:
Question: ".github directory already exists. Overwrite existing workflow files?"
Options:
1. "Yes, overwrite files" [Recommended if upgrading workflows]
2. "Show full preview first"
3. "Cancel"
If option 2: Display full content preview, then re-ask confirmation
If option 3: Exit gracefully
If new .github directory:
Use AskUserQuestion:
Question: "Create .github directory with [N] files?"
Options:
1. "Yes, create files"
2. "Show preview first"
3. "Cancel"
Directory creation:
Create .github/ directory:
mkdir -p .github
Create .github/workflows/ subdirectory:
mkdir -p .github/workflows
File writing sequence:
Write files in order (mise.toml first, then root files, then workflows):
mise.toml [Only if existingMise == false] — repo root, version-substituted.github/FUNDING.yml [Skip if minimal mode].github/dependabot.yml.github/workflows/linter.yml.github/workflows/coverage.yml [Skip if minimal mode].github/workflows/snapshot.yml [Skip if minimal mode].github/workflows/release.ymlFor each file:
Error handling:
Track results:
successfulFiles = []
failedFiles = []
for each file:
try write:
if success: add to successfulFiles
if failure: add to failedFiles
Post-creation validation: for each file in successfulFiles, confirm it exists
(e.g. test -f .github/workflows/linter.yml) and is non-zero; move any failure to
failedFiles.
Report to the user — cover these facts; no fixed layout required:
.github/dependabot.yml,
.github/workflows/linter.yml, .github/workflows/release.yml, plus
.github/FUNDING.yml, .github/workflows/coverage.yml and
.github/workflows/snapshot.yml in standard mode. Mark mise.toml as created vs.
preserved.GITHUB_USERNAME was found from the git remote, report it and
that FUNDING.yml needs no editing. If mise.toml was created, report the pinned Go,
golangci-lint and goreleaser versions.mise.toml, not the workflow files —
editing it changes both local (mise install) and CI versions. If GITHUB_USERNAME was
not detected, .github/FUNDING.yml still contains [GITHUB_USERNAME] and must be
replaced by hand. GitHub Actions permissions must be set under Settings → Actions →
General: "Workflow permissions" to "Read and write permissions", and
"Allow GitHub Actions to create and approve pull requests" checked.mise.toml and the QEMU + registry-login steps in snapshot.yml
and release.yml. The coverage threshold is limit-coverage: 70 in
.github/workflows/coverage.yml. Dependabot update intervals
(daily/weekly/monthly) are in .github/dependabot.yml.git add .github/ mise.toml and
git commit -m "ci: add mise-based GitHub Actions workflows", git push origin main,
and confirm the workflows appear and run under the repository's Actions tab.${CLAUDE_PLUGIN_ROOT}/docs/github-workflows-reference.md ·
${CLAUDE_PLUGIN_ROOT}/docs/github-workflows-troubleshooting.md · /gen-goreleaser for
.goreleaser.yml · /gen-taskfiles for Taskfile.yml (the lint/snapshot/release tasks
these workflows call) and mise.toml · https://mise.jdx.devOn failure: report which files were written, which failed and why, and that --force
retries. Partial success is a warning, total failure an error — for a total failure also
name the likely causes (permissions, disk space, filesystem restrictions).
Arguments are parsed from the argument string parameter:
--force: Skip confirmation prompt and overwrite existing files
--minimal: Generate only 3 essential files
--dry-run: Preview files without writing to disk
Parsing example:
argument = "--force --minimal"
Split by space, check for each flag:
- forceMode = true
- minimalMode = true
- dryRunMode = false
Not a Git repository:
❌ Error: Not a git repository
This skill requires a Git repository. Initialize one:
git init
git add .
git commit -m "Initial commit"
Not a Go project:
❌ Error: go.mod not found
This skill is for Go projects only. Initialize a Go module:
go mod init github.com/username/project
Skill assets missing:
❌ Error: Skill assets directory not found
The go-specialist plugin may be corrupted. Try:
1. Reinstalling the plugin
2. Updating Claude Code to latest version
3. Reporting issue at: https://github.com/sgaunet/claude-plugins/issues
Existing .github directory:
--force: Request user confirmation--force: Overwrite silentlyIndividual file write failure:
Missing optional asset (e.g., FUNDING.yml):
If mkdir fails:
❌ Error: Failed to create .github directory
Check:
1. Current directory is writable
2. Sufficient disk space
3. No existing .github file (not directory) blocking creation
Current permissions: [show with ls -ld .]
If all writes fail:
❌ Error: Failed to write any workflow files
This may indicate:
1. Permission issues in .github directory
2. Disk full
3. File system mounted read-only
Check disk space: df -h .
Check permissions: ls -la .github/
Complete mapping from skill assets to target locations:
| Source Path | Target (Relative to CWD) | Mode |
|---|---|---|
${CLAUDE_PLUGIN_ROOT}/assets/mise/mise.toml | mise.toml | Create-if-missing |
${CLAUDE_PLUGIN_ROOT}/assets/github-workflows/FUNDING.yml | .github/FUNDING.yml | Standard |
${CLAUDE_PLUGIN_ROOT}/assets/github-workflows/dependabot.yml | .github/dependabot.yml | All |
${CLAUDE_PLUGIN_ROOT}/assets/github-workflows/workflows/linter.yml | .github/workflows/linter.yml | All |
${CLAUDE_PLUGIN_ROOT}/assets/github-workflows/workflows/coverage.yml | .github/workflows/coverage.yml | Standard |
${CLAUDE_PLUGIN_ROOT}/assets/github-workflows/workflows/snapshot.yml | .github/workflows/snapshot.yml | Standard |
${CLAUDE_PLUGIN_ROOT}/assets/github-workflows/workflows/release.yml | .github/workflows/release.yml | All |
Mode Legend:
mise.toml; an existing one is preservedWorks with:
/commit: Commit generated .github directory/gen-goreleaser: Generate .goreleaser.yml config (required for release/snapshot workflows)/gen-linter: Generate .golangci.yml config (required for linter workflow)/create-issue: Create issue to track customization tasksTypical Workflow:
# 1. Generate dev tooling first (Taskfile.yml + mise.toml)
/gen-taskfiles
# 2. Generate .github directory (reuses mise.toml; creates it if you skipped step 1)
/gen-github-dir
# 3. Generate supporting configs
/gen-linter # Creates .golangci.yml
/gen-goreleaser # Creates .goreleaser.yml
# 4. Commit everything
git add .github/ mise.toml Taskfile*.yml .golangci.yml .goreleaser.yml
git commit -m "ci: add mise-based GitHub Actions workflows and supporting configs"
# 5. Push and verify
git push origin main
# Check: https://github.com/username/repo/actions
Required for workflows to function:
mise.toml (auto-created by this skill if missing):
jdx/mise-action@v3 in every workflow/gen-taskfilesTaskfile.yml with required tasks (lint, snapshot, release):
version: '3'
tasks:
lint:
cmds: [golangci-lint run ./...]
snapshot:
cmds: [goreleaser release --snapshot --clean]
release:
cmds: [goreleaser release --clean]
/gen-taskfiles (also emits mise.toml).golangci.yml configuration:
/gen-linter (golangci-lint itself comes from mise.toml).goreleaser.yml configuration:
/gen-goreleaser (required for snapshot.yml and release.yml)GitHub repository settings:
Optional enhancements:
Coverage badge in README.md:

GitHub Sponsors setup:
Dependabot auto-merge:
All template files include # CUSTOMIZE: comments marking required changes:
FUNDING.yml:
github: [YOUR_GITHUB_USERNAME] → Replace with your usernamemise.toml:
go, golangci-lint, goreleaser) → adjust as needed (used by dev + CI)buildx, docker-cli) → uncomment if publishing imagesworkflows/*.yml:
dependabot.yml:
interval: monthly → Change to daily/weekly for active projectsopen-pull-requests-limit: 10 → Adjust PR concurrencycoverage.yml:
limit-coverage: "70" → Adjust coverage thresholdsed -i '/cmd/d' → Remove if including cmd package in coverageBefore running this skill:
${CLAUDE_PLUGIN_ROOT}/docs/After generation:
# CUSTOMIZE: comments in workflow filesOngoing maintenance:
This skill does NOT:
/gen-taskfiles, which also manages mise.toml)/gen-goreleaser skill)/gen-linter skill)--force to overwrite)Scope boundaries:
.github/ directory structure# Standard generation (6 files)
/gen-github-dir
# Minimal setup (3 essential files)
/gen-github-dir --minimal
# Preview before creating
/gen-github-dir --dry-run
# Overwrite existing workflows
/gen-github-dir --force
# Minimal with force (quick upgrade)
/gen-github-dir --minimal --force
# Preview minimal mode
/gen-github-dir --minimal --dry-run
Standard mode (default):
.github files + mise.toml (if missing)Minimal mode (--minimal):
.github files + mise.toml (if missing)Dry run mode (--dry-run):
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub sgaunet/claude-plugins --plugin go-specialist11 skills in this plugin
/gen-forgejo-dirGenerate complete .forgejo/workflows directory with Forgejo Actions workflows (test, lint, release) for Go projects/gen-gitlab-ciGenerate GitLab CI/CD pipeline configuration for Go projects with testing, coverage, and automated releases/gen-goreleaserGenerate GoReleaser configuration with multi-arch Docker builds and release automation/gen-linterGenerate .golangci.yml configuration for Go linting with 90+ linters/gen-taskfilesGenerate mise.toml, Taskfile.yml, Taskfile_dev.yml, and .pre-commit-config.yaml for Go projects with comprehensive task automation/go-blackboxDetect white box Go tests and propose conversion to black box tests (package foo_test), creating export_test.go bridges when tests need access to internals.Other plugins' skills for the same job