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.2.tar.gz (16.8 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.2-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: skills_graph-0.1.2.tar.gz
  • Upload date:
  • Size: 16.8 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.2.tar.gz
Algorithm Hash digest
SHA256 1f56ef3e7f2392838e7cba5c3c41d080074c2184ad1e5fe3278da1eed4b95af7
MD5 f616d742836f4398f69d1aad9936f5c1
BLAKE2b-256 a8af3820378d77dc26108380774de086a860d382f086cbe344e695efdc97677f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: skills_graph-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 10.6 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 eddf3fd30415b2ee634faa0f405dab8ca2e4b4f64b680bd3181c679290ba9f7f
MD5 7b52e2994c2b50e1236a67b770bbd15c
BLAKE2b-256 9e76b68b607d56b9bdea1dcfffc12657b8ffadf832a25271b86e57c55bc1758c

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