用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/aRustyDev/agents --skill codebase-analysis命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | Codebase Analysis |
| version | 1.0.0 |
| description | Extract IR from source code for cross-language conversion |
| category | conversion |
| languages | ["python","typescript","rust","java","go","scala","roc","kotlin","swift","elixir"] |
| tools | ["ir-extract-python","ir-extract-rust","ir-extract-typescript","ir-extract-go","ir-extract-scala","ir-extract-roc"] |
Extract an Intermediate Representation (IR) from source code to enable cross-language conversion and analysis.
/codebase-analysis <path> [--language <lang>] [--depth <0-4>] [--output <format>]
| Parameter | Description | Default |
|---|---|---|
path | File or directory to analyze | Required |
--language | Source language (auto-detected if omitted) | auto |
--depth | IR extraction depth (0-4) | 4 |
--output | Output format (json, yaml, summary) | json |
If --language is not specified, detect based on:
.py, .rs, .ts, .go, .scala, .roc)pyproject.toml, Cargo.toml, package.json)Identify all modules and their relationships:
Extract type definitions and relationships:
Extract function signatures and semantics:
Infer semantic properties:
Mark concepts that may not convert cleanly:
The IR is organized into 5 layers of increasing abstraction:
| Layer | Name | Description |
|---|---|---|
| 0 | Expressions | AST-level expression nodes |
| 1 | Data Flow | Value flow through variables |
| 2 | Control Flow | Execution paths and branches |
| 3 | Type System | Type definitions and relationships |
| 4 | Module Structure | Imports, exports, dependencies |
ir:
version: "1.0"
source_language: "python"
source_path: "src/main.py"
modules:
- name: "main"
imports: [...]
exports: [...]
types:
- name: "User"
kind: "struct"
properties:
- name: "id"
type: "int"
- name: "name"
type: "str"
functions:
- name: "get_user"
parameters:
- name: "id"
type: "int"
return_type: "Optional[User]"
purity: "pure"
annotations:
- kind: "PY-003"
target: "get_user"
message: "Generator usage detected"
severity: "medium"
Gaps are annotated with:
kind: Gap identifier (e.g., "PY-RS-001")target: What element has the gapmessage: Human-readable descriptionseverity: critical, high, medium, low, infosuggestion: Recommended resolution/codebase-analysis src/models.py
/codebase-analysis ./src --language rust --output summary
/codebase-analysis lib/ --depth 2 # Control flow only