<< All versions

Skill v1.0.0

currentLLM-judged scan90/100
rysweet/agent-kgpacks/kg-pack
──Details
PublishedOctober 24, 2026 at 04:34 AM
Content Hashsha256:e1587fe0085de93a...
Git SHA96ea9594a0c0
──Files
Files (1 file, 4.1 KB)
SKILL.md4.1 KBactive
SKILL.md · 128 lines · 4.1 KB

version: "1.0.0" name: kg-pack description: "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." user-invocable: true


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:

bash
# 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):

bash
export KGPACKS_ROOT=~/.wikigr/agent-kgpacks

Commands

Parse the user's arguments to determine the subcommand:

CommandExampleWhat it does
list/kg-pack listShow all available and installed packs
install <name>/kg-pack install rust-expertInstall 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.mdBuild 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-expertRebuild a pack with latest docs
info <name>/kg-pack info rust-expertShow pack details
uninstall <name>/kg-pack uninstall rust-expertRemove a pack's skill from this project

Execution

list

bash
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
bash
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:
bash
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/install_pack_skills.py

query <pack> <question>

python
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>

bash
rm -rf .claude/skills/{name}

Notes

  • Builds require ANTHROPIC_API_KEY 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
All versions