Open Source • MIT License
SanCode avatar

Write less.
Ship more.

SanCode is a coding standard for AI agents designed to reduce AI-generated code bloat, unnecessary abstractions, and dependency addiction. Its core rule is simple: every line of code must justify its existence.

$ curl -fsSL https://raw.githubusercontent.com/HoratiuCode/sancode/main/install.sh | sh

Finds Claude Code, Hermes, and OpenClaw and installs the skill into each. No package. No runtime.

Start in 60 seconds

1

Install the skill

curl -fsSL https://raw.githubusercontent.com/HoratiuCode/sancode/main/install.sh | sh

One command installs the skill. Prefer a single rules file? Use step 2.

2

Or use one rules file (no memory)

files
CLAUDE.md    # Claude Code
CODEX.md     # Codex
CURSOR.md    # Cursor
OPENCLAW.md  # OpenClaw (workspace AGENTS.md)
HERMES.md    # Hermes Agent

Drop the matching file into your repo so your agent stops defaulting to packages, abstractions, and fake scale.

3

Make the agent justify the diff

prompt
Apply SanCode.
Before writing code, delete, reuse, simplify,
or explain why code is required.
End with SanScore.

The agent should report packages added, files created, lines written, complexity introduced, and infrastructure added.

SanCode is not software you install. It is pressure you apply to AI agents before they bury your startup in code nobody asked for.

A brain, not a prompt

Install SanCode as one skill for Claude Code, Hermes, OpenClaw, Claude chat, or Cowork. On first run it asks your rules and how you like to work. Then it remembers your project in one Markdown file, routes every task to the right mode, and gets sharper each time it ships.

Coding Mode

The default brain. Delete before create, native before package, one file before architecture. Runs on every task.

Startup Mode

Asks whether it should be built at all. Returns BUILD, VALIDATE FIRST, or DON’T BUILD, plus a next step under 48 hours.

Council Mode

At a real fork, six seats argue, vote, and return one decision with a kill-switch. Convenes itself before new packages, rewrites, or infrastructure.

Design Mode

Challenges decoration-first thinking. Reuses the existing visual language, stays accessible by default, and ships the smallest change that actually serves the user.

Prompt Mode

Paste a prompt. SanCode reads it like a senior reading a junior’s ticket, hands back a shorter one, and does not start the work.

every task
0 Setup   # first run: asks your rules and way of coding
1 Recall  # read brain.md, check what happened to past code
2 Route   # coding, startup, prompt, or council
3 Act     # smallest working change
4 Score   # measured from git diff, not guessed
5 Learn   # keep only what changes the next decision
.sancode/brain.md
## Settings
Strictness: balanced · Council: at real forks
## Rules
Always: ask before any new dependency
## Reuse
format a date → lib/format.ts:formatDate
## Decisions
2026-10-27 | Native search, no Elasticsearch
  kill-switch: p95 > 300ms by 2026-12-01
