atmos-rules

A set of coding rules for Atmos, a Go command-line project and its website. It describes how to organize commands and configuration, manage dependencies, lint code, and write tests.

In plain words
What is it for?
Use it when adding Go CLI commands, handling settings and flags, updating dependencies, or checking test coverage and error cases.
Why use it?
It gives contributors a shared way to structure changes, reducing inconsistent code and missed tests across the project.

Cursor rule for Cursor

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 rules/cloudposse/atmos/atmos-rules
Clone the repo
git clone --depth 1 https://github.com/cloudposse/atmos

Made for: Cursor.

Per session 1,420 This file is loaded in full into every session.
When invoked 1,420 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.01420 $0.01420
Opus 5 $0.00710 $0.00710
Sonnet 5 $0.00284 $0.00284
Haiku 4.5 $0.00142 $0.00142

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

Security

Grade A, and why

atmos-rules 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.

.cursor/rules/atmos-rules.mdc · 242 lines

How it starts

The opening of the file, as written. The whole thing — 242 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Cursor Rules for Atmos CLI Project

Project Overview

This is a Golang CLI project using Cobra for command structure and Viper for configuration management. The project maintains high code quality standards through golangci-lint and aims for maximum test coverage. The repository also includes the website source code for https://atmos.tools.

Code Structure

CLI Structure

  • Use Cobra's recommended command structure with a root command and subcommands
  • Implement each command in a separate file under cmd/ directory
  • Use Viper for managing configuration, environment variables, and flags
  • Follow the principle of separation of concerns between CLI interface and actual logic
// Preferred command structure
cmd/
  root.go
  command1.go
  command2.go
  ...
pkg/
  feature1/
    feature1.go
    feature1_test.go
  feature2/
    feature2.go
    feature2_test.go

Dependencies

  • Manage dependencies with Go modules
  • Keep dependencies up to date
  • Minimize external dependencies where possible

Testing Requirements

Unit Tests

  • Every new feature must include comprehensive unit tests
  • Target >80% code coverage for all packages
  • Test both happy paths and error conditions
  • Use table-driven tests for testing multiple scenarios
// Example of table-driven test
func TestFeature(t *testing.T) {
    testCases := []struct {
        name     string
        input    string
        expected string
        wantErr  bool
    }{
        {
            name:     "valid input",
            input:    "valid",
            expected: "processed",
            wantErr:  false,
        },
        {
            name:     "invalid input",
            input:    "",
            expected: "",
            wantErr:  true,
        },
    }

    for _, tc := range testCases {
        t.Run(tc.name, func(t *testing.T) {
            result, err := Feature(tc.input)
            if tc.wantErr {
                assert.Error(t, err)
            } else {
                assert.NoError(t, err)
                assert.Equal(t, tc.expected, result)
            }
        })
    }
}

Read the full file on GitHub · 242 lines

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 · 242 lines · 1,420 tokens per session scan A 645373c4f6aa

Subscribe to this mod's changes

atmos-rules is a cursor rule published in the GitHub repository cloudposse/atmos (1,367 stars, last pushed today), licensed Apache-2.0. It adds 1,420 tokens to every session, about $0.0071 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-30.