# Send Mechanics Sketches to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "mechanics-sketches",
    "name": "Mechanics Sketches",
    "source": "tencent",
    "type": "skill",
    "category": "AI 智能",
    "sourceUrl": "https://clawhub.ai/MatthiasHBusch/mechanics-sketches",
    "canonicalUrl": "https://clawhub.ai/MatthiasHBusch/mechanics-sketches",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/mechanics-sketches",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=mechanics-sketches",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "CHANGELOG.md",
      "references/api_reference.md",
      "scripts/generate_sketch.py",
      "SKILL.md"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/mechanics-sketches"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/mechanics-sketches",
    "downloadUrl": "https://openagent3.xyz/downloads/mechanics-sketches",
    "agentUrl": "https://openagent3.xyz/skills/mechanics-sketches/agent",
    "manifestUrl": "https://openagent3.xyz/skills/mechanics-sketches/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/mechanics-sketches/agent.md"
  }
}
```
## Documentation

### MechanicsSketches Skill

You can generate engineering mechanics sketches programmatically using the MechanicsSketches Python library.

### Setup

Install the library via pip:

pip install git+https://github.com/MatthiasHBusch/MechanicsSketches.git

Or install dependencies manually and add to PYTHONPATH:

pip install matplotlib PyQt5
export PYTHONPATH="/path/to/parent/of/MechanicsSketches:$PYTHONPATH"

### Quick Start — Writing a Script

Create a Python script that builds a sketch and renders it:

from MechanicsSketches import *
import os

sketch = create_sketch("My Sketch")
S = 30.0  # Scale factor (recommended: 20-40)

# Add components
add_beam(sketch, ax=0, ay=0, bx=10*S, by=0, scale_factor=S)
add_pinned_support(sketch, cx=0, cy=0, angle_deg=0, scale_factor=S)
add_roller_support(sketch, cx=10*S, cy=0, angle_deg=0, scale_factor=S)
add_force(sketch, cx=5*S, cy=0, angle_deg=0, scale_factor=S, annotation=r"$F$")

# Render
script_dir = os.path.dirname(os.path.abspath(__file__))
render(sketch, filename=os.path.join(script_dir, "output.pdf"), dpi=300)

Then run: python my_sketch.py

### Quick Start — Using the Helper Script

Alternatively, use the bundled helper to render from JSON:

python scripts/generate_sketch.py input.json output.pdf

### Scale Factor (S)

All positions and sizes should be multiples of S (typically 30.0). This keeps proportions consistent across components.

### Angle Convention

angle_deg=0 → default orientation (upward for supports/forces, horizontal for dimensions)
Angles rotate counterclockwise in degrees

### Available Components

FunctionDescriptionKey Parametersadd_beam(sketch, ax, ay, bx, by, scale_factor)Rectangular beam A→BEndpoints, scaleadd_truss(sketch, ax, ay, bx, by, scale_factor)Line member A→BEndpoints, scaleadd_pinned_support(sketch, cx, cy, angle_deg, scale_factor)Fixed-position support (triangle)Center, angle, scaleadd_roller_support(sketch, cx, cy, angle_deg, scale_factor)Sliding supportCenter, angle, scaleadd_fixed_support(sketch, cx, cy, angle_deg, scale_factor)Clamped wall supportCenter, angle, scaleadd_hinge(sketch, cx, cy, scale_factor)Joint circleCenter, scaleadd_force(sketch, cx, cy, angle_deg, scale_factor, annotation, ...)Force arrowCenter, angle, scale, labeladd_moment(sketch, cx, cy, angle_deg, scale_factor, annotation, ...)Curved moment arrowCenter, angle, scale, labeladd_dimension_arrow(sketch, cx, cy, length, angle_deg, scale_factor, annotation, ...)Double-headed dimensionCenter, length, angle, scale, labeladd_dimension_thickness(sketch, cx, cy, thickness, angle_deg, scale_factor, annotation, ...)Inward dimension arrowsCenter, thickness, angle, scale, labeladd_coordinate_system(sketch, cx, cy, angle_deg, scale_factor, ax1, ax2, ax3, ...)x-y-z axesCenter, angle, scale, axis labelsadd_text(sketch, x, y, text, fontsize, name, rotation)Text annotationPosition, text, font size

### Annotation Parameters

Force, moment, and dimension functions accept:

annotation — LaTeX string (e.g., r"$F$", r"$M_A$")
fontsize_scale — relative font size (default 1.0)
offsetx, offsety — label position offset
rotate_annotation — rotate label with component (default False)

### Primitives

For custom shapes, use:

make_line(x0, y0, x1, y1, linewidth, layer, edgecolor)
make_circle(x, y, r, linewidth, layer, facecolor, edgecolor)
make_polygon(points, linewidth, layer, facecolor, edgecolor)
make_arc(x, y, width, height, theta1, theta2, angle, linewidth, layer)
make_text(x, y, text, fontsize, layer, color, ha, va, rotation)
make_rectangle(x0, y0, x1, y1, ...)

Add to sketch via add_to_sketch(sketch, primitive).

### Transformations

translate(obj, dx, dy) — move by offset
rotate(obj, cx, cy, angle_deg) — rotate around point
scale(obj, cx, cy, factor) — scale from center

All return new objects (non-destructive). Can be chained.

### Rendering

render(sketch, filename="output.pdf", dpi=300)  # Qt renderer (default, recommended)
mpl_render(sketch, filename="output.pdf")        # Matplotlib fallback (deprecated, text scaling issues)

Supported formats: .pdf, .png, .jpg, .svg

### Tips for the Agent

Always define S = 30.0 as the scale factor
Place beams first, then supports at endpoints, then loads
Use LaTeX for annotations: r"$F$", r"$M_0$", r"$\\ell$"
For detailed API signatures, see references/api_reference.md
The render() function requires a filename — it does not display interactively
Do not use mpl_render() — it is deprecated due to text scaling issues. Always use render().

### External Endpoints

This skill makes no network requests. All processing is done locally.

### Security & Privacy

No data leaves your machine. The skill only reads local JSON files and writes local image/PDF output.
No API keys or credentials are required.
No telemetry or analytics.
The helper script (scripts/generate_sketch.py) only reads the input file specified by the user and writes to the specified output path.

### Trust Statement

This skill is developed and maintained by MatthiasHBusch. The source code is fully open under the MIT license. All functionality runs locally with no external dependencies beyond standard Python packages (matplotlib, PyQt5).
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: MatthiasHBusch
- Version: 1.0.0
## Source health
- Status: healthy
- Source download looks usable.
- Yavira can redirect you to the upstream package for this source.
- Health scope: source
- Reason: direct_download_ok
- Checked at: 2026-04-30T16:55:25.780Z
- Expires at: 2026-05-07T16:55:25.780Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/mechanics-sketches)
- [Send to Agent page](https://openagent3.xyz/skills/mechanics-sketches/agent)
- [JSON manifest](https://openagent3.xyz/skills/mechanics-sketches/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/mechanics-sketches/agent.md)
- [Download page](https://openagent3.xyz/downloads/mechanics-sketches)