openFunctions CLAUDE.md

openFunctions CLAUDE.md is an instructions file for coding agents from Tom-R-Main/openFunctions. It costs 2,680 tokens per session, scanned A, original, MIT.

A set of project instructions for openFunctions, a TypeScript framework for building tools and agents that other AI systems can call. It also explains its architecture and ways to store data.

In plain words
What is it for?
Defining callable tools, building chat agents, connecting context providers, adding persistence, and working with Claude, Gemini, or OpenAI tool interfaces.
Why use it?
It gives coding agents the project context needed to change the framework without breaking its structure or provider integrations.

Instructions file

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.

agentmods
npx agentmods add instructions/tom-r-main/openfunctions/claude-md
Clone the repo
git clone --depth 1 https://github.com/Tom-R-Main/openFunctions

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 openFunctions CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/tom-r-main/openfunctions/claude-md.svg)](https://agentmods.dev/instructions/tom-r-main/openfunctions/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/tom-r-main/openfunctions/claude-md"><img src="https://agentmods.dev/badge/instructions/tom-r-main/openfunctions/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,680 This file is loaded in full into every session.
When invoked 2,680 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.02680 $0.02680
Opus 5 $0.01340 $0.01340
Sonnet 5 $0.00536 $0.00536
Haiku 4.5 $0.00268 $0.00268

Measured 4d ago against content hash 8b59cd1e7f8d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

openFunctions CLAUDE.md 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 4d 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.md · 266 lines

How it starts

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

openFunctions — AI Assistant Context

What This Is

A TypeScript framework for building AI-callable tools, agents, and context providers. Tools work with Claude (MCP), Gemini (function calling), and OpenAI (tools API). Context providers connect external systems (ExecuFunction, Obsidian, Notion) to the agent runtime.

Architecture

src/
  framework/         # Core framework — don't edit
    tool.ts          # defineTool(), ok(), err()
    store.ts         # createStore() — JSON file persistence
    pg-store.ts      # createPgStore() — Postgres persistence (optional)
    registry.ts      # ToolRegistry — manages tools, provider format adapters
    chat-agent.ts    # createChatAgent() — composable chat agent factory
    chat-agent-types.ts # ChatAgent, ChatAgentConfig, ChatResult types
    chat-agent-resolve.ts # Config resolution, provider auto-detection
    chat-agent-http.ts # HTTP server for agent.serve()
    context.ts       # Context provider interface — connectProvider(), contextPrompt()
    server.ts        # startServer() — MCP server wrapper
    types.ts         # TypeScript interfaces
    index.ts         # Re-exports everything
  providers/         # Context provider implementations
    execufunction/   # ExecuFunction reference provider (tasks, calendar, CRM, etc.)
  examples/          # Read these for patterns
    study-tracker/   # CRUD pattern (beginner)
    bookmark-manager/# Arrays + search (beginner)
    quiz-generator/  # Stateful + complex params (advanced)
    expense-splitter/# Math + calculations (intermediate)
    workout-logger/  # Date filtering + aggregation (intermediate)
    recipe-keeper/   # Rich nested data + random (beginner)
    dictionary/      # External API wrapper (intermediate)
    ai-tools/        # Tool that calls an LLM (advanced)
    utilities/       # Stateless helpers — no store needed (beginner)
  my-tools/          # Student builds here
    index.ts         # Add tools to the myTools array
  index.ts           # Entry point — registers all tools, starts MCP server
test-client/
  cli.ts                  # Interactive CLI for testing tools (npm run test-tools)
  run-tests.ts            # Tool-test runner — runs `tests` arrays on tool defs
  run-framework-tests.ts  # Framework unit tests via node:test (zero deps)
scripts/
  chat.ts            # Multi-provider chat (Claude, Gemini, OpenAI, xAI)
  create-tool.ts     # Scaffold a new tool
  generate-docs.ts   # Generate tool docs

Read the full file on GitHub · 266 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. 4d ago First seen · 266 lines · 2,680 tokens per session scan A 8b59cd1e7f8d

Subscribe to this mod's changes

openFunctions CLAUDE.md is an instructions file published in the GitHub repository Tom-R-Main/openFunctions (5 stars, last pushed 9d ago), licensed MIT. It adds 2,680 tokens to every session, about $0.0134 per session on Opus 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.