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.1.tar.gz (16.1 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.1-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: skills_graph-0.1.1.tar.gz
  • Upload date:
  • Size: 16.1 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.1.tar.gz
Algorithm Hash digest
SHA256 beb81846335532df12621c136cd25e46f3b3ef49f88a6e7b24960caf8d519328
MD5 1c0c818832c6bd52a89575d60b744769
BLAKE2b-256 9f99a0038dc137b23dca09ab248f72aa6889c84e62fd382378c06c06c2f4c95f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: skills_graph-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.2 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6d622279e80afc5b18c918cfdcbde33939385e2f57418d3532cd5612d944f590
MD5 f164521e70c8f617c95968a32faacfdf
BLAKE2b-256 5437714a575a7ce87c03f43a69607b6ad4782eac5274319009144ad7d3474631

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