Skip to content
Skill

Knowledge graph relation typing

Type knowledge graph relations against a fixed schema and flag conflicting facts

Knowledge graph relation typing is an open-source agent skill for knowledge and memory. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

Scripts
None
Platforms
Claude Code, Codex, Cursor
GitHub stars
440
Last commit
License
MIT
Listing updated

Similar skills

About Knowledge graph relation typing

This skill guides an agent through labelling candidate subject, sentence, object triples with one relation from a fixed schema, using a batched classification service that needs no API key. Each label comes with a confidence score, and the skill sets gating thresholds so that only high-confidence edges are written to the graph, while mid-confidence edges go to a review queue and low-confidence ones are dropped.

The same approach is applied to contradiction checking: pairs of facts that share a subject and relation are compared and labelled as consistent, contradictory, or about different things. The skill explains how schema size and label wording affect confidence, recommends writing relation names as plain sentences, and covers a proposition-based method for cases where subject and object direction matters.

The skill expects the agent to already have extracted entities and their source sentences, since it only classifies and does not find entities or discover new relation types. It is written around a classifier.dev endpoint and calls are made from Python code the agent writes.

When your agent uses it

Type candidate (subject, sentence, object) triples against a fixed relation schema and flag triples that contradict each other, batched, with a calibrated confidence per edge so only confident edges are written. Use when building a knowledge graph, entity table or fact store from text. Triggers on "type these relations", "what relation is this", "build a knowledge graph", "do these facts conflict", "check these triples".

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 1 file (6 KB) on GitHub on 4 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

Copy the skill folder to ~/.claude/skills/knowledge-graph-relation-typing to use it in all your projects:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/mrmps/classifier-dev.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/knowledge-graph-relation-typing &&
cp -R "$tmp/skills/knowledge-graph-relation-typing" ~/.claude/skills/knowledge-graph-relation-typing &&
rm -rf "$tmp"

For one project only, put the folder in .claude/skills/knowledge-graph-relation-typing inside it instead.

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/knowledge-graph-relation-typing to use it in every repository:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/mrmps/classifier-dev.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/knowledge-graph-relation-typing &&
cp -R "$tmp/skills/knowledge-graph-relation-typing" ~/.agents/skills/knowledge-graph-relation-typing &&
rm -rf "$tmp"

For one repository only, put the folder in .agents/skills/knowledge-graph-relation-typing inside it instead.

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/knowledge-graph-relation-typing to use it in every project:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/mrmps/classifier-dev.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/knowledge-graph-relation-typing &&
cp -R "$tmp/skills/knowledge-graph-relation-typing" ~/.cursor/skills/knowledge-graph-relation-typing &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/knowledge-graph-relation-typing inside it instead.

Cursor docs on skills

Run in a terminal (add --scope workspace to install it for the current workspace only):

gemini skills install https://github.com/mrmps/classifier-dev.git --path skills/knowledge-graph-relation-typing

Or copy the folder to ~/.gemini/skills/knowledge-graph-relation-typing yourself.

Gemini CLI docs on skills

For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/knowledge-graph-relation-typing:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/mrmps/classifier-dev.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/knowledge-graph-relation-typing &&
cp -R "$tmp/skills/knowledge-graph-relation-typing" ~/.copilot/skills/knowledge-graph-relation-typing &&
rm -rf "$tmp"

For one project only, put the folder in .github/skills/knowledge-graph-relation-typing inside it instead.

VS Code docs on skills

Get the folder:

git clone --depth 1 https://github.com/mrmps/classifier-dev.git

Then copy classifier-dev/skills/knowledge-graph-relation-typing into your agent's skills folder as knowledge-graph-relation-typing. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Batched relation typing
Classifies many subject, sentence, object triples against a fixed relation schema in one request.
Confidence-gated writes
Sets thresholds so only confident edges enter the graph and uncertain ones are queued or dropped.
Contradiction detection
Compares fact pairs sharing a subject and relation and labels them consistent, contradictory or unrelated.
Schema design guidance
Explains how label count and near-synonyms affect confidence, and how to phrase labels as sentences.
Direction-aware propositions
Frames candidates as statements to test whether a sentence states a relation in a specific direction.

Good for

  • Type the relations between entities extracted from a batch of news articles
  • Check whether two stored facts about a company conflict with each other
  • Build a knowledge graph of people, organisations and locations from text
  • Decide which extracted relations are confident enough to store in a fact table
  • Flag contradictory founding dates or headquarters locations in a fact store

Knowledge graph relation typing FAQ

When should the skill be used?

It triggers when building a knowledge graph, entity table or fact store from text, or when asked to type relations, identify a relation, or check whether facts or triples conflict.

Does Knowledge graph relation typing find entities in text?

No. The skill states that entity finding is extraction, not classification, and that the service returns labels only, so spans and sentences must come from the agent's own extraction.

Can Knowledge graph relation typing discover relations that are not in the schema?

No. Every input is placed on one of the labels the user defines, so relations missing from the schema cannot be found directly, though the skill suggests treating frequent mid-confidence results as a sign of missing labels.

Is an API key required?

The skill says the classifier.dev service is keyless.

How do I install Knowledge graph relation typing in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/knowledge-graph-relation-typing to use it in all your projects, or to .claude/skills/knowledge-graph-relation-typing in one project.

Does Knowledge graph relation typing run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

Which AI agents can use Knowledge graph relation typing?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

What are the best alternatives to Knowledge graph relation typing?

The closest alternatives to Knowledge graph relation typing are Graph the network, Mini context graph, Kmg knowledge graph usage, Kb query and Wiki graph.

Where this comes from

  • Description: from the skill's own SKILL.md.

More from mrmps/classifier-dev

  1. Sorts many texts into your own labels in one call, with a confidence per answer

    • Open source
    • 440 GitHub stars
    • Developer tools
  2. Lets a browser or desktop agent pick its next action from on-screen elements

    • Open source
    • 440 GitHub stars
    • Browser automation
  3. Gates user posts against a written content policy using per-category scores

    • Open source
    • 440 GitHub stars
    • Security
  4. Sorts each page of a multi-document intake packet by type before extraction

    • Open source
    • 440 GitHub stars
    • Files and documents
  5. Sorts a downloads folder into invoice, receipt and contract folders with an undo log

    • Open source
    • 440 GitHub stars
    • Files and documents