Agent skill

Graph Retrieval

by larry-zy in larry-zy/cognida

“图谱与血缘检索技能,查询实体之间的关系、上下游依赖与数据血缘。”

— description from SKILL.md by larry-zy
MITAuto-check passed

Install Graph Retrieval

skills CLI
$ npx skills add larry-zy/cognida --skill graph-retrieval -a claude-code

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

GitHub CLI
$ gh skill install larry-zy/cognida graph-retrieval --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/larry-zy/cognida.git skills-src && mkdir -p .claude/skills && cp -r skills-src/services/cognida-go/skills/graph-retrieval .claude/skills/graph-retrieval && 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
graph-retrieval
GitHub stars
182
Token cost
~236 tokens
SKILL.md length
26 words
Files
1
Skills in repo
9
Repo updated
First seen
Licence
MIT

At a glance

  • SKILL.md covers 何时用 / 何时不用, 标准流程, 工具 and 约束
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

About this skill

Graph Retrieval is a skill in larry-zy/cognida (182 stars). Its SKILL.md is about 236 tokens. Licence: MIT.

What it can do on your machine

Read from SKILL.md and the folder at commit bf76257. 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

    No scripts in the folder and no shell commands in SKILL.md (its code samples are json).

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

  • Network

    No URLs in SKILL.md.

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

  • Credentials

    Names no API keys, tokens, secrets or passwords.

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

Context cost

Graph Retrieval loads about 236 tokens when it runs. Until then it costs about 12 tokens; SKILL.md has 26 words of instructions outside code blocks.

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

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 passed

The automated check found no risky patterns in SKILL.md.

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 larry-zy/cognida at commit bf76257, republished under its MIT licence (© larry-zy). 26 words, ~236 tokens.

Download SKILL.mdSave it as .claude/skills/graph-retrieval/SKILL.md (or your agent's skills folder).
name
graph-retrieval
description
图谱与血缘检索技能,查询实体之间的关系、上下游依赖与数据血缘。
when_to_use
当问题是关于实体间关系、依赖、影响面或数据血缘(如“这个字段的上游来自哪”“A 和 B 怎么关联”“改动这张表影响谁”)时使用,走知识图谱而非向量文档检索。
category
retrieval
tags
graph, lineage, relationship, knowledge-graph
version
1.0.0
author
Cognida Team

图谱 / 血缘检索

面向「查实体关系与数据血缘」的场景:沿图上的边遍历上下游、依赖与影响面。区别于文档问答(查文本片段)。

何时用 / 何时不用

  • ✅ 用:问的是关系/连接/依赖/血缘/影响面——上游来源、下游消费、A 与 B 如何关联、改动波及谁。
  • ❌ 不用:
    • 问题答案在文档正文里 → doc-qa
    • 要的是数据库里的统计数字 → text2sql-adhoc / semantic-metric

标准流程

1. 明确起点实体与关系方向(上游/下游/双向)
   ↓
2. graph_query 沿关系边检索(可限定跳数/关系类型)
   ↓
3. 归纳路径与影响面,必要时二次下钻
   ↓
4. 结构化呈现关系链 / 血缘路径

工具

graph_query — 图谱关系检索
json
{ "tool": "graph_query", "parameters": { "entity": "orders.amount", "direction": "upstream" } }

按实际参数 schema 传入起点、方向与跳数;不确定时先小跳数探路再扩展。

约束

  • 先确定方向与范围,避免全图无界遍历。
  • 呈现关系链时标明每一跳的关系类型与来源。
  • 图谱未启用或实体不在图上时如实说明,不臆造关系。

© larry-zy, MIT. 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 services/cognida-go/skills/graph-retrieval of larry-zy/cognida.

Open the folder on GitHubat commit bf76257

Compare with similar skills

Graph Retrieval 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.

Graph Retrieval compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Graph Retrieval this skilllarry-zy/cognida182—~236Automated safety check: PassMIT
Graph Retrievalstudy8677/repobrain1.3k—~255Automated safety check: PassMIT
Graphagenticnotetaking/arscontexta3.5k—~4.9kAutomated safety check: NotesMIT
Bigquery Graphgoogle/adk-python22k—~4.8kAutomated safety check: PassApache-2.0
Iterative Retrievalaffaan-m/ECC276k7 repos~1.6kAutomated safety check: PassMIT
Code Review Graph Buildertirth8205/code-review-graph32k—~295Automated safety check: PassMIT

Similar skills

  • Graph Retrieval

    study8677/repobrain

    Exposes graph-based retrieval as a tool capability via querygraph.

    1.3k GitHub stars~255 tokensUpdated yesterday
    Auto-check passed
  • Graph

    agenticnotetaking/arscontexta

    Interactive knowledge graph analysis. An agent skill from agenticnotetaking/arscontexta.

    3.5k GitHub stars~4.9k tokensUpdated 7 mo ago
    Knowledge ManagementAuto-check: notes
  • Bigquery Graph

    google/adk-python

    Official

    Skill for Graph Query Language (GQL) or SQL/PGQ queries against a property graph.

    22k GitHub stars~4.8k tokensUpdated today
    DatabasesAuto-check passed
  • Pattern for progressively refining context retrieval to solve the subagent context problem.

    276k GitHub starsUsed in 7 repos~1.6k tokens
    Agent WorkflowsAuto-check passed
  • Code Review Graph Builder

    tirth8205/code-review-graph

    Builds or incrementally updates the code-review knowledge graph for a repository and reports whether the build succeeded, partly or failed.

    32k GitHub stars~295 tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Mini Context Graph

    github/awesome-copilot

    Official

    A persistent, compounding knowledge base combining Karpathy's LLM Wiki pattern with a structured knowledge graph.

    40k GitHub starsUsed in 1 repo~2k tokens
    Knowledge ManagementAuto-check passed

More from larry-zy/cognida

All 9 skills in this repo
  • Attribution Analysis

    larry-zy/cognida

    归因/根因分析技能,把指标的期间变化拆解到候选维度,定位驱动因子并给出置信与下钻建议. An agent skill from larry-zy/cognida.

    182 GitHub stars~524 tokensUpdated 1 mo ago
    Auto-check passed
  • Report Composition

    larry-zy/cognida

    综合报告生成技能,把多段取数(总览+趋势+分群等)整合成一份带洞察的结构化报告. An agent skill from larry-zy/cognida.

    182 GitHub stars~397 tokensUpdated 1 mo ago
    Auto-check passed
  • Semantic Metric

    larry-zy/cognida

    语义指标取数技能,先查治理好的指标语义模型,再按统一口径取指标,避免对物理表猜测. An agent skill from larry-zy/cognida.

    182 GitHub stars~329 tokensUpdated 1 mo ago
    Auto-check passed
  • Generate a comprehensive report of core e-commerce operating metrics (GMV, orders, average order value, repurchase)

    182 GitHub stars~470 tokensUpdated 1 mo ago
    Auto-check passed
  • Text2sql Adhoc

    larry-zy/cognida

    即席取数技能,把一句话的具体数据问题翻译成 SQL 并执行返回结果。

    182 GitHub stars~390 tokensUpdated 1 mo ago
    Auto-check passed
  • Trend Analysis

    larry-zy/cognida

    趋势分析技能,取带时间维度的序列并量化其增长/变化幅度与异常点。

    182 GitHub stars~428 tokensUpdated 1 mo ago
    Auto-check passed

Questions about Graph Retrieval

How do I install Graph Retrieval in Claude Code?

Run `npx skills add larry-zy/cognida --skill graph-retrieval -a claude-code`. Or copy the skill folder (services/cognida-go/skills/graph-retrieval in larry-zy/cognida) into .claude/skills/graph-retrieval in your project. Claude Code loads it when a task matches its description.

How do I install Graph Retrieval in Codex?

Run `npx skills add larry-zy/cognida --skill graph-retrieval -a codex`. Or copy the skill folder (services/cognida-go/skills/graph-retrieval in larry-zy/cognida) into .agents/skills/graph-retrieval in your project. Codex loads it when a task matches its description.

Can I use Graph Retrieval 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 larry-zy/cognida --skill graph-retrieval -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/graph-retrieval, .gemini/skills/graph-retrieval, .github/skills/graph-retrieval and .opencode/skills/graph-retrieval in your project.

What does Graph Retrieval need to run?

SKILL.md names no scripts, command-line tools or credentials: Graph Retrieval is instructions for the agent only.

Does Graph Retrieval access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Graph Retrieval safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Graph Retrieval use?

Graph Retrieval is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Graph Retrieval use?

About 236 tokens (SKILL.md is roughly 944 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 Graph Retrieval?

Skills that share tags, products or a category with Graph Retrieval: Graph Retrieval (study8677/repobrain, 1.3k stars), Graph (agenticnotetaking/arscontexta, 3.5k stars), Bigquery Graph (google/adk-python, 22k stars) and Iterative Retrieval (affaan-m/ECC, 276k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Graph Retrieval?

larry-zy (a GitHub user) maintains it in larry-zy/cognida, which has 182 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on August 31, 2026.

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