code-path-analyzer

Analyze the role and purpose of a given file or directory path within the current project. Use when the user provides a path (file or folder) and asks to understand what it does, its responsibilities, its dependencies, or how it fits into the overall codebase. Triggers on requests like "analyze this path", "what does this file/folder do", "explain the role of this module", or any request to understand code at a given path.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "code-path-analyzer" with this command: npx skills add yigegongjiang/jj-skills/yigegongjiang-jj-skills-code-path-analyzer

Path Analyzer

Analyze the functional role and dependency relationships of a given path (file or folder) within the current project.

Workflow

1. Determine Path Type

  • If the path is a file: read it directly.
  • If the path is a directory: use Glob to list all files recursively, then read key files (prioritize entry points, index files, and type definitions).

2. Analyze Functional Role

For each file in the path, identify:

  • Core responsibility: What this code does in one sentence.
  • Exports: Key functions, classes, components, types, or constants exported.
  • Side effects: Database operations, API calls, file I/O, global state mutations.

3. Map Dependencies

  • Inbound dependencies (who uses this code): Use Grep to search for imports/references to the path across the project. Summarize which modules depend on this code.
  • Outbound dependencies (what this code uses): Extract import statements from the files. Categorize as internal (project modules) vs external (npm packages, stdlib).

4. Synthesize Report

Compose a clear analysis covering:

  1. 功能概要: One paragraph summarizing what this path does and why it exists.
  2. 核心职责: Bullet list of key responsibilities.
  3. 对外暴露: Exported API surface (functions, components, types).
  4. 依赖关系:
    • 被谁依赖(inbound): Which modules import/use this code.
    • 依赖谁(outbound): What this code imports from elsewhere.
  5. 在工程中的定位: How this path fits into the overall architecture.

Output Guidelines

  • Adapt format to complexity: use structured Markdown for complex paths, concise text for simple files.
  • Use Chinese for explanations; keep code identifiers in original form.
  • For directories with many files, group analysis by sub-module or functional area rather than listing every file.
  • Focus on "what and why", not line-by-line code walkthrough.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

handoff

No summary provided by upstream source.

Repository SourceNeeds Review
General

polish-technical-docs

No summary provided by upstream source.

Repository SourceNeeds Review
General

tech-content-optimizer

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

openclaw-version-monitor

监控 OpenClaw GitHub 版本更新,获取最新版本发布说明,翻译成中文, 并推送到 Telegram 和 Feishu。用于:(1) 定时检查版本更新 (2) 推送版本更新通知 (3) 生成中文版发布说明

Archived SourceRecently Updated