跳到正文
cccskills
免费在 GitHub 公开

memory

Use when Antigravity should remember, recall, search, improve, or forget information using Cognee.

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(1)

  • SKILL.md10.1 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Cognee Memory

Use this skill when the user asks Antigravity to use Cognee as memory, add facts or documents, search a knowledge graph, recall prior context, or improve existing memory.

Rules

  • Server first. Every operation below goes to the running Cognee server over HTTP, through the plugin's own scripts. That is the authoritative path in both local and cloud mode.
  • cognee-cli is a last resort, not an alternative. It is reachable only on a machine holding a cognee source checkout: scripts/cognee-cli.sh exits 64 anywhere else, and in cloud mode the plugin's venv is never built at all. Use it only when the server is genuinely unreachable and that checkout exists. Unsure which mode you are in? python3 "${COGNEE_ANTIGRAVITY_PLUGIN_ROOT:-$HOME/.gemini/config/plugins/cognee}/scripts/doctor.py" --json reports mode, server_url and reachable without importing cognee.
  • Empty CLI output is never proof of absence. Ground-truth against the server before concluding anything (see The server is the source of truth below).
  • Choose a clear dataset name with -d or --dataset-name; ask only if the dataset boundary is genuinely ambiguous.
  • Do not ingest secrets, credentials, .env files, private keys, token dumps, or unrelated generated artifacts.
  • Before destructive commands such as forget, delete, or --everything, get explicit user confirmation.

Add And Build

Server-first (one-step ingestion):

${COGNEE_ANTIGRAVITY_PLUGIN_ROOT:-$HOME/.gemini/config/plugins/cognee}/scripts/cognee-remember.sh "<text>" --node-set user_context

Use --node-set project_docs for project/code content, --node-set agent_actions for agent notes.

To store a file under its real filename (so code files ride the zero-LLM code path instead of being ingested as prose), pass --file:

${COGNEE_ANTIGRAVITY_PLUGIN_ROOT:-$HOME/.gemini/config/plugins/cognee}/scripts/cognee-remember.sh --file src/payments.py --node-set project_docs

For a whole repository (cross-file calls/imports, impact analysis), use the codebase skill instead. The script POSTs directly to /api/v1/remember. A {"ok": true} response means the server accepted the data. An error response means the server rejected or failed the request — check COGNEE_API_KEY and server logs; do not re-run or conclude the data wasn't stored without confirming against the server.

