rysweet/agent-kgpacks · Archived

kg-pack

Knowledge graph pack manager. Build, install, list, query, and update domain-expert knowledge packs. Use when user says /kg-pack or wants to add expert knowledge to Claude Code.

Installation

$ npx skills add rysweet/agent-kgpacks --skill kg-pack

Stronger alternatives

This repository is archived — consider an actively maintained alternative.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

License LICENSE
Default branch main
Open issues 1
Status Archived

Skill metadata

Parsed from SKILL.md frontmatter.

Declared agents claude-code

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 4,198 B
  • docs SUMMARY.md 192 B

History

  1. First recorded snapshot · 1 installs

SKILL.md

Knowledge Graph Pack Manager

Build, install, and manage domain-expert knowledge packs that give Claude deep expertise in specific technologies, frameworks, and languages.

Each pack is a LadybugDB graph database containing extracted documentation with vector embeddings for semantic search, entity relationships, and facts.

Setup

This skill requires the agent-kgpacks repository. If not present:

# Clone the repo (if not already available)
git clone https://github.com/rysweet/agent-kgpacks.git ~/.wikigr/agent-kgpacks
cd ~/.wikigr/agent-kgpacks && uv sync

Set KGPACKS_ROOT to the repo location (defaults to ~/.wikigr/agent-kgpacks):

export KGPACKS_ROOT=~/.wikigr/agent-kgpacks

Commands

Parse the user's arguments to determine the subcommand:

Command Example What it does
list /kg-pack list Show all available and installed packs
install <name> /kg-pack install rust-expert Install a pack as a Claude Code skill in this project
build <topic> /kg-pack build "kubernetes networking" Build a new pack from a topic
build-from-urls <file> /kg-pack build-from-urls urls.md Build a pack from a URL list
query <pack> <question> /kg-pack query rust-expert "how do lifetimes work?" Query a pack's knowledge graph
update <name> /kg-pack update rust-expert Rebuild a pack with latest docs
info <name> /kg-pack info rust-expert Show pack details
uninstall <name> /kg-pack uninstall rust-expert Remove a pack's skill from this project

Execution

list

KGPACKS_ROOT="${KGPACKS_ROOT:-$HOME/.wikigr/agent-kgpacks}"
for db in "$KGPACKS_ROOT"/data/packs/*/pack.db; do
  dir=$(dirname "$db"); name=$(basename "$dir")
  articles=$(python3 -c "import json; print(json.load(open('$dir/manifest.json')).get('graph_stats',{}).get('articles','?'))" 2>/dev/null)
  installed="no"; [ -f ".claude/skills/$name/SKILL.md" ] && installed="yes"
  printf "%-30s %4s articles  installed=%s\n" "$name" "$articles" "$installed"
done | sort

install <name>

  1. Verify pack exists at $KGPACKS_ROOT/data/packs/{name}/pack.db
  2. Generate and write SKILL.md to .claude/skills/{name}/SKILL.md in the current project
  3. The skill tells Claude how to query that pack's KG when the domain comes up
KGPACKS_ROOT="${KGPACKS_ROOT:-$HOME/.wikigr/agent-kgpacks}"
cd "$KGPACKS_ROOT" && uv run python scripts/install_pack_skills.py
# Or install a single pack:
mkdir -p .claude/skills/{name}
# Generate SKILL.md with pack-specific content (see install_pack_skills.py)

build <topic>

  1. Normalize topic → pack name (lowercase, hyphens)
  2. Use WebSearch to find 30-50 documentation URLs
  3. Create $KGPACKS_ROOT/data/packs/{name}/urls.txt
  4. Run build:
cd "$KGPACKS_ROOT"
uv run python scripts/build_pack_from_issue.py --issue-json '{
  "pack_name": "{name}",
  "description": "{topic}",
  "search_terms": "{search terms}"
}'
  1. Install skill: uv run python scripts/installpackskills.py

query <pack> <question>

import sys
sys.path.insert(0, KGPACKS_ROOT)
from wikigr.agent.kg_agent import KnowledgeGraphAgent

with KnowledgeGraphAgent(
    db_path=f"{KGPACKS_ROOT}/data/packs/{pack_name}/pack.db",
    read_only=True
) as agent:
    result = agent.query(question, max_results=5)
    # Use result["answer"], result["sources"], result["entities"]

info <name>

Read and display $KGPACKS_ROOT/data/packs/{name}/manifest.json.

update <name>

Delete pack.db, re-run build script, re-install skill.

uninstall <name>

rm -rf .claude/skills/{name}

Notes

  • Builds require ANTHROPICAPIKEY and take 3-30 minutes
  • Pack databases (pack.db) are 2-50 MB, built locally
  • Skills activate in the next Claude Code session, not the current one
  • Run /kg-pack list to see what's available before installing