diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json new file mode 100644 index 0000000..de23fd7 --- /dev/null +++ b/.claude-plugin/plugin.json @@ -0,0 +1,9 @@ +{ + "name": "memgraph", + "version": "1.0.0", + "description": "Skills for the Memgraph graph database: Cypher, data modeling, indexes, algorithms, query modules, and GraphRAG", + "author": { + "name": "Memgraph" + }, + "keywords": ["memgraph", "graph-database", "cypher", "graph-algorithms", "query-modules"] +} diff --git a/.cursor-plugin/.cursor-plugin b/.cursor-plugin/.cursor-plugin new file mode 120000 index 0000000..323b5cf --- /dev/null +++ b/.cursor-plugin/.cursor-plugin @@ -0,0 +1 @@ +.cursor-plugin \ No newline at end of file diff --git a/.cursor-plugin/plugin.json b/.cursor-plugin/plugin.json new file mode 100644 index 0000000..de23fd7 --- /dev/null +++ b/.cursor-plugin/plugin.json @@ -0,0 +1,9 @@ +{ + "name": "memgraph", + "version": "1.0.0", + "description": "Skills for the Memgraph graph database: Cypher, data modeling, indexes, algorithms, query modules, and GraphRAG", + "author": { + "name": "Memgraph" + }, + "keywords": ["memgraph", "graph-database", "cypher", "graph-algorithms", "query-modules"] +} diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index ba08839..ede83b1 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -23,7 +23,7 @@ jobs: - name: Validate skills run: | - for skill in */SKILL.md; do + for skill in skills/*/SKILL.md; do skill_dir=$(dirname "$skill") echo "Validating $skill_dir..." uv run skills-ref validate "$skill_dir" diff --git a/.lab-plugin/plugin.json b/.lab-plugin/plugin.json new file mode 100644 index 0000000..300230b --- /dev/null +++ b/.lab-plugin/plugin.json @@ -0,0 +1,18 @@ +{ + "$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json", + "name": "memgraph-lab", + "version": "1.0.0", + "description": "Memgraph skills integrated into Memgraph Lab", + "author": { + "name": "Memgraph" + }, + "keywords": ["memgraph", "graph-database", "cypher", "memgraph-lab"], + "skills": [ + "./skills/memgraph-indexes-and-constraints", + "./skills/memgraph-lab-write-gss", + "./skills/memgraph-model-graph-data", + "./skills/memgraph-python-query-modules", + "./skills/memgraph-run-mage-algorithms", + "./skills/memgraph-cypher-syntax" + ] +} diff --git a/README.md b/README.md index 5bd2fba..ab9d0da 100644 --- a/README.md +++ b/README.md @@ -1,37 +1,60 @@ -# Memgraph Agent Skills +# Memgraph Skills -A collection of [Agent Skills](https://agentskills.io) for working with [Memgraph](https://memgraph.com) graph database. +A collection of Agent Skills for working with [Memgraph](https://memgraph.com) graph database, covering Cypher, data modeling, indexes, algorithms, query modules, visualization, and GraphRAG. -## What are Agent Skills? +## Usage -Agent Skills are portable instruction sets that enhance AI coding agents with specialized knowledge. They follow the [Agent Skills specification](https://agentskills.io/specification) and can be used with compatible AI tools like Claude Code, Cursor, and others. +### With Cursor -## Available Skills +Clone the repo and symlink skills into one of the locations Cursor scans. -| Skill | Description | -|-------|-------------| -| [memgraph-python-query-modules](memgraph-python-query-modules/) | Develop custom query modules in Python for Memgraph using the mgp API | -| [memgraph-cpp-query-modules](memgraph-cpp-query-modules/) | Develop custom query modules in C++ for Memgraph using the mgp.hpp API | -| [memgraph-rust-query-modules](memgraph-rust-query-modules/) | Develop custom query modules in Rust for Memgraph using rsmgp-sys | -| [memgraph-graph-rag](memgraph-graph-rag/) | Language-agnostic blueprint for GraphRAG with Memgraph and agent tooling | +**Personal** (available across all your projects): -## Usage +```bash +git clone https://github.com/memgraph/skills.git ~/.memgraph-skills +ln -s ~/.memgraph-skills/skills/* ~/.cursor/skills-cursor/ +``` + +**Per-project** (available only in that project): + +```bash +git clone https://github.com/memgraph/skills.git ~/.memgraph-skills +cd /path/to/your/project +ln -s ~/.memgraph-skills/skills .cursor/skills +``` ### With Claude Code -Add skills to your project by cloning this repository or copying individual skill directories: +Clone the repo and symlink skills into one of the locations Claude Code scans. ```bash -# Clone the entire skills repository -git clone https://github.com/memgraph/skills.git .skills - -# Or copy a specific skill -cp -r skills/memgraph-python-query-modules .skills/ +git clone https://github.com/memgraph/skills.git ~/.memgraph-skills +cd /path/to/your/project +ln -s ~/.memgraph-skills/skills .claude/skills ``` -### Skill Structure +## Skills + +Skills are contextual and auto-loaded based on your conversation. When a request matches a skill's triggers, the agent loads and applies the relevant skill. -Each skill follows the Agent Skills specification: +| Skill | Useful for | +|-------|-----------| +| memgraph-brand-ui | Generating UIs, dashboards, diagrams, and visual artifacts in the Memgraph brand style | +| memgraph-cpp-query-modules | Building custom query modules in C++ using the mgp.hpp API | +| memgraph-cypher-syntax | Writing, fixing, and optimizing Cypher queries for Memgraph, including BFS/DFS/WSP lambdas, text and vector search | +| memgraph-database-configuration | Configuring triggers, transactions, isolation levels, storage modes, snapshots, WAL, and memory | +| memgraph-graph-rag | Building GraphRAG systems with Memgraph: schema design, ingestion, hybrid retrieval, and agent tool contracts | +| memgraph-indexes-and-constraints | Creating and managing indexes, constraints, enums, and ANALYZE GRAPH | +| memgraph-lab-write-gss | Writing Graph Style Script (GSS) for graph visualization in Memgraph Lab | +| memgraph-mgconsole-cli | Using the mgconsole CLI to connect, run queries, and configure output | +| memgraph-model-graph-data | Designing graph data models using Labeled Property Graph principles | +| memgraph-python-query-modules | Building custom query modules in Python using the mgp API | +| memgraph-run-mage-algorithms | Running MAGE graph algorithms: PageRank, community detection, centrality, embeddings, and 70+ modules | +| memgraph-rust-query-modules | Building custom query modules in Rust using the rsmgp-sys API | + +## Skill Structure + +Each skill follows the [Agent Skills specification](https://agentskills.io/specification): ``` skill-name/ @@ -42,16 +65,14 @@ skill-name/ ## Validation -Skills are validated against the [Agent Skills specification](https://agentskills.io/specification#validation) using [skills-ref](https://github.com/agentskills/agentskills/tree/main/skills-ref): +Skills are validated against the [Agent Skills specification](https://agentskills.io/specification#validation): ```bash uv sync -uv run skills-ref validate +uv run skills-ref validate skills/ ``` ## Resources - [Agent Skills Specification](https://agentskills.io/specification) - [Memgraph Documentation](https://memgraph.com/docs) -- [Memgraph Python API](https://memgraph.com/docs/custom-query-modules/python/python-api) - diff --git a/memgraph-brand-ui/SKILL.md b/skills/memgraph-brand-ui/SKILL.md similarity index 90% rename from memgraph-brand-ui/SKILL.md rename to skills/memgraph-brand-ui/SKILL.md index aa54570..348e5a9 100644 --- a/memgraph-brand-ui/SKILL.md +++ b/skills/memgraph-brand-ui/SKILL.md @@ -9,7 +9,7 @@ metadata: # Memgraph Brand Skill -You are designing for **Memgraph** — an in-memory graph database. The product surface is workbench-dense, neutral-first, technical. Engineers, not consumers. +You are designing for **Memgraph** - an in-memory graph database. The product surface is workbench-dense, neutral-first, technical. Engineers, not consumers. ## When to Use @@ -33,26 +33,26 @@ If a choice fights either rule, it's wrong. --- -## Tokens (use these literally — do not invent variants) +## Tokens (use these literally - do not invent variants) ### Color ``` --brand-black: #231F20 /* primary text, strong borders, dark surfaces */ ---brand-orange: #FB6E00 /* accent only — primary buttons, active states, links */ +--brand-orange: #FB6E00 /* accent only - primary buttons, active states, links */ --orange-tint: #FFF4EB /* soft orange badge bg */ --gray-1: #646265 /* secondary text */ --gray-2: #857F87 /* muted text */ --gray-3: #BAB8BB /* placeholder, disabled */ --gray-4: #E6E6E6 /* hairline borders, dividers */ ---gray-5: #F9F9F9 /* canvas/zebra/hover bg — NEVER on cards */ +--gray-5: #F9F9F9 /* canvas/zebra/hover bg - NEVER on cards */ --white: #FFFFFF /* default surface, including all cards */ --success: #19AF66 --error: #DC2223 --warning: #FFC500 /* brand yellow, used semantically */ ---purple: #720096 /* marketing accent only — not in product chrome */ +--purple: #720096 /* marketing accent only - not in product chrome */ ``` **Color usage:** @@ -62,7 +62,7 @@ If a choice fights either rule, it's wrong. - Orange budget: ~10% of pixels. Primary CTA, active nav indicator, focus ring, the wordmark. That's it. - Yellow / red / purple appear **only semantically** (warning / error / marketing-illustration accent). Not as decoration. -### The Brand Gradient — Handle With Care +### The Brand Gradient - Handle With Care A `#FFC500 → #DC2223 → #720096` gradient exists in the brand kit. It is **never a background fill on a UI surface**. Acceptable uses, max one per page: - A thin 2–4px decorative bar at the top of a marketing hero @@ -73,11 +73,11 @@ If you find yourself painting a card, button, header, or section bg with the gra ### Type -- **UI everything: `Inter Tight`.** Headings, body, buttons, labels, nav, tables — all Inter Tight. +- **UI everything: `Inter Tight`.** Headings, body, buttons, labels, nav, tables - all Inter Tight. - **Code only: `Ubuntu Mono`.** Cypher queries, code blocks, inline code, monospace numbers in dense tables. - Do not introduce Roboto, Encode Sans, system-ui, Inter, or anything else. -Weight scale (use these — do not freestyle): +Weight scale (use these - do not freestyle): ``` Body / paragraph: 400 UI labels, nav: 500 @@ -94,21 +94,21 @@ H4: 20 / 28 H5 / strong: 16 / 20 Body: 16 / 24 Small: 13 / 20 (default for dense UI: chips, tags, table cells) -Micro: 11 / 12 (eyebrow labels, table column heads — uppercase, +0.06em tracking) +Micro: 11 / 12 (eyebrow labels, table column heads - uppercase, +0.06em tracking) Code: 13 / 20 Ubuntu Mono ``` Letter-spacing: `-0.01em` on display headings, `+0.04em` on uppercase button labels and eyebrows, default elsewhere. -### Spacing — Strict 4px Grid +### Spacing - Strict 4px Grid `0, 4, 8, 12, 16, 24, 32, 40, 48, 64, 80`. Nothing in between. Component padding is usually 8/12/16. Card padding 16/24. Section gaps 40/64. -### Radii — Strict 2–8px +### Radii - Strict 2–8px ``` 2px tiny tags, swatches, micro-badges -4px default — buttons, inputs, cards, dropdowns, modals +4px default - buttons, inputs, cards, dropdowns, modals 8px large containers, marketing cards, hero tiles 999px ONLY avatars, status dots, loading spinners ``` @@ -118,7 +118,7 @@ Never 12, 16, 24. Never `border-radius: 9999px` on buttons or chips. ``` --shadow-card: 0 2px 10px 0 rgba(0,0,0,0.10); /* card lift */ ---shadow-button: 2px 2px 8px 0 rgba(0,0,0,0.24); /* primary button — note: asymmetric */ +--shadow-button: 2px 2px 8px 0 rgba(0,0,0,0.24); /* primary button - note: asymmetric */ --shadow-elev: 0 0 4px 0 rgba(0,0,0,0.25); /* outlined button */ --shadow-drop: 0 4px 12px 0 rgba(35,31,32,0.16);/* popovers, dropdowns */ --shadow-focus: 0 0 0 3px rgba(251,110,0,0.24); /* keyboard focus */ @@ -146,11 +146,11 @@ No inner shadows. No glow. Stack at most one shadow per element. ``` -Hover: primary darkens to `#E36300`, secondary fills to `#F9F9F9`. Press: subtle scale `0.98` or shadow flatten — never color shrink. +Hover: primary darkens to `#E36300`, secondary fills to `#F9F9F9`. Press: subtle scale `0.98` or shadow flatten - never color shrink. ### Cards -White background. **Either** a 1px `#E6E6E6` border **or** the card shadow — rarely both. 4px radius. 16/24 inner padding. +White background. **Either** a 1px `#E6E6E6` border **or** the card shadow - rarely both. 4px radius. 16/24 inner padding. ```html
-Memgraph — … +Memgraph - …