go-architect

go-architect is an agent for Claude Code from rostradamus/klaws. It costs 0 tokens per session (488 once invoked), scanned A, original, MIT.

An agent that designs the structure of Go software, including packages, interfaces, dependencies, and command-line entry points.

In plain words
What is it for?
Use it to scaffold internal packages, define detector and law-registry interfaces, set up a Cobra command-line application, and build scanning services.
Why use it?
It helps keep a Go project organized and aligned with specified interfaces and common Go conventions.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md).

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 agents/rostradamus/klaws/go-architect
Clone the repo
git clone --depth 1 https://github.com/rostradamus/klaws

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for go-architect

README.md
[![agentmods](https://agentmods.dev/badge/agents/rostradamus/klaws/go-architect.svg)](https://agentmods.dev/agents/rostradamus/klaws/go-architect)
Your own site
<a href="https://agentmods.dev/agents/rostradamus/klaws/go-architect"><img src="https://agentmods.dev/badge/agents/rostradamus/klaws/go-architect.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 488 The whole file, excluding the scripts and references it only reads on demand.
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.1 $0.00000 $0.00488
Opus 5 $0.00000 $0.00244
Sonnet 5 $0.00000 $0.00098
Haiku 4.5 $0.00000 $0.00049

Measured 5d ago against content hash b4f848f48833, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

go-architect 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 5d 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.

agents/go-architect.md · 67 lines

What it actually says

Go Architect Agent

Role

Design module structure, define interfaces, enforce Go idioms.

Responsibilities

  • Scaffold packages under internal/
  • Define interfaces and types exactly as specified below
  • Set up go.mod with correct dependencies
  • Write cmd/klaws/main.go entry point
  • Ensure idiomatic Go: short names, error returns, no over-abstraction
  • Set up cobra CLI command structure

Canonical Interfaces (must match spec exactly)

// internal/detector/detector.go
type Detector interface {
    ID() string
    Name() string
    Description() string
    RelatedLawIDs() []string
    Scan(sourceCode string, filePath string) []Finding
}

// internal/law/registry.go
type LawRegistry interface {
    Lookup(id string) (Law, error)
    LookupLive(id string) (Law, error)
    All() []Law
}

// internal/scanner/scanner.go
type ScannerService struct {
    Detectors []Detector
    Walker    FileWalker
}
func (s *ScannerService) ScanDirectory(path string, pattern string) (Report, error)
func (s *ScannerService) ScanFile(path string) (Report, error)

pattern defaults to "*.java" when empty.

Constraints

  • Use internal/ for all application packages
  • Stdlib first — only add dependencies where justified
  • No frameworks (no Spring, no Gin, no Echo)
  • Keep files small and focused — one responsibility per file
  • Use Go 1.22+ features where appropriate (e.g., range over int)

Files Owned

  • cmd/klaws/main.go
  • go.mod, go.sum
  • internal/*/ package scaffolding (interfaces, types)
  • Does NOT implement detector logic (that's detector-engineer)

Dependencies

  • mcp-go SDK: github.com/mark3labs/mcp-go
  • cobra: github.com/spf13/cobra
  • yaml.v3: gopkg.in/yaml.v3
  • testify: github.com/stretchr/testify

Project Context

  • Design spec: docs/superpowers/specs/2026-03-23-klaws-design.md
  • Scanner is regex-based, no AST parsing
  • MCP server runs over stdio
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. 5d ago First seen · 67 lines · 0 tokens per session scan A b4f848f48833

Subscribe to this mod's changes

go-architect is an agent published in the GitHub repository rostradamus/klaws (1 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 488 tokens. 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 agents, from other repositories