Adds a new output format converter (e.g., CSV, RDF) to the IO writers module.

MITAuto-check passedDocuments & Office

Install Add Converter

skills CLI
$ npx skills add FabioYanezRomero/Knowledge-Graph-Builder --skill add-converter -a claude-code

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

GitHub CLI
$ gh skill install FabioYanezRomero/Knowledge-Graph-Builder add-converter --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/FabioYanezRomero/Knowledge-Graph-Builder.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agent/skills/add-converter .claude/skills/add-converter && 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
add-converter
GitHub stars
103
Token cost
~2.6k tokens
SKILL.md length
326 words
Files
1
Skills in repo
6
Repo updated
First seen
Licence
MIT

At a glance

Adds a new output format converter (e.g., CSV, RDF) to the IO writers module.

  • Works in 5 steps: Understand the Interface → Implement Your Converter → Register in Module → …
  • Tasks that involve CSV and tabular files
  • SKILL.md covers Overview, Architecture, Dependencies and Field Mapping, plus 9 more sections
  • Calls python

What it does

Add Converter is an agent skill from FabioYanezRomero/Knowledge-Graph-Builder. Adds a new output format converter (e.g., CSV, RDF) to the IO writers module.

Its SKILL.md is about 2.6k 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 Documents & Office, covering CSV and tabular files. The repository describes itself as: Repository for building knowledge graphs from specific datasets using generative language model through ollama. The licence is MIT.

When your agent uses it

  • Tasks that involve CSV and tabular files

Example prompts

  • “/add-converter”

Requirements

  • Python 3

Workflow steps

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

  1. Understand the Interface
  2. Implement Your Converter
  3. Register in Module
  4. Add CLI Support
  5. Verify

What it can do on your machine

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

    Shell commands in SKILL.md call:

    • 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

Add Converter loads about 2.6k tokens when it runs. Until then it costs about 23 tokens; SKILL.md has 326 words of instructions outside code blocks.

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

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 FabioYanezRomero/Knowledge-Graph-Builder at commit 588f0d9, republished under its MIT licence (© FabioYanezRomero). 326 words, ~2,559 tokens.

