cognee: Skill for Claude Code

.agents/skills/cognee-performance/SKILL.md

cognee-performance is a skill for Claude Code, Codex from topoteretes/cognee. It costs 70 tokens per session (2,609 once invoked), scanned A, original, Apache-2.0.

A guide to controlling Cognee's ingestion speed, language-model use, and estimated cost. It covers how data is split and processed, how many tasks run at once, and how work can run in the background.

In plain words
What is it for?
Use it to preview token use and approximate cost, adjust concurrency and chunk sizes, select processing models, and reduce load during ingestion.
Why use it?
It helps when ingestion is slow, expensive, overloaded, or hitting service limits. It also separates cost estimates for graph extraction and summaries from other work such as embeddings.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

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

About the project

Cognee is an AI memory platform that stores information in a self-hosted knowledge graph so agents can retain context across sessions. It ingests data, connects related information, and helps agents retrieve it for reasoning and actions. The catalogue includes skills and instructions that extend agent workflows around Cognee.

topoteretes/cognee · 33,094 stars · on GitHub · cognee.ai

Reuse

Borrowing it

Nothing to install: this file belongs to topoteretes/cognee. 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/topoteretes/cognee/main/.agents/skills/cognee-performance/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/topoteretes/cognee

Made for: Claude Code, Codex.

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 cognee-performance

README.md
[![agentmods](https://agentmods.dev/badge/skills/topoteretes/cognee/cognee-performance/github.svg)](https://agentmods.dev/skills/topoteretes/cognee/cognee-performance)
Your own site
<a href="https://agentmods.dev/skills/topoteretes/cognee/cognee-performance"><img src="https://agentmods.dev/badge/skills/topoteretes/cognee/cognee-performance/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 cognee-performance

Your own site · 80×15
<a href="https://agentmods.dev/skills/topoteretes/cognee/cognee-performance"><img src="https://agentmods.dev/badge/skills/topoteretes/cognee/cognee-performance.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 70 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,609 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.00070 $0.02609
Opus 5.5 $0.00028 $0.01044
Sonnet 5.5 $0.00014 $0.00522
Haiku 4.5 $0.00007 $0.00261

Measured 21d ago against content hash 463891ca174b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

cognee-performance 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 21d 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/skills/cognee-performance/SKILL.md · 187 lines

How it starts

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

Tune cognee's performance

The LLM is the bottleneck. Building the graph costs two LLM calls per chunk (graph extraction and summarization), and almost every other tuning question comes down to how many of those calls run, how fast, and on which model. Database and embedding work is small next to that.

Use it

1. Estimate before you ingest

estimate = await cognee.remember("./docs", dry_run=True)
print(estimate)  # per-stage token counts and approximate cost; no LLM calls

The estimate covers graph extraction and summarization only, not improve() or embeddings. Not available with GLiNER or a remote instance.

2. Ingestion knobs

All are remember() arguments (and cognify() ones):

Knob Default What it controls
data_per_batch 20 How many documents are processed at the same time (a concurrency limit, not a batch). Lower it to reduce load; raise it for many small files.
chunks_per_batch 2000 (env CHUNKS_PER_BATCH) How many chunks each extraction/storage call receives. Lower it to spread load and fail smaller. The DLT pipeline defaults to 100.
chunk_size min(embedding max tokens, LLM max tokens / 2); about 8191 tokens with default OpenAI models Max tokens per chunk. Fewer, bigger chunks mean fewer LLM calls; smaller chunks mean finer-grained graphs.
run_in_background False Return immediately (status="running"); await result later.
self_improvement True improve() after the graph is built. False (or IMPROVE_AUTO_ENABLED=false) skips that extra work.

Worst-case concurrent LLM calls are about data_per_batch × min(chunks per document, chunks_per_batch) × 2, and there is no separate concurrency cap. The rate limiter below is the brake.

Several datasets in one cognify(datasets=[...]) call run one after another, not in parallel.

3. LLM throttling and models

Env var Default Notes
LLM_RATE_LIMIT_ENABLED false Turn on a requests-per-interval limit
LLM_RATE_LIMIT_REQUESTS / LLM_RATE_LIMIT_INTERVAL 60 / 60 s 10 requests for local providers (Ollama, llama.cpp, LM Studio)
AUTO_RATE_LIMIT true On a 429/503/529 or timeout, switches the limiter on for 15 minutes (extended while errors continue)
LLM_EXTRACTION_MODEL / _PROVIDER / _ENDPOINT / _API_KEY / _API_VERSION the main model Use a cheaper or faster model just for graph extraction
LLM_SUMMARIZATION_*, LLM_QUERY_* the main model Same, for summaries and for answering queries
LLM_MAX_COMPLETION_TOKENS 16384 Also caps the default chunk size (half of it)
LLM_ARGS — Extra litellm arguments merged into every call, e.g. a request timeout

Read the full file on GitHub · 187 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. 21d ago Changed 463891ca174b
  2. 1mo ago Changed 298b930d1191
  3. 1mo ago First seen · 187 lines · 70 tokens per session scan A 382f23bb74af

Subscribe to this mod's changes

cognee-performance is a skill published in the GitHub repository topoteretes/cognee (33,094 stars, last pushed today), licensed Apache-2.0. It adds 70 tokens to every session and 2,609 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-09-30.

Related

cognee-performance compared with skills from other repositories

cognee-performance next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
cognee-performancetopoteretes/cogneeSkill33ktodayApache-2.0A70Claude Code, Codex
openmemoryCaviraOSS/OpenMemorySkill4.6k19d agoApache-2.0A96Claude Code, Codex
memseek-remembermemseekai/memseekSkill11yesterdayApache-2.0A24Claude Code
memseek-explainmemseekai/memseekSkill11yesterdayApache-2.0A25Claude Code
memseek-searchmemseekai/memseekSkill11yesterdayApache-2.0A22Claude Code
surface-learningsterrizoaguimor/celiums-memorySkill232mo agoApache-2.0A60Claude Code
context-recoveryterrizoaguimor/celiums-memorySkill232mo agoApache-2.0A37Claude Code