Ramon SosaRamon Sosa·10 min read

al-grano: the style that makes Claude Code and Codex get to the point

Why I wrote it, the 11 rules it applies, how much context it costs per session and how to install it in Claude Code and in Codex with what is in the public repo.

In this article
  1. The problem I had
  2. What the repo contains
  3. The 11 rules
  4. What it costs in context
  5. Installing it in Claude Code
  6. Installing it in Codex
  7. How to tell it is on
  8. What I do not know yet
  9. If you want this in your business

I read AI answers all day. Claude Code and Codex fix things for me, review forms, prepare client deliverables. And for months the right answer came buried: a paragraph of context on top, the useful line somewhere in the middle and a summary of what I had just read at the bottom.

al-grano is what I wrote for that. It is a response style for your coding assistant, and one of the two repos the agency keeps open on GitHub. In the public repos post it got one section. Here is the whole thing: the problem, the rules, what it costs, how to install it in Claude Code and in Codex, and what I found while reviewing it for this post.

The problem I had

Before al-grano I used a «caveman» style plugin: it strips articles, filler and pleasantries out of the text. It half worked. The word count dropped, but the shape stayed the same: the answer still arrived as a block, with the decision on the third line and a list of things done at the end. The repo's decision record puts it this way: it cut words, not structure, so deliveries stayed long.

The other half was already in my working notes: a task close is 10 lines or fewer, one table at most, no recap and no sign-off. On September 18 I put both into one rules file, turned the old plugin off (I left it installed in case I had to go back) and it is what I have used since. Today it loads in Claude Code through two hooks and in Codex through a block in my AGENTS.md, so answers look the same in both tools.

This is the README example. We wrote it; it is not a client conversation:

Antesassistant reply

Great question. There are a few things going on with your build. The failing step is probably the type check, although it could also be the lint or a stale cache. You could clear the cache, run it again, and if that does not work check the tsconfig. Hope that helps you move forward!

Despuésassistant reply

Build fails at the type check: strict flag in tsconfig.json.
1. Fix the 3 errors it lists (or set "strict": false in tsconfig.json).
2. Run npm run build.

Aside: the cache is stale. Clear it later?
al-grano README example, translated from Spanish. Before: 50 words. After: 36, with the cause on line one and two numbered steps (counts from the Spanish original).

The difference is not the word count, which drops by 14. It is where the answer sits. In the before, the likely cause shows up in the third sentence, wrapped in a «probably» and two «could». In the after, line one says what fails and where, the steps are numbered and the thing that is not urgent (the cache) goes on one line at the end, as a question.

What the repo contains

The repo is small on purpose. Five files matter; the rest is documentation for anyone who wants to contribute.

FileWhat it does
skills/al-grano/SKILL.mdThe full rules, in Markdown. The single source: to change the style, you change this file.
hooks/al-grano-activate.mjsRuns when the session opens. Reads SKILL.md, strips the header and injects it as context. Writes an active flag.
hooks/al-grano-tracker.mjsRuns on every message you send. Turns the flag on or off based on what you type and, when it is on, adds a short reminder.
hooks/hooks.jsonWires both hooks when you install the repo as a Claude Code plugin.
.codex-plugin/plugin.jsonThe Codex manifest: points to SKILL.md as its entry. Version 0.1.0, same as the Claude Code one.
Files in the svdiginet/al-grano repo, read Oct 22, 2026.

The hooks make no network calls, run no commands and the only thing they write is the flag, a file called .al-grano-active inside your Claude config folder. If anything fails, they exit cleanly and the session opens as usual, just without the style. I read that in the code of both, not only in the README.

The 11 rules

SKILL.md is 1,072 words. Most of them are examples of what to do and what not to. The rules, condensed:

#RuleWhat it cuts
1Answer first«Great question», «let me look», the plan before the result
2Drop dead wordsFiller, pleasantries and hedges that say nothing; code and errors stay verbatim
3Numbered stepsA paragraph with five «and then»
4Length capCloses longer than 10 lines or with two tables
5No recap, no closer«Hope this helps», repeating what you just read
6State in one lineLosing track in multi-step work («Step 3/5 done»)
7One issue at a timeThree topics mixed; the second goes on one line at the end
8Findings in one lineEvidence dumped in chat; it goes to the commit or the log
9Estimates with units«A bit of work»; says «about 15 minutes»
10Errors without drama«Uh oh, there is a problem»; says file, cause and fix
11At most 5 per listLists of 14 things; groups them and shows the top 5
Summary of rules 1 to 11 in skills/al-grano/SKILL.md, Oct 22, 2026.

The file also says when to break them. There are six cases where length gives way: when you ask for an explanation («explain», «walk me through»), before an action that cannot be undone (deleting, a force push, sending something outside), when the order of steps could be misread without the connecting words, when the request is ambiguous (one short question), when you ask for options (two to four, recommended first) and when it clashes with the tool's own instructions, which always win.

The one that matters most to me is the one about actions that cannot be undone. A confirmation for something destructive written in fragments is dangerous. There the style asks for full sentences, even if it comes out longer.

What it costs in context

Nothing is free in an agent session: everything a hook injects takes up context. On October 22 I measured what each hook injects on a clean clone, with an empty Claude config:

al-grano: how much text the hooks inject

