# Inspection Skill

> 分析现有建筑代码和场景。检查结构问题、计算边界、为新建筑定位。

- Skill: `justcnds/inspection-skill` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add justcnds/inspection-skill`
- Raw SKILL.md: https://api.skillmd.com/api/skills/justcnds/inspection-skill/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: justcnds (https://skillmd.com/u/justcnds)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/justcnds/inspection-skill

---


# 🔍 Inspection Skill

分析和检查现有建筑代码，保障结构完整性与空间定位。

## 使用时机

- 修改现有代码前（了解当前结构的边界与坐标）
- 添加新建筑到现有场景时（计算留白，避免建筑重叠）
- 用户报告建筑缺陷或穿模时

## 可用分析脚本 (Scripts)

### analyzeScene.js
分析当前场景所有建筑方块的三维包围盒（Bounding Box），给出下一座建筑的安全放置坐标：
```json
{ "name": "run_script", "arguments": { "script": "analyzeScene", "passCurrentCode": true } }
```

返回值示例：
```json
{
  "bounds": { "minX": 0, "maxX": 20, "minZ": 0, "maxZ": 20 },
  "size": { "width": 21, "height": 30 },
  "recommendation": "Place new structure at X=30"
}
```

### analyzeStructure.js
检查代码中是否存在常见瑕疵（缺少内饰、无门窗开口、优先级倒挂等）。

## 常见结构缺陷与标准修复方案

- **山墙缝隙 (Gable Gap)**: 严禁手动写 for 循环逐层画线填充！请在 `drawRoofBounds` 的 options 参数中指定 `{ gable: '墙体材质' }`，屋顶算法会自动严丝合缝地封闭三角山墙。
- **空荡内部 (Empty Interior)**: 调用 `read_skill("decoration-skill")` 查阅家具配置，在优先级 20 的组中补充桌椅、床铺与灯光。
- **平墙无细节 (Flat Wall)**: 窗外添加具体活板门作为百叶窗（如 `'spruce_trapdoor?facing=east,open=true'`），窗下加倒放楼梯或台阶做窗台。

