openFunctions: Instructions file for Claude Code

CLAUDE.md

openFunctions CLAUDE.md is an instructions file for Claude Code from Tom-R-Main/openFunctions. It costs 2,836 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 for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: built for openclaw.

This is Tom-R-Main/openFunctions's own configuration. It tells Claude Code how to work on openFunctions itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything openFunctions configures →

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import { defineTool, ok, err } from "../framework/index.js";.

Reuse

Borrowing it

Nothing to install: this file belongs to Tom-R-Main/openFunctions. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Tom-R-Main/openFunctions/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/Tom-R-Main/openFunctions

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/tom-r-main/openfunctions/claude-md/github.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/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 openFunctions CLAUDE.md

Your own site · 80×15
<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="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,836 This file is loaded in full into every session.
When invoked 2,836 The same file — it is already loaded in full.
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.02836 $0.02836
Opus 5.5 $0.01134 $0.01134
Sonnet 5.5 $0.00567 $0.00567
Haiku 4.5 $0.00284 $0.00284

Measured 25d ago against content hash 7f7b9d3267fa, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 25d 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 · 277 lines

How it starts

The opening of the file, as written. The whole thing — 277 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         # Side-effect-free public framework exports
    executor.ts      # Canonical validation, policy, scheduling and receipts
    execution-journal.ts # Standalone durable action evidence
    work/            # Opt-in bounded attempts, grants, leases and verification
  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           # Side-effect-free package library entry
  workshop.ts        # Source workshop — registers tools and starts MCP
  cli.ts             # Compiled npm executable; serve/config/work commands
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 · 277 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. 25d ago Changed · +11 lines · +156 tokens per session 7f7b9d3267fa
  2. 2mo 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 (4 stars, last pushed 24d ago), licensed MIT. It adds 2,836 tokens to every session, about $0.0113 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

openFunctions CLAUDE.md compared with instructions from other repositories

openFunctions CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
openFunctions CLAUDE.mdTom-R-Main/openFunctionsInstructions file424d agoMITA2,836Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
vscode model-prompts.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA2,022GitHub Copilot