clickmem: Instructions file for Claude Code

AGENTS.md

clickmem AGENTS.md is an instructions file for Claude Code, Codex, OpenCode from auxten/clickmem. It costs 1,104 tokens per session, scanned A, original, MIT.

Workspace instructions recording learned preferences and project facts for clickmem, a knowledge-management system. They cover coding practices, configuration, architecture, interfaces, asynchronous work, and keeping knowledge separated by project.

In plain words
What is it for?
Use them when designing or changing clickmem APIs, MCP tools, hooks, asynchronous server code, configuration, embeddings, or project-scoped knowledge handling.
Why use it?
They preserve decisions that should remain consistent across future changes, such as using environment variables and fixing root causes. They also explain boundaries between project-specific knowledge and general preferences.

Instructions file for Claude CodeCodexOpenCode

Written for Claude Code and Codex and OpenCode: SessionStart hook event, but also the file is AGENTS.md. Also seen: mentions CLAUDE.md; mentions Claude Code; mentions AGENTS.md.

This is auxten/clickmem's own configuration. It tells Claude Code, Codex and OpenCode how to work on clickmem 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 clickmem configures →

Reuse

Borrowing it

Nothing to install: this file belongs to auxten/clickmem. 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/auxten/clickmem/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/auxten/clickmem

Made for: Claude Code, Codex, OpenCode.

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 clickmem AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/auxten/clickmem/agents-md/github.svg)](https://agentmods.dev/instructions/auxten/clickmem/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/auxten/clickmem/agents-md"><img src="https://agentmods.dev/badge/instructions/auxten/clickmem/agents-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 clickmem AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/auxten/clickmem/agents-md"><img src="https://agentmods.dev/badge/instructions/auxten/clickmem/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,104 This file is loaded in full into every session.
When invoked 1,104 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.01104 $0.01104
Opus 5.5 $0.00442 $0.00442
Sonnet 5.5 $0.00221 $0.00221
Haiku 4.5 $0.00110 $0.00110

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

Security

Grade A, and why

clickmem AGENTS.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 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.

AGENTS.md · 39 lines

How it starts

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

Learned User Preferences

Code quality & process

  • Fix root causes for all users; no case-by-case patches, retries, or workarounds; revert speculative changes promptly
  • All config via env vars with sensible defaults; never hardcode IPs or machine-specific values
  • Repo code, docs, and comments in English; extracted CEO Brain knowledge preserved in the user's original language
  • Batch commits by logical grouping; commit and push only when explicitly asked; release only via git tags + CI

Architecture & design

  • Plan and discuss architecture before coding; deliver plans in current chat mode — don't switch to Plan mode unless asked
  • All interfaces (CLI, MCP tools, plugins) must expose the same capabilities as the HTTP API; never access chDB directly
  • Use asyncio.to_thread() for all blocking calls (chDB, embedding, LLM) inside the async server
  • Prefer event-driven hooks over periodic cron; hooks source code in project tree (cursor-hooks/), not .cursor/
  • Distinguish project-scoped facts from global principles; use project_id + score boosting to prevent cross-project knowledge pollution
  • AGENTS.md bullets parsed directly as principles (not re-extracted through LLM); CLAUDE.md goes through LLM extraction

Workflow

  • Deploy changes AND verify end-to-end yourself; don't tell the user to verify
  • Test with representative cases before bulk operations; import data newest-first; don't proactively scan beyond what's specified
  • Coordinate parallel sessions: if another session implements a feature, revert speculative changes and wait for merge

Learned Workspace Facts

  • ClickMem: local memory system / belief-revision store for AI coding agents; explicit-only, no LLM in the server loop, no auto-extraction
  • Single port 9527 serves REST (/v1/*), MCP SSE (/sse), and the dashboard (/dashboard)
  • Two storage backends, switchable via CLICKMEM_BACKEND: local (embedded chDB, default) or clickhouse (ClickHouse Cloud or self-hosted via clickhouse-connect); all DDL flows through src/clickmem/schema.py
  • Single entity Memory with kind ∈ {principle, decision, fact, doc, free} and status ∈ {active, contracted, conflicted}; partitioned by project_id + privacy ∈ {public, private, confidential}
  • Conflict surfacing: on Expand/Revise, embeddings at cosine ≥ CLICKMEM_CONFLICT_THRESHOLD (default 0.92) inside the same (project_id, kind) flag both rows conflicted; pinned memories short-circuit (non-pinned conflicting commits are rejected outright)
  • Five first-class operations with CLI ↔ MCP parity: Expand (remember), Revise (edit), Contract (forget), Reinforce (pin), Refuse (blacklist)
  • Embedding-only retrieval: Qwen3-Embedding-0.6B at 256d on CPU (never MPS / GPU); no mlx-lm, no litellm, no [llm] extra
  • Recall scoring: same-project ×1.0, global (project_id='') ×0.9, other-project ×0.0; privacy filter (confidential excluded unless privacy_ack=true); pinned boost; recall_trace exposes the per-candidate breakdown
  • Hooks are slim: Cursor stop hook fires-and-forgets POST /v1/raw (<50 ms); Claude Code hooks.json has only SessionStart (HTTP recall) and Stop (HTTP raw landing), both <100 ms — never an LLM call inline
  • Adapters live in src/clickmem/adapters/ behind one AgentAdapter protocol; built-ins: Claude Code, Cursor, Codex, Aider, Continue.dev, Cline, Windsurf, Zed, JetBrains AI, generic
  • Config env vars: CLICKMEM_SERVER_HOST / CLICKMEM_SERVER_PORT (9527), CLICKMEM_REMOTE, CLICKMEM_API_KEY, CLICKMEM_BACKEND, CLICKMEM_DB_PATH, CLICKMEM_CH_URL / CH_USER / CH_PASSWORD / CH_DATABASE, CLICKMEM_CONFLICT_THRESHOLD, CLICKMEM_EMBEDDING_MODEL, CLICKMEM_LOG_LEVEL
  • Dashboard at /dashboard is the primary user-management surface (React + Vite + Tailwind + Recharts, bundled into the wheel via tool.hatch.build.targets.wheel.force-include of src/clickmem/dashboard/dist)
  • Tests use an in-memory chDB backend + MockEmbeddingEngine via tests/conftest.py; unit + httpx integration + MCP smoke layers
  • Package layout: src/clickmem/ (Python), src/clickmem/dashboard/ (TypeScript SPA), cursor-hooks/, claude-hooks/, skills/
  • PyPI clickmem 1.0.0 is the first release on the rebuilt code; CI on Python 3.10/3.12/3.13; release via v* tags + PyPI Trusted Publisher

Read the full file on GitHub · 39 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 · 39 lines · 1,104 tokens per session scan A a1df46a00071

Subscribe to this mod's changes

clickmem AGENTS.md is an instructions file published in the GitHub repository auxten/clickmem (66 stars, last pushed 4mo ago), licensed MIT. It adds 1,104 tokens to every session, about $0.0044 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.

Related

Other instructions, from other repositories