Skip to content

Development & Engineering

Idiomatic Go

Free

Idiomatic Go rules: explicit error handling, interface-based design, context-first concurrency.

Difficulty foundational

Purpose

Install the original Idiomatic Go rule from PatrickJS/awesome-cursorrules and use it in Cursor.

Procedure

--- name: cursor-go description: Idiomatic Go rules: explicit error handling, interface-based design, context-first concurrency. ---

Idiomatic Go

Purpose

Install the original Idiomatic Go rule from PatrickJS/awesome-cursorrules and use it in Cursor.

Procedure

Source: https://github.com/PatrickJS/awesome-cursorrules/blob/main/rules/go.mdc Maintainer: Community (PatrickJS/awesome-cursorrules). Skilling lists this rule; the original lives in that repository.

Install

mkdir -p .cursor/rules
curl -fsSL https://raw.githubusercontent.com/PatrickJS/awesome-cursorrules/main/rules/go.mdc -o .cursor/rules/go.mdc

Run this in the root of your project. Cursor loads .mdc files from .cursor/rules and applies them to the files matched by the globs line. Check Cursor Settings > Rules to see it listed.

What it does

  • Explicit errors
  • Small interfaces
  • context.Context first

How to use it

Cursor applies it to .go files.

Example requests

1. Use Idiomatic Go

Request: Cursor applies it to .go files. Expected: Explicit errors.

Dependencies

Cursor, and curl.

Compatibility

This document follows the Agent Skills layout (a folder named cursor-go containing SKILL.md). Claude Code, Cursor, Codex, and Gemini CLI can load that file from the paths in the Skilling installation guide. GitHub Copilot does not load SKILL.md. Use the Copilot instructions copy, and narrow applyTo before you commit it. Last verified 2026-11-15.

Example prompts

Use Idiomatic Go

Cursor applies it to .go files.

Expected: Explicit errors.

Choose the agent

Pick the agent you use.

Related

  • TypeScript Standards

    TypeScript coding standards: strict config, no any, unknown for unknown values, utility types.

  • Python FastAPI

    FastAPI and Pydantic v2 rules for scalable APIs: functional style, clear structure, error handling first.

  • Python Django

    Django best practices: built-in features first, PEP 8, modular apps and clean views.

Reviews

No reviews yet.

    Sign in to review.

    Report a problem

    Inaccurate steps, an unsafe instruction, or a licensing concern.

    Sign in to report.