← 返回
未分类 中文

Nm Cartograph Call Chain

Traces execution paths through the code graph with criticality scoring and Mermaid charts
追踪代码图中的执行路径,进行关键性评分并生成Mermaid图表
athola athola 来源
未分类 clawhub v1.9.12 4 版本 100000 Key: 无需
★ 0
Stars
📥 481
下载
💾 1
安装
4
版本
#latest

概述

> Night Market Skill — ported from claude-night-market/cartograph. For the full experience with agents, hooks, and commands, install the Claude Code plugin.

Call Chain Tracing

Trace execution flows through the codebase using the

code knowledge graph.

Prerequisites

This skill requires the gauntlet plugin for graph

data. Discover it:

GRAPH_QUERY=$(find ~/.claude/plugins -name "graph_query.py" -path "*/gauntlet/*" 2>/dev/null | head -1)

If gauntlet is not installed: Fall back to static

analysis. Use grep to trace function calls and build

a Mermaid diagram manually from import/call patterns.

Skip graph-specific steps.

If installed but no graph.db: Tell the user to run

/gauntlet-graph build.

Steps

  1. Accept target: Get a function name or entry point

from the user (or trace all entry points).

  1. Run flow tracing (requires gauntlet):

```bash

python3 "$GRAPH_QUERY" --action flows --depth 15

```

To filter by entry point:

```bash

python3 "$GRAPH_QUERY" --action flows --entry "main"

```

Fallback (no gauntlet): Trace calls with rg (or grep):

```bash

# Prefer rg (ripgrep) for speed; fall back to grep

if command -v rg &>/dev/null; then

rg -n "function_name\(" --type py . | head -20

else

grep -rn "function_name(" --include="*.py" . | head -20

fi

```

Build the call tree manually from search results.

  1. Display as indented tree:

```

main() [criticality: 0.72]

-> validate_input()

-> parse_config()

-> process_data()

-> db.execute_query()

-> cache.store()

-> send_response()

```

  1. Generate Mermaid flowchart:

```mermaid

flowchart LR

main --> validate_input

main --> process_data

main --> send_response

validate_input --> parse_config

process_data --> db.execute_query

process_data --> cache.store

```

  1. Show criticality breakdown:
    • File spread: how many files the flow touches
    • Security sensitivity: auth/crypto code in the path
    • Test coverage gaps: untested nodes in the flow

Criticality Scoring

FactorWeightMeaning
-------------------------
File spread0.30Touches many files
Security0.25Contains auth/crypto code
External calls0.20Unresolved dependencies
Test gap0.15Untested nodes in flow
Depth0.10Deep call chains

版本历史

共 4 个版本

  • v1.9.12 当前
    2026-06-19 19:51 安全 安全
  • v1.0.3
    2026-06-09 17:48 安全 安全
  • v1.0.2
    2026-05-09 16:38 安全 安全
  • v1.0.1
    2026-05-07 11:36 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

dev-programming

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 678 📥 327,494
dev-programming

Mcporter

steipete
使用 mcporter CLI 直接列出、配置、认证及调用 MCP 服务器/工具(支持 HTTP 或 stdio),涵盖临时服务器、配置编辑及 CLI/类型生成功能。
★ 195 📥 67,667
business-ops

Nm Attune Project Planning

athola
将规格说明转化为分阶段、依赖排序的实施计划,用于规格完成后、执行前。
★ 0 📥 727