Download SKILL.mdSave it as .claude/skills/add-converter/SKILL.md (or your agent's skills folder).
name
add-converter
description
Adds a new output format converter (e.g., CSV, RDF) to the IO writers module.

Adding a Converter

This skill documents how to add a new output format converter to kgb/io/writers/.

Overview

Converters transform JSON triples into various output formats for use with external tools. The system provides:

  • GraphML for graph analysis tools (Gephi, Cytoscape)
  • Extensible architecture for custom formats (CSV, RDF, etc.)

Architecture

                        IO Writers Module
    ┌───────────────────────────────────────────────────────────┐
    │                                                           │
    │  io/writers/__init__.py    ← Public exports               │
    │                                                           │
    │  io/writers/graphml.py     ← NetworkX GraphML format      │
    │  ├─ json_to_graphml()        Single file conversion       │
    │  └─ convert_json_directory() Batch conversion             │
    │                                                           │
    │  io/writers/csv.py         ← Your new format              │
    │  ├─ json_to_csv()                                         │
    │  └─ convert_csv_directory()                               │
    │                                                           │
    └───────────────────────────────────────────────────────────┘

Data Flow:
  list[Triple] → Validation → Field Mapping → Format Rendering → File

Key Files:

  • kgb/io/writers/graphml.py — Reference implementation (GraphML)
  • kgb/io/writers/__init__.py — Public exports
  • kgb/io/__init__.py — Top-level IO exports

Dependencies

FormatRequired LibraryPurpose
CSVcsv (stdlib)Tabular export
GraphMLnetworkx>=3.0Graph format
RDFrdflib>=6.0Semantic web

Field Mapping

Triple FieldGraphMLCSVRDF
headSource nodehead columnSubject URI
tailTarget nodetail columnObject URI
relationEdge labelrelation columnPredicate URI
inferenceEdge attributeinference columnAnnotation

Step 1: Understand the Interface

The existing GraphML converter follows this pattern (in kgb/io/writers/graphml.py):

python
def json_to_graphml(
    triples: list[Triple] | list[dict[str, Any]],
    output_path: Path | str | None = None
) -> nx.DiGraph:
    """Convert triples to a NetworkX DiGraph (optionally saved as GraphML).

    - Validates/converts to Triple objects
    - Normalizes entity names (case-insensitive dedup)
    - Stores relation and inference as edge attributes
    - Uses inference.value (not str(inference)) for clean enum serialization
    """

Key implementation details from the reference:

  • Accept both list[Triple] and list[dict] inputs
  • Use Triple(**t) to validate dict inputs, skip invalid with warning
  • Entity name canonicalization via get_canonical_name() to avoid duplicates
  • Preserve inference as .value string ("explicit" / "contextual")

Step 2: Implement Your Converter

Create kgb/io/writers/csv.py:

python
"""CSV converter for knowledge graph triples."""

from __future__ import annotations
import csv
from pathlib import Path
from typing import Any

from pydantic import ValidationError
from ...domains import Triple


def json_to_csv(
    triples: list[Triple] | list[dict[str, Any]],
    output_path: Path | str,
    *,
    include_metadata: bool = True,
    delimiter: str = ","
) -> Path:
    """Convert triples to CSV edge list format."""
    if not triples:
        raise ValueError("Cannot convert empty triple list")

    output_path = Path(output_path)
    output_path.parent.mkdir(parents=True, exist_ok=True)

    # Validate and convert to Triple objects
    validated: list[Triple] = []
    for t in triples:
        try:
            if isinstance(t, Triple):
                validated.append(t)
            else:
                validated.append(Triple(**t))
        except ValidationError as e:
            print(f"Warning: Skipping invalid triple: {e}")
            continue

    if not validated:
        raise ValueError("No valid triples after validation")

    # Determine columns
    fieldnames = ["head", "relation", "tail"]
    if include_metadata:
        fieldnames.extend(["inference", "justification"])

    # Write CSV
    with open(output_path, "w", newline="", encoding="utf-8") as f:
        writer = csv.DictWriter(f, fieldnames=fieldnames, delimiter=delimiter)
        writer.writeheader()

        for triple in validated:
            row = {
                "head": triple.head,
                "relation": triple.relation,
                "tail": triple.tail,
            }
            if include_metadata:
                row.update({
                    "inference": triple.inference.value,
                    "justification": triple.justification or "",
                })
            writer.writerow(row)

    return output_path


def convert_csv_directory(
    input_dir: Path | str,
    output_dir: Path | str,
    *,
    include_metadata: bool = True
) -> list[Path]:
    """Convert all JSON files to CSV format."""
    import json

    input_dir = Path(input_dir)
    output_dir = Path(output_dir)
    output_dir.mkdir(parents=True, exist_ok=True)

    csv_files = []
    for json_file in input_dir.glob("*.json"):
        try:
            with open(json_file) as f:
                data = json.load(f)

            output_path = output_dir / f"{json_file.stem}.csv"
            json_to_csv(data, output_path, include_metadata=include_metadata)
            print(f"Converted: {json_file.name} -> {output_path.name}")
            csv_files.append(output_path)
        except ValueError as e:
            print(f"Skipped {json_file.name}: {e}")

    return csv_files

Step 3: Register in Module

Update kgb/io/writers/__init__.py:

python
from .graphml import json_to_graphml, convert_json_directory
from .csv import json_to_csv, convert_csv_directory

__all__ = [
    "json_to_graphml",
    "convert_json_directory",
    "json_to_csv",
    "convert_csv_directory",
]

Update kgb/io/__init__.py to export the new functions:

python
from .readers import load_records, detect_format, DataLoadError
from .writers import json_to_graphml, convert_json_directory, json_to_csv, convert_csv_directory

__all__ = [
    "load_records",
    "detect_format",
    "DataLoadError",
    "json_to_graphml",
    "convert_json_directory",
    "json_to_csv",
    "convert_csv_directory",
]

Step 4: Add CLI Support

Update the convert command in kgb/__main__.py to support the new format:

python
@app.command()
def convert(
    input_dir: Path = typer.Option(..., "--input", "-i", exists=True),
    output_dir: Optional[Path] = typer.Option(None, "--output", "-o"),
    format: str = typer.Option("graphml", "--format", "-f"),
):
    """Convert JSON triples to specified format."""
    from .io.writers import convert_json_directory, convert_csv_directory

    out_dir = output_dir or input_dir.parent / format

    if format == "graphml":
        files = convert_json_directory(input_dir, out_dir)
    elif format == "csv":
        files = convert_csv_directory(input_dir, out_dir)
    else:
        console.print(f"[red]Unknown format: {format}[/red]")
        raise typer.Exit(code=1)

    console.print(f"\n[green]Converted {len(files)} files to {format}[/green]")

Step 5: Verify

Check Import
bash
python -c "from kgb.io.writers.csv import json_to_csv; print('OK')"
Unit Tests
python
def test_json_to_csv_basic(tmp_path):
    from kgb.io.writers.csv import json_to_csv
    from kgb.domains import Triple

    triples = [
        Triple(head="Alice", relation="knows", tail="Bob"),
        Triple(head="Bob", relation="works_at", tail="Acme"),
    ]

    output = tmp_path / "graph.csv"
    result = json_to_csv(triples, output)

    assert result.exists()

    import csv
    with open(result) as f:
        rows = list(csv.DictReader(f))

    assert len(rows) == 2
    assert rows[0]["head"] == "Alice"
    assert rows[0]["inference"] == "explicit"


def test_json_to_csv_empty_list(tmp_path):
    from kgb.io.writers.csv import json_to_csv
    import pytest

    with pytest.raises(ValueError, match="empty"):
        json_to_csv([], tmp_path / "empty.csv")


def test_json_to_csv_from_dicts(tmp_path):
    from kgb.io.writers.csv import json_to_csv
    import csv

    dicts = [{"head": "X", "relation": "r", "tail": "Y", "inference": "explicit"}]
    csv_path = tmp_path / "roundtrip.csv"
    json_to_csv(dicts, csv_path)

    with open(csv_path) as f:
        row = next(csv.DictReader(f))

    assert row["head"] == "X"
    assert row["relation"] == "r"
    assert row["tail"] == "Y"

Key Principles

PrincipleImplementation
Accept list[Triple] and list[dict]Use isinstance check with Triple(**t) validation
Use .value for enumstriple.inference.value → "explicit" (not "InferenceType.EXPLICIT")
Create Directoriesoutput_path.parent.mkdir(parents=True, exist_ok=True)
Skip Invalid DataLog warning and continue

Error Handling

ExceptionWhenAction
ValueErrorEmpty input or no valid triplesFail with message
ValidationErrorTriple validation failsLog, skip, continue
FileNotFoundErrorInput directory doesn't existFail loudly

Files to Create/Modify

FileAction
kgb/io/writers/csv.pyCreate — converter implementation
kgb/io/writers/__init__.pyModify — add imports
kgb/io/__init__.pyModify — add exports
kgb/__main__.pyModify — add format dispatch (optional)

Verification Checklist

  • Implementation validates Triple inputs
  • Uses inference.value for enum serialization
  • Tests pass (unit + round-trip)
  • Batch function for directory processing
  • Registered in kgb/io/writers/__init__.py
  • Exported in kgb/io/__init__.py
  • CLI format dispatch works (if added)

© FabioYanezRomero, 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 .agent/skills/add-converter of FabioYanezRomero/Knowledge-Graph-Builder.

Open the folder on GitHubat commit 588f0d9

Compare with similar skills

Add Converter 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.

Add Converter compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Add Converter this skillFabioYanezRomero/Knowledge-Graph-Builder103—~2.6kAutomated safety check: PassMIT
Data Table Managern8n-io/n8n207k—~2.3kAutomated safety check: PassCustom licence
Instrument Data To Allotropeaws-samples/amazon-bedrock-agents-healthcare-lifesciences2742 repos~2.7kAutomated safety check: PassApache-2.0
Abuse Hunternexu-io/harness-engineering-guide664—~1.9kAutomated safety check: PassMIT
Intelligence Requirements BuilderTracecatHQ/tracecat3.8k—~6kAutomated safety check: PassMIT
Markitshift-labs-ai/markit1.3k—~299Automated safety check: PassMIT

Similar skills

  • Official

    Load before calling data-tables or parse-file. An agent skill from n8n-io/n8n.

    207k GitHub stars~2.3k tokensUpdated today
    Documents & OfficeAuto-check passed
  • Instrument Data To Allotrope

    aws-samples/amazon-bedrock-agents-healthcare-lifesciences

    Official

    Convert laboratory instrument output files (PDF, CSV, Excel, TXT) to Allotrope Simple Model (ASM) JSON format or flattened 2D CSV.

    274 GitHub starsUsed in 2 repos~2.7k tokens
    Documents & OfficeAuto-check passed
  • Abuse Hunter

    nexu-io/harness-engineering-guide

    Detect and investigate bulk registration abuse on SaaS platforms.

    664 GitHub stars~1.9k tokensUpdated 5 mo ago
    Documents & OfficeAuto-check passed
  • Turns a vague, high-level stakeholder ask into a structured set of intelligence requirements for a CTI team, complete with Essential Elements of Information, collection guidance, success criteria…

    3.8k GitHub stars~6k tokensUpdated today
    Documents & OfficeAuto-check passed
  • Markit

    shift-labs-ai/markit

    Convert files and URLs to Markdown. An agent skill from shift-labs-ai/markit.

    1.3k GitHub stars~299 tokensUpdated 1 mo ago
    Documents & OfficeAuto-check passed
  • Sector Analyst

    tradermonty/claude-trading-skills

    This skill should be used when analyzing sector rotation patterns and market cycle positioning.

    3k GitHub starsUsed in 1 repo~2.3k tokens
    Documents & OfficeAuto-check passed

More from FabioYanezRomero/Knowledge-Graph-Builder

  • Add LLM Client

    FabioYanezRomero/Knowledge-Graph-Builder

    Adds a new LLM client provider to the clients module. An agent skill from FabioYanezRomero/Knowledge-Graph-Builder.

    103 GitHub stars~3.8k tokensUpdated 1 mo ago
    Auto-check passed
  • Add Augmentation Strategy

    FabioYanezRomero/Knowledge-Graph-Builder

    Adds a new iterative augmentation strategy (e.g., enrichment, summarization) to the builder module.

    103 GitHub stars~3.3k tokensUpdated 1 mo ago
    Auto-check passed
  • Add Dataset Format

    FabioYanezRomero/Knowledge-Graph-Builder

    Adds a new input format loader (e.g., Parquet, Excel) to the IO readers module.

    103 GitHub stars~1.9k tokensUpdated 1 mo ago
    Auto-check passed
  • Add Domain

    FabioYanezRomero/Knowledge-Graph-Builder

    Manage knowledge domains (e.g., Medical, Finance). An agent skill from FabioYanezRomero/Knowledge-Graph-Builder.

    103 GitHub stars~3.1k tokensUpdated 1 mo ago
    Auto-check passed
  • Add Visualization

    FabioYanezRomero/Knowledge-Graph-Builder

    Adds a new visualization engine or style to the visualization module.

    103 GitHub stars~3.3k tokensUpdated 1 mo ago
    Auto-check passed

Questions about Add Converter

What does Add Converter do?

Adds a new output format converter (e.g., CSV, RDF) to the IO writers module. Add Converter is an agent skill from FabioYanezRomero/Knowledge-Graph-Builder., CSV, RDF) to the IO writers module.

