Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计异常

deep-trace深迹

Agent Skill

deep-trace 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

282

周安装

12

GitHub Stars

2

下载量

99
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:deep-trace(深迹)
来源仓库:https://github.com/laststance/skills
仓库路径:skills/deep-trace
安装命令:
npx skills add https://github.com/laststance/skills --skill deep-trace
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/laststance/skills --skill deep-trace

简介

deep-trace 实现类似调试器的逐行代码执行路径追踪功能,增强数据流与触发机制可视化。

  • 适用于需要理解代码运行细节、数据流转路径及页面/API 路由对应关系的开发场景。
  • 输出结构化追踪表格,包含屏幕状态、URL、数据流与触发条件等关键执行上下文信息。
  • 安装前需确认仓库访问权限,注意其可能涉及文件读取与网络请求操作。
  • deep-trace 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Deep Trace — Line-by-Line Execution Path Tracer

<essential_principles>

Core Concept

Trace code like a debugger stepping through line-by-line, but enriched with:

  • Screen: What the user sees when this code runs
  • URL: The page/API route where this executes
  • Data flow: What data enters, transforms, and exits
  • Trigger: What event/action causes this line to execute

Trace Table Format

Every trace outputs a structured table:

## Trace: [description]

| # | File:Line | Code | Screen/URL | Data Flow | Trigger |
|---|-----------|------|------------|-----------|---------|
| 1 | page.tsx:15 | `const router = useRouter()` | /drawings | — | Page mount |
| 2 | page.tsx:16 | `const { id } = router.query` | /drawings?id=123 | id: string | URL params |
| 3 | hook.ts:8 | `const { data } = useQuery(...)` | /drawings?id=123 | id → API call | React render |
| ... | ... | ... | ... | ... | ... |

Principles

  1. Diff-first: Start from changed lines, trace outward to entry point and downstream effects
  2. Line granularity: Every meaningful line gets its own row (skip blank lines, imports, type-only lines)
  3. Screen mapping: Always identify which screen/URL the user is on when this code runs
  4. Bidirectional: Trace both UP (who calls this?) and DOWN (what does this call?)
  5. Application boundary: Summarize library calls in 1 row, don't trace into node_modules
  6. No abbreviation in File:Line: NEVER truncate or ellipsis file names. Always show the full file name (e.g., useSetFormValuesFromQueryStrings.tsx:77, NOT useSetFormValues...:77). Code column may be abbreviated if >80 chars, but file names must be exact.

</essential_principles>

Workflow

Step 1: Identify Target

Determine input source from user's argument:

InputDetectionAction
PR number#1234 or numbergh pr diff <number>
Branch diff--diff or no arggit diff HEAD~1 or git diff dev...HEAD
File path.ts, .tsx, etc.Read file, trace from exports
Function nametext without pathSerena find_symbol

Step 2: Extract Changed Code

For PR/diff inputs:

  1. Parse diff to get changed files and line ranges
  2. Group changes by file
  3. Prioritize: components > hooks > utils > types

For file/function inputs:

  1. Read the target code
  2. Identify exported functions/components

Step 3: Find Entry Points

For each changed code section, trace UP to find the entry point:

Changed line → containing function → caller → ... → page component / API route / event handler

Use Serena tools:

  • find_symbol — locate the function
  • find_referencing_symbols — find callers
  • Repeat until reaching a page/route/event boundary

Entry point types:

TypeExampleScreen/URL
Page componentpages/drawings/index.tsx/drawings
API routepages/api/drawings.tsPOST /api/drawings
Event handleronClick, onSubmitButton click on current page
EffectuseEffectOnMountPage load
Provider_app.tsx wrapperAll pages

Step 4: Build Trace Table

Starting from entry point, step through line-by-line:

  1. Read the entry point file (Serena find_symbol with include_body=True)
  2. For each meaningful line, create a table row:

- #: Sequential step number - File:Line: Full file name + line number. NEVER abbreviate or ellipsis file names - Code: The actual code (backtick-wrapped, may abbreviate if >80 chars) - Screen/URL: What screen/page/URL is active - Data Flow: What data is being read/written/transformed - Trigger: What causes this line to execute (mount, click, API response, etc.)

  1. When hitting a function call:

- If it's application code → trace INTO it (sub-steps like 3.1, 3.2,...) - If it's a library call → summarize in 1 row with [lib] prefix

  1. When hitting a conditional: note both paths, trace the primary path

Step 5: Annotate with Context

Add these sections after the trace table:

## Summary
- **When**: [user action / event that triggers this code]
- **Where**: [screen URL and component location]
- **What**: [1-2 sentence description of what the code accomplishes]
- **Data**: [key data entities involved, their sources and destinations]

## Key Observations
- [Notable patterns, potential issues, or design decisions]

Step 6: Generate Extension-Compatible Output

After the Summary, generate a separate copyable table for the deep-trace-extension VS Code extension.

Extension format (4 columns, specific header names required):

## 📋 Deep Trace Extension

| file | line | col | reason |
| --- | --- | --- | --- |
| src/components/FreewordSearchFilter.tsx | 40 | 1 | useFreewordSearchFormContext — Component render |
| src/components/FreewordSearchFilter.tsx | 54 | 1 | useWatch target values — Form state change |

Conversion rules from trace table → extension table:

Trace column→ Extension columnRule
File:Linefile + lineSplit on last : — file path before, line number after
colAlways 1 (column info not tracked in trace)
Code + TriggerreasonCombine: short code description + + trigger

Requirements:

  • Every row from the trace table gets a corresponding row
  • file must be the full relative path (not just filename). Resolve from project root using Serena if the trace table only has the filename
  • Output inside a fenced code block (``` `markdown... ` ```) so users can copy the raw Markdown

Step 6.5: Copy Extension Table to Clipboard (Optional, OS-aware)

Right after printing the fenced extension-table block from Step 6, also pipe that same block into the bundled helper so users can paste straight into the deep-trace-extension without manual selection:

cat <<'EOF' | bash skills/deep-trace/scripts/copy-to-clipboard.sh
| file | line | col | reason |
| --- | --- | --- | --- |
| src/components/FreewordSearchFilter.tsx | 40 | 1 | useFreewordSearchFormContext — Component render |
| src/components/FreewordSearchFilter.tsx | 54 | 1 | useWatch target values — Form state change |
EOF

The helper auto-detects the host clipboard tool:

OS / environmentTool tried
macOSpbcopy
Linux (Wayland session)wl-copy
Linux (X11 session)xclip -selection clipboardxsel
WSLclip.exe
Cygwin / MinGW / MSYSclip
No tool / unknown OSSkipped with a one-line stderr notice

Behavior contract (do not violate):

  • The fenced markdown block from Step 6 is always printed first — clipboard copy is purely additive, never a replacement.
  • The script always exits 0, even when no clipboard tool exists. Skill workflow must not fail because clipboard is unavailable.
  • The script reports the chosen tool (or skip reason) on stderr, e.g. copy-to-clipboard: copied via pbcopy (macOS). Surface that line back to the user so they know whether to copy manually.

When to skip this step entirely:

  • Headless CI / non-interactive runs (no human to paste)
  • Sandboxed or remote environments where clipboard access is denied or meaningless
  • User explicitly opts out (e.g. security-sensitive context)

Step 7: Save to Memory (Optional)

If the user wants to remember this trace:

Serena write_memory("trace_<descriptive_name>", traceContent)

Examples

Example: Tracing a PR diff

/deep-trace #3548

Output:

## Trace: PR #3548 — フリーワード検索の種別フィルター追加

### Entry: FreewordSearchFilter.tsx (絞り込みPopover内)

| # | File:Line | Code | Screen/URL | Data Flow | Trigger |
|---|-----------|------|------------|-----------|---------|
| 1 | FreewordSearchFilter.tsx:40 | `const { control } = useFreewordSearchFormContext()` | /freeword_search?query=テスト | form context | Component render |
| 2 | FreewordSearchFilter.tsx:54 | `const targetValues = useWatch({ control, name: 'target' })` | same | target: SelectOption[] | Form state change |
| 3 | FreewordSearchFilter.tsx:65 | `useDocumentTypeSettingsQuery(...)` | same | API → document_type_settings | React Query cache/fetch |
| 4 | FreewordSearchFilter.tsx:70 | `const targetOptions = useMemo(...)` | same | settings → SelectOption[] | Deps change |
| 5 | FreewordSearchFilter.tsx:119 | `<MultiSelectRHF ... options={targetOptions}>` | same (Popover open) | targetOptions → UI | User opens filter |

### Summary
- **When**: User opens 絞り込み popover on freeword search page
- **Where**: /freeword_search (ファイルフリーワード検索モード)
- **What**: Shows multi-select filter for 種別 (drawing + document types)
- **Data**: document_type_settings API → SelectOption[] → form state → API search params

## 📋 Deep Trace Extension
filelinecolreason
src/components/FreewordSearchFilter.tsx401useFreewordSearchFormContext — Component render
src/components/FreewordSearchFilter.tsx541useWatch target values — Form state change
src/components/FreewordSearchFilter.tsx651useDocumentTypeSettingsQuery — React Query cache/fetch
src/components/FreewordSearchFilter.tsx701useMemo targetOptions — Deps change
src/components/FreewordSearchFilter.tsx1191MultiSelectRHF render — User opens filter

Tools Used

ToolPurpose
gh pr diffGet PR diff
git diffGet branch diff
Serena find_symbolLocate functions
Serena find_referencing_symbolsFind callers (trace UP)
Serena get_symbols_overviewMap file structure
Serena write_memorySave trace for future reference
scripts/copy-to-clipboard.shOS-aware clipboard copy of the extension table (pbcopy / wl-copy / xclip / xsel / clip.exe / clip; graceful skip otherwise)

Success Criteria

  • [ ] Entry point correctly identified (page/route/event)
  • [ ] Every meaningful changed line has a trace row
  • [ ] Screen/URL column populated for all rows
  • [ ] Data flow shows inputs → transformations → outputs
  • [ ] Trace is readable top-to-bottom as an execution story
  • [ ] Summary captures when/where/what/data
  • [ ] Extension-compatible table included with file, line, col, reason columns
  • [ ] Extension table uses full relative paths (not just filenames)
  • [ ] Extension table wrapped in fenced code block for easy copy
  • [ ] Extension table also piped through scripts/copy-to-clipboard.sh (or step explicitly skipped with reason); helper's stderr status surfaced to the user

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.96%
按下载量换算37

Claude

32.38%
按下载量换算32

Cursor

19.29%
按下载量换算19

Gemini CLI

8.52%
按下载量换算8

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills