Skip to main content

Persist, retrieve and evolve AI skills in Memgraph

Project description

skills-graph

A small library to persist, retrieve and evolve AI skills in Memgraph.

Graph Model

(:Skill {name, description, content, created_at, updated_at})
(:Skill)-[:DEPENDS_ON]->(:Skill)
(:Session)-[:USED_SKILL]->(:Skill)

Quick Start

from skills_graph import SkillGraph, Skill

# Connect (uses MEMGRAPH_URL, MEMGRAPH_USER, MEMGRAPH_PASSWORD env vars by default)
sg = SkillGraph()

# Prepare the database schema (constraints + indexes)
sg.setup()

# Store a skill
sg.add_skill(Skill(
    name="memgraph-cypher",
    description="Writing Cypher queries for Memgraph",
    content="# Cypher for Memgraph\n\nUse MATCH, CREATE, MERGE ...",
))

# Retrieve by name
skill = sg.get_skill("memgraph-cypher")

# Search
sg.search_by_name("memgraph")

# Dependencies
sg.add_dependency("advanced-cypher", "memgraph-cypher")
deps = sg.get_dependencies("advanced-cypher")

# List all
all_skills = sg.list_skills()

# Update
sg.update_skill("memgraph-cypher", content="updated content")

# Delete
sg.delete_skill("memgraph-cypher")

Codex Hook Integration

When used through agent-context-graph's Codex hook adapter, SkillGraphConnector records direct tool names like get_skill and Codex MCP-style names like mcp__skills__get_skill.

It also records local reads of valid Agent Skills definitions, such as /skills/<name>/SKILL.md, as skill usage. This supports runtimes where using a skill appears as a filesystem or shell tool reading the skill's SKILL.md file rather than as a dedicated get_skill tool call.

Search/list tool results can be Python lists or JSON tool content containing skill objects with name fields. Today those results are recorded through USED_SKILL with result actions; future work will split weaker surfacing signals into a separate relationship.

Installation

uv sync

Testing

uv run pytest tests/ -v

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

skills_graph-0.1.3.tar.gz (16.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

skills_graph-0.1.3-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

Details for the file skills_graph-0.1.3.tar.gz.

File metadata

  • Download URL: skills_graph-0.1.3.tar.gz
  • Upload date:
  • Size: 16.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.11 {"installer":{"name":"uv","version":"0.11.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for skills_graph-0.1.3.tar.gz
Algorithm Hash digest
SHA256 89c95483e2270e96c4a7c60095bec821099676691de35c801bbeebcf82289983
MD5 86919feb3018e8ee64769f4f545b9aea
BLAKE2b-256 8d4b8d960cd1d1b371e116307f98330da436941479597daf82ab135256ce476b

See more details on using hashes here.

File details

Details for the file skills_graph-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: skills_graph-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 10.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.11 {"installer":{"name":"uv","version":"0.11.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for skills_graph-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a0311e6e7a2ef617788ff866e52c1e2ae8b24c6e512a667c2d489fe39225d3f9
MD5 a0bc4b5ad1c0333815388ffaf65dd55b
BLAKE2b-256 9d82c00ef9931ca4a7a0d06d870d21d323ce43dd5410fccd21fe6789ada0af2e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page