← 返回 Skills 市场
ziad-hsn

Describe Design

作者 ziad-hsn · GitHub ↗ · v0.1.0
cross-platform ✓ 安全检测通过
1618
总下载
1
收藏
10
当前安装
1
版本数
在 OpenClaw 中安装
/install describe-design
功能描述
Research a codebase and create architectural documentation describing how features or systems work. Use when the user asks to: (1) Document how a feature works, (2) Create an architecture overview, (3) Explain code structure for onboarding or knowledge transfer, (4) Research and describe a system's design. Produces markdown documents with Mermaid diagrams and stable code references suitable for humans and AI agents.
使用说明 (SKILL.md)

Describe Design

Research a codebase and produce an architectural document describing how features or systems work. The output is a markdown file organized for both human readers and future AI agents.

Workflow

Stage 1: Scope Definition

Understand what to document before exploring:

  1. Ask what feature, system, or component to document.
  2. Clarify the target audience (developers, AI agents, or both).
  3. Confirm the codebase location if not obvious from context.

Stage 2: Initial Exploration

Explore the codebase broadly to build a mental model. Use lightweight, fast exploration methods when available (in Claude Code, for example, use a Haiku Explore subagent):

  1. Scan directory structure and identify key entry points.
  2. Read README, config files, and existing documentation.
  3. Identify the main files and modules related to the feature.
  4. Build a mental model of codebase organization.

Present a high-level outline to the user:

## Proposed Outline

1. [Component A] - Brief description
2. [Component B] - Brief description
3. [Component C] - Brief description

* Have I correctly captured the scope of the research? Reply "yes" to continue.
* Otherwise, please let me know what I've misunderstood.

When the user confirms the scope, move on to deep research.

Stage 3: Deep Research

For each component in the approved outline:

  1. Trace code paths from entry points.
  2. Identify dependencies and interactions between components.
  3. Note configuration options and where they're defined.
  4. Find where data is stored or persisted.
  5. Build a code reference index (file paths + key function/class names).

Try to rely on the initial code exploration for much of this information. Read additional files as needed. If the scope changed considerably in Stage 2, you can engage a second code exploration subagent.

When to Stop Exploring

You're ready to draft when you can:

  • Trace the happy path — Follow a typical request/action from entry point to completion without gaps.
  • Name the boundaries — Clearly state what's in scope and what's external.
  • Draw the diagram — Sketch the architecture without placeholder boxes.
  • Answer "what talks to what?" — For each component, you know its inputs and outputs.

Signs you're not done:

  • Uncertainty: "I think this connects to..." or "probably calls..."
  • Unresolved references: Found imports/calls to modules you haven't examined.
  • Missing edges: Can't explain how data gets from component A to B.

Signs you've gone too far:

  • Reading every file in a directory instead of representative samples.
  • Tracing into external libraries or framework internals.
  • Exploring implementation details that don't affect architecture.

Stage 4: Document Draft

Generate the document following the template below. Present the draft to the user for review and iterate based on feedback. If available, use the AskUserQuestion tool to request user input on key decisions.

Stage 5: Finalize

  1. Confirm the file location before writing. You may propose a path based on repository conventions (e.g., docs/architecture/, ARCHITECTURE.md), but NEVER write the file without explicit user confirmation of the location. If the user provided a path upfront, that counts as confirmation.
  2. Write the final document to the confirmed location.

Document Template

The following template provides a starting point. Adapt it to fit the feature being documented — omit sections that don't apply, add sections for unique aspects, and adjust the structure to best serve the target audience.

# [Feature/System Name] Architecture

## Overview

[1-2 paragraph summary of what this feature/system does and why it exists]

## Architecture Diagram

```mermaid
flowchart TD
    A[Entry Point] --> B[Component]
    B --> C[Data Store]
```

## Components

### [Component Name]

**Purpose**: [What it does]

**Location**: `path/to/file.ext`

**Key Functions**:
- `functionName()` - Brief description
- `anotherFunction()` - Brief description

**Interactions**:
- Receives input from: [Component]
- Sends output to: [Component]

## Data Flow

[Description of how data moves through the system, from input to output]

## Configuration

[How features are enabled, disabled, or configured. Include file paths and
environment variables.]

## Code References

| Component | File | Key Symbols |
|-----------|------|-------------|
| Auth | `src/auth/index.ts` | `authenticate()`, `AuthConfig` |
| Cache | `src/cache/redis.ts` | `CacheManager`, `invalidate()` |

## Glossary

| Term | Definition |
|------|------------|
| [Term] | [Project-specific definition] |

Code Reference Conventions

Use stable references that survive refactoring:

  • Paths: Use relative paths from repository root (src/auth/login.ts)
  • Symbols: Reference function and class names, not line numbers
  • Format: path/to/file.ext with key symbols listed separately
  • Anchors: Use search patterns when helpful (handleAuth function in auth/)

Avoid:

  • Copying code: Never paste code into the document. Code goes stale immediately; the document should be a guide that points readers to the source. Describe what code does, then reference where to find it.
  • Line numbers: They change with every edit.
  • Absolute paths: Use repository-relative paths only.

Mermaid Diagrams

Use Mermaid for architecture visualizations:

Flowcharts for component relationships:

flowchart TD
    A[Client] --> B[API Gateway]
    B --> C[Service]
    C --> D[(Database)]

Sequence diagrams for request flows:

sequenceDiagram
    Client->>API: Request
    API->>Service: Process
    Service-->>API: Response
    API-->>Client: Result

Keep diagrams focused on the specific feature being documented. Avoid overcrowding with unrelated components.

Writing Guidelines

  • Describe, never copy: Explain what code does and where to find it. Readers who need implementation details will read the actual source — which is always current.
  • Structure for scanning: Use headers, tables, and lists for quick navigation.
  • Be specific: Include actual file paths, function names, and config keys.
  • Serve two audiences: Write clearly for humans; use consistent structure for AI.
  • Stay current: Note any assumptions about code state or version.
安全使用建议
This skill appears coherent for documenting a codebase. Before installing or invoking it, consider: (1) Limit the repository or workspace the agent can access — architecture research legitimately reads README/config and source files, which may contain secrets; avoid granting access to production credentials or entire home directories. (2) Provide an explicit target path when you want the skill to write files and confirm writes as instructed. (3) If you only want high-level docs, ask the agent to ignore .env or credentials files. (4) Review the generated document (and any referenced paths) before committing or publishing it.
功能分析
Type: OpenClaw Skill Name: describe-design Version: 0.1.0 The skill bundle is benign. The `SKILL.md` file outlines a multi-stage process for an AI agent to research a codebase and generate architectural documentation. While this involves extensive file system read access, which is necessary for its stated purpose, it includes a critical security control: the agent is explicitly instructed to 'NEVER write the file without explicit user confirmation of the location' in Stage 5. There is no evidence of data exfiltration, malicious execution, persistence, or prompt injection attempting to subvert the agent's intended function or security boundaries.
能力评估
Purpose & Capability
Name/description (produce architecture docs from a codebase) align with the instructions: scanning directories, reading READMEs/configs, tracing code paths, and producing markdown + Mermaid diagrams are all expected capabilities for this goal. No unrelated binaries, installs, or credentials are requested.
Instruction Scope
SKILL.md explicitly instructs the agent to explore repository files, identify entry points, trace code paths, and produce a draft for user review. It cautions against copying code and requires explicit user confirmation before writing files. The scope is focused on documentation and code exploration; it is not open-ended or instructing unrelated data collection.
Install Mechanism
No install spec and no code files are present (instruction-only). This minimizes disk writes and arbitrary code execution risk.
Credentials
The skill declares no required environment variables or credentials, which is appropriate. It does instruct documenting configuration and environment variables found in the repo — which implies the agent may read config files that could contain secrets. This is expected for architecture research but worth noting: the skill itself does not request credentials, so any access to secrets depends on the agent's repository permissions.
Persistence & Privilege
always is false and the skill does not request persistent installation or system-wide changes. It explicitly requires user confirmation before writing documents, which limits autonomous modification of the filesystem.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install describe-design
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /describe-design 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.1.0
Initial release of describe-design skill. - Guides users through documenting a codebase's architecture, features, or systems using structured markdown. - Provides a clear, staged workflow: scoping, exploration, detailed research, drafting, and finalization. - Outputs documents with Mermaid diagrams, stable code references, and a consistent template. - Enforces best practices: no copying code, no line numbers, repository-relative paths only. - Designed to serve both human and AI audiences with clear, searchable documentation. - Always requires user confirmation before writing files to disk.
元数据
Slug describe-design
版本 0.1.0
许可证
累计安装 10
当前安装数 10
历史版本数 1
常见问题

Describe Design 是什么?

Research a codebase and create architectural documentation describing how features or systems work. Use when the user asks to: (1) Document how a feature works, (2) Create an architecture overview, (3) Explain code structure for onboarding or knowledge transfer, (4) Research and describe a system's design. Produces markdown documents with Mermaid diagrams and stable code references suitable for humans and AI agents. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 1618 次。

如何安装 Describe Design?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install describe-design」即可一键安装,无需额外配置。

Describe Design 是免费的吗?

是的,Describe Design 完全免费(开源免费),可自由下载、安装和使用。

Describe Design 支持哪些平台?

Describe Design 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Describe Design?

由 ziad-hsn(@ziad-hsn)开发并维护,当前版本 v0.1.0。

💬 留言讨论