code-formatter

A code-formatting guide for applying a repository's standard style with tools such as gofmt, which formats Go source code.

In plain words
What is it for?
Use it after changing code to format affected files, update imports where needed, and prepare for lint checks or tests.
Why use it?
It reduces unnecessary formatting differences and helps code meet the project's linting expectations after edits.

Skill for Claude CodeCodex

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 skills/pilinux/gorest/code-formatter
Any agent
npx skills add pilinux/gorest --skill code-formatter
Clone the repo
git clone --depth 1 https://github.com/pilinux/gorest

Made for: Claude Code, Codex.

Per session 18 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 218 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 $0.00018 $0.00218
Opus 5 $0.00009 $0.00109
Sonnet 5 $0.00004 $0.00044
Haiku 4.5 $0.00002 $0.00022

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

Security

Grade A, and why

code-formatter 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 3d 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/skills/code-formatter/SKILL.md · 35 lines

What it actually says

Code Formatter

When to Use

  • After making code edits and before running linters/tests or opening a PR.

Rules

  • Prefer go fmt ./... for Go files; do not perform sweeping reformatting unless requested.
  • Only format files you changed unless the user asks for a global reformat.
  • Run gofmt/goimports where appropriate and include updated imports in the patch.

Commands

  • Format: go fmt ./... (or gofmt -w . when explicitly requested)
  • Verify: golangci-lint run --timeout 5m --verbose ./... after formatting

Output

  • Files formatted: list of changed files.
  • Next: recommended lint or test command.
  • patch-applier, linter-runner
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. 3d ago First seen · 35 lines · 18 tokens per session scan A f7b48d16d639

Subscribe to this mod's changes

code-formatter is a skill published in the GitHub repository pilinux/gorest (502 stars, last pushed 5d ago), licensed MIT. It adds 18 tokens to every session and 218 once invoked, about $0.0001 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.

Related

Other skills, from other repositories

add-operation

The end-to-end procedure for adding, overriding, or disabling a Kavo operation — registry entry, DTO slots, handler, route metadata, and tests. Use when a change introduces a new CRUD operation or a custom per-entity operation.

kavo-labs/kavo · 51 tokens

kavo-decorator

Reference for what @Kavo(Entity, config?) generates and how to configure/override it — routes table, EntityConfig shape (dto/allowlists/operations), manual-method-wins, @Override, and fully custom routes. Use when writing or reviewing a @Kavo-decorated controller, or answering "how do I configure/override this route"…

kavo-labs/kavo · 79 tokens

policy

Reference for Kavo's policy authorization DSL — permission()/role()/owner()/authenticated()/filtered()/when() composed with and()/or()/not(), config placement, entity-aware nodes, enforcement order, and the authorization.required default-deny switch. Use when gating an operation on the caller (403 KAVOFORBIDDEN)…

kavo-labs/kavo · 94 tokens

add-config-key

How to add a new key to KavoSettings — schema, default, merge semantics, validation, and docs — through the one layered precedence chain (global → entity → operation → per-call). Use when a change needs a new configurable behavior rather than a hardcoded constant.

kavo-labs/kavo · 59 tokens

composite-primary-keys

Reference for composite primary key support in @kavo/typeorm — the compositeIdFields metadata field, the -delimited route-id encoding, the creatable/updatable split, and every place composite keys don't yet work (other ORM adapters, many-to-many array-mutation, @kavo/graphql). Use when an entity has more than one…

kavo-labs/kavo · 99 tokens

error-handling

Reference for Kavo's exception hierarchy, KAVO error-code catalog, and the RFC 9457 problem-details wire shape every generated route returns on failure. Use when handling/mapping a Kavo error, deciding which exception to throw from a custom handler/@Override, or answering "what does the error response look like"…

kavo-labs/kavo · 72 tokens