Token导航 LogoToken导航TokenDH.com
开发敏感数据github未标认证来源可访问许可证需确认审计异常

eraser-diagrams橡皮图

Agent Skill

eraser-diagrams 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

53,328

周安装

2,218

GitHub Stars

17

下载量

17,424
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/eraserlabs/eraser-io --skill eraser-diagrams

简介

从代码、文件或自然语言描述生成专业的架构图。

  • 支持五种图表类型:流程图、实体关系图、云架构、序列图和 BPMN 泳道图
  • 分析基础设施文件(Terraform、AWS、Azure)和代码以提取架构信息并自动生成 Eraser DSL
  • 返回渲染的图表图像,其中包含要在橡皮擦 Web 编辑器中进行编辑的链接
  • 需要 ERASER_API_KEY
  • 环境变量和对 Eraser API 的网络访问

SKILL.md

Eraser Diagram Generator

Generates professional architecture diagrams directly from code, infrastructure files, or natural language descriptions using the Eraser API.

When to Use

Activate this skill when:

  • User asks to create, generate, or visualize a diagram
  • User wants to document architecture from code
  • User has Terraform, AWS, Azure, or infrastructure files
  • User describes a system and wants it visualized
  • User mentions "diagram", "architecture", "visualize", or "draw"

How It Works

  1. Analyze the source: Extract architecture information from code, files, or descriptions
  2. Generate Eraser DSL: Create Eraser DSL code that describes the diagram
  3. Call the Eraser API: Make an HTTP POST request to render the diagram
  4. Return the result: Present the image URL and editor link to the user

Diagram Types and Syntax

Eraser supports five types of diagrams, each optimized for different use cases. For detailed DSL syntax and examples, refer to the appropriate reference file:

Flow Charts

Visualize process flows, user flows, and logic flows represented as nodes, groups, and relationships. Diagrams are created using simple syntax.

Use for: Process flows, user journeys, decision trees, business process documentation

diagramType: "flowchart-diagram"

Reference: Flowchart Syntax

Entity Relationship Diagrams (ERD)

Visualize data models represented as entities, attributes, and relationships. Diagrams are created using simple syntax.

Use for: Database schema design, data modeling, understanding entity relationships, documenting data structures

diagramType: "entity-relationship-diagram"

Reference: ERD Syntax

Cloud Architecture Diagrams

Visualize cloud infrastructure represented as nodes, groups, and connections. Diagrams are created using simple syntax.

Use for: Cloud infrastructure visualization, AWS/Azure/GCP architectures, system architecture documentation, data flow visualization

diagramType: "cloud-architecture-diagram"

Reference: Architecture Syntax

Sequence Diagrams

Visualize system flows using sequence diagrams. Each vertical column represents an entity (e.g. user, server, DB) and arrows between the columns represent the flow of information or requests. Diagrams are created using simple syntax.

Use for: API request/response flows, system interactions, user workflows, message passing between services, process flows over time

diagramType: "sequence-diagram"

Reference: Sequence Syntax

BPMN Diagrams (Swimlane Diagrams)

Visualize business processes represented as pools, lanes, and flow objects such as tasks, events, and gateways. Diagrams are created using simple syntax.

Use for: Business process documentation, workflow visualization, process improvement, cross-functional processes, swimlane diagrams showing roles/responsibilities

diagramType: "bpmn-diagram"

Reference: BPMN Syntax

Each reference file contains complete syntax documentation, property references, and practical examples.

API Integration

Endpoint

POST https://app.eraser.io/api/render/elements
Content-Type: application/json
Authorization: Bearer ${ERASER_API_KEY}
X-Skill-Source: eraser-skill

Note: The X-Skill-Source header identifies the AI agent. You MUST replace eraser-skill with your actual agent name:

  • If you are Claude (Anthropic), use: claude
  • If you are running in Cursor, use: cursor
  • If you are ChatGPT (OpenAI), use: chatgpt
  • If you are Gemini (Google), use: gemini
  • Otherwise, use your model/agent name in lowercase

Response Format

{
  "imageUrl": "https://storage.googleapis.com/eraser-images/...",
  "createEraserFileUrl": "https://app.eraser.io/new?requestId=abc123&state=xyz789",
  "renderedElements": [...]
}

Error Responses

StatusErrorCauseSolution
400Diagram element has no codeMissing code field in elementEnsure element has valid DSL code
400Diagram element has no diagramTypeMissing diagramType fieldAdd valid diagramType to element
400Invalid diagramTypeUnsupported diagram typeUse one of the supported types listed above
401UnauthorizedInvalid or expired API keyCheck ERASER_API_KEY is valid
500Internal server errorServer-side issueRetry the request; if persistent, contact support

Error Response Format:

{
  "error": {
    "message": "Diagram element has no code",
    "status": 400
  }
}