Background by default + eventual consistency: the wrapper submits with run_in_background=true (so a large cognify never holds one request open past the cloud's ~10-min request ceiling). The POST returns once the work is enqueued, with dataset_id and pipeline_run_id; status: "running" means submitted, not yet in the permanent graph. The graph is queryable only after the cognify pipeline completes; until then a search will not find the new content.

By default the wrapper then waits a short, bounded time (COGNEE_REMEMBER_WAIT_SECONDS, default 8) polling /api/v1/datasets/status and adds "queryable": true|false + "wait_outcome" to the result. queryable: true means it's now in the graph and an immediate recall will find it. If queryable: false, check wait_outcome: "timeout" means it's still processing (recall later — not an error), "errored" means the cognify failed (check server logs), "unknown" means completion couldn't be confirmed (e.g. an older server without the status route). Set COGNEE_REMEMBER_WAIT_SECONDS=0 to skip the wait, or COGNEE_REMEMBER_BACKGROUND=false for a fully synchronous, immediately-queryable write (small content only — large content risks the request ceiling).

Fallback only — server unreachable:

"${COGNEE_ANTIGRAVITY_PLUGIN_ROOT:-$HOME/.gemini/config/plugins/cognee}/scripts/cognee-cli.sh" remember <text-or-path> -d <dataset-name>

For staged work there is no HTTP equivalent, so it is available only with a cognee source checkout. Prefer the one-step server path above; mention this limitation rather than switching to the CLI when no checkout exists:

"${COGNEE_ANTIGRAVITY_PLUGIN_ROOT:-$HOME/.gemini/config/plugins/cognee}/scripts/cognee-cli.sh" add <text-or-path> -d <dataset-name>
"${COGNEE_ANTIGRAVITY_PLUGIN_ROOT:-$HOME/.gemini/config/plugins/cognee}/scripts/cognee-cli.sh" cognify -d <dataset-name>

For long processing:

"${COGNEE_ANTIGRAVITY_PLUGIN_ROOT:-$HOME/.gemini/config/plugins/cognee}/scripts/cognee-cli.sh" remember <text-or-path> -d <dataset-name> --background
"${COGNEE_ANTIGRAVITY_PLUGIN_ROOT:-$HOME/.gemini/config/plugins/cognee}/scripts/cognee-cli.sh" cognify -d <dataset-name> --background

Recall And Search

Server-first (authoritative) — use the wrapper:

${COGNEE_ANTIGRAVITY_PLUGIN_ROOT:-$HOME/.gemini/config/plugins/cognee}/scripts/cognee-search.sh "<question>" 10 --graph

It resolves the endpoint, the session and the API key the way the hooks do (launch record → COGNEE_API_KEY → the auto-minted api_key.json), so it authenticates correctly in both local and cloud mode. --graph is the default and may be omitted; memory is read from the knowledge graph (and the code graph via --code) only — the session cache is written, never searched.

An empty result from the server is authoritative — the server searched and found nothing.

Do not hand-roll the curl with -H "X-Api-Key: ${COGNEE_API_KEY:-}". In local mode that variable is empty — the key is minted into ~/.cognee-plugin/api_key.json and never exported to your shell — so the request 401s and looks like a server problem when nothing is wrong. When you genuinely need the raw endpoint (to pass node_name, say), resolve the credentials first, in the same shell invocation:

eval "$(${COGNEE_ANTIGRAVITY_PLUGIN_ROOT:-$HOME/.gemini/config/plugins/cognee}/scripts/cognee-forget.sh env)" && \
curl -s -X POST "${COGNEE_BASE_URL}/api/v1/recall" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: ${COGNEE_API_KEY}" \
  -d '{"query": "<question>", "top_k": 10, "only_context": true, "scope": ["graph"]}'

A 401 after that resolver means the key really is wrong for that server; a 401 without it means nothing.

Fallback only — server unreachable:

"${COGNEE_ANTIGRAVITY_PLUGIN_ROOT:-$HOME/.gemini/config/plugins/cognee}/scripts/cognee-cli.sh" recall "<question>" -d <dataset-name> -f pretty

These search modes have no HTTP equivalent, so they are available only with a cognee source checkout. They are not a reason to leave the server path: if no checkout exists, say the mode is unavailable and use the server search above.

"${COGNEE_ANTIGRAVITY_PLUGIN_ROOT:-$HOME/.gemini/config/plugins/cognee}/scripts/cognee-cli.sh" search "<question>" -d <dataset-name> -t GRAPH_COMPLETION -f pretty
"${COGNEE_ANTIGRAVITY_PLUGIN_ROOT:-$HOME/.gemini/config/plugins/cognee}/scripts/cognee-cli.sh" search "<exact passage or citation need>" -d <dataset-name> -t CHUNKS -k 10 -f pretty
"${COGNEE_ANTIGRAVITY_PLUGIN_ROOT:-$HOME/.gemini/config/plugins/cognee}/scripts/cognee-cli.sh" search "<code question>" -d <dataset-name> -t CODE -k 10 -f pretty

The server is the source of truth

cognee-cli is a thin client over the running Cognee server and can print empty stdout even when content exists (a serialization quirk). So:

  • Never conclude "not found" from an empty/clean CLI run. Confirm against the server directly — this is authoritative.
  • Do not re-run the same CLI search to "retry." One server answer is authoritative.
  • Omit -d <dataset> to search all your datasets; restricting to one dataset can miss content that lives in another.

Improve Memory

Server-first (session → graph sync):

python3 "${COGNEE_ANTIGRAVITY_PLUGIN_ROOT:-$HOME/.gemini/config/plugins/cognee}/scripts/sync-session-to-graph.py"

Fallback only — server unreachable:

"${COGNEE_ANTIGRAVITY_PLUGIN_ROOT:-$HOME/.gemini/config/plugins/cognee}/scripts/cognee-cli.sh" improve -d <dataset-name>

Bridge session feedback or Q&A into the graph:

"${COGNEE_ANTIGRAVITY_PLUGIN_ROOT:-$HOME/.gemini/config/plugins/cognee}/scripts/cognee-cli.sh" improve -d <dataset-name> -s <session-id>

For targeted enrichment:

"${COGNEE_ANTIGRAVITY_PLUGIN_ROOT:-$HOME/.gemini/config/plugins/cognee}/scripts/cognee-cli.sh" improve -d <dataset-name> --node-name <entity-name>

Forget

When the user asks to forget or delete something from memory, walk the guided flow below through the wrapper: sync the live session (so unsynced content becomes a deletable document), find the dataset id, judge candidate documents by their raw content — by meaning, not just keywords, and grouped by session, since one session produces several documents carrying the same content in different forms — confirm with the user, then delete each match:

${COGNEE_ANTIGRAVITY_PLUGIN_ROOT:-$HOME/.gemini/config/plugins/cognee}/scripts/cognee-forget.sh sync
${COGNEE_ANTIGRAVITY_PLUGIN_ROOT:-$HOME/.gemini/config/plugins/cognee}/scripts/cognee-forget.sh datasets
${COGNEE_ANTIGRAVITY_PLUGIN_ROOT:-$HOME/.gemini/config/plugins/cognee}/scripts/cognee-forget.sh data <dataset_id>
${COGNEE_ANTIGRAVITY_PLUGIN_ROOT:-$HOME/.gemini/config/plugins/cognee}/scripts/cognee-forget.sh raw <dataset_id> <data_id>
${COGNEE_ANTIGRAVITY_PLUGIN_ROOT:-$HOME/.gemini/config/plugins/cognee}/scripts/cognee-forget.sh forget <dataset_id> <data_id>

The wrapper always authenticates (env → ~/.cognee/.env → the auto-minted local api_key.json) and prints an HTTP <status> trailer per call. Deletion is irreversible — use the narrowest scope possible and confirm first.

Fallback only — server unreachable:

"${COGNEE_ANTIGRAVITY_PLUGIN_ROOT:-$HOME/.gemini/config/plugins/cognee}/scripts/cognee-cli.sh" forget --dataset <dataset-name> --data-id <data-uuid>
"${COGNEE_ANTIGRAVITY_PLUGIN_ROOT:-$HOME/.gemini/config/plugins/cognee}/scripts/cognee-cli.sh" forget --dataset <dataset-name>

Avoid the CLI's forget --everything unless the user explicitly asks to delete all Cognee data.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

codebase

免费

Use when indexing a code repository into Cognee's code graph or querying it (callers, impact analysis, paths, endpoints) from Antigravity.

中文简介正在准备中。当前显示原文说明。

topoteretes/cognee-integrations1012026年10月21日 更新

codebase

免费

Use when indexing a code repository into Cognee's code graph or querying it (callers, impact analysis, paths, endpoints) from Codex.

中文简介正在准备中。当前显示原文说明。

topoteretes/cognee-integrations1012026年10月21日 更新

Explain a repository's architecture (modules, routes, storage, services), find risky hotspots, draw a Mermaid diagram of the code graph, or review how far a change reaches, from Cognee's code graph.

中文简介正在准备中。当前显示原文说明。

topoteretes/cognee-integrations1012026年10月21日 更新

Index a repository (local path or git URL) into Cognee's code graph and answer exact structural queries with no LLM calls: callers, dependencies, impact of changing a symbol, call paths, endpoints, re-index changes.

中文简介正在准备中。当前显示原文说明。

topoteretes/cognee-integrations1012026年10月21日 更新

A digest of a week or more of the user's own coding-agent sessions (default 7 days): sessions per day and project, most-edited files and the lessons Cognee learned, written up as shipped, decided and still open.

中文简介正在准备中。当前显示原文说明。

topoteretes/cognee-integrations1012026年10月21日 更新

A multi-day digest of the user's own coding-agent sessions — sessions per day and project, most-edited files, and every lesson Cognee distilled into the knowledge graph in that window. Use only when the user explicitly asks for a weekly digest, a retro, a recap or report of their recent sessions, or asks for the `cognee-digest` skill by name. Not for questions about code or the current task.

中文简介正在准备中。当前显示原文说明。

topoteretes/cognee-integrations1012026年10月21日 更新

查看 topoteretes 的全部技能

报告此技能的问题