demo-6-article-kg

demo-6-article-kg is a skill for Claude Code, Codex from decodingai-magazine/building-a-coding-agent-from-scratch-course. It costs 61 tokens per session (1,861 once invoked), scanned A, original, Apache-2.0.

A demonstration workflow that fetches two articles, extracts people, things, and connections into a knowledge graph, and displays the result in a self-contained HTML page.

In plain words
What is it for?
Use it as an example for fetching specified articles, producing a graph data file, and rendering an interactive force-directed graph that opens directly in a browser.
Why use it?
It shows how to turn written material into a browsable map of related entities without relying on external graph libraries, frameworks, or content-delivery networks.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it as an example for fetching specified articles, producing a graph data file, and rendering an interactive force-directed graph that opens directly in a browser.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/decodingai-magazine/building-a-coding-agent-from-scratch-course/demo-6-article-kg
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add decodingai-magazine/building-a-coding-agent-from-scratch-course --skill demo-6-article-kg
Clone the repo
git clone --depth 1 https://github.com/decodingai-magazine/building-a-coding-agent-from-scratch-course

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for demo-6-article-kg

README.md
[![agentmods](https://agentmods.dev/badge/skills/decodingai-magazine/building-a-coding-agent-from-scratch-course/demo-6-article-kg/github.svg)](https://agentmods.dev/skills/decodingai-magazine/building-a-coding-agent-from-scratch-course/demo-6-article-kg)
Your own site
<a href="https://agentmods.dev/skills/decodingai-magazine/building-a-coding-agent-from-scratch-course/demo-6-article-kg"><img src="https://agentmods.dev/badge/skills/decodingai-magazine/building-a-coding-agent-from-scratch-course/demo-6-article-kg/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for demo-6-article-kg

Your own site · 80×15
<a href="https://agentmods.dev/skills/decodingai-magazine/building-a-coding-agent-from-scratch-course/demo-6-article-kg"><img src="https://agentmods.dev/badge/skills/decodingai-magazine/building-a-coding-agent-from-scratch-course/demo-6-article-kg.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 61 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,861 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00061 $0.01861
Opus 5 $0.00030 $0.00931
Sonnet 5 $0.00012 $0.00372
Haiku 4.5 $0.00006 $0.00186

Measured 11d ago against content hash ba7f20a606d7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

demo-6-article-kg scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.decode/skills/demo-6-article-kg/SKILL.md · 146 lines

How it starts

The opening of the file, as written. The whole thing — 146 lines — stays where its author put it; the contents beside it link to each section on GitHub.

The hardcore one: turn two live articles into a knowledge graph you can play with in the browser. You do all of it — you are the extractor (no NLP library) and you are the renderer (no graph library, no CDN, no framework). Two artifacts, one page that works the instant it lands.

Work the steps in order. Do not skip ahead to the HTML.

Step 0 — paths and plan

Both artifacts go in the output directory named in the Output default line at the very end of these instructions — normally .decode/outputs/, but a destination the human named always wins. Resolve it once, call it <OUT>, and use <OUT> everywhere below:

  • <OUT>/graph.json — the extraction
  • <OUT>/kg.html — the page

Put the pipeline in todo_write as five items (fetch, extract, render, verify, report) and write the real <OUT> path into the first one so you never re-derive it.

Step 1 — fetch the two sources

One web_fetch per URL (the tool returns Markdown):

Keep the title and body prose. Ignore navigation, subscribe buttons, CTAs, comments, footers and trailing "read more" lists. If a fetch fails or comes back truncated, say so plainly and work with what you have — never invent content you did not fetch.

Step 2 — extract one merged graph

Distill ONE graph across both articles: an entity discussed in both articles is ONE node, not two. Write it to <OUT>/graph.json:

{
  "nodes": [
    {
      "id": "Ontology",
      "type": "concept",
      "desc": "one sentence in your own words"
    },
    { "id": "Neo4j", "type": "tool", "desc": "one sentence in your own words" }
  ],
  "edges": [{ "source": "Ontology", "target": "KG drift", "label": "prevents" }]
}
  • 20–35 nodes. The key ideas, not every noun.
  • type is exactly one of concept / tool / pattern / problem.
  • desc is one sentence of your own synthesis, not a quote.
  • Edges are directed; label is a short verb phrase (prevents, stores, queries).
  • Every source and target matches a node id exactly — ids are case-sensitive.
  • No orphans: every node has at least one edge.

Read the full file on GitHub · 146 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 146 lines · 61 tokens per session scan A ba7f20a606d7

Subscribe to this mod's changes

demo-6-article-kg is a skill published in the GitHub repository decodingai-magazine/building-a-coding-agent-from-scratch-course (374 stars, last pushed yesterday), licensed Apache-2.0. It adds 61 tokens to every session and 1,861 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories