{"id":"9c08f0f6-3e5f-4fb7-9354-dd8bc1c6276d","entityType":"agent","slug":"clawhub-wongeven-gb-arch-cad-gen","name":"Gb Arch Cad Gen","canonicalUrl":"https://www.xpersona.co/agent/clawhub-wongeven-gb-arch-cad-gen","canonicalPath":"/agent/clawhub-wongeven-gb-arch-cad-gen","generatedAt":"2026-10-12T19:29:02.416Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"editorial-content","verified":true,"confidence":"high","updatedAt":"2026-10-12T00:11:09.701Z","emptyReason":null},"description":"程序化生成符合中国建筑设计规范的 CAD 图纸（平面图）。 严格遵循 GB/T 50104-2010《建筑制图标准》、 GB/T 50001-2017《房屋建筑制图统一标准》、 GB 55038-2025《住宅项目规范》（强制性）等相关国标。 支持输出 SVG 和 PDF 格式，不依赖 AutoCAD。 Skill: Gb Arch Cad Gen Owner: wongeven Summary: 程序化生成符合中国建筑设计规范的 CAD 图纸（平面图）。 严格遵循 GB/T 50104-2010《建筑制图标准》、 GB/T 50001-2017《房屋建筑制图统一标准》、 GB 55038-2025《住宅项目规范》（强制性）等相关国标。 支持输出 SVG 和 PDF 格式，不依赖 AutoCAD。 Tags: latest:1.0.0 Version history: v1.0.0 | 2026-05-27T04:34:01.729Z | auto - 首次发布：支持程序化生成符合中国建筑设计规范的 CAD 平面图。 - 遵循 GB/T 50104、GB/T 50001、GB 55038 等多项建筑制图与住宅规范。 - 支持输出 SVG 和 PDF 格式，完全独立于 AutoCAD。 - 涵盖图纸布局、标准图框、标题栏、尺寸标注","descriptionLabel":"Technical summary","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 970 downloads reported by the source. Last updated 10/12/2026.","installCommand":"clawhub skill install s17eq9h86qqe1j56tmhp3w119n86qcg0:gb-arch-cad-gen","sourceUrl":"https://clawhub.ai/wongeven/gb-arch-cad-gen","homepage":"https://clawhub.ai/wongeven/skills/gb-arch-cad-gen","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/wongeven/gb-arch-cad-gen","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/wongeven/skills/gb-arch-cad-gen","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":60,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"程序化生成符合中国建筑设计规范的 CAD 图纸（平面图）。 严格遵循 GB/T 50104-2010《建筑制图标准》、 GB/T 50001-2017《房屋建筑制图统一标准》、 GB 55038-2025《住宅项目规范》（强制性）等相关国标。 支持输出 SVG 和 PDF 格式，不依赖 AutoCAD。 Skill: "},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-12T00:11:09.701Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-12T00:11:09.701Z","emptyReason":null},"stars":null,"forks":null,"downloads":970,"likes":null,"task":null,"library":null,"packageName":null,"latestVersion":"1.0.0","tractionLabel":"970 downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-12T00:11:09.689Z","emptyReason":null},"lastUpdatedAt":"2026-10-12T00:11:09.701Z","lastCrawledAt":"2026-10-12T00:11:09.689Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-13T00:11:09.689Z","lastVerifiedAt":null,"highlights":[{"version":"1.0.0","createdAt":"2026-05-27T04:34:01.729Z","changelog":"- 首次发布：支持程序化生成符合中国建筑设计规范的 CAD 平面图。 - 遵循 GB/T 50104、GB/T 50001、GB 55038 等多项建筑制图与住宅规范。 - 支持输出 SVG 和 PDF 格式，完全独立于 AutoCAD。 - 涵盖图纸布局、标准图框、标题栏、尺寸标注、图层管理等关键环节。 - 可针对住宅平面、构件详图等需求定制参数化输出；详细规范与参数速查表一应俱全。","fileCount":6,"zipByteSize":9339}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s17eq9h86qqe1j56tmhp3w119n86qcg0:gb-arch-cad-gen","setupComplexity":"low","setupSteps":["Node.js workspace detected. Install dependencies securely: run `npm ci --ignore-scripts` to prevent post-install lifecycle triggers from running arbitrary code, then selectively audit the dependency tree.","Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.","Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-wongeven-gb-arch-cad-gen/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-wongeven-gb-arch-cad-gen/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-wongeven-gb-arch-cad-gen/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-wongeven-gb-arch-cad-gen/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-wongeven-gb-arch-cad-gen/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-wongeven-gb-arch-cad-gen/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-12T19:29:02.415Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-wongeven-gb-arch-cad-gen/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-wongeven-gb-arch-cad-gen/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-wongeven-gb-arch-cad-gen/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-wongeven-gb-arch-cad-gen/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"high","updatedAt":"2026-10-12T00:11:09.701Z","emptyReason":null},"readme":"Skill: Gb Arch Cad Gen\n\nOwner: wongeven\n\nSummary: 程序化生成符合中国建筑设计规范的 CAD 图纸（平面图）。 严格遵循 GB/T 50104-2010《建筑制图标准》、 GB/T 50001-2017《房屋建筑制图统一标准》、 GB 55038-2025《住宅项目规范》（强制性）等相关国标。 支持输出 SVG 和 PDF 格式，不依赖 AutoCAD。\n\nTags: latest:1.0.0\n\nVersion history:\n\nv1.0.0 | 2026-05-27T04:34:01.729Z | auto\n\n- 首次发布：支持程序化生成符合中国建筑设计规范的 CAD 平面图。\n- 遵循 GB/T 50104、GB/T 50001、GB 55038 等多项建筑制图与住宅规范。\n- 支持输出 SVG 和 PDF 格式，完全独立于 AutoCAD。\n- 涵盖图纸布局、标准图框、标题栏、尺寸标注、图层管理等关键环节。\n- 可针对住宅平面、构件详图等需求定制参数化输出；详细规范与参数速查表一应俱全。\n\nArchive index:\n\nArchive v1.0.0: 6 files, 9339 bytes\n\nFiles: _skillhub_meta.json (144b), package.json/document.md (372b), scripts/main.js/document.md (12339b), skill-card.md (2683b), SKILL.md (4963b), _meta.json (134b)\n\nFile v1.0.0:SKILL.md\n\n---\nname: arch-cad-generator\ndescription: >\n  程序化生成符合中国建筑设计规范的 CAD 图纸（平面图）。\n  严格遵循 GB/T 50104-2010《建筑制图标准》、\n  GB/T 50001-2017《房屋建筑制图统一标准》、\n  GB 55038-2025《住宅项目规范》（强制性）等相关国标。\n  支持输出 SVG 和 PDF 格式，不依赖 AutoCAD。\nversion: 1.0.0\nauthor: user\ntags:\n  - cad\n  - architecture\n  - drawing\n  - building-regulation\n  - china-standard\ntriggers:\n  - \"生成建筑图纸\"\n  - \"绘制平面图\"\n  - \"生成CAD图纸\"\n  - \"画建筑图\"\n  - \"CAD drawing\"\n  - \"floor plan\"\n---\n\n# 中国规范 CAD 图纸生成器\n\n## 能力边界\n\n本 Skill 用于**程序化生成符合中国建筑设计规范的 CAD 图纸**，适用于：\n- 住宅建筑方案平面图\n- 建筑构件详图\n- 标准图框与标题栏自动生成\n- 图纸尺寸标注与定位轴线标注\n\n不适用于：\n- 结构计算图纸（需结构工程师校核）\n- MEP（暖通/给排水/电气）专业系统图\n- 需要 PKPM/YJK 等专业软件计算的结构施工图\n\n## 执行工作流\n\n1. **接收用户需求** → 解析建筑类型、面积、房间构成\n2. **规范校验** → 根据 GB 55038-2025 等强制规范校验设计参数\n3. **生成布局** → 程序化生成平面图布局数据结构\n4. **绘制图纸** → 调用 Maker.js/Photon 库绘制图形\n5. **尺寸标注** → 按 GB/T 50104 标准格式标注尺寸\n6. **叠加图框** → 添加符合 GB/T 50001 的图框和标题栏\n7. **输出文件** → 导出 SVG + PDF\n\n## 遵循的规范标准\n\n### 强制性规范（必须严格执行）\n- **GB 55038-2025**《住宅项目规范》：层高≥3.0m、卧室净高≥2.6m、≥4层设电梯\n- **GB 50016-2014**《建筑设计防火规范》：防火分区、疏散距离\n- **GB 50763-2012**《无障碍设计规范》：无障碍通道、坡道坡度\n\n### 制图标准\n- **GB/T 50104-2010**《建筑制图标准》：图线、比例、图例、尺寸标注\n- **GB/T 50001-2017**《房屋建筑制图统一标准》：图纸幅面、标题栏、图层\n\n### 参考规范\n- **GB 50096-2011**《住宅设计规范》：各功能空间面积下限\n- **GB 50103-2010**《总图制图标准》\n\n## 关键规范参数速查\n\n| 参数 | 规范要求 | 来源 |\n|------|---------|------|\n| 住宅层高 | ≥ 3.0m | GB 55038-2025 |\n| 卧室净高 | ≥ 2.6m | GB 55038-2025 |\n| 局部净高 | ≥ 2.2m | GB 55038-2025 |\n| 卧室使用面积（双人） | ≥ 9㎡ | GB 50096-2011 |\n| 起居室使用面积 | ≥ 10㎡ | GB 50096-2011 |\n| 厨房使用面积 | ≥ 4.0㎡ | GB 50096-2011 |\n| 卫生间使用面积 | ≥ 2.5㎡ | GB 50096-2011 |\n| 户门净宽 | ≥ 0.90m | GB 55038-2025 |\n| 卧室门净宽 | ≥ 0.80m | GB 50096-2011 |\n| 卫生间门净宽 | ≥ 0.70m | GB 55038-2025 |\n| 走廊净宽 | ≥ 1.20m | GB 50096-2011 |\n| 电梯设置门槛 | ≥ 4层 | GB 55038-2025 |\n| 阳台栏杆高度 | ≥ 1.10m | GB 55038-2025 |\n\n## 图纸幅面（GB/T 50001-2017）\n\n| 幅面代号 | 尺寸 (mm) | 适用场景 |\n|----------|----------|---------|\n| A0 | 841×1189 | 大型工程总图 |\n| A1 | 594×841 | 中型项目 |\n| A2 | 420×594 | 常规楼层平面 |\n| A3 | 297×420 | 详图/方案图 |\n| A4 | 210×297 | 节点详图 |\n\n## 线型规定（GB/T 50104-2010）\n\n- **粗实线（bold）** ：被剖切的主要建筑构造（墙体等）——线宽 b\n- **中实线（medium）** ：可见轮廓线——线宽 0.5b\n- **细实线（thin）** ：尺寸线、引出线、填充线——线宽 0.25b\n- **粗虚线（bold-dash）** ：地下/被遮挡的主要构造\n- **细点划线（thin-dot-dash）** ：定位轴线、中心线\n- **线宽组**：b = 2.0 / 1.4 / 1.0 / 0.7 / 0.5 mm\n\n## 图层命名（GB/T 50001-2017 协同设计）\n\n- **A-WALL** — 墙体\n- **A-DOOR** — 门窗\n- **A-DIMS** — 尺寸标注\n- **A-AXIS** — 定位轴线\n- **A-TEXT** — 文字说明\n- **A-TTLB** — 图框标题栏\n- **A-FURN** — 家具布置\n\n## 使用说明\n\n### 典型请求示例\n\n### 参数说明\n\n用户可指定以下参数（未指定则使用默认值）：\n\n- `building_type`：建筑类型（residential / office / school / commercial）\n- `total_area`：总面积（㎡）\n- `rooms`：房间列表（名称 + 面积）\n- `paper_size`：图纸幅面（A0~A4，默认 A3）\n- `scale`：比例（默认 1:100）\n- `output_format`：输出格式（svg / pdf / both，默认 both）\n\n## 所需工具\n\n- `file_write` — 写入 SVG/PDF 文件\n- `command_exec` — 执行 Node.js 脚本\n\n## 环境依赖\n\n- Node.js ≥ 18.x\n- npm 包：`makerjs`（程序化绘图）、`pdfkit`（PDF 生成）\n- 安装命令：`npm install makerjs pdfkit`\n\n## 注意事项\n\n1. 本 Skill 生成的图纸为**方案级**图纸，不可直接用于施工。\n2. 所有尺寸标注单位为毫米（mm），符合国标规定。\n3. 图纸输出路径默认为 `./output/` 目录。\n4. 图纸数据以 JSON 格式结构化存储，方便二次处理。\n\nFile v1.0.0:_meta.json\n\n{\n  \"ownerId\": \"kn70tg2gq9dps1hzxceqvfarw986p1e8\",\n  \"slug\": \"gb-arch-cad-gen\",\n  \"version\": \"1.0.0\",\n  \"publishedAt\": 1779856441729\n}\n\nFile v1.0.0:scripts/main.js/document.md\n\n#!/usr/bin/env node\n/**\n * OpenClaw Skill: arch-cad-generator\n * 中国规范 CAD 图纸生成器 - 核心绘制引擎\n *\n * 使用 makerjs（Photon 前身）进行程序化绘图，输出 SVG + PDF。\n * 严格遵循 GB/T 50104-2010《建筑制图标准》及 GB/T 50001-2017《房屋建筑制图统一标准》。\n */\n\nconst makerjs = require('makerjs');\nconst fs = require('fs');\nconst path = require('path');\n\n// ============================================================\n// 一、规范常量定义\n// ============================================================\n\n/** GB/T 50001-2017 图纸幅面 (mm) */\nconst PAPER_SIZES = {\n  A0: [1189, 841],\n  A1: [841, 594],\n  A2: [594, 420],\n  A3: [420, 297],\n  A4: [297, 210],\n};\n\n/** GB/T 50104-2010 线宽组 (mm), 以 b=1.0 为基准 */\nconst LINE_WEIGHTS = {\n  BOLD:      1.0,   // b — 粗实线：剖切到的墙体轮廓\n  MEDIUM:    0.5,   // 0.5b — 中实线：可见轮廓\n  THIN:      0.25,  // 0.25b — 细实线：尺寸线、轴线\n};\n\n/** GB 55038-2025 + GB 50096-2011 关键尺寸 (mm) */\nconst REGULATIONS = {\n  MIN_STOREY_HEIGHT:       3000,   // 住宅层高 ≥ 3.0m (GB 55038-2025)\n  MIN_BEDROOM_AREA_SQ:     9.0,    // 双人卧室 ≥ 9㎡ (GB 50096-2011)\n  MIN_LIVING_AREA_SQ:      10.0,   // 起居室 ≥ 10㎡ (GB 50096-2011)\n  MIN_KITCHEN_AREA_SQ:     4.0,    // 厨房 ≥ 4㎡ (GB 50096-2011)\n  MIN_BATHROOM_AREA_SQ:    2.5,    // 卫生间 ≥ 2.5㎡ (GB 50096-2011)\n  MAIN_DOOR_WIDTH:         900,    // 户门净宽 ≥ 0.90m (GB 55038-2025)\n  BEDROOM_DOOR_WIDTH:      800,    // 卧室门 ≥ 0.80m\n  BATH_DOOR_WIDTH:         700,    // 卫生间门 ≥ 0.70m\n  CORRIDOR_WIDTH:          1200,   // 走廊净宽 ≥ 1.20m\n  WALL_THICKNESS_OUTER:    240,    // 外墙厚度\n  WALL_THICKNESS_INNER:    120,    // 内墙厚度\n};\n\n/** GB/T 50104-2010 图层名称 */\nconst LAYERS = {\n  WALL:  'A-WALL',\n  DOOR:  'A-DOOR',\n  DIMS:  'A-DIMS',\n  AXIS:  'A-AXIS',\n  TEXT:  'A-TEXT',\n  TTLB:  'A-TTLB',\n  FURN:  'A-FURN',\n};\n\n// ============================================================\n// 二、规范校验模块\n// ============================================================\n\n/**\n * 校验设计参数是否符合强制性规范\n * @param {Object} design - 用户设计参数\n * @returns {{ valid: boolean, violations: string[] }}\n */\nfunction validateDesign(design) {\n  const violations = [];\n  const { rooms, storey_height } = design;\n\n  if (storey_height && storey_height < REGULATIONS.MIN_STOREY_HEIGHT) {\n    violations.push(\n      `[GB 55038-2025] 层高 ${storey_height}mm < 最低要求 ${REGULATIONS.MIN_STOREY_HEIGHT}mm`\n    );\n  }\n\n  for (const room of rooms || []) {\n    const area = (room.width * room.height) / 1_000_000; // mm² → m²\n    switch (room.type) {\n      case 'bedroom':\n        if (area < REGULATIONS.MIN_BEDROOM_AREA_SQ) {\n          violations.push(\n            `[GB 50096-2011] \"${room.name}\" 面积 ${area.toFixed(1)}㎡ < 最小 ${REGULATIONS.MIN_BEDROOM_AREA_SQ}㎡`\n          );\n        }\n        break;\n      case 'living':\n        if (area < REGULATIONS.MIN_LIVING_AREA_SQ) {\n          violations.push(\n            `[GB 50096-2011] \"${room.name}\" 面积 ${area.toFixed(1)}㎡ < 最小 ${REGULATIONS.MIN_LIVING_AREA_SQ}㎡`\n          );\n        }\n        break;\n      case 'kitchen':\n        if (area < REGULATIONS.MIN_KITCHEN_AREA_SQ) {\n          violations.push(\n            `[GB 50096-2011] \"${room.name}\" 面积 ${area.toFixed(1)}㎡ < 最小 ${REGULATIONS.MIN_KITCHEN_AREA_SQ}㎡`\n          );\n        }\n        break;\n      case 'bathroom':\n        if (area < REGULATIONS.MIN_BATHROOM_AREA_SQ) {\n          violations.push(\n            `[GB 50096-2011] \"${room.name}\" 面积 ${area.toFixed(1)}㎡ < 最小 ${REGULATIONS.MIN_BATHROOM_AREA_SQ}㎡`\n          );\n        }\n        break;\n    }\n  }\n\n  return { valid: violations.length === 0, violations };\n}\n\n// ============================================================\n// 三、图纸绘制模块\n// ============================================================\n\n/**\n * 创建定位轴线（细点划线, GB/T 50104-2010）\n * @param {number} x - 轴线位置 X\n * @param {number} y - 轴线位置 Y\n * @param {number} length - 轴线长度\n * @param {'h'|'v'} direction - 水平/垂直\n * @returns {makerjs.paths.Line}\n */\nfunction createAxis(x, y, length, direction) {\n  const isHorizontal = direction === 'h';\n  const path = new makerjs.paths.Line(\n    [x, y],\n    [isHorizontal ? x + length : x, isHorizontal ? y : y + length]\n  );\n  path.layer = LAYERS.AXIS;\n  return path;\n}\n\n/**\n * 创建墙体（粗实线, GB/T 50104-2010）\n * @returns {makerjs.models.ConnectTheDots}\n */\nfunction createWall(points, thickness) {\n  // 外墙为矩形，用粗实线绘制\n  const wallModel = new makerjs.models.ConnectTheDots(true, points);\n  wallModel.layer = LAYERS.WALL;\n  wallModel.paths.forEach(p => {\n    p.layer = LAYERS.WALL;\n  });\n  return wallModel;\n}\n\n/**\n * 创建墙体矩形（简化版：给定对角两点）\n */\nfunction createWallRect(x1, y1, x2, y2) {\n  const model = new makerjs.models.ConnectTheDots(true, [\n    [x1, y1], [x2, y1], [x2, y2], [x1, y2]\n  ]);\n  model.layer = LAYERS.WALL;\n  return model;\n}\n\n/**\n * 创建门（中实线 + 开启弧线, GB/T 50104-2010）\n * @param {number} x, y - 门铰链位置\n * @param {number} width - 门宽\n * @param {'l'|'r'|'u'|'d'} swing - 开启方向\n */\nfunction createDoor(x, y, width, swing) {\n  const doorModel = new makerjs.models.ConnectTheDots(true, [\n    [x, y], [x, y + width]\n  ]);\n  doorModel.layer = LAYERS.DOOR;\n  return doorModel;\n}\n\n/**\n * 创建窗户（四条细线表示窗, GB/T 50104-2010）\n */\nfunction createWindow(x1, y1, x2, y2) {\n  const model = {\n    paths: {\n      outer1: new makerjs.paths.Line([x1, y1], [x2, y1]),\n      outer2: new makerjs.paths.Line([x1, y2], [x2, y2]),\n      inner1: new makerjs.paths.Line([x1, (y1 + y2) / 2 - 25], [x2, (y1 + y2) / 2 - 25]),\n      inner2: new makerjs.paths.Line([x1, (y1 + y2) / 2 + 25], [x2, (y1 + y2) / 2 + 25]),\n    },\n  };\n  Object.values(model.paths).forEach(p => { p.layer = LAYERS.DOOR; });\n  return model;\n}\n\n/**\n * 创建图框和标题栏（GB/T 50001-2017）\n * @param {[number,number]} paperSize - [宽, 高] mm\n */\nfunction createTitleBlock(paperSize) {\n  const [pw, ph] = paperSize;\n  const model = {\n    paths: {},\n  };\n\n  // 外框（细实线）\n  model.paths.outerFrame = new makerjs.paths.Line([0, 0], [pw, 0]);\n  model.paths.outerFrame.layer = LAYERS.TTLB;\n  // ...（实际项目中应绘制完整的标题栏，此处示意）\n\n  return model;\n}\n\n// ============================================================\n// 四、尺寸标注模块（GB/T 50104-2010）\n// ============================================================\n\n/**\n * 创建尺寸标注线（细实线 + 起止符号）\n * @param {number} x1, y1 - 标注起点\n * @param {number} x2, y2 - 标注终点\n * @param {string} text - 标注文字\n * @param {number} offset - 与标注对象的间距\n */\nfunction createDimension(x1, y1, x2, y2, text, offset) {\n  const dimModel = {\n    paths: {\n      dimLine: new makerjs.paths.Line([x1, y1 - offset], [x2, y2 - offset]),\n      tick1:    new makerjs.paths.Line([x1, y1 - offset - 50], [x1, y1 - offset + 50]),\n      tick2:    new makerjs.paths.Line([x2, y2 - offset - 50], [x2, y2 - offset + 50]),\n    },\n  };\n  Object.values(dimModel.paths).forEach(p => { p.layer = LAYERS.DIMS; });\n  return dimModel;\n}\n\n// ============================================================\n// 五、完整平面图生成\n// ============================================================\n\n/**\n * 生成住宅平面图\n * @param {Object} design - { rooms, width, height, scale, paperSize }\n * @returns {makerjs.Drawing}\n */\nfunction generateFloorPlan(design) {\n  const drawing = new makerjs.Drawing();\n\n  // --- 1. 定位轴线 ---\n  const axisSpacing = 3000; // 轴线间距 3m（与层高一致）\n  const numAxisH = Math.ceil(design.height / axisSpacing) + 1;\n  const numAxisV = Math.ceil(design.width / axisSpacing) + 1;\n\n  for (let i = 0; i < numAxisH; i++) {\n    const y = i * axisSpacing;\n    const axis = createAxis(-500, y, design.width + 1000, 'h');\n    drawing.addPath(axis);\n  }\n  for (let i = 0; i < numAxisV; i++) {\n    const x = i * axisSpacing;\n    const axis = createAxis(x, -500, design.height + 1000, 'v');\n    drawing.addPath(axis);\n  }\n\n  // --- 2. 墙体 ---\n  // 外墙\n  drawing.addModel(createWallRect(\n    0, 0,\n    design.width, design.height\n  ));\n\n  // --- 3. 房间分隔墙 ---\n  let xCursor = 0;\n  for (const room of design.rooms || []) {\n    const rx = xCursor;\n    const ry = 0;\n    const rw = room.width;\n    const rh = room.height;\n\n    // 内墙\n    if (xCursor > 0) {\n      drawing.addModel(createWallRect(\n        xCursor - REGULATIONS.WALL_THICKNESS_INNER / 2, ry,\n        xCursor + REGULATIONS.WALL_THICKNESS_INNER / 2, rh\n      ));\n    }\n\n    // 门（根据房间类型设置门宽）\n    let doorWidth = REGULATIONS.BEDROOM_DOOR_WIDTH;\n    if (room.type === 'bathroom') doorWidth = REGULATIONS.BATH_DOOR_WIDTH;\n\n    const door = createDoor(rx + 200, ry + rh / 2 - doorWidth / 2, doorWidth, 'r');\n    drawing.addModel(door);\n\n    xCursor += room.width;\n  }\n\n  // --- 4. 尺寸标注 ---\n  drawing.addModel(createDimension(0, 0, design.width, 0,\n    `${(design.width / 1000).toFixed(2)}m`, 800));\n  drawing.addModel(createDimension(0, 0, 0, design.height,\n    `${(design.height / 1000).toFixed(2)}m`, 800));\n\n  // --- 5. 图框 ---\n  drawing.addModel(createTitleBlock(design.paperSize));\n\n  return drawing;\n}\n\n// ============================================================\n// 六、输出模块\n// ============================================================\n\n/**\n * 导出图纸到文件\n * @param {makerjs.Drawing} drawing\n * @param {Object} options - { format, outputDir, filename }\n */\nfunction exportDrawing(drawing, options) {\n  const { format, outputDir, filename } = options;\n  const outDir = outputDir || './output';\n\n  if (!fs.existsSync(outDir)) {\n    fs.mkdirSync(outDir, { recursive: true });\n  }\n\n  if (format === 'svg' || format === 'both') {\n    const svg = makerjs.exporter.toSVG(drawing, {\n      useSvgPathOnly: false,\n      strokeWidth: 0.25,\n    });\n    fs.writeFileSync(path.join(outDir, `${filename}.svg`), svg);\n    console.log(`✅ SVG 已输出: ${outDir}/${filename}.svg`);\n  }\n\n  if (format === 'pdf' || format === 'both') {\n    const pdf = makerjs.exporter.toPDF(drawing, {\n      pageSize: drawing.paperSize || [420, 297],\n    });\n    fs.writeFileSync(path.join(outDir, `${filename}.pdf`), pdf);\n    console.log(`✅ PDF 已输出: ${outDir}/${filename}.pdf`);\n  }\n}\n\n// ============================================================\n// 七、主入口\n// ============================================================\n\nasync function main() {\n  // 从命令行参数或环境变量读取设计参数\n  const args = process.argv.slice(2);\n\n  // 默认：90㎡ 两室一厅\n  const design = {\n    storey_height: 3000,\n    width:  9000,  // 9m 面宽\n    height: 10000, // 10m 进深\n    scale:  100,   // 1:100\n    paperSize: PAPER_SIZES.A3,\n    rooms: [\n      { name: '客厅', type: 'living',   width: 4500, height: 5000 },\n      { name: '主卧', type: 'bedroom',  width: 3500, height: 4500 },\n      { name: '次卧', type: 'bedroom',  width: 3000, height: 3500 },\n      { name: '厨房', type: 'kitchen',  width: 2000, height: 3000 },\n      { name: '卫生间', type: 'bathroom', width: 2000, height: 2500 },\n    ],\n  };\n\n  // --- 规范校验 ---\n  const { valid, violations } = validateDesign(design);\n  if (!valid) {\n    console.warn('⚠️  设计存在以下规范违规：');\n    violations.forEach(v => console.warn(`   - ${v}`));\n    console.warn('将继续生成图纸，但请在设计说明中注明偏差。\\n');\n  } else {\n    console.log('✅ 设计通过强制性规范校验。\\n');\n  }\n\n  // --- 生成图纸 ---\n  console.log('🔧 正在生成图纸...');\n  const drawing = generateFloorPlan(design);\n\n  // --- 输出 ---\n  exportDrawing(drawing, {\n    format: 'both',\n    outputDir: './output',\n    filename: `floor-plan-${Date.now()}`,\n  });\n\n  console.log('🎉 图纸生成完成！');\n  return { success: true, violations };\n}\n\n// 执行\nmain().catch(err => {\n  console.error('❌ 图纸生成失败:', err.message);\n  process.exit(1);\n});\n\nFile v1.0.0:package.json/document.md\n\n{\n  \"name\": \"openclaw-skill-arch-cad-generator\",\n  \"version\": \"1.0.0\",\n  \"description\": \"OpenClaw Skill: 中国规范 CAD 图纸生成器\",\n  \"main\": \"scripts/main.js\",\n  \"scripts\": {\n    \"draw\": \"node scripts/main.js\"\n  },\n  \"dependencies\": {\n    \"makerjs\": \"^0.18.1\"\n  },\n  \"keywords\": [\"openclaw\", \"skill\", \"cad\", \"architecture\", \"china-standard\"],\n  \"license\": \"MIT\"\n}\n\nFile v1.0.0:skill-card.md\n\n## Description:\n\nGb Arch Cad Gen helps agents generate conceptual CAD floor-plan drawings aligned with cited Chinese architectural drafting standards, exporting SVG and PDF files without AutoCAD.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[wongeven](https://clawhub.ai/user/wongeven)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nDevelopers, architects, and design automation users can use this skill to generate parameterized residential plan drawings, title blocks, dimensions, and local SVG/PDF outputs for early-stage design review. The outputs should be treated as conceptual drafts and reviewed by qualified professionals before any construction or compliance use.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Generated CAD drawings may be incomplete, approximate, or unsuitable for construction, permitting, structural, MEP, fire-safety, or accessibility decisions.\n\nMitigation: Use the drawings only as conceptual drafts and require review by qualified architects, engineers, and code specialists before relying on them.\n\nRisk: Running the skill can install npm packages and write SVG/PDF outputs to the local filesystem.\n\nMitigation: Review dependency versions, run in a controlled workspace, and inspect generated files before moving them into sensitive project environments.\n\nRisk: The skill cites Chinese architectural standards, but automated checks may not prove full legal or project-specific compliance.\n\nMitigation: Treat built-in standard checks as preliminary screening and verify all applicable regulatory requirements against authoritative project documentation.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/wongeven/skills/gb-arch-cad-gen)\n- [Skill definition](artifact/SKILL.md)\n- [Package manifest](artifact/package.json/document.md)\n- [Drawing engine source](artifact/scripts/main.js/document.md)\n\n## Skill Output:\n\n**Output Type(s):** [Files, Code, Shell commands, Guidance]\n\n**Output Format:** [SVG and PDF drawing files with optional JSON design data and Markdown or shell guidance]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Writes generated drawings locally under ./output; generated drawings are conceptual drafts and require professional review.]\n\n## Skill Version(s):\n\n1.0.0 (source: server release, SKILL.md frontmatter, package.json/document.md, _skillhub_meta.json)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v1.0.0:_skillhub_meta.json\n\n{\n  \"slug\": \"gb-arch-cad-gen\",\n  \"name\": \"architectual-engineer\",\n  \"version\": \"1.0.0\",\n  \"installedAt\": 1779674929122,\n  \"source\": \"skillhub\"\n}","readmeExcerpt":"Skill: Gb Arch Cad Gen Owner: wongeven Summary: 程序化生成符合中国建筑设计规范的 CAD 图纸（平面图）。 严格遵循 GB/T 50104-2010《建筑制图标准》、 GB/T 50001-2017《房屋建筑制图统一标准》、 GB 55038-2025《住宅项目规范》（强制性）等相关国标。 支持输出 SVG 和 PDF 格式，不依赖 AutoCAD。 Tags: latest:1.0.0 Version history: v1.0.0 | 2026-05-27T04:34:01.729Z | auto - 首次发布：支持程序化生成符合中国建筑设计规范的 CAD 平面图。 - 遵循 GB/T 50104、GB/T 50001、GB 55038 等多项建筑制图与住宅规范。 - 支持输出 SVG 和 PDF 格式，完全独立于 AutoCAD。 - 涵盖图纸布局、标准图框、标题栏、尺寸标注","codeSnippets":[],"executableExamples":[],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\nname: arch-cad-generator\ndescription: >\n  程序化生成符合中国建筑设计规范的 CAD 图纸（平面图）。\n  严格遵循 GB/T 50104-2010《建筑制图标准》、\n  GB/T 50001-2017《房屋建筑制图统一标准》、\n  GB 55038-2025《住宅项目规范》（强制性）等相关国标。\n  支持输出 SVG 和 PDF 格式，不依赖 AutoCAD。\nversion: 1.0.0\nauthor: user\ntags:\n  - cad\n  - architecture\n  - drawing\n  - building-regulation\n  - china-standard\ntriggers:\n  - \"生成建筑图纸\"\n  - \"绘制平面图\"\n  - \"生成CAD图纸\"\n  - \"画建筑图\"\n  - \"CAD drawing\"\n  - \"floor plan\"\n---\n\n# 中国规范 CAD 图纸生成器\n\n## 能力边界\n\n本 Skill 用于**程序化生成符合中国建筑设计规范的 CAD 图纸**，适用于：\n- 住宅建筑方案平面图\n- 建筑构件详图\n- 标准图框与标题栏自动生成\n- 图纸尺寸标注与定位轴线标注\n\n不适用于：\n- 结构计算图纸（需结构工程师校核）\n- MEP（暖通/给排水/电气）专业系统图\n- 需要 PKPM/YJK 等专业软件计算的结构施工图\n\n## 执行工作流\n\n1. **接收用户需求** → 解析建筑类型、面积、房间构成\n2. **规范校验** → 根据 GB 55038-2025 等强制规范校验设计参数\n3. **生成布局** → 程序化生成平面图布局数据结构\n4. **绘制图纸** → 调用 Maker.js/Photon 库绘制图形\n5. **尺寸标注** → 按 GB/T 50104 标准格式标注尺寸\n6. **叠加图框** → 添加符合 GB/T 50001 的图框和标题栏\n7. **输出文件** → 导出 SVG + PDF\n\n## 遵循的规范标准\n\n### 强制性规范（必须严格执行）\n- **GB 55038-2025**《住宅项目规范》：层高≥3.0m、卧室净高≥2.6m、≥4层设电梯\n- **GB 50016-2014**《建筑设计防火规范》：防火分区、疏散距离\n- **GB 50763-2012**《无障碍设计规范》：无障碍通道、坡道坡度\n\n### 制图标准\n- **GB/T 50104-2010**《建筑制图标准》：图线、比例、图例、尺寸标注\n- **GB/T 50001-2017**《房屋建筑制图统一标准》：图纸幅面、标题栏、图层\n\n### 参考规范\n- **GB 50096-2011**《住宅设计规范》：各功能空间面积下限\n- **GB 50103-2010**《总图制图标准》\n\n## 关键规范参数速查\n\n| 参数 | 规范要求 | 来源 |\n|------|---------|------|\n| 住宅层高 | ≥ 3.0m | GB 55038-2025 |\n| 卧室净高 | ≥ 2.6m | GB 55038-2025 |\n| 局部净高 | ≥ 2.2m | GB 55038-2025 |\n| 卧室使用面积（双人） | ≥ 9㎡ | GB 50096-2011 |\n| 起居室使用面积 | ≥ 10㎡ | GB 50096-2011 |\n| 厨房使用面积 | ≥ 4.0㎡ | GB 50096-2011 |\n| 卫生间使用面积 | ≥ 2.5㎡ | GB 50096-2011 |\n| 户门净宽 | ≥ 0.90m | GB 55038-2025 |\n| 卧室门净宽 | ≥ 0.80m | GB 50096-2011 |\n| 卫生间门净宽 | ≥ 0.70m | GB 55038-2025 |\n| 走廊净宽 | ≥ 1.20m | GB 50096-2011 |\n| 电梯设置门槛 | ≥ 4层 | GB 55038-2025 |\n| 阳台栏杆高度 | ≥ 1.10m | GB 55038-2025 |\n\n## 图纸幅面（GB/T 50001-2017）\n\n| 幅面代号 | 尺寸 (mm) | 适用场景 |\n|----------|----------|---------|\n| A0 | 841×1189 | 大型工程总图 |\n| A1 | 594×841 | 中型项目 |\n| A2 | 420×594 | 常规楼层平面 |\n| A3 | 297×420 | 详图/方案图 |\n| A4 | 210×297 | 节点详图 |\n\n## 线型规定（GB/T 50104-2010）\n\n- **粗实线（bold）** ：被剖切的主要建筑构造（墙体等）——线宽 b\n- **中实线（medium）** ：可见轮廓线——线宽 0.5b\n- **细实线（thin）** ：尺寸线、引出线、填充线——线宽 0.25b\n- **粗虚线（bold-dash）** ：地下/被遮挡的主要构造\n- **细点划线（thin-dot-dash）** ：定位轴线、中心线\n- **线宽组**：b = 2.0 / 1.4 / 1.0 / 0.7 / 0.5 mm\n\n## 图层命名（GB/T 50001-2017 协同设计）\n\n- **A-WALL** — 墙体\n- **A-DOOR** — 门窗\n- **A-DIMS** — 尺寸标注\n- **A-AXIS** — 定位轴线\n- **A-TEXT** — 文字说明\n- **A-TTLB** — 图框标题栏\n- **A-FURN** — 家具布置\n\n## 使用说明\n\n### 典型请求示例\n\n### 参数说明\n\n用户可指定以下参数（未指定则使用默认值）：\n\n- `building_type`：建筑类型（residential / office / school / commercial）\n- `total_area`：总面积（㎡）\n- `rooms`：房间列表（名称 + 面积）\n- `paper_size`：图纸幅面（A0~A4，默认 A3）\n- `scale`：比例（默认 1:100）\n- `output_format`：输出格式（svg / pdf / both，默认 both）\n\n## 所需工具\n\n- `file_write` — 写入 SVG/PDF 文件\n- `command_exec` — 执行 Node.js 脚本\n\n## 环境依赖\n\n- Node.js ≥ 18.x\n- npm 包：`makerjs`（程序化绘图）、`pdfkit`（PDF 生成）\n- 安装命令：`npm install makerjs pdfkit`\n\n## 注意事项\n\n1. 本 Skill 生成的图纸为**方案级**图纸，不可直接用于施工。\n2. 所有尺寸标注单位为毫米（mm），符合国标规定。\n3. 图纸输出路径默认为 `./output/` 目录。\n4. 图纸数据以 JSON 格式结构化存储，方便二次处理。"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn70tg2gq9dps1hzxceqvfarw986p1e8\",\n  \"slug\": \"gb-arch-cad-gen\",\n  \"version\": \"1.0.0\",\n  \"publishedAt\": 1779856441729\n}"},{"path":"scripts/main.js/document.md","content":"#!/usr/bin/env node\n/**\n * OpenClaw Skill: arch-cad-generator\n * 中国规范 CAD 图纸生成器 - 核心绘制引擎\n *\n * 使用 makerjs（Photon 前身）进行程序化绘图，输出 SVG + PDF。\n * 严格遵循 GB/T 50104-2010《建筑制图标准》及 GB/T 50001-2017《房屋建筑制图统一标准》。\n */\n\nconst makerjs = require('makerjs');\nconst fs = require('fs');\nconst path = require('path');\n\n// ============================================================\n// 一、规范常量定义\n// ============================================================\n\n/** GB/T 50001-2017 图纸幅面 (mm) */\nconst PAPER_SIZES = {\n  A0: [1189, 841],\n  A1: [841, 594],\n  A2: [594, 420],\n  A3: [420, 297],\n  A4: [297, 210],\n};\n\n/** GB/T 50104-2010 线宽组 (mm), 以 b=1.0 为基准 */\nconst LINE_WEIGHTS = {\n  BOLD:      1.0,   // b — 粗实线：剖切到的墙体轮廓\n  MEDIUM:    0.5,   // 0.5b — 中实线：可见轮廓\n  THIN:      0.25,  // 0.25b — 细实线：尺寸线、轴线\n};\n\n/** GB 55038-2025 + GB 50096-2011 关键尺寸 (mm) */\nconst REGULATIONS = {\n  MIN_STOREY_HEIGHT:       3000,   // 住宅层高 ≥ 3.0m (GB 55038-2025)\n  MIN_BEDROOM_AREA_SQ:     9.0,    // 双人卧室 ≥ 9㎡ (GB 50096-2011)\n  MIN_LIVING_AREA_SQ:      10.0,   // 起居室 ≥ 10㎡ (GB 50096-2011)\n  MIN_KITCHEN_AREA_SQ:     4.0,    // 厨房 ≥ 4㎡ (GB 50096-2011)\n  MIN_BATHROOM_AREA_SQ:    2.5,    // 卫生间 ≥ 2.5㎡ (GB 50096-2011)\n  MAIN_DOOR_WIDTH:         900,    // 户门净宽 ≥ 0.90m (GB 55038-2025)\n  BEDROOM_DOOR_WIDTH:      800,    // 卧室门 ≥ 0.80m\n  BATH_DOOR_WIDTH:         700,    // 卫生间门 ≥ 0.70m\n  CORRIDOR_WIDTH:          1200,   // 走廊净宽 ≥ 1.20m\n  WALL_THICKNESS_OUTER:    240,    // 外墙厚度\n  WALL_THICKNESS_INNER:    120,    // 内墙厚度\n};\n\n/** GB/T 50104-2010 图层名称 */\nconst LAYERS = {\n  WALL:  'A-WALL',\n  DOOR:  'A-DOOR',\n  DIMS:  'A-DIMS',\n  AXIS:  'A-AXIS',\n  TEXT:  'A-TEXT',\n  TTLB:  'A-TTLB',\n  FURN:  'A-FURN',\n};\n\n// ============================================================\n// 二、规范校验模块\n// ============================================================\n\n/**\n * 校验设计参数是否符合强制性规范\n * @param {Object} design - 用户设计参数\n * @returns {{ valid: boolean, violations: string[] }}\n */\nfunction validateDesign(design) {\n  const violations = [];\n  const { rooms, storey_height } = design;\n\n  if (storey_height && storey_height < REGULATIONS.MIN_STOREY_HEIGHT) {\n    violations.push(\n      `[GB 55038-2025] 层高 ${storey_height}mm < 最低要求 ${REGULATIONS.MIN_STOREY_HEIGHT}mm`\n    );\n  }\n\n  for (const room of rooms || []) {\n    const area = (room.width * room.height) / 1_000_000; // mm² → m²\n    switch (room.type) {\n      case 'bedroom':\n        if (area < REGULATIONS.MIN_BEDROOM_AREA_SQ) {\n          violations.push(\n            `[GB 50096-2011] \"${room.name}\" 面积 ${area.toFixed(1)}㎡ < 最小 ${REGULATIONS.MIN_BEDROOM_AREA_SQ}㎡`\n          );\n        }\n        break;\n      case 'living':\n        if (area < REGULATIONS.MIN_LIVING_AREA_SQ) {\n          violations.push(\n            `[GB 50096-2011] \"${room.name}\" 面积 ${area.toFixed(1)}㎡ < 最小 ${REGULATIONS.MIN_LIVING_AREA_SQ}㎡`\n          );\n        }\n        break;\n      case 'kitchen':\n        if (area < REGULATIONS.MIN_KITCHEN_AREA_SQ) {\n          violations.push(\n            `[GB 50096-2011] \"${room.name}\" 面积 ${area"},{"path":"package.json/document.md","content":"{\n  \"name\": \"openclaw-skill-arch-cad-generator\",\n  \"version\": \"1.0.0\",\n  \"description\": \"OpenClaw Skill: 中国规范 CAD 图纸生成器\",\n  \"main\": \"scripts/main.js\",\n  \"scripts\": {\n    \"draw\": \"node scripts/main.js\"\n  },\n  \"dependencies\": {\n    \"makerjs\": \"^0.18.1\"\n  },\n  \"keywords\": [\"openclaw\", \"skill\", \"cad\", \"architecture\", \"china-standard\"],\n  \"license\": \"MIT\"\n}"},{"path":"skill-card.md","content":"## Description:\n\nGb Arch Cad Gen helps agents generate conceptual CAD floor-plan drawings aligned with cited Chinese architectural drafting standards, exporting SVG and PDF files without AutoCAD.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[wongeven](https://clawhub.ai/user/wongeven)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nDevelopers, architects, and design automation users can use this skill to generate parameterized residential plan drawings, title blocks, dimensions, and local SVG/PDF outputs for early-stage design review. The outputs should be treated as conceptual drafts and reviewed by qualified professionals before any construction or compliance use.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Generated CAD drawings may be incomplete, approximate, or unsuitable for construction, permitting, structural, MEP, fire-safety, or accessibility decisions.\n\nMitigation: Use the drawings only as conceptual drafts and require review by qualified architects, engineers, and code specialists before relying on them.\n\nRisk: Running the skill can install npm packages and write SVG/PDF outputs to the local filesystem.\n\nMitigation: Review dependency versions, run in a controlled workspace, and inspect generated files before moving them into sensitive project environments.\n\nRisk: The skill cites Chinese architectural standards, but automated checks may not prove full legal or project-specific compliance.\n\nMitigation: Treat built-in standard checks as preliminary screening and verify all applicable regulatory requirements against authoritative project documentation.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/wongeven/skills/gb-arch-cad-gen)\n- [Skill definition](artifact/SKILL.md)\n- [Package manifest](artifact/package.json/document.md)\n- [Drawing engine source](artifact/scripts/main.js/document.md)\n\n## Skill Output:\n\n**Output Type(s):** [Files, Code, Shell commands, Guidance]\n\n**Output Format:** [SVG and PDF drawing files with optional JSON design data and Markdown or shell guidance]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Writes generated drawings locally under ./output; generated drawings are conceptual drafts and require professional review.]\n\n## Skill Version(s):\n\n1.0.0 (source: server release, SKILL.md frontmatter, package.json/document.md, _skillhub_meta.json)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment."}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":"程序化生成符合中国建筑设计规范的 CAD 图纸（平面图）。 严格遵循 GB/T 50104-2010《建筑制图标准》、 GB/T 50001-2017《房屋建筑制图统一标准》、 GB 55038-2025《住宅项目规范》（强制性）等相关国标。 支持输出 SVG 和 PDF 格式，不依赖 AutoCAD。 Skill: Gb Arch Cad Gen Owner: wongeven Summary: 程序化生成符合中国建筑设计规范的 CAD 图纸（平面图）。 严格遵循 GB/T 50104-2010《建筑制图标准》、 GB/T 50001-2017《房屋建筑制图统一标准》、 GB 55038-2025《住宅项目规范》（强制性）等相关国标。 支持输出 SVG 和 PDF 格式，不依赖 AutoCAD。 Tags: latest:1.0.0 Version history: v1.0.0 | 2026-05-27T04:34:01.729Z | auto - 首次发布：支持程序化生成符合中国建筑设计规范的 CAD 平面图。 - 遵循 GB/T 50104、GB/T 50001、GB 55038 等多项建筑制图与住宅规范。 - 支持输出 SVG 和 PDF 格式，完全独立于 AutoCAD。 - 涵盖图纸布局、标准图框、标题栏、尺寸标注","editorialQuality":{"score":100,"threshold":65,"status":"ready","wordCount":1287,"uniquenessScore":46,"reasons":[]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-12T00:11:09.701Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-12T00:11:09.701Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-12T19:29:02.416Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}