visualize
Skill này làm gì
Skill tạo các bản tóm tắt trực quan của đồ thị tri thức Semantica, như sơ đồ và bảng các mục được kết nối nhiều nhất. Skill dành cho người muốn xem dữ liệu của mình được cấu trúc như thế nào.
Khi nào nên dùng
- ✓Khi bạn muốn có cái nhìn tổng quan về cách các mục và kết nối trong đồ thị được cấu trúc.
- ✓Khi bạn muốn tìm các mục trung tâm hoặc có ảnh hưởng nhất trong đồ thị.
- ✓Khi bạn muốn có sơ đồ đường đi giữa hai mục.
Liên kết skill
https://github.com/semantica-agi/semantica/blob/main/plugins/skills/visualize/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Bạn có thể cho tôi xem các mục được kết nối nhiều nhất trong đồ thị tri thức của chúng tôi dưới dạng bảng, và vẽ đường đi giữa Acme và Globex không?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent phân tích cấu trúc đồ thị, đo mức độ trung tâm của từng mục và nhóm các mục thành cộng đồng. Nó trình bày kết quả dưới dạng sơ đồ Mermaid, hình ASCII hoặc bảng có cấu trúc.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
/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
Câu hỏi thường gặp
Độ trung tâm là gì?
Là một thước đo cho thấy một mục quan trọng hoặc được kết nối tốt đến mức nào trong mạng các liên kết.
Cộng đồng trong đồ thị là gì?
Là một nhóm các mục được liên kết chặt chẽ với nhau hơn là với phần còn lại của đồ thị.
Sơ đồ có thể dùng những định dạng nào?
Mermaid, ASCII và bảng Markdown có cấu trúc.
Chi tiết
Mô tả gốc của tác giả
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
Độ phổ biến
- Sao GitHub
- 14k
- Vị trí xếp hạng
- #11158
- Giấy phép
- MIT
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
semantica
14kCung cấp cho agent của bạn một bộ công cụ đầy đủ cho đồ thị tri thức, gồm trích xuất, suy luận, nguồn gốc, ontology, chính sách và xuất dữ liệu.
causal
14kGiúp agent của bạn truy vết các liên kết nhân quả trong đồ thị tri thức, gồm chuỗi nguyên nhân, kịch bản nếu-thì và điểm ảnh hưởng.
change
14kCho agent của bạn thấy một đồ thị tri thức trông như thế nào vào một ngày trước đó, và điều gì đã thay đổi giữa hai ngày hoặc hai phiên bản ontology.
decision
14kGiúp agent của bạn ghi lại, tìm kiếm, giải thích và rà soát các quyết định trong đồ thị tri thức, từ ghi chú đầu tiên đến kết quả của nó.
Skill tương tự
gitcrawl
394kCho phép agent của bạn tìm trong kho lưu trữ issue và pull request GitHub, gom các mục trùng lặp và kiểm tra trạng thái hiện tại trên GitHub.
slacrawl
394kCho phép agent của bạn tìm và đếm tin nhắn trong kho lưu trữ Slack cục bộ, kiểm tra kho đó mới đến mức nào và làm mới khi cần.
goplaces
394kGiúp agent của bạn tìm địa điểm, lấy chi tiết và đánh giá, và xác định tên địa điểm bằng Google Places, với đầu ra JSON cho script.