Bash(node hooks/al-grano-activate.mjs | wc -w)

    1037

Bash(echo '{"prompt":"arregla el build"}' | node hooks/al-grano-tracker.mjs)

AL-GRANO MODE ACTIVE. Answer first (command/path/decision on line 1). Drop dead words. ...
Real run of the hooks on a clean clone of the repo, Oct 22, 2026. I trimmed the reminder; in full it is 33 words.

With those two numbers you can work out one of your own sessions. An example with 40 messages:

  1. On open: 1,037 words, once.
  2. Per message: 33 words × 40 messages = 1,320 words.
  3. Total: 1,037 + 1,320 = 2,357 words of rules across the session.
  4. If the session gets compacted, the start hook runs again (the plugin wires it to startup, resume, clear and compact): add another 1,037 per compaction.

These are words, not tokens. The token count depends on the model, so I do not convert it. What I do know is why the 33-word reminder exists: when the conversation gets compacted, the rules from the start can get lost in the summary, and the reminder is what keeps the style in place until they load again.

Installing it in Claude Code

First, something I found while reviewing the repo for this post. INSTALL.md describes my setup, not yours: it mentions two copies of the hooks in my ~/.claude/hooks/folder that are not in the repo, and the plugin command points to a private copy. Until that is fixed in the repo, the route that works with what is public is to point your config at the repo's two hooks, the same ones I ran above:

  1. Clone the repo into your home folder: git clone https://github.com/svdiginet/al-grano ~/al-grano. You need Node.
  2. Open skills/al-grano/SKILL.md and find the sentence that starts with «For this reader:», inside the language section. It says Caribbean Spanish with tú, which is mine. Put your language and your register.
  3. Back up ~/.claude/settings.json and add the two hooks from the block below. If you already have hooks on those events, add these to the list; do not replace it.
  4. Open a new session. AL-GRANO MODE ACTIVE should show up in the context.

~/.claude/settings.json (hooks part only)

{
  "hooks": {
    "SessionStart": [
      { "matcher": "startup|resume|clear|compact",
        "hooks": [ { "type": "command", "timeout": 5,
          "command": "node \"$HOME/al-grano/hooks/al-grano-activate.mjs\"" } ] }
    ],
    "UserPromptSubmit": [
      { "hooks": [ { "type": "command", "timeout": 5,
          "command": "node \"$HOME/al-grano/hooks/al-grano-tracker.mjs\"" } ] }
    ]
  }
}
Based on the repo's hooks/hooks.json, with a direct path to ~/al-grano instead of the plugin variable.

Installing it in Codex

According to the repo, Codex has no hook that runs when a session opens, so the trick there is different: Codex always reads your AGENTS.md. You add a short block telling it to use al-grano and give it the full rules file as a skill. That is how I run it, and it is why answers look the same in both tools.

  1. Link the skill folder: ln -s ~/al-grano/skills/al-grano ~/.codex/skills/al-grano.
  2. Paste the block below into the AGENTS.md that Codex loads in your project or working folder.
  3. Open a new Codex session and ask for something ordinary.

AGENTS.md (minimal block)

<!-- al-grano -->
## Output style: al-grano
Apply the al-grano output style to every response.
Full ruleset: ~/.codex/skills/al-grano/SKILL.md
Off only on "para al-grano" or "normal mode".
<!-- al-grano -->
Short version of the block in my own AGENTS.md; mine also repeats the exceptions.

One difference worth knowing: in Codex there is no per-message reminder and no flag. The only thing holding the style in place is the AGENTS.md block, which Codex reads at the start, and switching it off depends on the model obeying the line that says when to stop.

How to tell it is on

A short list to check your install, in Claude Code:

  1. The start line. When the session opens, the context begins with AL-GRANO MODE ACTIVE.
  2. The flag. The file ~/.claude/.al-grano-active exists (or inside your CLAUDE_CONFIG_DIR, if you use another folder).
  3. Off. Type para al-grano, stop al-grano, normal mode or modo normal. The flag is deleted and the next message carries no reminder.
  4. On. A message that starts with al grano, or says «activate al-grano», creates it again. So does a new session.
  5. The first-line test. Ask something with a concrete answer. If line one is the answer and not an introduction, it is working.

What I do not know yet

  • How much shorter my answers come out. I notice it every day, but I have not measured it with a fair before and after, so I will not give you a percentage.
  • Whether 33 words per message pay off in very long sessions. The repo roadmap has a pending idea: a test with a fixed set of questions to compare the style every time the rules change.
  • Whether a softer level is needed. Also on the roadmap as an idea, not a plan: a «lite» version for anyone who finds one single shape too blunt.

If you try it and something breaks, open an issue on the repo. It is the fastest way to get it fixed, and the only way I find out someone else uses it.

github.com/svdiginet/al-grano

Read also: SVDIGINET's two public repos and what I check before opening one.

If you want this in your business

al-grano comes out of the daily work at SVDIGINET, my local marketing agency in Central Florida. We use AI agents for Google profiles, reviews, websites and automations, and al-grano is on in my Claude Code and Codex sessions. If you would rather have us do it, the details are at svdiginet.com.

Sources: github.com/svdiginet/al-grano, read Oct 22, 2026; skills/al-grano/SKILL.md; INSTALL.md