本文へスキップ
Skillpedia
分析とスプレッドシート14k · #11158

visualize

できること

このスキルは、Semanticaのナレッジグラフの視覚的な要約を作ります。例えば、最も多くつながっている項目の図と表です。データがどのように構造化されているかを見たい人向けです。

使う場面

  • ✓グラフの項目とつながりがどう構造化されているかの概要が欲しいとき。
  • ✓グラフの中で最も中心的、または影響力のある項目を見つけたいとき。
  • ✓2つの項目の間の経路の図が欲しいとき。

スキルのリンク

https://github.com/semantica-agi/semantica/blob/main/plugins/skills/visualize/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/semantica-agi/semantica/blob/main/plugins/skills/visualize/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“ナレッジグラフの中で最もつながりの多い項目を表で見せ、AcmeとGlobexの間の経路を図にしてください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

エージェントは、グラフの構造を分析し、各項目がどれほど中心にあるかを測り、項目をコミュニティにまとめます。結果は、Mermaidの図、ASCIIの表示、または構造化されたMarkdownの表として提示されます。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

/semantica:visualize

Render graph visualizations as Mermaid, ASCII, or structured Markdown. Usage: /semantica:visualize <sub-command> [args]

$ARGUMENTS = sub-command + optional node label or filter.


topology [--filter <node_type>]

Full graph structure analysis — node types, edge distribution, connectivity metrics.

from semantica.kg.graph_analyzer import GraphAnalyzer
from semantica.context import ContextGraph

graph = ContextGraph(advanced_analytics=True)
analyzer = GraphAnalyzer()

# Comprehensive analysis
analysis = analyzer.analyze_graph(graph=graph.to_dict())
metrics = analyzer.compute_metrics(graph=graph)
connectivity = analyzer.analyze_connectivity(graph=graph)

Output:

Graph Topology:
  Nodes:         N (M types)
  Edges:         P
  Density:       0.23
  Avg degree:    4.7
  Connected:     YES / NO (K components)

Node type distribution:
  [Mermaid pie chart]
  | Type | Count | % | Avg Degree |

Top-10 connected nodes:
  | Node | Type | Degree | Betweenness |

centrality [--type degree|betweenness|closeness|eigenvector|pagerank|all] [--top N]

Calculate and rank nodes by centrality.

from semantica.kg.centrality_calculator import CentralityCalculator
from semantica.context import ContextGraph

graph = ContextGraph()
calc = CentralityCalculator()

if centrality_type == "all" or not centrality_type:
    scores = calc.calculate_all_centrality(graph=graph)
elif centrality_type == "degree":
    scores = calc.calculate_degree_centrality(graph=graph)
elif centrality_type == "betweenness":
    scores = calc.calculate_betweenness_centrality(graph=graph)
elif centrality_type == "closeness":
    scores = calc.calculate_closeness_centrality(graph=graph)
elif centrality_type == "eigenvector":
    scores = calc.calculate_eigenvector_centrality(graph=graph)
elif centrality_type == "pagerank":
    scores = calc.calculate_pagerank(
        graph=graph,
        max_iterations=100,
        damping_factor=0.85,
    )

Return: | Rank | Node | Type | Degree | Betweenness | Closeness | Eigenvector | PageRank |

For a single node, also call ContextGraph.get_node_centrality(node_id) and get_node_importance(node_id).


community [--algorithm louvain|leiden|label-propagation|overlapping]

Detect and visualize graph communities/clusters.

from semantica.kg.community_detector import CommunityDetector
from semantica.context import ContextGraph

graph = ContextGraph()
detector = CommunityDetector()

algorithm = algo_arg or "louvain"

if algorithm == "louvain":
    result = detector.detect_communities_louvain(graph, resolution=1.0)
elif algorithm == "leiden":
    result = detector.detect_communities_leiden(graph, resolution=1.0)
elif algorithm == "label-propagation":
    result = detector.detect_communities_label_propagation(graph)
elif algorithm == "overlapping":
    result = detector.detect_overlapping_communities(graph)
else:
    result = detector.detect_communities(graph, algorithm=algorithm)

structure = detector.analyze_community_structure(graph, result)
metrics = detector.calculate_community_metrics(graph, result)

Output:

Community Detection (algorithm: louvain)
  Communities: N
  Modularity:  0.71

Community summary:
  | ID | Size | Top Node | Internal Density | Bridge Nodes |

[Mermaid graph TD — nodes colored/grouped by community ID]

path <n1> <n2> [--k N] [--algorithm bfs|dijkstra|astar|k-shortest]

Find and visualize paths between two nodes.

from semantica.kg.path_finder import PathFinder
from semantica.context import ContextGraph

graph = ContextGraph()
finder = PathFinder()

k = int(k_arg) if k_arg else 3

if algorithm == "bfs":
    path = finder.bfs_shortest_path(graph, source=n1, target=n2)
    paths = [path]
elif algorithm == "dijkstra":
    path = finder.dijkstra_shortest_path(graph, source=n1, target=n2)
    paths = [path]
else:  # default: k-shortest
    paths = finder.find_k_shortest_paths(graph, source=n1, target=n2, k=k)

lengths = [finder.path_length(graph, p) for p in paths]

Output as Mermaid sequenceDiagram for each path:

Path 1 (length: 2.3):
  n1 →[rel_type]→ Middle →[rel_type]→ n2

Path 2 (length: 3.7): ...

decision-graph [--category <cat>] [--depth N]

Visualize the decision influence graph for a category or all decisions.

from semantica.context import ContextGraph
from semantica.context.causal_analyzer import CausalChainAnalyzer
from semantica.conte
よくある質問

中心性とは何ですか?

リンクのネットワークの中で、項目がどれほど重要またはつながりが多いかを示す指標です。

グラフのコミュニティとは何ですか?

グラフの残りの部分よりも、互いに密にリンクしている項目のグループです。

図にはどんな形式を使えますか?

Mermaid、ASCII、構造化されたMarkdownの表です。

詳細

作者による元の説明

Visualize the Semantica knowledge graph — topology, centrality, communities, paths, embeddings, decision insights, and temporal evolution. Uses GraphAnalyzer, CentralityCalculator, CommunityDetector, PathFinder, and ContextGraph analytics. Sub-commands: topology, centrality, community, path, decision-graph, insights, temporal, embedding.

repo: semantica-agi/semantica

人気

GitHubのスター
14k
ランキング
#11158
ライセンス
MIT
更新日
2026/11/2

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル