スキル一覧に戻る
faxenoff

ultracode-trace

by faxenoff

Ultra-fast MCP server enabling AI agents to comprehensively work with TypeScript/JavaScript/Python projects: instant structural search, code modification with automatic linting/formatting/fixes, runtime debugging and backwards error analysis, integrated Git automation. Your AI's survival kit for massive codebases!

4🍴 0📅 2026年1月22日
GitHubで見るManusで実行

SKILL.md


name: UltraCode Trace version: 1.0.0 description: Code tracing, debugging, "why not called", flow analysis, state dependencies triggers:

  • debugging
  • why not called
  • flow analysis
  • trace
  • state dependencies

UltraCode Tracing — Claude Code Skill

Auto-activated for: Debugging, "why not called", flow analysis, state dependencies

Static analysis of code execution flow without running the code.

When to Use

QuestionToolReturns
"How does code get from A to B?"trace_flowPaths, states, conditions, Mermaid
"Why isn't this method called?"trace_backwardsCallers, blocking conditions, diagnosis
"How does data affect state?"trace_data_flowSources, transformations, behavior matrix
"What changes with different values?"analyze_state_impactScenarios, conflicts, ripple effects
"What conditions affect this scenario?"find_decision_pointsDecision points with classification

trace_flow — Trace from A to B

Find all execution paths between two points:

trace_flow({
  from: "handleLogin",
  to: "redirectToHome",
  trackStates: true,     // Track state changes
  trackConditions: true, // Track branches
  maxDepth: 15,
  format: "mermaid"      // sequence | tree | graph | mermaid
})

Returns:

  • Paths with confidence scores
  • State changes at each step
  • Conditions and branches
  • Mermaid sequence diagram

trace_backwards — Why Not Called?

Understand why a method isn't being called:

trace_backwards({
  target: "FinishTask",
  question: "why_not_called", // | "what_affects" | "dependencies"
  depth: 15,
  includeStates: true
})

Question types:

  • why_not_called — find blocking conditions
  • what_affects — all dependencies
  • dependencies — full dependency graph

Returns:

  • List of callers with probability (always/conditional/rare)
  • Blocking conditions with recommendations
  • State dependencies
  • Call chains
  • Diagnosis with suggested debug points

trace_data_flow — Data Flow

Trace how data affects target state:

trace_data_flow({
  entryPoint: "AppInit",
  targetState: "startPage",
  dataSources: ["config", "api:fetchUser"], // auto-detect if empty
  trackTransformations: true
})

Data sources (auto-detect):

  • API: fetch, axios, http
  • Storage: localStorage, database
  • Props: props, input, param
  • State: state, store, redux
  • Config: config, settings, env

Returns:

  • Data flows from sources
  • Transformations (parse, map, validate)
  • Branches based on data
  • Behavior matrix for different inputs

analyze_state_impact — State Impact

Understand how state affects different scenarios:

analyze_state_impact({
  state: "user.isAuthenticated",
  scenarios: [
    { value: true, label: "logged in" },
    { value: false, label: "logged out" }
  ]
})

Returns:

  • All state usages (read/write/condition)
  • For each scenario:
    • Available paths
    • Blocked paths
    • Enabled features
  • Conflicts (multiple writers, race conditions)
  • Ripple effects (direct and indirect)

find_decision_points — Decision Points

Find all places where code makes decisions:

find_decision_points({
  scenario: "checkout flow",
  includeGuards: true,
  includeEffects: true,
  groupBy: "impact" // | "location" | "type"
})

Decision point types:

  • validation — input validation
  • api_response — API response handling
  • state_mutation — state changes
  • guard — guard conditions (early return)
  • loop — loop control
  • error_handling — try-catch
  • feature_flag — feature toggles

Impact levels:

  • critical — blocks execution
  • high — significant impact
  • medium — moderate impact
  • low — minimal impact

Returns:

  • Decision points with classification
  • Mermaid flowchart
  • Summary: total, critical, possible outcomes

Usage Examples

Debugging: Why Doesn't It Fire?

// Step 1: Find blocking conditions
trace_backwards({
  target: "sendNotification",
  question: "why_not_called"
})
// → Finds: "user.preferences.notifications === false" blocks

// Step 2: Check setting impact
analyze_state_impact({
  state: "user.preferences.notifications",
  scenarios: [
    { value: true, label: "enabled" },
    { value: false, label: "disabled" }
  ]
})
// → Shows which paths are open/closed for each value

Understanding: How Does Data Affect UI?

trace_data_flow({
  entryPoint: "loadDashboard",
  targetState: "dashboardData"
})
// → Shows: API → parse → validate → setState
// → Matrix: if API error → fallback state

Refactoring: Where to Change Logic?

find_decision_points({
  scenario: "user authentication",
  groupBy: "impact"
})
// → List of all if/switch/guards related to auth
// → Grouped by importance

Output Formats

Text (default)

═══ Trace Flow: handleLogin → redirectToHome ═══

Found 2 path(s):

─── Path 1 (confidence: 85%) ───
Summary: Login flow via session creation

  1. → handleLogin (/src/auth.ts:10)
     └─ if: credentials.valid
  2. → createSession (/src/session.ts:5)
     └─ isAuthenticated: false → true
  3. → redirectToHome (/src/router.ts:100)

─── States ───
Modified: isAuthenticated, currentSession

Mermaid

sequenceDiagram
  participant P0 as handleLogin
  participant P1 as createSession
  participant P2 as redirectToHome
  P0->>P1: credentials.valid
  P1->>P2: session created

Semantic Integration

Tracing automatically uses semantic search (if available) for:

  • Fuzzy search of entry/exit points by description
  • Improved analysis quality
  • Natural language queries
trace_flow({
  from: "user login handler",  // Semantic search finds handleLogin
  to: "home page redirect"     // Finds redirectToHome
})

Tool Reference

trace_flow

ParamTypeDefaultDescription
fromstringrequiredStarting point (function or semantic query)
tostringrequiredEnding point
formatenum"sequence"sequence / tree / graph / mermaid
maxDepthnumber15Maximum traversal depth
trackStatesbooleantrueTrack state changes
trackConditionsbooleantrueTrack conditions/branches

trace_backwards

ParamTypeDefaultDescription
targetstringrequiredTarget method
questionenumrequiredwhy_not_called / what_affects / dependencies
depthnumber15Backward traversal depth
includeStatesbooleantrueInclude state dependencies
includeEffectsbooleantrueInclude side effects

trace_data_flow

ParamTypeDefaultDescription
entryPointstringrequiredEntry point function
targetStatestringrequiredTarget state to trace
dataSourcesstring[]autoData sources to analyze
trackTransformationsbooleantrueTrack data transformations

analyze_state_impact

ParamTypeDefaultDescription
statestringrequiredState variable
scenariosobject[]required[{value, label}]
scopestring-Analysis scope (semantic query)

find_decision_points

ParamTypeDefaultDescription
scenariostringrequiredScenario to analyze
groupByenum"impact"impact / location / type
includeGuardsbooleantrueInclude guard conditions
includeEffectsbooleantrueInclude side effects

  • ultracode — Code analysis, semantic search, refactoring, code modification
  • ultracode-autodoc — Working with .autodoc/ directory

スコア

総合スコア

70/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

+10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です