Agent skill

Knowledge Graph Relation Typing

by mrmps in mrmps/classifier-dev

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…

MITAuto-check passedKnowledge Management

Install Knowledge Graph Relation Typing

skills CLI
$ npx skills add mrmps/classifier-dev --skill knowledge-graph-relation-typing -a claude-code

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

GitHub CLI
$ gh skill install mrmps/classifier-dev knowledge-graph-relation-typing --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/mrmps/classifier-dev.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/knowledge-graph-relation-typing .claude/skills/knowledge-graph-relation-typing && 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
knowledge-graph-relation-typing
GitHub stars
424
Token cost
~1.5k tokens
SKILL.md length
568 words
Files
1
Skills in repo
21
Repo updated
First seen
Licence
MIT

At a glance

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…

  • Works in 3 steps: one input per triple → gate the write → contradictions between triples
  • Building a knowledge graph
  • SKILL.md covers When not to use it, Step 1: one input per triple, Step 2: gate the write and Keeping the schema small, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Knowledge Graph Relation Typing is an agent skill from mrmps/classifier-dev. 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".

Its SKILL.md is about 1.5k 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, covering Knowledge graphs. The repository describes itself as: Zero-shot text classification over plain HTTP — no API key, no account. One Cloudflare Worker, a CLI, and an MCP server. https://classifier.dev. The licence is MIT.

When your agent uses it

  • Building a knowledge graph
  • Fact store from text
  • Type these relations
  • What relation is this

Example prompts

  • “type these relations”
  • “what relation is this”
  • “build a knowledge graph”
  • “/knowledge-graph-relation-typing”

Requirements

  • Python 3

Workflow steps

3 steps, taken from the step headings in SKILL.md.

  1. one input per triple
  2. gate the write
  3. contradictions between triples

What it can do on your machine

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

    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

Knowledge Graph Relation Typing loads about 1.5k tokens when it runs. Until then it costs about 114 tokens; SKILL.md has 568 words of instructions outside code blocks.

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

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 mrmps/classifier-dev at commit b9211dd, republished under its MIT licence (© mrmps). 568 words, ~1,500 tokens.