When should I use Add Converter?

Add Converter fits situations like: tasks that involve CSV and tabular files.

How do I install Add Converter in Claude Code?

Run `npx skills add FabioYanezRomero/Knowledge-Graph-Builder --skill add-converter -a claude-code`. Or copy the skill folder (.agent/skills/add-converter in FabioYanezRomero/Knowledge-Graph-Builder) into .claude/skills/add-converter in your project. Claude Code loads it when a task matches its description.

How do I install Add Converter in Codex?

Run `npx skills add FabioYanezRomero/Knowledge-Graph-Builder --skill add-converter -a codex`. Or copy the skill folder (.agent/skills/add-converter in FabioYanezRomero/Knowledge-Graph-Builder) into .agents/skills/add-converter in your project. Codex loads it when a task matches its description.

Can I use Add Converter 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 FabioYanezRomero/Knowledge-Graph-Builder --skill add-converter -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/add-converter, .gemini/skills/add-converter, .github/skills/add-converter and .opencode/skills/add-converter in your project.

What does Add Converter need to run?

Going by SKILL.md and its folder, Add Converter needs the command-line tools its instructions call (python). Our summary lists: Python 3.

Does Add Converter 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 Add Converter 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 Add Converter use?

Add Converter 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 Add Converter use?

About 2.6k tokens (SKILL.md is roughly 10k 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 Add Converter?

Skills that share tags, products or a category with Add Converter: Data Table Manager (n8n-io/n8n, 207k stars), Instrument Data To Allotrope (aws-samples/amazon-bedrock-agents-healthcare-lifesciences, 274 stars), Abuse Hunter (nexu-io/harness-engineering-guide, 664 stars) and Intelligence Requirements Builder (TracecatHQ/tracecat, 3.8k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Add Converter?

FabioYanezRomero (a GitHub user) maintains it in FabioYanezRomero/Knowledge-Graph-Builder, which has 103 GitHub stars. The repository holds 6 skills in this directory. The repository was last updated on August 28, 2026.

Source: FabioYanezRomero/Knowledge-Graph-Builder on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.