Community图像github.com

drawing-review

施工图 PDF 针对性审查并生成审查报告。先在本机抽取 PDF 文字层、剔除图签并把单位/人名/工程名称等脱敏,再按审图清单逐项找能用原文证明的问题(说明内部参数矛盾、构件与配筋前后不一致、图纸与计算书/勘察报告参数对应、计算书算式复算、规范/图集引用版本、混凝土最低强度等级、说明编号、文字错误等),用脚本核验每条引文能逐字回到原图位置、核对对象对应关系并独立复算,最后输出带定位、证据分级和未覆盖范围的 Markdown 审查报告。模型能看图时可选用本机遮盖后的页面图辅助判断标注归属;不能看图时用文字坐标完成同样流程。用户提到审图、图纸审查、施工图自查、校审、设计说明核对、计算书核对、出图前检查、生成审查报告时使用。Use for Chinese construction drawing review / 审图 reports.

drawing-review 是什么?

drawing-review is a Claude Code agent skill that 施工图 PDF 针对性审查并生成审查报告。先在本机抽取 PDF 文字层、剔除图签并把单位/人名/工程名称等脱敏,再按审图清单逐项找能用原文证明的问题(说明内部参数矛盾、构件与配筋前后不一致、图纸与计算书/勘察报告参数对应、计算书算式复算、规范/图集引用版本、混凝土最低强度等级、说明编号、文字错误等),用脚本核验每条引文能逐字回到原图位置、核对对象对应关系并独立复算,最后输出带定位、证据分级和未覆盖范围的 Markdown 审查报告。模型能看图时可选用本机遮盖后的页面图辅助判断标注归属;不能看图时用文字坐标完成同样流程。用户提到审图、图纸审查、施工图自查、校审、设计说明核对、计算书核对、出图前检查、生成审查报告时使用。Use for Chinese construction drawing review / 审图 reports.

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/qiushanyueyue/drawing-review-skill/tree/HEAD/drawing-review

Installed? Explore more 图像 skills: steipete/songsee, affaan-m/frontend-design, mattpocock/improve-codebase-architecture · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

Construction Drawing Review (drawing-review)

Delegates the entire review process—drag in drawings → automatic parsing → checklist-based review → results traceable to original drawings → human confirmation—to you. The output is a candidate issue list for designers to verify, not a formal review opinion or compliance conclusion.

Non-Negotiable Rules

  1. Do not review or disclose title blocks or identity information. Title blocks (design/check/review/approval signature areas, design unit, construction unit, project name, date, issuance stamp, registration stamp, certificate numbers, phone numbers) are desensitized data and are outside the review scope. Do not report issues like "incomplete signatures," "incorrect unit name format," or "title block date."
  2. Do not open original drawings directly. Only read extract-generated review_input.md / blocks.jsonl / coverage.json; in image mode, only view images listed in images.json that have been locally masked. mapping.local.json contains original-to-masked references—never read, reference, or upload it. Retain placeholders (e.g., [Unit1]) in reports; do not attempt to reconstruct them.
  3. Only report issues provable with original drawing text. Each issue must have at least one verbatim quotation + block ID (e.g., F1-P3-B12). Do not report issues that cannot be proven from the provided text; "adjacent text" caused by PDF extraction order does not imply the same component.
  4. Object correspondence must be provable. Before comparing two pieces of text, confirm they refer to the same component/section/location/condition (same ID and clear floor area, explicit detail reference, same clause context). Cross-page or cross-file comparisons must include object_match: "explicit" and explain the basis in basis; if only inferred, write inferred—the script will downgrade it to "needs supplementary conditions."
  5. Standard-based conclusions must have a verifiable basis. Do not assert "the standard should be X" from memory or fabricate clause numbers. Only rules in references/verified-rules.md can yield "below standard" conclusions; all other standard references must be written as "clause to be verified" or needs_context. Check whether a standard is current from online official sources; if not found, write "unverified."
  6. Let the script do the math. When recalculating calculation book expressions, rebar areas, or reinforcement ratios, use the calc command or write calculation in findings—do not calculate mentally; if parameters are missing, write needs_context and never fill in missing parameters yourself.
  7. Image reading is only supplementary. If dimensions or reinforcement read from images cannot be corroborated in the text layer, they can only be "needs supplementary conditions" and must note "requires original drawing verification"; do not fabricate unreadable diameters, spacings, or counts.
  8. Quality over quantity. Value lies in few, accurate issues; merge multiple occurrences of the same issue into one entry, listing all positions. "No issues found" only means none were detected within the current checklist items and readable range—do not write "review passed/compliant."

