Skip to content

aiskillstore/marketplace / skills/0xbigboss/go-best-practices

go-best-practices

Verified

Use when reading or writing Go files (.go, go.mod).

FileKindSize
SKILL.mdskill md2.6 KB
skill-report.jsonconfig21.5 KB

skill-report.json

View on GitHub
{
  "schema_version": "2.0",
  "meta": {
    "generated_at": "2026-07-06T13:20:24.777Z",
    "slug": "0xbigboss-go-best-practices",
    "source_url": "https://github.com/0xBigBoss/claude-code/tree/main/.claude/skills/go-best-practices",
    "source_ref": "main",
    "model": "codex",
    "analysis_version": "3.0.0",
    "source_type": "community",
    "content_hash": "884ef41b4cdd0172c39e48b7cf8d284646072d4ae9654c6a045b06d3c9ed91c1",
    "tree_hash": "806577a20f2fc4de432084441d98736f669c0c0ed4a94fcc3db2181f5fdffe28",
    "provenance": {
      "model_effective": "codex",
      "fallback_chain": [
        {
          "agent": "codex",
          "outcome": "success"
        }
      ],
      "analysis_version": "3.0.0"
    }
  },
  "skill": {
    "name": "go-best-practices",
    "description": "Provides concise Go guidance for type-safe design, interface boundaries, functional options, error handling, and structured logging.",
    "summary": "Guide Claude, Codex, and Claude Code toward idiomatic Go design and review patterns.",
    "icon": "📦",
    "version": "1.0.1",
    "author": "0xBigBoss",
    "license": "MIT",
    "tags": [
      "go",
      "golang",
      "best-practices",
      "code-review",
      "error-handling"
    ],
    "supported_tools": [
      "claude",
      "codex",
      "claude-code"
    ],
    "risk_factors": [
      "external_commands"
    ],
    "category": "coding"
  },
  "security_audit": {
    "risk_level": "safe",
    "is_blocked": false,
    "safe_to_publish": true,
    "analysis_status": "ok",
    "summary": "All static external command findings are false positives caused by markdown code fences and inline backticks in SKILL.md. The system reconnaissance findings are also false positives from ordinary Go prose and function examples; no prompt injection, command execution instruction, or data exfiltration intent was found.",
    "remediation": [],
    "risk_factor_evidence": [
      {
        "factor": "external_commands",
        "evidence": [
          {
            "file": "SKILL.md",
            "line_start": 15,
            "line_end": 28
          },
          {
            "file": "SKILL.md",
            "line_start": 28,
            "line_end": 31
          },
          {
            "file": "SKILL.md",
            "line_start": 31,
            "line_end": 42
          },
          {
            "file": "SKILL.md",
            "line_start": 42,
            "line_end": 45
          },
          {
            "file": "SKILL.md",
            "line_start": 45,
            "line_end": 66
          },
          {
            "file": "SKILL.md",
            "line_start": 66,
            "line_end": 69
          },
          {
            "file": "SKILL.md",
            "line_start": 69,
            "line_end": 84
          },
          {
            "file": "SKILL.md",
            "line_start": 84,
            "line_end": 87
          },
          {
            "file": "SKILL.md",
            "line_start": 87,
            "line_end": 98
          },
          {
            "file": "SKILL.md",
            "line_start": 98,
            "line_end": 102
          },
          {
            "file": "SKILL.md",
            "line_start": 102,
            "line_end": 102
          },
          {
            "file": "SKILL.md",
            "line_start": 103,
            "line_end": 108
          },
          {
            "file": "SKILL.md",
            "line_start": 108,
            "line_end": 112
          },
          {
            "file": "SKILL.md",
            "line_start": 112,
            "line_end": 113
          },
          {
            "file": "SKILL.md",
            "line_start": 113,
            "line_end": 124
          }
        ]
      }
    ],
    "static_findings": [
      {
        "id": "external_commands:SKILL.md:15:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 15,
        "line_end": 28,
        "snippet": "```go"
      },
      {
        "id": "external_commands:SKILL.md:28:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 28,
        "line_end": 31,
        "snippet": "```"
      },
      {
        "id": "external_commands:SKILL.md:31:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 31,
        "line_end": 42,
        "snippet": "```go"
      },
      {
        "id": "external_commands:SKILL.md:42:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 42,
        "line_end": 45,
        "snippet": "```"
      },
      {
        "id": "external_commands:SKILL.md:45:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 45,
        "line_end": 66,
        "snippet": "```go"
      },
      {
        "id": "external_commands:SKILL.md:66:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 66,
        "line_end": 69,
        "snippet": "```"
      },
      {
        "id": "external_commands:SKILL.md:69:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 69,
        "line_end": 84,
        "snippet": "```go"
      },
      {
        "id": "external_commands:SKILL.md:84:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 84,
        "line_end": 87,
        "snippet": "```"
      },
      {
        "id": "external_commands:SKILL.md:87:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 87,
        "line_end": 98,
        "snippet": "```go"
      },
      {
        "id": "external_commands:SKILL.md:98:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 98,
        "line_end": 102,
        "snippet": "```"
      },
      {
        "id": "external_commands:SKILL.md:102:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 102,
        "line_end": 102,
        "snippet": "Wrap errors with `%w` to preserve the chain for `errors.Is` / `errors.As`:"
      },
      {
        "id": "external_commands:SKILL.md:103:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 103,
        "line_end": 108,
        "snippet": "```go"
      },
      {
        "id": "external_commands:SKILL.md:108:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 108,
        "line_end": 112,
        "snippet": "```"
      },
      {
        "id": "external_commands:SKILL.md:112:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 112,
        "line_end": 113,
        "snippet": "Use `log/slog` with structured key-value pairs:"
      },
      {
        "id": "external_commands:SKILL.md:113:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 113,
        "line_end": 124,
        "snippet": "```go"
      },
      {
        "id": "blocker:SKILL.md:12:system-reconnaissance",
        "category": "blocker",
        "severity": "low",
        "pattern": "System reconnaissance",
        "file": "SKILL.md",
        "line_start": 12,
        "line_end": 12,
        "snippet": "Use Go's type system to prevent invalid states at compile time."
      },
      {
        "id": "blocker:SKILL.md:20:system-reconnaissance",
        "category": "blocker",
        "severity": "low",
        "pattern": "System reconnaissance",
        "file": "SKILL.md",
        "line_start": 20,
        "line_end": 20,
        "snippet": "func GetUser(id UserID) (*User, error) {"
      },
      {
        "id": "blocker:SKILL.md:25:system-reconnaissance",
        "category": "blocker",
        "severity": "low",
        "pattern": "System reconnaissance",
        "file": "SKILL.md",
        "line_start": 25,
        "line_end": 25,
        "snippet": "func (id UserID) String() string {"
      },
      {
        "id": "blocker:SKILL.md:34:system-reconnaissance",
        "category": "blocker",
        "severity": "low",
        "pattern": "System reconnaissance",
        "file": "SKILL.md",
        "line_start": 34,
        "line_end": 34,
        "snippet": "GetByID(ctx context.Context, id UserID) (*User, error)"
      }
    ],
    "finding_verdicts": [
      {
        "id": "external_commands:SKILL.md:15:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.97,
        "reason": "This is an opening markdown Go code fence for a custom type example, not Ruby or shell execution. The surrounding lines show static Go declarations only."
      },
      {
        "id": "external_commands:SKILL.md:28:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.97,
        "reason": "This is a closing markdown code fence, not an executable backtick expression. It only terminates the preceding Go example."
      },
      {
        "id": "external_commands:SKILL.md:31:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.97,
        "reason": "This is an opening markdown Go code fence for an interface example. No shell command or runtime execution instruction is present."
      },
      {
        "id": "external_commands:SKILL.md:42:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.97,
        "reason": "This is a closing markdown code fence after a Go interface example. It is documentation formatting, not command execution."
      },
      {
        "id": "external_commands:SKILL.md:45:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.97,
        "reason": "This is an opening markdown Go code fence for an enum example. The content is ordinary Go sample code with no external command invocation."
      },
      {
        "id": "external_commands:SKILL.md:66:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.97,
        "reason": "This is a closing markdown code fence after the enum example. It does not execute anything or instruct the agent to run commands."
      },
      {
        "id": "external_commands:SKILL.md:69:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.97,
        "reason": "This is an opening markdown Go code fence for a functional options example. It is documentation syntax, not Ruby or shell execution."
      },
      {
        "id": "external_commands:SKILL.md:84:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.97,
        "reason": "This is a closing markdown code fence after the functional options example. No command execution behavior is described."
      },
      {
        "id": "external_commands:SKILL.md:87:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.97,
        "reason": "This is an opening markdown Go code fence for an embedding example. The sample defines structs only and has no external command use."
      },
      {
        "id": "external_commands:SKILL.md:98:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.97,
        "reason": "This is a closing markdown code fence after a struct composition example. It is safe markdown formatting."
      },
      {
        "id": "external_commands:SKILL.md:102:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.97,
        "reason": "The backticks are inline markdown around Go formatting and standard library names. They are not shell backticks and do not invoke commands."
      },
      {
        "id": "external_commands:SKILL.md:103:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.97,
        "reason": "This is an opening markdown Go code fence for an error handling example. The sample wraps an error and does not run external commands."
      },
      {
        "id": "external_commands:SKILL.md:108:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.97,
        "reason": "This is a closing markdown code fence after the error handling example. It is not an executable construct."
      },
      {
        "id": "external_commands:SKILL.md:112:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.97,
        "reason": "The backticks are inline markdown around a Go package name. The line recommends structured logging and does not execute commands."
      },
      {
        "id": "external_commands:SKILL.md:113:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.97,
        "reason": "This is an opening markdown Go code fence for a structured logging example. The example imports log/slog and logs local values only."
      },
      {
        "id": "blocker:SKILL.md:12:system-reconnaissance",
        "verdict": "false_positive",
        "confidence": 0.96,
        "reason": "The line describes using Go types to prevent invalid states. It does not request system inspection, host discovery, or reconnaissance."
      },
      {
        "id": "blocker:SKILL.md:20:system-reconnaissance",
        "verdict": "false_positive",
        "confidence": 0.96,
        "reason": "This is a Go function signature in a domain type example. It does not inspect the system or gather environment information."
      },
      {
        "id": "blocker:SKILL.md:25:system-reconnaissance",
        "verdict": "false_positive",
        "confidence": 0.96,
        "reason": "This is a String method example for a custom type. It is ordinary Go documentation, not reconnaissance behavior."
      },
      {
        "id": "blocker:SKILL.md:34:system-reconnaissance",
        "verdict": "false_positive",
        "confidence": 0.96,
        "reason": "This is an interface method signature for a repository example. It has no host, network, or environment discovery behavior."
      }
    ],
    "semantic_findings": [],
    "critical_findings": [],
    "high_findings": [],
    "medium_findings": [],
    "low_findings": [],
    "dangerous_patterns": [],
    "files_scanned": 1,
    "total_lines": 125,
    "audit_model": "codex",
    "audited_at": "2026-07-06T13:20:24.777Z",
    "agent_auto_install_policy": "allowed",
    "manual_install_policy": "allowed"
  },
  "content": {
    "user_title": "Improve Go Code With Best Practices",
    "value_statement": "Go projects can drift into weak types, unclear interfaces, and inconsistent error handling. This skill gives Claude, Codex, and Claude Code focused guidance for idiomatic Go design, errors, and logging.",
    "seo_keywords": [
      "Claude",
      "Codex",
      "Claude Code",
      "Go best practices",
      "Golang coding guide",
      "Go error handling",
      "Go interfaces",
      "structured logging",
      "functional options",
      "type safe Go"
    ],
    "actual_capabilities": [
      "Recommends custom domain types to prevent invalid states.",
      "Shows how to define narrow Go interfaces for behavior contracts.",
      "Demonstrates enum-style constants with explicit default handling.",
      "Explains functional options for flexible constructor design.",
      "Covers error wrapping and structured logging with standard Go patterns."
    ],
    "limitations": [
      "Does not run Go tests or formatting tools by itself.",
      "Does not cover concurrency, generics, modules, or build pipelines in depth.",
      "Examples are guidance snippets and may need project-specific adaptation.",
      "Does not infer team standards unless the user provides that context."
    ],
    "use_cases": [
      {
        "title": "Refactor Domain Models",
        "description": "Identify weak primitive types and replace them with clearer domain concepts.",
        "target_user": "Backend developers"
      },
      {
        "title": "Review Go Pull Requests",
        "description": "Check interfaces, constructors, error handling, and logging for consistent Go style.",
        "target_user": "Engineering leads"
      },
      {
        "title": "Guide AI Coding Sessions",
        "description": "Give Claude, Codex, or Claude Code focused rules before editing Go files.",
        "target_user": "AI-assisted developers"
      }
    ],
    "prompt_templates": [
      {
        "title": "Review a Go File",
        "scenario": "Beginner review of one file.",
        "prompt": "Review this Go file for type safety, clear interfaces, error wrapping, and structured logging. Explain each suggestion clearly."
      },
      {
        "title": "Improve Domain Types",
        "scenario": "Intermediate refactor of model boundaries.",
        "prompt": "Find primitive values that represent domain concepts. Suggest Go types and method names that make invalid states harder to create."
      },
      {
        "title": "Refactor Constructors",
        "scenario": "Intermediate design pass for configuration-heavy code.",
        "prompt": "Review these constructors and configuration paths. Recommend functional options only where they reduce call-site complexity."
      },
      {
        "title": "Audit Service Boundaries",
        "scenario": "Advanced review across packages.",
        "prompt": "Audit this Go package boundary. Evaluate interfaces, returned structs, error chains, and logging fields for maintainable service design."
      }
    ],
    "output_examples": [
      {
        "input": "Review a package that uses plain strings for user IDs and order IDs.",
        "output": [
          "Suggest distinct domain types for each identifier.",
          "Explain how compile-time checks reduce accidental mixing.",
          "List migration steps for affected function signatures."
        ]
      },
      {
        "input": "Improve error handling around an external service call.",
        "output": [
          "Recommend preserving the original error chain.",
          "Add context that names the failed operation.",
          "Avoid hiding errors behind generic messages."
        ]
      },
      {
        "input": "Review logging in a widget creation workflow.",
        "output": [
          "Recommend structured fields for component, name, and identifier.",
          "Use debug logs for lifecycle details.",
          "Avoid logging sensitive values without a clear need."
        ]
      }
    ],
    "best_practices": [
      "Provide real Go files or clear package context before asking for refactors.",
      "Ask for tradeoffs before applying patterns to small packages.",
      "Validate suggested changes with project tests and formatting tools."
    ],
    "anti_patterns": [
      "Applying every pattern to trivial code without a design reason.",
      "Replacing project conventions without checking team standards.",
      "Treating short examples as complete production implementations."
    ],
    "faq": [
      {
        "question": "What does this skill help with?",
        "answer": "It helps review and write Go code using type safety, focused interfaces, error handling, and structured logging patterns."
      },
      {
        "question": "Does it write complete Go applications?",
        "answer": "No. It provides language-specific guidance and examples for Go design and review tasks."
      },
      {
        "question": "Can it review existing Go code?",
        "answer": "Yes. Provide the relevant files and ask for recommendations based on the included Go practices."
      },
      {
        "question": "Does it run gofmt or tests?",
        "answer": "No. The AI tool using the skill may run tools only when you ask and the environment allows it."
      },
      {
        "question": "Which AI tools can use it?",
        "answer": "The report lists support for Claude, Codex, and Claude Code."
      },
      {
        "question": "Is it only for advanced Go users?",
        "answer": "No. It includes simple examples, but advanced users can apply the patterns across package boundaries."
      }
    ]
  },
  "file_structure": [
    {
      "name": "SKILL.md",
      "type": "file",
      "path": "SKILL.md",
      "lines": 125
    }
  ]
}
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall