MCPInstall

go-skills

Shared Go best practices for LlamaFarm CLI. Covers idiomatic patterns, error handling, and testing.

Installs
55
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/llama-farm/llamafarm --skill go-skills
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads go-skills automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

Go Skills for LlamaFarm CLI

Shared Go best practices for LlamaFarm CLI development. These guidelines ensure idiomatic, maintainable, and secure Go code.

Tech Stack

  • Go 1.24+
  • Cobra (CLI framework)
  • Bubbletea (TUI framework)
  • Lipgloss (terminal styling)

Directory Structure

cli/
  cmd/           # Command implementations
    config/      # Configuration types and loading
    orchestrator/ # Service management
    utils/       # Shared utilities
    version/     # Version and upgrade handling
  internal/      # Internal packages
    tui/         # TUI components
    buildinfo/   # Build information

Quick Reference

Error Handling

  • Always wrap errors with context: fmt.Errorf("operation failed: %w", err)
  • Use sentinel errors for expected conditions: var ErrNotFound = errors.New("not found")
  • Check errors immediately after function calls

Concurrency

  • Use sync.Mutex for shared state protection
  • Use sync.RWMutex when reads dominate writes
  • Use channels for goroutine communication
  • Always use defer for mutex unlocks

Testing

  • Use table-driven tests for comprehensive coverage
  • Use interfaces for mockability
  • Test file names: *_test.go in same package

Security

  • Never log credentials or tokens
  • Redact sensitive headers in debug logs
  • Validate all external input
  • Use context.Context for cancellation

Checklist Files

FileDescription
patterns.mdIdiomatic Go patterns
concurrency.mdGoroutines, channels, sync
error-handling.mdError wrapping, sentinels
testing.mdTable-driven tests, mocks
security.mdInput validation, secure coding

Go Proverbs to Remember

  1. "Don't communicate by sharing memory; share memory by communicating"
  2. "Errors are values"
  3. "A little copying is better than a little dependency"
  4. "Clear is better than clever"
  5. "Design the architecture, name the components, document the details"

Common Patterns in This Codebase

HTTP Client Interface

type HTTPClient interface {
    Do(req *http.Request) (*http.Response, error)
}

Process Management with Mutex

type ProcessManager struct {
    mu        sync.RWMutex
    processes map[string]*ProcessInfo
}

Cobra Command Pattern

var myCmd = &cobra.Command{
    Use:   "mycommand",
    Short: "Brief description",
    RunE: func(cmd *cobra.Command, args []string) error {
        // Implementation
        return nil
    },
}

Bubbletea Model Pattern

type myModel struct {
    // State fields
}

func (m myModel) Init() tea.Cmd { return nil }
func (m myModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) { /* ... */ }
func (m myModel) View() string { return "" }

FAQ

What does the go-skills skill do?

Shared Go best practices for LlamaFarm CLI. Covers idiomatic patterns, error handling, and testing.

How do I install go-skills?

Run npx skills add https://github.com/llama-farm/llamafarm --skill go-skills in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/go-skills/ (personal) or .claude/skills/go-skills/ (project).

Which AI agents can use go-skills?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is go-skills safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains go-skills?

It is published by llama-farm in llama-farm/llamafarm. It has 55 recorded installs.

More from llama-farm/llamafarm

View all →

code-review

llama-farm/llamafarm

Comprehensive code review for diffs. Analyzes changed code for security vulnerabilities, anti-patterns, and quality issues. Auto-detects domain (frontend/backend) from file paths.

commit-push-pr

llama-farm/llamafarm

Open the skill to read its SKILL.md instructions.

electron-skills

llama-farm/llamafarm

Electron patterns for LlamaFarm Desktop. Covers main/renderer processes, IPC, security, and packaging.

Security85 installs

typescript-skills

llama-farm/llamafarm

Shared TypeScript best practices for Designer and Electron subsystems.

python-skills

llama-farm/llamafarm

Open the skill to read its SKILL.md instructions.

68 installs

react-skills

llama-farm/llamafarm

React 18 patterns for LlamaFarm Designer. Covers components, hooks, TanStack Query, and testing.

Popular testing & qa skills

View category →

tdd

mattpocock/skills

Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.

Testing & QA1.2M installs

grilling

mattpocock/skills

Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.

Testing & QA996.2K installs

migrate-to-shoehorn

mattpocock/skills

Migrate test files from as type assertions to @total-typescript/shoehorn. Use when user mentions shoehorn, wants to replace as in tests, or needs partial test data.

Testing & QA484.1K installs

run-train

lllllllama/rigorpilot-skills

Rigor Train skill for deep learning research repositories. Use when a documented or selected training command should be run conservatively for startup verification, short-run verification, full kickoff, or resume, with command, config, seed, log, checkpoint, status, and metric evidence written to standardized trainoutputs/. Do not use for environment setup, exploratory sweeps, speculative idea implementation, or end-to-end orchestration.

Testing & QA337.8K installs

test-driven-development

obra/superpowers

Use when implementing any feature or bugfix, before writing implementation code

Testing & QA261.8K installs

Use when implementation is complete, all tests pass, and you need to decide how to integrate the work

Testing & QA216.8K installs