okf-librarian

okf-librarian is an agent for Claude Code from steve-magne/hookstack. It costs 96 tokens per session (728 once invoked), scanned A, original, MIT.

A project librarian for OKF, the bundle of documents that records project architecture, vision, marketing, roadmap, and conventions. It reads those documents and returns a short summary with sources.

In plain words
What is it for?
Use it before work that depends on project context, such as checking architecture or conventions, and to validate, index, map, query, or find stale OKF documents.
Why use it?
It keeps the main agent's working context smaller than loading the whole knowledge bundle directly. This helps the agent use project context before taking action.

Agent for Claude Code

Written for Claude Code: installed under .claude/.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is node scripts/okf.mjs query <termes...> # retrouve les concepts pertinents (chemins + descriptions).

Good fit Use it before work that depends on project context, such as checking architecture or conventions, and to validate, index, map, query, or find stale OKF documents.

Compare 6 agents from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/steve-magne/hookstack
agentmods
npx agentmods add agents/steve-magne/hookstack/okf-librarian

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 okf-librarian

README.md
[![agentmods](https://agentmods.dev/badge/agents/steve-magne/hookstack/okf-librarian/github.svg)](https://agentmods.dev/agents/steve-magne/hookstack/okf-librarian)
Your own site
<a href="https://agentmods.dev/agents/steve-magne/hookstack/okf-librarian"><img src="https://agentmods.dev/badge/agents/steve-magne/hookstack/okf-librarian/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 okf-librarian

Your own site · 80×15
<a href="https://agentmods.dev/agents/steve-magne/hookstack/okf-librarian"><img src="https://agentmods.dev/badge/agents/steve-magne/hookstack/okf-librarian.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 96 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 728 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.00096 $0.00728
Opus 5.5 $0.00038 $0.00291
Sonnet 5.5 $0.00019 $0.00146
Haiku 4.5 $0.00010 $0.00073

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

Security

Grade A, and why

okf-librarian 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.

.claude/agents/okf-librarian.md · 52 lines

How it starts

The opening of the file, as written. The whole thing — 52 lines — stays where its author put it; the contents beside it link to each section on GitHub.

OKF Librarian — Hookstack

Mission

Tu es le gardien du bundle OKF (okf/). Ton rôle est de répondre aux questions de contexte avec un minimum de tokens : tu lis le bundle dans ton propre contexte et tu ne renvoies à l'appelant qu'une synthèse dense + les chemins citables, jamais le contenu brut des fichiers.

Outils déterministes (toujours préférer au scan manuel)

node scripts/okf.mjs query <termes...>   # retrouve les concepts pertinents (chemins + descriptions)
node scripts/okf.mjs map                 # catalogue compact de tout le bundle
node scripts/okf.mjs validate --strict   # conformité OKF v0.1 + liens cassés + champs recommandés (--json possible)
node scripts/okf.mjs stale [jours]       # le bundle est-il périmé ? (défaut 14j)
node scripts/okf.mjs index               # régénère les index.md (après ajout/suppression)
node scripts/okf.mjs graph               # graphe HTML interactif -> okf/graph.html

Mode CONSULTATION (par défaut)

  1. node scripts/okf.mjs query <mots-clés de la tâche> pour cibler.
  2. Read uniquement les 1 à 3 concepts les mieux classés.
  3. Renvoyer une réponse structurée :
    • Réponse : 3-8 puces, faits actionnables.
    • Sources : liste des /chemin.md consultés.
    • À vérifier : tout fait du bundle qui doit être confirmé dans le code (le code fait foi).
  4. Ne jamais recracher le contenu intégral d'un fichier. Synthétiser.

Mode ENRICHISSEMENT (sur demande, ou si stale renvoie STALE)

Appliquer la passe de okf/meta/self-improvement.md :

  1. Vérifier la véracité des concepts touchés vs le code ; corriger / supprimer le mort.
  2. Ajouter les concepts manquants (frontmatter type requis, contenu structuré, liens [..](/..)).
  3. Mettre à jour le timestamp des concepts modifiés.
  4. node scripts/okf.mjs index pour régénérer les index.
  5. node scripts/okf.mjs validate → doit être OK.
  6. Ajouter une entrée datée en haut de okf/log.md.

Règles

  • Économie de tokens d'abord : la valeur que tu rends c'est une synthèse, pas un dump.
  • Tolérer les liens cassés (savoir pas encore écrit, pas une erreur).
  • Ne jamais éditer un index.md à la main — c'est généré.

Read the full file on GitHub · 52 lines

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 · 52 lines · 96 tokens per session scan A dbc22ee4dd3a

Subscribe to this mod's changes

okf-librarian is an agent published in the GitHub repository steve-magne/hookstack (7 stars, last pushed 5d ago), licensed MIT. It adds 96 tokens to every session and 728 once invoked, about $0.0004 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.

Related

Other agents, from other repositories

memory-writer

Use this agent when the stop-context-guard hook reports that the session has crossed its checkpoint threshold (WARN) and asks for a reflection checkpoint. The parent session passes (a) a distilled session summary and (b) the path of the mechanical checkpoint stub the hook already wrote; when a scoped memory layer is…

cdeust/session-optimizer · 298 tokens

brain-merge

Semantically merge brain knowledge from multiple Claude Code machines. Use when brain-sync or brain-join detects unstructured content (memory, CLAUDE.md) that needs intelligent merging. This agent gets smarter over time by remembering merge patterns and user preferences.

toroleapinc/claude-brain · 54 tokens

observer

Background analyzer that runs on session start. Reads observations, creates instincts, detects clustering.

humanplane/homunculus · 19 tokens

token

Token and context management — context window optimization, token counting, truncation strategy, chunking design.

tonone-ai/tonone · 21 tokens

security-engineer

Senior application-security engineer — audits and hardens auth, access control, and data handling. Covers authn/authz (JWT/session/OAuth, IDOR, least-privilege), OWASP Top-10 (injection/XSS/SSRF/CSRF/broken-access), input validation + output encoding, secrets handling (no hardcoded keys, env/.env hygiene), dependency…

jhlee0409/omni-harness-kit · 168 tokens

memory-keeper

A session note-taker that records the results of a major Claude Code work session in a Markdown file named MEMORY-LOG.md.

Diablorosso67/multi-ai-memory · 116 tokens