cypher
Cypher query language: MATCH CREATE MERGE DELETE path expressions BFS/DFS aggregations graph algorithms
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o cypher.zip https://jpskill.com/download/22172.zip && unzip -o cypher.zip && rm cypher.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/22172.zip -OutFile "$d\cypher.zip"; Expand-Archive "$d\cypher.zip" -DestinationPath $d -Force; ri "$d\cypher.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
cypher.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
cypherフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-18
- 取得日時
- 2026-05-18
- 同梱ファイル
- 1
📖 Claude が読む原文 SKILL.md(中身を展開)
この本文は AI(Claude)が読むための原文(英語または中国語)です。日本語訳は順次追加中。
Purpose
This skill allows OpenClaw to execute Cypher queries for interacting with graph databases, specifically Neo4j, enabling operations like node matching, relationship creation, and graph traversals.
When to Use
Use this skill when working with graph-structured data, such as social networks or recommendation systems. For example, query relationships in a user graph or perform BFS on a knowledge base. Avoid it for relational data; opt for SQL-based skills instead.
Key Capabilities
- Execute core Cypher clauses: MATCH, CREATE, MERGE, DELETE.
- Handle path expressions for traversals (e.g., shortest paths).
- Support BFS/DFS traversals via algorithms like shortestPath().
- Perform aggregations (e.g., COUNT, SUM) on graph data.
- Run graph algorithms such as PageRank or community detection.
- Integrate with Neo4j for querying nodes and relationships.
Usage Patterns
To execute a Cypher query, use cypher-shell or the Python neo4j driver. Neo4j Community Edition runs on bolt://localhost:7687 with no authentication by default.
Example 1: Match all nodes and return their labels.
MATCH (n) RETURN labels(n), count(n) LIMIT 10;
Via CLI: cypher-shell -a bolt://localhost:7687 --format plain "MATCH (n) RETURN labels(n), count(n) LIMIT 10"
Example 2: Create a relationship between two nodes.
MATCH (a:Person {name: 'Alice'}), (b:Person {name: 'Bob'})
CREATE (a)-[:KNOWS]->(b);
Common Commands/API
Use cypher-shell for interactive queries or the Python neo4j driver for programmatic access:
# CLI query
cypher-shell -a bolt://localhost:7687 --format plain "MATCH (n:Skill) RETURN n.name LIMIT 10"
# Python neo4j driver
from neo4j import GraphDatabase
driver = GraphDatabase.driver("bolt://localhost:7687")
with driver.session() as session:
result = session.run("MATCH (n:Skill) RETURN n.name LIMIT 10")
for record in result:
print(record["n.name"])
driver.close()
Config: Connection via bolt://localhost:7687, no auth. Use MERGE for upsert operations: MERGE (n:Person {name: 'Alice'}).
Integration Notes
Integrate this skill in OpenClaw by ensuring Neo4j is running (brew services start neo4j on macOS, systemctl start neo4j on Linux). Connection defaults to bolt://localhost:7687 with no authentication. Override via NEO4J_URI environment variable if needed.
Error Handling
Common errors include syntax issues (e.g., missing semicolons) or connection failures. Check for "Neo4jError: Invalid input" by validating queries first. If connection fails, verify Neo4j is running. In code, wrap queries in try-catch blocks:
from neo4j import GraphDatabase
from neo4j.exceptions import ServiceUnavailable, CypherSyntaxError
driver = GraphDatabase.driver("bolt://localhost:7687")
try:
with driver.session() as session:
result = session.run("MATCH (n) RETURN n LIMIT 5")
records = list(result)
except ServiceUnavailable:
print("Error: Neo4j is not running. Start with: brew services start neo4j")
except CypherSyntaxError as e:
print(f"Cypher syntax error: {e}")
finally:
driver.close()
For graph-specific errors like missing nodes, use OPTIONAL MATCH. Always log errors with details for debugging.
Graph Relationships
- Nodes: Person, Movie, Organization.
- Relationships: (:Person)-[:KNOWS]-(:Person), (:Person)-[:ACTED_IN]-(:Movie), (:Organization)-[:EMPLOYS]-(:Person).
- Path examples: Shortest path via shortestPath((:Person {name: 'Alice'})-[:KNOWS*]-(:Person {name: 'Bob'})).
- Aggregations: Use on relationships, e.g., RETURN COUNT((:Person)-[:KNOWS]-()) AS connections.