Agent skill

Self Hosted Companion

by topoteretes in topoteretes/cognee

Chat with a companion that knows your notes folder (a journal, an Obsidian vault, any .md or .txt files) and every earlier chat, using cognee memory with local databases.

Apache-2.0Auto-check: notesKnowledge Management

Install Self Hosted Companion

skills CLI
$ npx skills add topoteretes/cognee --skill self-hosted-companion -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install topoteretes/cognee self-hosted-companion --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/topoteretes/cognee.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/self-hosted-companion .claude/skills/self-hosted-companion && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
self-hosted-companion
GitHub stars
32k
Token cost
~697 tokens
SKILL.md length
327 words
Files
1
Skills in repo
19
Repo updated
First seen
Licence
Apache-2.0

At a glance

Chat with a companion that knows your notes folder (a journal, an Obsidian vault, any .md or .txt files) and every earlier chat, using cognee memory with local databases.

  • Works in 4 steps: Run → You can't type into the interactive… → The answer is everything after [chat]… → …
  • Someone wants to ask questions about their own notes
  • SKILL.md covers Steps, Rules and Clean up
  • Calls uv; needs LLM_API_KEY

What it does

Self Hosted Companion is an agent skill from topoteretes/cognee. Chat with a companion that knows your notes folder (a journal, an Obsidian vault, any .md or .txt files) and every earlier chat, using cognee memory with local databases. Use when someone wants to ask questions about their own notes, or to talk with a companion that remembers past conversations. Runs locally; reads the notes folder, writes only to cognee's memory.

Its SKILL.md is about 700 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Knowledge Management. It works with Obsidian and Python. The repository describes itself as: Cognee is the open-source AI memory platform for agents. Give your AI agents persistent long-term memory with small models for free. The licence is Apache-2.0.

When your agent uses it

  • Someone wants to ask questions about their own notes
  • Talk with a companion that remembers past conversations

Example prompts

  • “/self-hosted-companion”

Requirements

  • Python 3
  • A credential in LLM_API_KEY

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Run
  2. You can't type into the interactive chat, so pass the user's message with --ask
  3. The answer is everything after [chat] companion>. Give it to the user. Each --ask is
  4. If a script fails, self_hosted_companion.py exits 1 with a line naming what went

What it can do on your machine

Read from SKILL.md and the folder at commit 0ec7a9f. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • uv

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use uv, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • LLM_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Self Hosted Companion loads about 697 tokens when it runs. Until then it costs about 97 tokens; SKILL.md has 327 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~97
When it runs · the whole SKILL.md, loaded when a task matches
~697

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:41
    question, and don't print `.env`.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from topoteretes/cognee at commit 0ec7a9f, republished under its Apache-2.0 licence (© topoteretes). 327 words, ~697 tokens.

Download SKILL.mdSave it as .claude/skills/self-hosted-companion/SKILL.md (or your agent's skills folder).
name
self-hosted-companion
description
Chat with a companion that knows your notes folder (a journal, an Obsidian vault, any .md or .txt files) and every earlier chat, using cognee memory with local databases. Use when someone wants to ask questions about their own notes, or to talk with a companion that remembers past conversations. Runs locally; reads the notes folder, writes only to cognee's memory.

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.

Clean up

bash
uv run cognee-cli forget --dataset self_hosted_companion

© topoteretes, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/self-hosted-companion of topoteretes/cognee.

Open the folder on GitHubat commit 0ec7a9f

Compare with similar skills

Self Hosted Companion next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Self Hosted Companion compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Self Hosted Companion this skilltopoteretes/cognee32k—~697Automated safety check: NotesApache-2.0
Obsidian Wiki LinterAgriciDaniel/claude-obsidian15k—~938Automated safety check: PassMIT
Conference Paper Recommenderjuliye2025/evil-read-arxiv1.7k—~2.5kAutomated safety check: PassNone
Daily arXiv Paper Briefjuliye2025/evil-read-arxiv1.7k—~4.3kAutomated safety check: PassNone
Paper and Web Source Analyzerjuliye2025/evil-read-arxiv1.7k—~715Automated safety check: PassNone
Paper Figure Extractorjuliye2025/evil-read-arxiv1.7k—~298Automated safety check: PassNone

Similar skills

  • Obsidian Wiki Linter

    AgriciDaniel/claude-obsidian

    Runs a deterministic, read-only health check on an Obsidian vault, reporting dead or ambiguous links, orphan pages, missing frontmatter, empty sections and stale index entries.

    15k GitHub stars~938 tokensUpdated 1 mo ago
    Knowledge ManagementAuto-check passed
  • Conference Paper Recommender

    juliye2025/evil-read-arxiv

    Searches DBLP for papers from top conferences such as CVPR, ICLR and NeurIPS, adds Semantic Scholar data, scores them and writes a yearly Obsidian note.

    1.7k GitHub stars~2.5k tokensUpdated 26 days ago
    Research & ScienceAuto-check passed
  • Daily arXiv Paper Brief

    juliye2025/evil-read-arxiv

    Searches arXiv for recent papers matching your research interests, scores them and writes a daily recommendation note into an Obsidian vault.

    1.7k GitHub stars~4.3k tokensUpdated 26 days ago
    Research & ScienceAuto-check passed
  • Paper and Web Source Analyzer

    juliye2025/evil-read-arxiv

    Analyzes arXiv papers, PDFs, project pages and blogs and writes an evidence-backed Obsidian note with images and a knowledge-graph entry.

    1.7k GitHub stars~715 tokensUpdated 26 days ago
    Research & ScienceAuto-check passed
  • Paper Figure Extractor

    juliye2025/evil-read-arxiv

    Pulls architecture, method and result figures from an arXiv paper or PDF into an Obsidian vault and writes an index of them.

    1.7k GitHub stars~298 tokensUpdated 26 days ago
    Research & ScienceAuto-check passed
  • Obsidian Canvas Populator

    AgriciDaniel/claude-canvas

    Adds images, text cards, PDFs, notes, links, diagrams, zones and edges to an existing Obsidian Canvas file without overlapping what is already there.

    300 GitHub stars~1.6k tokensUpdated 6 mo ago
    Knowledge ManagementAuto-check passed

More from topoteretes/cognee

All 19 skills in this repo
  • Cognee CLI Memory Commands

    topoteretes/cognee

    Drives cognee from the terminal with remember, recall, forget and improve memory commands, dataset and config management and database migrations.

    32k GitHub stars~2.2k tokensUpdated yesterday
    Auto-check: notes
  • Cognee Community Packages

    topoteretes/cognee

    Guide to using and contributing cognee community packages: database adapters, data-source connectors, custom tasks and retrievers, and Keywords AI observability.

    32k GitHub stars~1.2k tokensUpdated yesterday
    Auto-check passed
  • Cognee Custom Graph Models

    topoteretes/cognee

    Defines the shape of cognee's knowledge graph with graph_model: DataPoint node classes, identity and index fields, typed edges and fixes for duplicated nodes.

    32k GitHub stars~2.5k tokensUpdated yesterday
    Auto-check passed
  • Cognee Custom Pipelines

    topoteretes/cognee

    Shows how to write custom cognee tasks, chain them into pipelines, store custom DataPoints and run enrichment over the existing graph.

    32k GitHub stars~2.8k tokensUpdated yesterday
    Auto-check passed
  • Cognee Docker Setup

    topoteretes/cognee

    Runs the Cognee AI memory platform in Docker, from a one-file prebuilt image to a full compose stack with UI, MCP server, Postgres and Neo4j.

    32k GitHub stars~901 tokensUpdated yesterday
    Auto-check: notes
  • Cognee Forget

    topoteretes/cognee

    Removes data from cognee memory with forget(), finding the right dataset and document first and choosing between one document, a dataset or only the graph and vector memory.

    32k GitHub stars~1.9k tokensUpdated yesterday
    Auto-check passed

Works with

Questions about Self Hosted Companion

What does Self Hosted Companion do?

Chat with a companion that knows your notes folder (a journal, an Obsidian vault, any .md or .txt files) and every earlier chat, using cognee memory with local databases. Self Hosted Companion is an agent skill from topoteretes/cognee.txt files) and every earlier chat, using cognee memory with local databases.

When should I use Self Hosted Companion?

Self Hosted Companion fits situations like: someone wants to ask questions about their own notes; talk with a companion that remembers past conversations.

How do I install Self Hosted Companion in Claude Code?

Run `npx skills add topoteretes/cognee --skill self-hosted-companion -a claude-code`. Or copy the skill folder (.agents/skills/self-hosted-companion in topoteretes/cognee) into .claude/skills/self-hosted-companion in your project. Claude Code loads it when a task matches its description.

How do I install Self Hosted Companion in Codex?

Run `npx skills add topoteretes/cognee --skill self-hosted-companion -a codex`. Or copy the skill folder (.agents/skills/self-hosted-companion in topoteretes/cognee) into .agents/skills/self-hosted-companion in your project. Codex loads it when a task matches its description.

Can I use Self Hosted Companion in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add topoteretes/cognee --skill self-hosted-companion -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/self-hosted-companion, .gemini/skills/self-hosted-companion, .github/skills/self-hosted-companion and .opencode/skills/self-hosted-companion in your project.

What does Self Hosted Companion need to run?

Going by SKILL.md and its folder, Self Hosted Companion needs the command-line tools its instructions call (uv) and credentials named LLM_API_KEY. Our summary lists: Python 3; A credential in LLM_API_KEY.

Does Self Hosted Companion access the network?

SKILL.md contains no URLs. Its commands use uv, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Self Hosted Companion safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Self Hosted Companion use?

Self Hosted Companion is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Self Hosted Companion use?

About 697 tokens (SKILL.md is roughly 2.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Self Hosted Companion?

Skills that share tags, products or a category with Self Hosted Companion: Obsidian Wiki Linter (AgriciDaniel/claude-obsidian, 15k stars), Conference Paper Recommender (juliye2025/evil-read-arxiv, 1.7k stars), Daily arXiv Paper Brief (juliye2025/evil-read-arxiv, 1.7k stars) and Paper and Web Source Analyzer (juliye2025/evil-read-arxiv, 1.7k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Self Hosted Companion?

topoteretes (a GitHub organization) maintains it in topoteretes/cognee, which has 31,919 GitHub stars. The repository holds 19 skills in this directory. The repository was last updated on October 9, 2026.

Source: topoteretes/cognee on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.