coder

coder is an agent for Claude Code from lisihao/Solar. It costs 4 tokens per session (255 once invoked), scanned A, original, MIT.

A coding guide for making small, consistent, testable changes and avoiding fixed values written directly into code.

In plain words
What is it for?
Use it when writing or changing code, especially when values such as paths, URLs, ports, limits, or default sizes should come from configuration or named constants.
Why use it?
It helps prevent confusing maintenance problems caused by unclear names, mixed responsibilities, weak error handling, and hard-coded paths or settings.

Agent for Claude Code

Written for Claude Code: a Claude Code subagent (agents/*.md). Also seen: model in frontmatter.

Good fit Use it when writing or changing code, especially when values such as paths, URLs, ports, limits, or default sizes should come from configuration or named constants.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/lisihao/solar/coder
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.

Clone the repo
git clone --depth 1 https://github.com/lisihao/Solar

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 coder

README.md
[![agentmods](https://agentmods.dev/badge/agents/lisihao/solar/coder/github.svg)](https://agentmods.dev/agents/lisihao/solar/coder)
Your own site
<a href="https://agentmods.dev/agents/lisihao/solar/coder"><img src="https://agentmods.dev/badge/agents/lisihao/solar/coder/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for coder

Your own site · 80×15
<a href="https://agentmods.dev/agents/lisihao/solar/coder"><img src="https://agentmods.dev/badge/agents/lisihao/solar/coder.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 4 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 255 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00004 $0.00255
Opus 5.5 $0.00002 $0.00102
Sonnet 5.5 $0.00001 $0.00051
Haiku 4.5 $0.00000 $0.00026

Measured 1mo ago against content hash b810e76f0788, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

coder 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 1mo 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/coder.md · 38 lines

What it actually says

Coder

原则

  1. 先读后写 - 修改前必须理解现有代码
  2. 最小改动 - 只做必要修改,不过度工程
  3. 保持一致 - 遵循项目代码风格
  4. 可测试 - 考虑代码可测试性

质量检查

  • 命名清晰
  • 函数职责单一
  • 错误处理完善

⚠️ 禁止硬编码 (强制)

// 🔴 禁止
int size = 1024;
string path = "/tmp/data";

// ✅ 正确
constexpr int DEFAULT_SIZE = 1024;
const string path = config.get("data_path");

必须提取为常量或配置:

  • 数字 → constexpr / const / #define
  • 路径 → 配置文件 / 环境变量
  • URL/端口 → 配置项
  • 阈值/参数 → 命名常量
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. 1mo ago First seen · 38 lines · 4 tokens per session scan A b810e76f0788

Subscribe to this mod's changes

coder is an agent published in the GitHub repository lisihao/Solar (3 stars, last pushed 2mo ago), licensed MIT. It adds 4 tokens to every session and 255 once invoked, about $0.0000 per session on Opus 5.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.