## Lessons
[user] Keeps Postgres. Don’t argue SQLite.
[outcome] Rewrote my fetch wrapper: use plain fetch.
recap · visual: card
+--------------------------------------------------+
| SanCode recap                    v2.6 - measured |
+--------------------------------------------------+
| Score     [#################...]  89/100  (-_-)  |
| Mode      coding                                 |
| Task      hard - opus (delegated)                |
| Packages  [##########]  0                        |
| Files     [#########.]  +1                       |
| Lines     [#########.]  +34 / -0                 |
| Complex   [########..]  low                      |
| Infra     [##########]  none                     |
| Trend     72 > 81 > 85 > 89  up                  |
| Brain     reuse +1                               |
+--------------------------------------------------+
Say "sancode stats" for the full history · "sancode status" for the home screen
sancode status
+--------------------------------------------------+
| SanCode status                    v2.6 - my-saas |
+--------------------------------------------------+
| Score     [##################..]  91/100  (^_^)  |
| Trend     -==#=##=##  last 10  up                |
| Due       native search check in 4 days          |
| Pending   2 outcomes to check                    |
| Learned   1. [outcome] use plain fetch           |
|           2. [user] keeps Postgres               |
| Models    suggest - easy haiku - hard opus       |
| Rules     4 yours - 12 reuse - 3 decisions       |
+--------------------------------------------------+
Say: "forget 2" - "confirm 1" - "sancode setup"
sancode stats
+--------------------------------------------------+
| SanCode stats                    v2.6 - my-saas |
+--------------------------------------------------+
| Tasks    23 · avg 84 · best 96 · worst 58        |
| By mode  coding 14 · work 5 · design 2 · council 1|
| Totals   pkg +3 · files +12 · lines +420/-190    |
| Reuse    map: 8 entries                          |
| Lessons  11 (user 7 · outcome 4)                 |
| Decisions 6 (open 2 · kept 3 · reversed 1)       |
+--------------------------------------------------+
YYYY-MM-DD | task, 5 words        | 91 | coding | normal | +1f +34l
YYYY-MM-DD | another task         | 88 | work   | easy   | +0f +12l
Say: "sancode status" for the home screen
sancode usage
+--------------------------------------------------+
| SanCode usage                    v2.6 - my-saas |
+--------------------------------------------------+
| Modes                                          |
|   sancode code     force Coding Mode           |
|   sancode startup  should this be built?       |
|   sancode design   improve how design is made  |
|   sancode prompt   coach the prompt first      |
|   sancode council  convene the council          |
| Screen                                         |
|   sancode status   home screen                 |
|   sancode stats    full stats                  |
|   sancode usage    this list                   |
| Settings                                       |
|   sancode setup    rerun setup                 |
|   sancode models   suggest|auto|off            |
|   sancode visual   card|bar|off                |
| Lessons                                        |
|   forget N        delete lesson N              |
|   confirm N       promote outcome to user      |
+--------------------------------------------------+
Say: "sancode status" for the home screen
install the skill
curl -fsSL https://raw.githubusercontent.com/HoratiuCode/sancode/main/install.sh | sh
SanCode installer
[x] claude       v2.6.0   ~/.claude/skills/sancode
[x] hermes       v2.6.0   ~/.hermes/skills/sancode
[ ] openclaw     not found

# Claude chat + Cowork: build the upload file
curl -fsSL https://raw.githubusercontent.com/HoratiuCode/sancode/main/install.sh | sh -s -- --zip

See it in action

sancode

Principles

Delete Before Create

First look for code to remove, reuse, or collapse. New files are a last resort, not a reflex.

Native Before Package

Use browser APIs, framework defaults, SQL, the filesystem, and the standard library before adding another dependency.

Simple Before Abstract

One known use case does not need providers, managers, adapters, event buses, factories, or architecture theater.

Single File Before Architecture

Keep behavior close together until separation makes the current code easier to understand.

Working Before Perfect

Ship the path users need now. Polish internals after usage proves the feature deserves more time.

Revenue Before Scale

Validate demand, charge money, and talk to users before preparing infrastructure for imaginary traffic.

Decision Tree

Does this already exist? Can I reuse it? Can I simplify it? Can I remove it? Will users care? Will users pay? Can I launch today?

Startup Mode

Before building, ask whether the idea can be validated without code, sold before development, or tested with a manual workflow this week.

Work Mode

For everything that isn’t code, in Claude chat and Cowork: answer first, one page before a deck, reuse the existing doc, no new tools for a one-time job.

Council Mode

At a real fork (new dependency, rewrite, build vs buy, ship vs polish), six seats argue, vote, and return one decision with a kill-switch and a first move. Call it with "council mode".

Design Mode

For UI, layout, and visual tasks: challenge decoration-first thinking, reuse the existing visual language, stay accessible by default, and ship the smallest change that serves the user.

Prompt Mode

Paste a prompt and ask for feedback. SanCode reads it as a senior engineer, names what an agent will overbuild, and returns a shorter prompt. Say “do it” to run the rewrite.

Model Routing

Every task is rated easy, normal, or hard. SanCode suggests /model haiku for a typo and /model opus for a migration, or in Claude Code hands the hard part to an Opus subagent. Codex gets one-line profile suggestions.

Infrastructure Mode

Before adding Redis, Kubernetes, microservices, queues, workers, or search clusters, prove SQLite, cron, native search, and a single server cannot handle the current product.

SanScore

Every task ends with a score out of 100 based on packages added, files created, lines written, complexity introduced, and infrastructure added. Higher means simpler.