Getting it into your agent
This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.
/plugin marketplace add Pinperepette/context-kernel/plugin install context-kernelWrote 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.
[](https://agentmods.dev/skills/pinperepette/context-kernel/kernel-invariants)<a href="https://agentmods.dev/skills/pinperepette/context-kernel/kernel-invariants"><img src="https://agentmods.dev/badge/skills/pinperepette/context-kernel/kernel-invariants/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.
<a href="https://agentmods.dev/skills/pinperepette/context-kernel/kernel-invariants"><img src="https://agentmods.dev/badge/skills/pinperepette/context-kernel/kernel-invariants.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00072 | $0.00779 |
| Opus 5.5 | $0.00029 | $0.00312 |
| Sonnet 5.5 | $0.00014 | $0.00156 |
| Haiku 4.5 | $0.00007 | $0.00078 |
Grade A, and why
kernel-invariants 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 3mo 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.
How it starts
The opening of the file, as written. The whole thing — 62 lines — stays where its author put it; the contents beside it link to each section on GitHub.
kernel-invariants — estrazione dei vincoli (T3)
Input: il manifest di kernel-repo-slice (o una lista di file) + il task Q. Output: la carta del task — poche proposizioni citabili che il fix deve rispettare. E' lossy per scelta: converte codice in vincoli. La regola che rende l'operazione verificabile: ogni vincolo cita la riga da cui viene.
Procedura
- Leggi i file della slice nell'ordine del manifest (seed -> 1 hop -> test).
Per file grandi Python, usa
kernel_slice(MCP) sul simbolo rilevante invece di leggere tutto. - Estrai SOLO cio' che vincola il fix, in queste categorie:
- Contratti: firme, tipi, eccezioni dichiarate/attese dai caller
(
api.py:12 si aspetta che connect() sollevi ConnectionError, non ritorni None) - Invarianti dei dati: assunzioni su forma/stato
(
db.py:30: pool inizializzato prima di connect — mai None dopo setup()) - Comportamenti attesi: cosa fissano i test correlati
(
test_db.py:8: retry esattamente 3 volte prima di propagare) - Mappa del sintomo: errore -> raise site -> percorso dati che ci arriva
- Contratti: firme, tipi, eccezioni dichiarate/attese dai caller
(
- Formato di output:
# carta del task
Q: <il bug, una riga>
## vincoli
1. [contratto] <proposizione> (file.py:riga)
2. [invariante] <proposizione> (file.py:riga)
3. [comportamento] <proposizione> (test_x.py:riga)
## percorso del sintomo
<errore> nasce in <file:riga>, raggiunto da <catena breve>
## fuori slice ma sospetti (page fault suggeriti)
- <file/config> perche' <motivo> (se nessuno: "nessuno")
- Salva la carta (la rende ATTIVA: la guardia sugli Edit inietta il vincolo giusto prima di ogni modifica a un file citato, e la carta sopravvive all'auto-compact):
python3 "${CLAUDE_PLUGIN_ROOT}/hooks/charter.py" save --repo <repo_root> <<'CK_EOF'
<la carta, esattamente come prodotta al punto 3>
CK_EOF
Regole
- Un vincolo senza citazione file:riga NON e' un vincolo: eliminalo o trovala. (Vale anche meccanicamente: la guardia indicizza SOLO le citazioni.)
- Massimo ~10 vincoli: se sono di piu', stai riassumendo, non estraendo.
- Niente parafrasi del codice: solo cio' che il fix puo' violare.
- La carta e' anche la checklist di review: dopo il fix, ripassala vincolo per vincolo (o passala a kernel-verify / al verifier agent).
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.
- 3mo ago First seen · 62 lines · 72 tokens per session scan A 273abd60e79d
kernel-invariants is a skill published in the GitHub repository Pinperepette/context-kernel (24 stars, last pushed 4mo ago), licensed MIT. It adds 72 tokens to every session and 779 once invoked, about $0.0003 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-30.
kernel-invariants compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| kernel-invariantsPinperepette/context-kernel | Skill | 24 | 4mo ago | MIT | A | 72 | Claude Code |
| autoreviewopenclaw/clawhub | Skill | 9.6k | today | MIT | A | 17 | Claude Code, Codex |
| omh-code-reviewrlaope/oh-my-hermes | Skill | 6.2k | today | MIT | A | 18 | Claude Code |
| agent-teams-simplify-and-hardenLeoYeAI/openclaw-master-skills | Skill | 2.2k | 9d ago | MIT | A | 115 | Claude Code, Codex |
| asplos-writing-stylebrycewang-stanford/Awesome-Journal-Skills | Skill | 1.5k | 3d ago | MIT | A | 65 | Claude Code |
| revdiff-planumputun/revdiff | Skill | 974 | 3d ago | MIT | A | 84 | Claude Code |
| re0-mergeLilMGenius/paperthin | Skill | 1.5k | yesterday | MIT | A | 51 | Claude Code, Codex |