Workflow

Step 0: Confirm Scope and Mode (one or two sentences, don't make the user fill out a form)

  • If the user gave a focus area (e.g., "check only waterproofing," "mainly check beam reinforcement," "if this section corresponds with the calculation book"), follow that focus; if not, follow all check items in references/review-checklist.md.
  • If the discipline is unclear, do not guess—mark it as "discipline unknown" and perform only general checks. For applicable local standards, ask the user directly for the province; project names are already desensitized—do not infer from placeholders.
  • Choose mode:
    • Text mode (default, usable by any model): Read only the text layer, determine annotation attribution using block coordinates and near.
    • Image mode (optional): Only if you can truly view images and the user explicitly agrees to share the locally masked page images with the current model. After Step 1 ends, if there are pages that are "graphics-heavy" or the user wants to check reinforcement/dimensions, ask with one sentence: "These pages are mainly graphics—do you want me to show you the masked (title blocks and sensitive info removed) page images to help determine annotation placement?" If you cannot view images, skip this and use text mode.

Step 1: Local Extraction and Desensitization

pip install pdfplumber              # First time; within China, add -i https://pypi.tuna.tsinghua.edu.cn/simple
python scripts/drawing_review.py extract <drawing1.pdf> [calculation_book.pdf survey_report.pdf ...] --out review_pack [--extra-terms sensitive_words.txt]
  • Only supports PDFs (must have a text layer; CAD-exported vector PDFs are best). If the user provides DWG/DXF, ask them to export as PDF from CAD. Scanned pages or pages where fonts cannot be decoded are marked as "not reviewed"—do not OCR or guess content yourself.
  • Multiple files are extracted together; block IDs automatically include a file number (F1, F2…), so cross-file comparisons are unambiguous; coverage.json contains the SHA-256 hash and inferred type (drawing/calculation book/survey report) for each file.
  • --extra-terms: User-specified sensitive words (project abbreviations, place names, person names), one per line.
  • First, tell the user: total pages, how many reviewed / mainly graphical (few text characters) / not reviewed, how many title block texts removed, how many sensitive items replaced; also mention any "title block detection tips" or "suspected residual names."

Step 2: Read Review Materials and Apply Checklist

Read review_pack/review_input.md (if too long, read page by page) and references/review-checklist.md; read references/verified-rules.md when necessary.

  • Go through the checklist item by item; each batch of pages usually yields 0–2 truly confident issues.
  • Design specification pages: Check C1–C9. Simultaneously extract key parameters (object + parameter + value + citation) for cross-page and cross-file comparisons (C8, C12, C13).
  • Drawing pages (reinforcement plans, section views, plan views): Short annotations include @x,y coordinates. To determine which component an annotation belongs to, run: python scripts/drawing_review.py near --pack review_pack --block F1-P3-B12 (lists surrounding text, direction, distance) or near --page F1-P3 --region x0,y0,x1,y1 to list text within a region. Proximity does not imply association; if attribution is unclear, do not compare.
  • Calculation book: Recalculate expressions and results using python scripts/drawing_review.py calc "expression" (supports As(d,n), As_s(d,s), rho(As,b,h0), sqrt, sind, etc.); report only transcription, substitution, or arithmetic errors (C14)—do not evaluate the selection of the calculation model.
  • Image mode (when agreed in Step 0):
    1. python scripts/drawing_review.py render <same PDFs ...> --pack review_pack [--pages F1-P3,F1-P5]; check the full-page images listed in images.json (black blocks are masks, blue grid numbers are page coordinates).
    2. When details are needed: python scripts/drawing_review.py zoom <PDF> --pack review_pack --page F1-P3 --region x0,y0,x1,y1 (coordinates read from grid numbers); the output lists text blocks in that region for easy reference.
    3. Use image viewing to determine annotation, cut marker, and reference-to-component correspondences; conclusions still cite text blocks. Image evidence is written into visual_evidence (page, region coordinates, text read).
    4. Scanned pages and garbled pages are not rendered by default; do not add --allow-unmasked-pages unless the user explicitly agrees and understands these pages only receive conservative perimeter masking.
  • Save each candidate issue as the JSON structure defined in references/report-format.md into review_pack/findings.json (include check_method, object, object_match; recalculations include calculation).

Step 3: Self-Refutation Cross-check (Mandatory)

For each candidate issue, act as a strict reviewer and try to overturn it: Is it due to extraction order misalignment? Are the two parts actually from different sections/conditions/construction phases? Can the two items be confirmed as the same object? Is it an industry-standard wording? Does it rely on external knowledge to be valid? Was the recalculation done with parameters not in the drawing? If uncertain, delete or downgrade to needs_context. In the JSON, record basis (judgment basis) and uncertainties (conditions unable to confirm).

Step 4: Verify and Generate Report

python scripts/drawing_review.py verify --pack review_pack --findings review_pack/findings.json
python scripts/drawing_review.py evidence <same PDFs ...> --pack review_pack     # Optional: generate masked original drawing screenshots for each issue
python scripts/drawing_review.py report --pack review_pack --title "XX Review Report (AI-Assisted Self-Check)"
  • verify assigns evidence grades to each issue: E1 Whether citations occur verbatim in the specified block (or subsequent contiguous blocks); E2 Whether cross-page/cross-file comparisons declare and explain object correspondence; E3 Whether recalculation confirms a numerical inconsistency. If citations are found only on different pages/files, the locational match fails (relocated_candidate) and the issue is downgraded to "leads for further investigation"; if object correspondence is unconfirmed and relies only on visual reading, downgrade to "needs supplementary conditions"; if recalculation matches the file, downgrade to a lead.
  • If many downgrades occur, go back to Step 2, check citations, block IDs, and object correspondences, correct, and rerun; do not rewrite or fabricate citations just to pass verification.
  • evidence only generates screenshots locally, with red boxes marking evidence locations and black boxes as masks; in text mode, these images need not be viewed.
  • report generates review_pack/ReviewReport.md. Convert to Word/PDF from this basis without adding or removing conclusions.

Step 5: Report to User

In 3–6 lines, tell the user: number of suspected issues (list the most important 1–3 titles and locations), number needing supplementary conditions, which pages/contents were not reviewed, whether image mode was used, and the report file path. Remind the user that all issues in the report must be confirmed one by one. After the user confirms or dismisses an issue, maintain the user's decision (review_status) in subsequent re-reviews—do not overwrite it.

Re-review (Revision Check)

When the user provides updated drawings: re-run extract into a new directory (if SHA-256 differs, it's a new version); after reviewing, compare with the previous verified.json. If an issue existed in the previous version but not in the current one, write "not present in this version" (could be fixed or not detected due to recognition differences)—do not say "fixed." Issues user has previously dismissed should remain dismissed.

Reference Files

  • references/review-checklist.md: Review check items (C1–C15, including drawing geometry, reinforcement, calculation book and survey report parameter correspondence, expression recalculation, construction phase), discipline-specific focus areas, and content not to report.
  • references/verified-rules.md: Verified and usable standard rules (minimum concrete strength grade, etc.) and verified standard substitutions.
  • references/desensitization.md: Desensitization scope, placeholder meanings, title block detection, and image masking methods and limitations.
  • references/report-format.md: findings.json fields, conclusion grades, evidence grades, and report structure.

相关技能