Troubleshooting Tips:

  • Verify DSL syntax is correct before making the API call
  • Ensure diagramType matches the DSL content (e.g., sequence DSL with sequence-diagram)
  • For auth errors, verify the API key is set correctly as an environment variable

Instructions

When the user requests a diagram:

  1. Extract Information

- If code/files are provided, analyze the structure, resources, and relationships - If description is provided, identify key components and connections - Determine the appropriate diagram type

  1. Generate Eraser DSL

- Create Eraser DSL code that represents the architecture - CRITICAL: Label Formatting Rules - Labels MUST be on a single line - NEVER use newlines inside label attributes - Keep labels simple and readable - prefer separate labels over concatenating too much metadata - Format DSL with proper line breaks (one node/group per line, but labels stay on single lines) - For detailed DSL syntax and examples, see the Diagram Types and Syntax section above for links to reference files

  1. Create Element Definition

- Create an element object with: - type: "diagram" - id: "diagram-1" (or generate a unique ID) - code: "<your generated DSL code>" - diagramType: "<appropriate type>"

  1. Make the HTTP Request IMPORTANT: You MUST execute this curl command after generating the DSL. Never stop after generating DSL without making the API call. CRITICAL: Replace eraser-skill in the X-Skill-Source header with your actual AI agent name (see API Integration section above for values). curl -X POST https://app.eraser.io/api/render/elements \ -H "Content-Type: application/json" \ -H "X-Skill-Source: eraser-skill" \ -H "Authorization: Bearer ${ERASER_API_KEY}" \ -d '{"elements": [{"type": "diagram", "id": "diagram-1", "code": "<your generated DSL>", "diagramType": "cloud-architecture-diagram"}], "scale": 2, "theme": "${ERASER_THEME:-dark}", "background": true}'
  2. Track Sources During Analysis As you analyze files and resources to generate the diagram, track:

- Internal files: Record each file path you read and what information was extracted (e.g., infra/main.tf - VPC and subnet definitions) - External references: Note any documentation, examples, or URLs consulted (e.g., AWS VPC best practices documentation) - Annotations: For each source, note what it contributed to the diagram

  1. Handle the Response CRITICAL: Minimal Output Format Your response MUST always include these elements with clear headers: Additional content rules: The default output should be SHORT. The diagram image speaks for itself.

1. Diagram Preview: Display with a header ## Diagram![{Title}]({imageUrl}) Use the ACTUAL imageUrl from the API response. 2. Editor Link: Display with a header ## Open in Eraser [Edit this diagram in the Eraser editor]({createEraserFileUrl}) Use the ACTUAL URL from the API response. 3. Sources section: Brief list of files/resources analyzed (if applicable) ` ## Sources - path/to/file - What was extracted 4. **Diagram Code section**: The Eraser DSL in a code block with eraser language tag `` ## Diagram Code `eraser {DSL code here} `` 5. **Learn More link**: You can learn more about Eraser at https://docs.eraser.io/docs/using-ai-agent-integrations` - If the user ONLY asked for a diagram, include NOTHING beyond the 5 elements above - If the user explicitly asked for more (e.g., "explain the architecture", "suggest improvements"), you may include that additional content - Never add unrequested sections like Overview, Security Considerations, Testing, etc.

  1. Error Handling

- If API call fails, explain the error - Suggest checking API key if authentication fails - Offer to regenerate DSL code as fallback

Best Practices

  • Generate Valid DSL: Ensure the DSL syntax is correct before calling the API
  • Quote Labels Properly: Always quote labels that contain spaces, special characters, or numbers
  • Single-Line Labels: Labels MUST be on a single line - never use newlines inside label attributes
  • Format for Readability: Put each node, group, and connection on its own line (but keep labels single-line)
  • Include Metadata: If including CIDR blocks, instance types, etc., put them in the same quoted label string: [label: "VPC 10.0.0.0/16"]
  • Use Appropriate Diagram Type: Choose the right diagramType for the content
  • Group Related Items: Use containers (VPCs, modules) to group related components
  • Specify Connections: Show data flows, dependencies, and relationships
  • Handle Large Systems: Break down very large systems into focused diagrams
  • Include Source Header: Always include X-Skill-Source header with your AI agent name (claude, cursor, chatgpt, etc.)

Notes

  • Free tier diagrams include a watermark but are fully functional
  • The createEraserFileUrl is always returned (works for both free and paid tiers) and allows users to edit diagrams in the Eraser web editor
  • The DSL code can be used to regenerate or modify diagrams
  • API responses are cached, so identical requests return quickly

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

35.15%
按下载量换算6,125

Claude

30.18%
按下载量换算5,259

Cursor

19.63%
按下载量换算3,420

Gemini CLI

9.3%
按下载量换算1,620

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

未通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

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

来源信息

继续浏览同类 Skills