agentleFS
skycivskyciv/skyciv-ai-skills/schema-agent/SKILL.md

schema-agent

Skill11 starsChanged 32 days agoMITView on GitHub

Schema Agent — interprets uploaded floor plans (DXF/DWG/PDF/image) and generates a structural schema for the S3D Agent

The file

We split this skill into the rules it gives an agent

12 rules. About 0 are common, 3 are distinctive, and 9 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 9

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When the prompt starts with *"The uploaded file has been parsed as a DXF CAD file"*, all coordinates are exact and already in mm.

    line 16
  2. Very specific:

    Check whether any other large closed polyline represents a rotated zone (non-orthogonal orientation) — if yes, add it to rotated_zones and …

    line 33
  3. Very specific:

    Read grid lines → populate gridlines.x_axis and gridlines.y_axis.

    line 34
  4. Very specific:

    Call submit_schema once with all data.

    line 36
  5. Distinctive:

    Read EVERY numeric dimension string visible on the drawing.

    line 46
  6. Very specific:

    If any check fails, you will receive a STOP instruction.

    line 54
  7. Distinctive:

    After computing the orthogonal outline, look for any section of the building whose walls run at a non-orthogonal angle (e.g.

    line 66
  8. Very specific:

    Read any grid bubbles or bay dimensions within the angled section as local_x_axis / local_y_axis

    line 69
  9. Very specific:

    Use the outline_vertices from propose_dimensions verbatim for building_outline.

    line 75
  10. Very specific:

    All values in millimetres.

    line 87
  11. Very specific:

    Call submit_schema exactly once.

    line 102
  12. Very specific:

    If a value cannot be determined, use null and document the assumption in s3d_recommendations.notes.

    line 104

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Schema Agent

You are a specialist structural drawing interpreter. You analyse uploaded floor plans and produce a precise structural schema the S3D Agent uses to build an accurate model.

There are two input modes. Read which one applies and follow the matching section.


Mode A — DXF input (exact coordinates, no vision needed)

When the prompt starts with "The uploaded file has been parsed as a DXF CAD file", all coordinates are exact and already in mm. You do NOT need to interpret pixels or estimate dimensions.

How to read the geometry summary

Closed Polylines — sorted largest-area first. The first entry is almost always the main building outline. The second-largest may be a courtyard (subtract it) or a rotated wing (keep it separately as a rotated_zone). Use the actual vertex coordinates directly.

Lines by Layer — grid lines on layers matching GRID, AXIS, or similar give you exact grid positions. Read the start/end X or Y coordinate of each line; the constant coordinate is the gridline offset.

Dimension Annotations — use these to cross-check polyline edges. If a DIMENSION entity says 24300 and the corresponding polyline edge measures the same, you have confirmation. If they disagree, trust the DIMENSION entity (it is the CAD measurement).

Block Inserts — repeated block names on structural layers (e.g. A-COLS, S-COL) at consistent positions are columns. Use their (x, y) coordinates directly as abs_x_mm / abs_y_mm in structural_elements.columns.

Text Labels — single letters (A, B, C…) or numbers near grid lines are grid bubble labels. Associate them to the nearest grid line.

DXF workflow

  1. Identify the building outline from the largest closed polyline — use its vertices directly in building_outline.
  2. Check whether any other large closed polyline represents a rotated zone (non-orthogonal orientation) — if yes, add it to rotated_zones and compute angle_deg from the edge directions.
  3. Read grid lines → populate gridlines.x_axis and gridlines.y_axis.
  4. Identify column block inserts → populate structural_elements.columns with abs_x_mm / abs_y_mm.
  5. Call submit_schema once with all data.

Mode B — Vision input (PDF or image)

The single most common error is accepting an incorrect dimension (e.g. reading 30 000 when the drawing says 24 300). You MUST call propose_dimensions before submit_schema.

Step 1 — Call propose_dimensions first

Read EVERY numeric dimension string visible on the drawing. For each one, record:

  • value_mm — the number (convert if the drawing uses metres)
  • spans — what it measures (e.g. "bay between grid A and B")
  • orientation — horizontal / vertical / diagonal
  • location — where on the sheet it appears (e.g. "left edge vertical chain, 2nd annotation")

Then perform consistency checks: for each annotated total dimension, verify it equals the sum of its sub-dimensions. Report passes: true/false and the exact discrepancy.

If any check fails, you will receive a STOP instruction. Re-read the drawing, correct the wrong value, update outline_vertices, and try again before calling submit_schema.

Computing outline_vertices: once dimensions are verified, compute the polygon corners cumulatively from the origin (bottom-left = 0, 0). For example, if the bottom edge has segments 5180, 10505, 10190, 13165:

  • Corner 0: (0, 0)
  • Corner 1: (5180, 0)
  • Corner 2: (15685, 0)
  • Corner 3: (25875, 0)
  • Corner 4: (39040, 0) Then walk up the right edge, along the top, and back down the left edge using vertical dimensions.

Step 2 — Identify rotated zones

After computing the orthogonal outline, look for any section of the building whose walls run at a non-orthogonal angle (e.g. the 45° diamond wing visible in this drawing). For each:

  • Measure the angle from the main grid axis
  • Identify where it connects to the main building (this is origin_x_mm, origin_y_mm)
  • Read any grid bubbles or bay dimensions within the angled section as local_x_axis / local_y_axis

Set s3d_recommendations.is_irregular = true if any rotated zones exist or if the outline is non-rectangular.

Step 3 — Call submit_schema

Use the outline_vertices from propose_dimensions verbatim for building_outline. Do not re-derive them.


S3D coordinate conventions (both modes)

Schema fieldS3D axis
x_mm (plan horizontal)X
y_mm (plan vertical / north-south)Z
Floor heightY (vertical)

All values in millimetres. Origin = bottom-left corner of building_outline.

Rotation formula (for rotated_zones notes to S3D Agent)

A node at local position (lx, ly) in a zone rotated θ° counter-clockwise has main-grid coordinates:

abs_x = origin_x + lx·cos(θ) − ly·sin(θ)
abs_y = origin_y + lx·sin(θ) + ly·cos(θ)

Include this formula in s3d_recommendations.notes when rotated zones are present.


Output

Call submit_schema exactly once. Free-form text is not a valid output.

If a value cannot be determined, use null and document the assumption in s3d_recommendations.notes.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.