Skip to content

Guide · Agent skill

How to use the 3D Cloth Material agent skill

Updated · written with AI from the project's own documentation and checked against our catalogue data

The 3D Cloth Material skill is a set of instructions that teaches an AI coding agent how to build convincing woven fabric in Three.js, the JavaScript 3D library for web pages. It covers linen, silk, wool, canvas, curtains and similar drapes. This guide explains what the skill changes, how to install it, how to ask for it in plain language, and what to check before you rely on the output.

3D Cloth MaterialMengTo/Skills · MIT

Quick start

  1. 1Download and unzip. Download the skill ZIP from this page and unzip it so the folder contains SKILL.md and demo.html.
  2. 2Place the folder. Move the unzipped folder into ~/.claude/skills/ for personal use, or into a project's .claude/skills/ folder.
  3. 3Or upload in the Claude apps. In the Claude apps, open Settings → Capabilities → Skills and upload the ZIP.
  4. 4Make a specific request. Describe the fabric, the scene and the problem, for example a silk banner in a dark room or a stretched linen texture.
  5. 5Open the reference demo. Open demo.html in a WebGL browser to compare the result with the intended look.
  6. 6Review the output. Check the weave in a close-up, the fold shading, the hem thickness and that the texture does not stretch when the cloth moves.

What an agent skill is and what this one does

An agent skill is a folder with a SKILL.md file that an AI agent loads when a request matches the skill's description. Once installed, the agent follows the skill's rules instead of guessing from general knowledge.

This skill tells the agent how to make cloth look like cloth rather than a plastic sheet or a flat coloured plane. It describes a thread-level weave texture, sheen and anisotropic highlights, folds that do not stretch the texture, hems with thickness, stitches, seams, frayed raw edges, fold occlusion, dye and wear variation, and light passing through thin fabric.

It is a rendering guide, not a physics simulation. It does not make cloth fall, flap or collide with objects. For that you need a separate simulation step, and the skill says to keep its material rules after simulating.

  • Requires Three.js r169 and a browser with WebGL.
  • Targets a vanilla JavaScript environment for the demo.
  • The skill is for Three.js only; other 3D pipelines or game engines are outside its rules.
  • Gives code guidance, not finished 3D models or textures.

Install the 3d-cloth-material skill

Download the ZIP for the skill from this page and unzip it. The folder contains agents/openai.yaml, demo.html, PROMPT.md and SKILL.md.

For a personal install, unzip the skill into ~/.claude/skills/. To limit it to one project, unzip it into that project's .claude/skills/ folder instead.

In the Claude apps you can instead upload the ZIP under Settings → Capabilities → Skills.

  • Personal: ~/.claude/skills/ (available across your projects).
  • Project: .claude/skills/ inside the project folder.
  • Claude apps: Settings → Capabilities → Skills, then upload the ZIP.

Trigger the skill with a natural request

You do not need a special command. Name the skill with a dollar sign, as the included prompts do, or describe the fabric problem directly. The description lists triggers such as linen, silk, wool, canvas, curtains, banners, cloaks, tablecloths and tapestries, plus symptoms such as a plastic sheet or a stretched texture.

Be specific about the fabric and the symptom. The more context you give about the scene, the better the agent can choose a weave and edge treatment.

  • Use $3d-cloth-material to make this cloth read as woven linen, not a plastic sheet.
  • Use $3d-cloth-material for a silk banner in a dark room with a lit paper window behind it.
  • Use $3d-cloth-material to add a heavy wool blanket with a twill weave, a stitched seam and a raw fringe.
  • Use $3d-cloth-material to fix a stretched, blurry fabric texture on a draped model.

Choose a fabric: linen, silk or wool

The skill includes a constants table that sets a weave, thread count, pitch, sheen, roughness and edge treatment for each fabric. Linen uses a plain weave with a raw fray edge. Silk uses a 5-harness satin with a 3.5 cm hem. Wool uses a twill with a 5 cm hem.

You can ask the agent to pick the fabric or to follow a named one. The table values are starting points taken from the skill, and you can adjust them in your own scene.

  • Linen: plain weave, 1.6 mm pitch, roughness 0.90, sheen 0.55, raw fray 3 cm.
  • Silk: 5-harness satin, 0.7 mm pitch, roughness 0.36, sheen 0.5, hem 3.5 cm.
  • Wool: twill, 2.6 mm pitch, roughness 0.96, sheen 1.0, hem 5 cm.

Check the result in the reference demo

The skill ships with demo.html, which the skill calls the reference. Open it in a WebGL-capable browser to see the intended look before asking the agent to adapt it.

When the agent edits your scene, check that the weave stays fixed to the cloth as it moves, that folds do not show black slits, and that the hem has visible thickness in a close-up.

  • Open demo.html in a browser that supports WebGL.
  • Look at a close-up for weave, hem thickness and stitching.
  • Move or wind the cloth to confirm the weave does not crawl.

What people use it for

  • Making a linen tablecloth or curtain in a Three.js product or interior scene look like woven fabric.
  • Adding a silk banner that glows where light passes through thin cloth.
  • Adding a wool blanket with a twill weave, a stitched seam and a raw fringe.
  • Fixing a stretched or blurry fabric texture on a draped model by rebuilding uv coordinates in rest metres.
  • Creating a fabric material for a WebGL fashion or design demo where the reasoning behind the settings matters.

Frequently asked questions

Is the 3d-cloth-material skill free to use?

The source lists the licence as MIT. Check the licence file in the skill's repository for the full terms before you reuse code in a commercial project.

Does this skill simulate cloth movement?

No. The skill states it is not a cloth simulation. For a flowing cape or a flag that must collide with objects, you need a separate simulation step, then you can apply the skill's material rules to the baked result.

What do I need to run the demo?

You need Three.js r169, a vanilla JavaScript environment and a browser that supports WebGL. The skill does not run scripts or use the network.

Where do I put the skill so my agent finds it?

Unzip it into ~/.claude/skills/ for personal use or into a project's .claude/skills/ folder. In the Claude apps, upload the ZIP under Settings → Capabilities → Skills.

Can I use this skill with Unity or Blender?

Not for the rendering rules. The skill is specific to Three.js r169 and GLSL shader hooks, so it does not target game engines or other non-web pipelines. For Blender cloth, the skill mentions simulating and baking, but its material rules are written for Three.js.

Why does my cloth look stretched or plastic after using the skill?

The skill's guidance says folds must keep the texture in rest metres, and that a height-based fold stretches the weave. Check that uv is not rebuilt from the moving surface and that folds do not exceed the angle limit described in the skill. Open demo.html to compare.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Use this skill if you build woven fabric in Three.js and want the reasoning behind the weave, fold, sheen and hem settings. Skip it if you need real cloth physics, a non-Three.js engine, or a ready-made 3D asset.

Download the skill