cognee: Skill for Claude Code

.claude/skills/cognee-install/SKILL.md

cognee-install is a skill for Claude Code from topoteretes/cognee. It costs 42 tokens per session (1,046 once invoked), scanned A, original, Apache-2.0.

An installation guide for Cognee, a Python tool that stores information as AI-searchable memory and answers questions about it.

In plain words
What is it for?
Creating a Python environment, installing Cognee, choosing optional features, and running the first remember, recall, forget, or improve operation.
Why use it?
It explains the initial setup, required API key, optional integrations, and the first working example without requiring separate databases.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is topoteretes/cognee's own configuration. It tells Claude Code 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 · 30,576 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/.claude/skills/cognee-install/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/topoteretes/cognee

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/topoteretes/cognee/cognee-install.svg)](https://agentmods.dev/skills/topoteretes/cognee/cognee-install)
Your own site
<a href="https://agentmods.dev/skills/topoteretes/cognee/cognee-install"><img src="https://agentmods.dev/badge/skills/topoteretes/cognee/cognee-install.svg" alt="Measured on agentmods" height="20"></a>
Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,046 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. Third-party audits
  • Snyk fail 7 Sept 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00042 $0.01046
Opus 5 $0.00021 $0.00523
Sonnet 5 $0.00008 $0.00209
Haiku 4.5 $0.00004 $0.00105

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

Security

Grade A, and why

cognee-install 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 8d 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/skills/cognee-install/SKILL.md · 98 lines

How it starts

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

Install and run cognee

Install

Requires Python 3.10–3.14. Prefer uv:

uv venv && source .venv/bin/activate
uv pip install cognee            # from PyPI
# or, working inside this repo:
uv pip install -e .

Add extras only when needed — examples: cognee[postgres], cognee[neo4j], cognee[docling] (office/HTML document parsing, slim), cognee[docs] (unstructured), cognee[anthropic], cognee[ollama], cognee[aws]. The full list is in pyproject.toml under [project.optional-dependencies].

Configure

The only required setting is an LLM API key. Create .env in the working directory (or export the variable):

LLM_API_KEY="your_openai_api_key"

Defaults need no services: SQLite (relational), LanceDB (vector), and Ladybug (graph), all stored locally. OpenAI is the default LLM and embedding provider — if you configure a different LLM but not embeddings (or vice versa), the other silently stays on OpenAI. For other providers and databases use the cognee-integrations skill.

First run

As of cognee 1.x the memory API — remember, recall, forget, improve — is the primary surface. All SDK functions are async. Minimal end-to-end script:

import asyncio
import cognee

async def main():
    await cognee.remember("Cognee turns documents into AI memory.")
    results = await cognee.recall("What does cognee do?")
    print(results)

asyncio.run(main())

remember() is the whole ingestion path in one call — it runs add() + cognify(), then improve() to index the graph (self_improvement=True by default). It accepts text, file paths, URLs, and binary streams, with an optional dataset_name="my_project"; pass datasets=["my_project"] to recall() to stay inside one dataset.

recall() auto-routes the query to a search strategy by default. Pass query_type=SearchType.CHUNKS (etc.) to pin one, or auto_route=False to fall back to GRAPH_COMPLETION.

Session memory is the other half of the API — remember(..., session_id="chat_1") writes to a fast session cache rather than running add+cognify inline, and recall(..., session_id="chat_1") reads it back (session hits short-circuit the graph search). With the default self_improvement=True it still bridges that data into the permanent graph in the background; improve(dataset=..., session_ids=[...]) does the same explicitly. Session memory runs on the session cache, which is on by default (CACHING=true); setting CACHING=false disables it entirely and makes remember(session_id=...) raise.

Read the full file on GitHub · 98 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. 8d ago First seen · 98 lines · 42 tokens per session scan A 56466739d464

Subscribe to this mod's changes

cognee-install is a skill published in the GitHub repository topoteretes/cognee (30,576 stars, last pushed today), licensed Apache-2.0. It adds 42 tokens to every session and 1,046 once invoked, about $0.0002 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-30.

Related

Other skills, from other repositories

openmemory

Manage persistent memory via OpenMemory MCP. TRIGGER when: user says "remember this", "save to memory", "store this", "recall", "what do you remember about", "check memory", "forget this", "delete memory", "clean up memory", or when agent forms a stable conclusion worth persisting. DO NOT TRIGGER when: user refers to…

CaviraOSS/OpenMemory · 96 tokens

surface-learnings

Use when the user asks "what have you learned", "what do you remember about me", "show me memory stats", "memory state", "/reflexes", or any variant. Surfaces what the limbic engine has accumulated as patterns, not as a memory dump.

terrizoaguimor/celiums-memory · 60 tokens

context-recovery

Use at the start of every session, and especially after context compaction or a cold restart. Fires as the first action, before engaging with the user's opening message.

terrizoaguimor/celiums-memory · 37 tokens

decision-encoding

Use when an architectural choice is made, a library is selected, an approach is committed to, a convention is set, or any "we'll do it this way" moment occurs. Fires the moment the decision stabilizes, not after.

terrizoaguimor/celiums-memory · 52 tokens

pre-response-recall

Use when the user asks about anything that could have context in prior sessions — names, preferences, decisions, past work, or anything starting with "remember", "what did", "have we", "did we". Fires before generating any substantive response.

terrizoaguimor/celiums-memory · 55 tokens

salience-filtering

Use when deciding whether to store a memory. Fires as a gate before every remember() call. The default answer is "no" — biological memory is selective, not exhaustive.

terrizoaguimor/celiums-memory · 40 tokens