Token导航 LogoToken导航TokenDH.com
研究检索external-servicegithub未标认证来源可访问许可证需确认审计通过

re-structure-analysis重组分析

Agent Skill

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

总安装

376

周安装

16

GitHub Stars

公开资料未说明

下载量

132
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/caldiaworks/caldiaworks-marketplace --skill re-structure-analysis

简介

re-structure-analysis 用于查找、检索和筛选相关信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中根据关键词或任务场景快速定位候选结果。
  • 通过 npx skills add 命令从指定仓库安装,需结合原始 README 确认具体用法。
  • 安装前建议确认权限范围、维护状态及是否触发联网、命令执行或文件读写操作。
  • 该技能适用于需要重新组织分析结构或优化信息架构的场景。

SKILL.md

Structure Analysis — Reverse Engineering Phase 1

Analyze the target codebase structure exhaustively. Identify ALL entry points, dependencies, modules, and components within the user-specified scope. Produce a structure map document and initialize manifest.json for pipeline chaining.

Three Principles

These principles are non-negotiable. Violating any principle invalidates the analysis.

1. Code is Truth

  • Document what IS implemented, not what SHOULD be implemented
  • If code appears buggy, document the behavior as-is and note it in the Question List
  • Prioritize actual code over comments, variable names, or documentation

2. Traceability to Line

  • Every finding MUST include a file:line reference
  • If a line number cannot be determined, exclude the finding and note it in the Question List
  • References without line numbers are considered hallucination

3. Behavior over Intent

  • Focus on observable behavior: inputs, outputs, side effects
  • Do NOT infer business intent or "why" from code
  • Document "what" and "how" only

Execution

Step 1: Setup

Determine analysis name:

  • Use the name argument if provided
  • Otherwise derive from target: class name, directory name, or file stem

Detect language:

  • If language argument is provided, use it
  • Otherwise detect from file extensions and project files:

- .cs / *.csprojcsharp - .py / pyproject.toml / setup.pypython - .ts / .tsx / package.json with typescript → typescript - .java / pom.xml / build.gradlejava - Other → generic

Load language reference:

  • Check if references/{language}.md exists in this skill's directory
  • If it exists, read and apply the language-specific patterns
  • If not, proceed with language-agnostic analysis

Detect tool availability:

  • Check if Serena MCP tools are available (mcp__serena__find_symbol, etc.)
  • If available, use Serena as primary analysis tools
  • If not, use Read, Grep, Glob, Bash exclusively

Create output directory and manifest:

mkdir -p docs/reverse/{name}
mkdir -p docs/reverse/{name}/verification

Initialize manifest.json:

{
  "name": "{name}",
  "language": "{detected-language}",
  "created": "{YYYY-MM-DD}",
  "updated": "{YYYY-MM-DD}",
  "targets": {
    "entry_points": ["{user-specified targets}"],
    "classes": ["{extracted class names}"],
    "specified_by": "user"
  },
  "phase1": {
    "status": "in_progress",
    "output": null,
    "verification": null,
    "targets_for_phase2": []
  },
  "phase2": {
    "status": "pending",
    "completed": [],
    "remaining": [],
    "targets_for_phase3": []
  },
  "phase3": {
    "status": "pending",
    "completed": [],
    "remaining": []
  },
  "phase4": {
    "status": "pending",
    "output": null,
    "verification": null
  }
}

Step 2: Entry Point Detection

Identify all entry points within the target scope.

With Serena:

mcp__serena__get_symbols_overview(relative_path="{target}", depth=1)
mcp__serena__find_symbol(name_path_pattern="Main|main|__main__|app")

Without Serena:

  • Use Grep to search for entry point patterns from the language reference
  • Use Read to examine candidate files
  • Use Glob to find project configuration files

For each entry point, record:

  • File path (relative to workspace root)
  • Line number
  • Function/method name
  • Purpose (derived from code, not inferred)

Step 3: Dependency Mapping

Identify dependencies within the target scope.

Package/library dependencies:

  • Read project configuration files (language-specific: *.csproj, pyproject.toml, package.json, pom.xml)
  • List external dependencies with versions

Internal module dependencies:

  • Trace imports/using statements from the target files
  • Build a dependency graph

Produce Mermaid diagram:

graph TD
    ModuleA --> ModuleB
    ModuleA --> ExternalLib
    ModuleB --> ModuleC

Mermaid syntax rules (prevent parse errors):

  • No special characters in text (!=, >=, [], ())
  • No array/generic syntax (byte[], List<string>byte array, string list)
  • No method call parentheses (Method()Method)
  • Use quotes for node text with spaces: A["Node text (L45)"]