Download SKILL.mdSave it as .claude/skills/knowledge-graph-relation-typing/SKILL.md (or your agent's skills folder).
name
knowledge-graph-relation-typing
description
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".
license
MIT

Type relations, catch contradictions

Extraction gives you candidates: two entities and the sentence they appeared in. Which relation that sentence states, out of a fixed schema, is a classification; so is whether a new triple contradicts a stored one. Both are one batched call to classifier.dev, keyless, with a calibrated confidence to gate the write on. It returns labels only; spans and sentences come from your own extraction.

When not to use it

Not for finding the entities (extraction, not classification) and not for open relation discovery: every input lands on one of your labels, so a relation you never wrote down cannot be found here. Under five triples, decide yourself.

Step 1: one input per triple

python
inputs = [f"SUBJECT: {s}\nOBJECT: {o}\nSENTENCE: {sent}" for s, o, sent in triples]
SCHEMA = ["SUBJECT works for OBJECT", "SUBJECT founded OBJECT",
          "SUBJECT is headquartered or located in OBJECT",
          "SUBJECT acquired OBJECT", "SUBJECT is owned by OBJECT",
          "SUBJECT is married to OBJECT", "SUBJECT is a child of OBJECT",
          "SUBJECT studied at OBJECT", "SUBJECT created or authored OBJECT",
          "SUBJECT is a member of OBJECT",
          "no relation between SUBJECT and OBJECT is stated in this sentence"]

Labels are read as language, so write each schema name as the sentence it means: SUBJECT acquired OBJECT, not acquired_by or rel_17. With instructions: "Pick the relation the sentence states between SUBJECT and OBJECT in that direction. Only the sentence counts." Up to 1,000 triples per request.

Ten triples from Wikipedia leads, one call, 305 ms; eight of them:

1.00  is headquartered or located in  Cloudflare -> San Francisco
0.99  acquired                        Cloudflare -> Replicate
0.95  founded                         Matthew Prince -> Cloudflare
0.98  no relation stated              Instagram -> Facebook
0.91  is married to                   Marie Curie -> Pierre Curie
0.72  works for                       Marie Curie -> University of Paris
0.76  is a member of                  Cloudflare -> New York Stock Exchange
0.44  works for                       Ada Lovelace -> analytical engine

The last two rows teach the most. Cloudflare -> NYSE is a listing, absent from the schema, so the model took the nearest label at 0.76: a relation you keep meeting in the 0.5-0.9 band is one you are missing. The 0.44 row is the gate working — nothing gets written.

Step 2: gate the write

  • 0.9 and above — write the edge.
  • 0.5 to 0.9 — hold it in a review queue, or re-ask with "tier": "smart". That queue is where missing relations show up.
  • below 0.5 — drop it. Do not store a guess in a graph that later steps will treat as fact.

Keeping the schema small

Up to 100 labels are allowed; confidence, not the limit, stops you first. Near-synonyms split the probability between them. On the same Matthew Prince -> Cloudflare triple the 11-label schema above answered founded at 0.95; a 31-label version that also carried co-founded and is a founding investor in answered founded at 0.57 — the same answer, pushed into the review band by its own synonyms.

Splitting on meaning works the other way: is a professor at in the larger schema typed Marie Curie -> University of Paris at 0.92 against 0.72 for works for. Add a label for a distinct edge, never for a rewording.

Show full SKILL.md (185 more words)Show less

The direction trap

Swapping subject and object does not reliably flip the answer: the headquarters sentence asked as San Francisco -> Cloudflare came back is headquartered or located in at 0.93. The model reads the sentence, not the argument order. When direction matters, write the candidate as a proposition:

python
LABELS = ["the sentence states this",
          "the sentence states the reverse of this",
          "the sentence does not state this"]
inputs = [f"STATEMENT: {prop}\n\nSENTENCE: {sent}" for prop, sent in pairs]

All six test propositions came back right: Instagram is owned by Meta Platforms → states this, 0.97; the reverse → states the reverse, 1.00; Cloudflare founded Matthew Prince → the reverse, 0.94.

Step 3: contradictions between triples

Compare only pairs sharing a subject and a relation, or the count goes quadratic.

python
inputs = [f"FACT A: {a}\nFACT B: {b}" for a, b in candidate_pairs]
LABELS = ["the two facts are consistent", "the two facts contradict each other",
          "the two facts are about different things"]

Eight pairs, 164 ms, with instructions = "Two facts contradict only if they cannot both be true of the same entity."

1.00  contradict        founded in 2009       | founded in 2011
0.99  contradict        headquartered in SF   | headquartered in Austin
0.99  consistent        headquartered in SF   | has an office in Austin
0.86  consistent        Prince founded it     | Zatlyn founded it
0.94  different things  Curie won a Nobel     | Lovelace was a mathematician
0.80  contradict        Cloudflare acquired X | X acquired Cloudflare

All eight were right, six at 0.9 or above. The co-founders at consistent 0.86 is the case to watch: a schema where one founder excludes another must say so in instructions.

Done looks like

Every candidate carries a relation and a confidence; only edges at 0.9 or above are in the graph; the 0.5-0.9 queue is reviewed for missing relations; every contradiction above 0.9 is resolved or marked disputed.

© mrmps, 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 skills/knowledge-graph-relation-typing of mrmps/classifier-dev.

Open the folder on GitHubat commit b9211dd

Compare with similar skills

Knowledge Graph Relation Typing 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.

Knowledge Graph Relation Typing compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Knowledge Graph Relation Typing this skillmrmps/classifier-dev424—~1.5kAutomated safety check: PassMIT
LLM Wiki Knowledge GraphEgonex-AI/Understand-Anything85k1 repos~1.5kAutomated safety check: PassMIT
Obsidian Canvas BoardsAgriciDaniel/claude-obsidian15k—~1.4kAutomated safety check: PassMIT
Ontology1mancompany/OneManCompany4382 repos~1.5kAutomated safety check: PassApache-2.0
Graphagenticnotetaking/arscontexta3.5k1 repos~4.9kAutomated safety check: NotesMIT
Knowledge Graphgnomeria/usbtree688—~1.5kAutomated safety check: PassMIT

Similar skills

  • LLM Wiki Knowledge Graph

    Egonex-AI/Understand-Anything

    Detects a Karpathy-pattern LLM wiki and builds an interactive knowledge graph with entities, implicit relationships and topic clusters.

    85k GitHub starsUsed in 1 repo~1.5k tokens
    Knowledge ManagementAuto-check passed
  • Obsidian Canvas Boards

    AgriciDaniel/claude-obsidian

    Creates, inspects and updates Obsidian JSON Canvas boards in a vault, with text, file, link, group and edge nodes, using safe recoverable edits.

    15k GitHub stars~1.4k tokensUpdated 26 days ago
    Knowledge ManagementAuto-check passed
  • Ontology

    1mancompany/OneManCompany

    Typed knowledge graph for structured agent memory and composable skills.

    438 GitHub starsUsed in 2 repos~1.5k tokens
    Knowledge ManagementAuto-check passed
  • Graph

    agenticnotetaking/arscontexta

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

    3.5k GitHub starsUsed in 1 repo~4.9k tokens
    Knowledge ManagementAuto-check: notes
  • Knowledge Graph

    gnomeria/usbtree

    Set up and maintain a lightweight, file-based knowledge graph of the repo — entities, typed relations, decisions, gotchas — so agents load context fast instead of re-exploring the codebase every…

    688 GitHub stars~1.5k tokensUpdated 1 mo ago
    Knowledge ManagementAuto-check passed
  • Knowledge Graph

    nimbalyst/nimbalyst

    Write a project's knowledge pages in Nimbalyst Pages -- record what people said and decided in the page it affects, keep typed pages for the things the team tracks (its own types, such as modules…

    1.8k GitHub stars~3.5k tokensUpdated yesterday
    Knowledge ManagementAuto-check passed

More from mrmps/classifier-dev

All 21 skills in this repo
  • Bulk Classify

    mrmps/classifier-dev

    Sort many texts into your own categories without reading them, using a keyless HTTP API that returns a calibrated confidence per answer.

    424 GitHub stars~3.1k tokensUpdated yesterday
    Auto-check passed
  • Computer Use Action Picker

    mrmps/classifier-dev

    Pick a browser or desktop agent's next action by choosing among the actions actually on screen instead of inventing one.

    424 GitHub stars~1.5k tokensUpdated yesterday
    Auto-check passed
  • Content Moderation Gate

    mrmps/classifier-dev

    Check user-generated text against a written policy before it is published.

    424 GitHub stars~1.5k tokensUpdated yesterday
    Auto-check passed
  • Label each context chunk keep, drop or replace-with-a-pointer and pass the survivors through byte for byte instead of summarising, with key-shaped chunks decided locally and never sent, and a…

    424 GitHub stars~1.5k tokensUpdated yesterday
    Auto-check passed
  • Document Intake Routing

    mrmps/classifier-dev

    Label each page of an intake packet with a document type and a page role before extraction runs, so only confident pages reach an extractor and the rest reach a person.

    424 GitHub stars~1.5k tokensUpdated yesterday
    Auto-check passed
  • Headline Filter Map Reduce

    mrmps/classifier-dev

    Filter hundreds or thousands of headlines, search results or feed items against a written brief before opening any of them, using a two-stage cascade that spends a fast model on everything and a…

    424 GitHub stars~1.5k tokensUpdated yesterday
    Auto-check passed

Questions about Knowledge Graph Relation Typing

What does Knowledge Graph Relation Typing do?

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…. Knowledge Graph Relation Typing is an agent skill from mrmps/classifier-dev. 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.

When should I use Knowledge Graph Relation Typing?

Knowledge Graph Relation Typing fits situations like: building a knowledge graph; fact store from text; type these relations; what relation is this.

How do I install Knowledge Graph Relation Typing in Claude Code?

Run `npx skills add mrmps/classifier-dev --skill knowledge-graph-relation-typing -a claude-code`. Or copy the skill folder (skills/knowledge-graph-relation-typing in mrmps/classifier-dev) into .claude/skills/knowledge-graph-relation-typing in your project. Claude Code loads it when a task matches its description.

How do I install Knowledge Graph Relation Typing in Codex?

Run `npx skills add mrmps/classifier-dev --skill knowledge-graph-relation-typing -a codex`. Or copy the skill folder (skills/knowledge-graph-relation-typing in mrmps/classifier-dev) into .agents/skills/knowledge-graph-relation-typing in your project. Codex loads it when a task matches its description.

Can I use Knowledge Graph Relation Typing 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 mrmps/classifier-dev --skill knowledge-graph-relation-typing -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/knowledge-graph-relation-typing, .gemini/skills/knowledge-graph-relation-typing, .github/skills/knowledge-graph-relation-typing and .opencode/skills/knowledge-graph-relation-typing in your project.

What does Knowledge Graph Relation Typing need to run?

SKILL.md names no scripts, command-line tools or credentials: Knowledge Graph Relation Typing is instructions for the agent only. Our summary lists: Python 3.

Does Knowledge Graph Relation Typing 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 Knowledge Graph Relation Typing 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 Knowledge Graph Relation Typing use?

Knowledge Graph Relation Typing is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Knowledge Graph Relation Typing use?

About 1.5k tokens (SKILL.md is roughly 6k 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 Knowledge Graph Relation Typing?

Skills that share tags, products or a category with Knowledge Graph Relation Typing: LLM Wiki Knowledge Graph (Egonex-AI/Understand-Anything, 85k stars), Obsidian Canvas Boards (AgriciDaniel/claude-obsidian, 15k stars), Ontology (1mancompany/OneManCompany, 438 stars) and Graph (agenticnotetaking/arscontexta, 3.5k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Knowledge Graph Relation Typing?

mrmps (a GitHub user) maintains it in mrmps/classifier-dev, which has 424 GitHub stars. The repository holds 21 skills in this directory. The repository was last updated on October 6, 2026.

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