trailmark-summary
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseTrailmark Summary
Trailmark 摘要
Runs on a target directory.
trailmark analyze --summary对目标目录运行 命令。
trailmark analyze --summaryWhen to Use
适用场景
- Vivisect Phase 0 needs a quick structural overview before decomposition
- Galvanize Phase 1 needs language detection and entry point count
- Quick orientation on an unfamiliar codebase before deeper analysis
- Vivisect 第0阶段在分解代码前需要快速获取结构概览
- Galvanize 第1阶段需要语言检测结果和入口点数量
- 在对不熟悉的代码库进行深入分析前快速了解整体概况
When NOT to Use
不适用场景
- Full structural analysis with all passes needed (use )
trailmark-structural - Detailed code graph queries (use the main skill directly)
trailmark - You need hotspot scores or taint data (use )
trailmark-structural
- 需要执行包含所有流程的全量结构分析(使用 )
trailmark-structural - 需要进行详细的代码图查询(直接使用主 技能)
trailmark - 需要获取热点评分或污点数据(使用 )
trailmark-structural
Rationalizations to Reject
错误的拒绝理由
| Rationalization | Why It's Wrong | Required Action |
|---|---|---|
| "I can read the code manually instead" | Manual reading misses dependency graph shape and entry point enumeration | Install and run trailmark |
| "Language detection doesn't matter" | Wrong language flag produces empty or incorrect analysis | Detect language from file extensions first |
| "Partial output is good enough" | Missing any of the three required outputs (language, entry points, dependencies) means incomplete analysis | Verify all three are present |
| "Tool isn't installed, I'll skip it" | This skill exists specifically to run trailmark | Report the installation gap instead of skipping |
| 理由 | 错误原因 | 需要执行的操作 |
|---|---|---|
| "我可以手动阅读代码代替" | 手动阅读会遗漏依赖图结构和入口点枚举 | 安装并运行trailmark |
| "语言检测不重要" | 错误的语言标识会导致分析结果为空或不正确 | 首先根据文件扩展名检测语言 |
| "部分输出就足够了" | 缺少三个必填输出项(语言、入口点、依赖项)中的任意一个都意味着分析不完整 | 确认三个输出项都存在 |
| "工具没安装,我就跳过这步" | 本技能就是专门用于运行trailmark的 | 上报安装缺失问题,不要跳过 |
Usage
使用方法
The target directory is passed via the parameter.
args目标目录通过 参数传入。
argsExecution
执行步骤
Step 1: Check that trailmark is available.
bash
trailmark analyze --help 2>/dev/null || \
uv run trailmark analyze --help 2>/dev/nullIf neither command works, report "trailmark is not installed"
and return. Do NOT run , ,
, or any install command. The user must install
trailmark themselves.
pip installuv pip installgit cloneStep 2: Detect the primary language.
bash
find {args} -type f \( -name '*.rs' -o -name '*.py' \
-o -name '*.go' -o -name '*.js' -o -name '*.jsx' \
-o -name '*.ts' -o -name '*.tsx' -o -name '*.sol' \
-o -name '*.c' -o -name '*.h' -o -name '*.cpp' \
-o -name '*.hpp' -o -name '*.hh' -o -name '*.cc' \
-o -name '*.cxx' -o -name '*.hxx' \
-o -name '*.rb' -o -name '*.php' -o -name '*.cs' \
-o -name '*.java' -o -name '*.hs' -o -name '*.erl' \
-o -name '*.cairo' -o -name '*.circom' \) 2>/dev/null | \
sed 's/.*\.//' | sort | uniq -c | sort -rn | head -5Map the most common extension to a language flag:
- ->
.rs--language rust - -> (no flag, Python is default)
.py - ->
.go--language go - /
.js->.jsx--language javascript - /
.ts->.tsx--language typescript - ->
.sol--language solidity - /
.c->.h--language c - /
.cpp/.hpp/.hh/.cc/.cxx->.hxx--language cpp - ->
.rb--language ruby - ->
.php--language php - ->
.cs--language c_sharp - ->
.java--language java - ->
.hs--language haskell - ->
.erl--language erlang - ->
.cairo--language cairo - ->
.circom--language circom
Step 3: Run the summary.
bash
trailmark analyze --summary {language_flag} {args} 2>&1 || \
uv run trailmark analyze --summary {language_flag} {args} 2>&1Step 4: Verify the output.
The output must include ALL THREE of:
- Language detection (at least one language name)
- Entry point count (or "no entry points found")
- Dependency graph shape (module count or "single module")
If any are missing, report the gap. Do not fabricate output.
Return the full trailmark output.
步骤1:检查trailmark是否可用。
bash
trailmark analyze --help 2>/dev/null || \
uv run trailmark analyze --help 2>/dev/null如果两个命令都无法运行,上报 "trailmark is not installed" 并返回。不要运行 、、 或任何安装命令。必须由用户自行安装trailmark。
pip installuv pip installgit clone步骤2:检测主要开发语言。
bash
find {args} -type f \( -name '*.rs' -o -name '*.py' \
-o -name '*.go' -o -name '*.js' -o -name '*.jsx' \
-o -name '*.ts' -o -name '*.tsx' -o -name '*.sol' \
-o -name '*.c' -o -name '*.h' -o -name '*.cpp' \
-o -name '*.hpp' -o -name '*.hh' -o -name '*.cc' \
-o -name '*.cxx' -o -name '*.hxx' \
-o -name '*.rb' -o -name '*.php' -o -name '*.cs' \
-o -name '*.java' -o -name '*.hs' -o -name '*.erl' \
-o -name '*.cairo' -o -name '*.circom' \) 2>/dev/null | \
sed 's/.*\.//' | sort | uniq -c | sort -rn | head -5将出现频率最高的扩展名映射为对应的语言标识:
- ->
.rs--language rust - -> (无标识,Python为默认语言)
.py - ->
.go--language go - /
.js->.jsx--language javascript - /
.ts->.tsx--language typescript - ->
.sol--language solidity - /
.c->.h--language c - /
.cpp/.hpp/.hh/.cc/.cxx->.hxx--language cpp - ->
.rb--language ruby - ->
.php--language php - ->
.cs--language c_sharp - ->
.java--language java - ->
.hs--language haskell - ->
.erl--language erlang - ->
.cairo--language cairo - ->
.circom--language circom
步骤3:运行摘要分析。
bash
trailmark analyze --summary {language_flag} {args} 2>&1 || \
uv run trailmark analyze --summary {language_flag} {args} 2>&1步骤4:验证输出结果。
输出必须包含以下全部三项内容:
- 语言检测结果(至少包含一个语言名称)
- 入口点数量(或 "no entry points found")
- 依赖图结构(模块数量或 "single module")
如果缺少任意一项,上报缺失问题,不要捏造输出内容。
返回完整的trailmark输出结果。