Step 4: Module and Component Listing

List ALL classes, interfaces, functions, and significant components within the target scope.

With Serena:

mcp__serena__search_for_pattern(
    substring_pattern="class |interface |def |function ",
    restrict_search_to_code_files=true
)
mcp__serena__get_symbols_overview(relative_path="{directory}", depth=2)

Without Serena:

  • Use Grep to find class/function definitions
  • Use Read to examine each file
  • Use Glob to enumerate source files

For each component, record:

ComponentTypeFile:LineDescription
OrderServiceclasssrc/services/order.py:15Order processing service

CRITICAL: List ALL components. Selecting only "important" ones is prohibited. Partial listing invalidates the analysis for downstream phases.

Step 5: Build Phase 2 Target List

From the component list, identify classes/modules that contain methods requiring logic visualization:

  • Classes with business logic methods
  • Handlers/controllers with processing flows
  • Services with complex operations

For each, record:

{
  "class": "OrderService",
  "file": "src/services/order.py",
  "methods": ["process_order", "validate_order", "calculate_total"]
}

Step 6: Generate Output

Write structure map to docs/reverse/{name}/01-structure-map.md:

# Structure Map: {name}

**Analysis Date**: {YYYY-MM-DD}
**Target**: {relative path}
**Language**: {language}
**Framework**: {detected framework and version}
**Confidence**: {High / Medium / Low}

**Important**: All paths are relative to workspace root.

## Technology Stack

### Framework and Language
| Component | Version | Source |
|:----------|:--------|:-------|
| {language} | {version} | {file:line} |

### Dependencies
| Package | Version | Purpose | Source |
|:--------|:--------|:--------|:-------|
| {package} | {version} | {purpose} | {config-file:line} |

## Directory Tree

{tree output with functional annotations}

## Entry Points

| Entry Point | File:Line | Purpose | Evidence |
|:------------|:----------|:--------|:---------|
| {name} | [{file}:{line}]({file}:{line}) | {purpose} | Line {N} |

## Dependency Diagram

graph TD ...


## Module and Component List

### {Category} (e.g., Services, Handlers, Models)

| Component | Type | File:Line | Description |
| --- | --- | --- | --- |
| {name} | {class/interface/function} | [{file}:{line}](https://github.com/caldiaworks/caldiaworks-marketplace/blob/HEAD/skills/re-structure-analysis/%7Bfile%7D:%7Bline%7D) | {description} |

## Question List

### Unconfirmed Findings

- **[Unconfirmed]** {description} — [{file}:{line}](https://github.com/caldiaworks/caldiaworks-marketplace/blob/HEAD/skills/re-structure-analysis/%7Bfile%7D:%7Bline%7D)

### Suspected Issues

- **[Suspected Bug]** {description} — [{file}:{line}](https://github.com/caldiaworks/caldiaworks-marketplace/blob/HEAD/skills/re-structure-analysis/%7Bfile%7D:%7Bline%7D)

## Analysis Constraints

### Confidence Factors

- **Code comments**: {sparse/moderate/rich}
- **Test coverage**: {estimated %}
- **Architecture patterns**: {observed patterns}

### Evidence Strength

- ✅ **Strong**: Implementation + tests + clear behavior
- ⚠️ **Medium**: Implementation + partial tests
- ❌ **Weak**: Implementation only, inferred from structure

Update manifest:

  • Set phase1.status to "completed"
  • Set phase1.output to "01-structure-map.md"
  • Populate phase1.targets_for_phase2 with the Phase 2 target list
  • Update phase2.remaining with all component names from targets_for_phase2
  • Update updated timestamp

Validation Before Completion

Before writing output, verify:

  • [ ] Every finding has a file:line reference
  • [ ] No speculative content (all claims verifiable in source)
  • [ ] Mermaid diagrams use valid syntax (no special characters)
  • [ ] All file paths are relative to workspace root
  • [ ] Component list is exhaustive within target scope
  • [ ] manifest.json is valid JSON with all required fields
  • [ ] targets_for_phase2 contains entries for all components with analyzable methods

Prohibited Actions

  • Do NOT execute code or run build commands
  • Do NOT infer business logic from variable names alone
  • Do NOT add components not present in the source code
  • Do NOT modify any source files
  • Do NOT include absolute file paths in output

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

37.62%
按下载量换算50

Claude

28.6%
按下载量换算38

Cursor

18.69%
按下载量换算25

Gemini CLI

9.18%
按下载量换算12

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

external-service

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

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

来源信息

继续浏览同类 Skills