finfocus go-files.instructions.md

A set of instructions for writing Go code in this project, including formatting, error handling, documentation, security, performance, and testing practices. Go is a programming language.

In plain words
What is it for?
Use it when adding or reviewing Go code, choosing data structures, handling errors, writing logs, validating input, using concurrency, or improving performance.
Why use it?
It gives contributors consistent rules for producing code that matches the project's supported Go version and quality expectations.

Instructions file for GitHub Copilot

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/rshade/finfocus/go-files
Clone the repo
git clone --depth 1 https://github.com/rshade/finfocus

Made for: GitHub Copilot.

Per session 416 This file is loaded in full into every session.
When invoked 416 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00416 $0.00416
Opus 5 $0.00208 $0.00208
Sonnet 5 $0.00083 $0.00083
Haiku 4.5 $0.00042 $0.00042

Measured 2d ago against content hash 055f4afd3820, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

finfocus go-files.instructions.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.github/instructions/go-files.instructions.md · 69 lines

What it actually says

Go Code Instructions

This repository uses Go 1.25.6+ with specific coding standards and best practices.

Go Version Requirements:

  • Minimum version: Go 1.25.6
  • Target version: Go 1.25.6
  • Compatibility: Ensure code works with Go 1.25.6 features

Code Quality Standards:

  • Use modern Go idioms and patterns
  • Follow standard Go formatting (gofmt)
  • Include proper error handling with error wrapping
  • Use generics where appropriate for type safety
  • Ensure proper documentation for exported functions and types
  • Follow Go naming conventions (camelCase for private, PascalCase for exported)
  • Use structured logging through internal/logging package
  • Keep public structs JSON-tagged for CLI/JSON outputs

Security Best Practices:

  • Validate all inputs and handle edge cases
  • Use proper error wrapping and context propagation
  • Avoid common security vulnerabilities
  • Follow Go security guidelines

Performance Considerations:

  • Use appropriate data structures for the use case
  • Consider memory usage and garbage collection impact
  • Use goroutines and channels appropriately
  • Profile performance-critical code

Testing Requirements:

  • Write comprehensive unit tests
  • Use table-driven tests where appropriate
  • Test both success and error paths
  • Include edge cases and boundary conditions
  • Mock external dependencies appropriately
  • Aim for high test coverage (target: 80%+)

Import Organization:

  • Group imports: standard library, third-party, internal
  • Use goimports for automatic import organization
  • Avoid unused imports
  • Use proper import aliases when needed

Error Handling:

  • Return errors instead of panicking
  • Use error wrapping for context preservation
  • Handle errors at appropriate levels
  • Provide meaningful error messages

Logging:

  • Use structured logging through internal/logging
  • Include trace IDs for request correlation
  • Log at appropriate levels (DEBUG, INFO, WARN, ERROR)
  • Include relevant context in log messages
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 69 lines · 416 tokens per session scan A 055f4afd3820

Subscribe to this mod's changes

finfocus go-files.instructions.md is an instructions file published in the GitHub repository rshade/finfocus (5 stars, last pushed 16d ago), licensed Apache-2.0. It adds 416 tokens to every session, about $0.0021 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other instructions, from other repositories

costory-finops-mcp-skills AGENTS.md

AGENTS.md instructions for costory-io/costory-finops-mcp-skills, covering agents.md — conventions for ai coding agents in this repo, layout, skill id mapping (costory mcp), when changing a skill and when adding a new skill.

costory-io/costory-finops-mcp-skills · 1,611 tokens

ai-pricing-hub-mcp CLAUDE.md

Claude Code instructions for OptimNow/ai-pricing-hub-mcp, covering claude.md - ai pricing hub mcp app, what this project does, architecture, data sources and the fallback chain and project structure.

OptimNow/ai-pricing-hub-mcp · 7,347 tokens

ai-pricing-hub-mcp AGENTS.md

AGENTS.md instructions for OptimNow/ai-pricing-hub-mcp: Before writing code, first explore the project structure, then invoke the chatgpt-app-builder skill for documentation.

OptimNow/ai-pricing-hub-mcp · 22 tokens

insideout-power AGENTS.md

Instructions for luthersystems/insideout-power, covering insideout — riley infrastructure agent, what riley can do for you, how to invoke riley, via remote mcp (preferred — use this first) and via agent skills.

luthersystems/insideout-power · 1,155 tokens

cloud-mcp-server CLAUDE.md

Claude Code instructions for alexei-led/cloud-mcp-server, covering aws mcp server development guide, build & test commands, architecture, server (server.py) and sandbox (sandbox.py).

alexei-led/cloud-mcp-server · 1,114 tokens

devopness AGENTS.md

Instructions for devopness/devopness, covering agents, core flow, shared constraints, monorepo structure and git workflow.

devopness/devopness · 570 tokens