cognee: Skill for Claude Code

.agents/skills/self-hosted-companion/SKILL.md

self-hosted-companion is a skill for Claude Code, Codex from topoteretes/cognee. It costs 85 tokens per session (693 once invoked), scanned A, original, Apache-2.0.

A local chat companion that remembers a folder of notes, such as journal entries, Obsidian files, Markdown, or text files, along with earlier chats. It answers questions about those notes and saves each conversation for later context.

In plain words
What is it for?
Question-answering over personal notes and continuing conversations with memory of earlier chats.
Why use it?
It avoids repeatedly explaining your notes or past conversations when asking follow-up questions.

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/self-hosted-companion/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 self-hosted-companion

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/topoteretes/cognee/self-hosted-companion"><img src="https://agentmods.dev/badge/skills/topoteretes/cognee/self-hosted-companion.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 85 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 693 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.00085 $0.00693
Opus 5.5 $0.00034 $0.00277
Sonnet 5.5 $0.00017 $0.00139
Haiku 4.5 $0.00009 $0.00069

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

Security

Grade A, and why

self-hosted-companion 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/skills/self-hosted-companion/SKILL.md · 54 lines

How it starts

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

Self-hosted AI companion

Runs the self-hosted companion cookbook in examples/cookbooks/self_hosted_companion/. It remembers a notes folder in the cognee dataset self_hosted_companion, then answers messages about it; each chat is saved to memory, so a later one knows it. Setup, the scripts and what each one does are in the cookbook's README.md.

Run every command from the repo root.

Steps

Without a notes folder of the user's own, or to see it work first, leave out <folder> below: the run then uses sample notes (the [setup] line says so). It needs only LLM_API_KEY. Tell the user the answer comes from sample notes.

  1. Run uv run python examples/cookbooks/self_hosted_companion/self_hosted_companion.py --check <folder> with the notes folder the user named.
    • Exit 0: go to step 2.
    • Exit 2: each [setup] MISSING: line names one fix. Tell the user which line to fix, using the README's "What it needs" table, and stop.
  2. You can't type into the interactive chat, so pass the user's message with --ask: uv run python examples/cookbooks/self_hosted_companion/self_hosted_companion.py <folder> --ask "...". Once the folder is remembered, later messages only need uv run python examples/cookbooks/self_hosted_companion/scripts/chat.py --ask "...".
  3. The answer is everything after [chat] companion>. Give it to the user. Each --ask is its own chat session, saved to memory, so a later one knows it.
  4. If a script fails, self_hosted_companion.py exits 1 with a line naming what went wrong. Run that script from examples/cookbooks/self_hosted_companion/scripts/ on its own to look closer.

Rules

  • The notes are the user's private files. Don't quote them beyond what answers the question, and don't print .env.
  • Every run uses LLM credits, so run it only when the user asked for it.
  • A sample run forgets the cookbook's dataset self_hosted_companion before it ingests (the [clear] line). On the user's own data, pass --clear only when they asked to start over: it forgets everything the dataset holds, including the earlier chats.
  • Don't pass --ui unless the user asked to browse the graph: it keeps running until Ctrl+C.

Read the full file on GitHub · 54 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 · 54 lines · 85 tokens per session scan A 3690fde55139

Subscribe to this mod's changes

self-hosted-companion is a skill published in the GitHub repository topoteretes/cognee (33,094 stars, last pushed today), licensed Apache-2.0. It adds 85 tokens to every session and 693 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-10-08.

Related

self-hosted-companion compared with skills from other repositories

self-hosted-companion next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
self-hosted-companiontopoteretes/cogneeSkill33ktodayApache-2.0A85Claude Code, Codex
handoffthedotmack/claude-memSkill114ktodayApache-2.0A66Claude Code
openmemoryCaviraOSS/OpenMemorySkill4.6k19d agoApache-2.0A96Claude Code, Codex
cortex-profilecdeust/CortexSkill76todayMITA98Claude Code
yesmem-cap-buildercarsteneu/yesmemSkill463d agoApache-2.0A81Claude Code, Codex
learn-proceduresliamh11/DeusSkill512d agoMITB65Claude Code
jiaojieJordanwei1/jiaojie-skillSkill902mo agoMITA186Codex