create-oo-component-documentation by github/awesome-copilot
npx skills add https://github.com/github/awesome-copilot --skill create-oo-component-documentation为以下路径的面向对象组件创建全面的文档:${input:ComponentPath}。
通过检查所提供路径中的代码来分析组件。如果是文件夹,则分析所有源文件。如果是单个文件,则将其视为主组件并分析同一目录中的相关文件。
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
生成结构良好的 Markdown,具有清晰的标题层次结构、代码块、表格、项目符号和适当的格式,以确保可读性和可维护性。
文档应保存在 /docs/components/ 目录中,并根据以下约定命名:[component-name]-documentation.md。
文档文件必须遵循以下模板,确保所有部分都得到适当填写。Markdown 的前言应按照以下示例正确构建:
---
title: [组件名称] - 技术文档
component_path: `${input:ComponentPath}`
version: [可选:例如,1.0,日期]
date_created: [YYYY-MM-DD]
last_updated: [可选:YYYY-MM-DD]
owner: [可选:负责此组件的团队/个人]
tags: [可选:相关标签或类别列表,例如 `component`、`service`、`tool`、`infrastructure`、`documentation`、`architecture` 等]
---
# [组件名称] 文档
[对组件及其在系统中的目的的简短介绍。]
## 1. 组件概述
### 目的/职责
- OVR-001:说明组件的主要职责
- OVR-002:定义范围(包含/排除的功能)
- OVR-003:描述系统上下文和关系
## 2. 架构部分
- ARC-001:记录使用的设计模式(Repository、Factory、Observer 等)
- ARC-002:列出内部和外部依赖项及其目的
- ARC-003:记录组件交互和关系
- ARC-004:包含可视化图表(UML 类图、序列图、组件图)
- ARC-005:创建 Mermaid 图表,显示组件结构、关系和依赖项
### 组件结构和依赖关系图
包含一个全面的 Mermaid 图表,显示:
- **组件结构** - 主要类、接口及其关系
- **内部依赖** - 组件在系统内的交互方式
- **外部依赖** - 外部库、服务、数据库、API
- **数据流** - 依赖关系和交互的方向
- **继承/组合** - 类层次结构和组合关系
```mermaid
graph TD
subgraph "Component System"
A[Main Component] --> B[Internal Service]
A --> C[Internal Repository]
B --> D[Business Logic]
C --> E[Data Access Layer]
end
subgraph "External Dependencies"
F[External API]
G[Database]
H[Third-party Library]
I[Configuration Service]
end
A --> F
E --> G
B --> H
A --> I
classDiagram
class MainComponent {
+property: Type
+method(): ReturnType
+asyncMethod(): Promise~Type~
}
class InternalService {
+businessOperation(): Result
}
class ExternalAPI {
<<external>>
+apiCall(): Data
}
MainComponent --> InternalService
MainComponent --> ExternalAPI
| 方法/属性 | 目的 | 参数 | 返回类型 | 使用说明 |
|---|---|---|---|---|
| [名称] | [目的] | [参数] | [类型] | [说明] |
// Basic usage example
var component = new ComponentName();
component.DoSomething();
// Advanced configuration patterns
var options = new ComponentOptions();
var component = ComponentFactory.Create(options);
await component.ProcessAsync(data);
每周安装量
7.0K
仓库
GitHub 星标数
26.9K
首次出现
2026 年 2 月 25 日
安全审计
安装于
codex7.0K
gemini-cli6.9K
opencode6.9K
cursor6.9K
github-copilot6.9K
kimi-cli6.9K
Create comprehensive documentation for the object-oriented component(s) at: ${input:ComponentPath}.
Analyze the component by examining code in the provided path. If folder, analyze all source files. If single file, treat as main component and analyze related files in same directory.
Generate well-structured Markdown with clear heading hierarchy, code blocks, tables, bullet points, and proper formatting for readability and maintainability.
The documentation should be saved in the /docs/components/ directory and named according to the convention: [component-name]-documentation.md.
The documentation file must follow the template below, ensuring that all sections are filled out appropriately. The front matter for the markdown should be structured correctly as per the example following:
---
title: [Component Name] - Technical Documentation
component_path: `${input:ComponentPath}`
version: [Optional: e.g., 1.0, Date]
date_created: [YYYY-MM-DD]
last_updated: [Optional: YYYY-MM-DD]
owner: [Optional: Team/Individual responsible for this component]
tags: [Optional: List of relevant tags or categories, e.g., `component`,`service`,`tool`,`infrastructure`,`documentation`,`architecture` etc]
---
# [Component Name] Documentation
[A short concise introduction to the component and its purpose within the system.]
## 1. Component Overview
### Purpose/Responsibility
- OVR-001: State component's primary responsibility
- OVR-002: Define scope (included/excluded functionality)
- OVR-003: Describe system context and relationships
## 2. Architecture Section
- ARC-001: Document design patterns used (Repository, Factory, Observer, etc.)
- ARC-002: List internal and external dependencies with purposes
- ARC-003: Document component interactions and relationships
- ARC-004: Include visual diagrams (UML class, sequence, component)
- ARC-005: Create mermaid diagram showing component structure, relationships, and dependencies
### Component Structure and Dependencies Diagram
Include a comprehensive mermaid diagram that shows:
- **Component structure** - Main classes, interfaces, and their relationships
- **Internal dependencies** - How components interact within the system
- **External dependencies** - External libraries, services, databases, APIs
- **Data flow** - Direction of dependencies and interactions
- **Inheritance/composition** - Class hierarchies and composition relationships
```mermaid
graph TD
subgraph "Component System"
A[Main Component] --> B[Internal Service]
A --> C[Internal Repository]
B --> D[Business Logic]
C --> E[Data Access Layer]
end
subgraph "External Dependencies"
F[External API]
G[Database]
H[Third-party Library]
I[Configuration Service]
end
A --> F
E --> G
B --> H
A --> I
classDiagram
class MainComponent {
+property: Type
+method(): ReturnType
+asyncMethod(): Promise~Type~
}
class InternalService {
+businessOperation(): Result
}
class ExternalAPI {
<<external>>
+apiCall(): Data
}
MainComponent --> InternalService
MainComponent --> ExternalAPI
| Method/Property | Purpose | Parameters | Return Type | Usage Notes |
|---|---|---|---|---|
| [Name] | [Purpose] | [Parameters] | [Type] | [Notes] |
// Basic usage example
var component = new ComponentName();
component.DoSomething();
// Advanced configuration patterns
var options = new ComponentOptions();
var component = ComponentFactory.Create(options);
await component.ProcessAsync(data);
Weekly Installs
7.0K
Repository
GitHub Stars
26.9K
First Seen
Feb 25, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
codex7.0K
gemini-cli6.9K
opencode6.9K
cursor6.9K
github-copilot6.9K
kimi-cli6.9K
99,500 周安装