lightcad

lightcad is a skill for Claude Code, Codex from znlgis/opengis-skills. It costs 43 tokens per session (2,446 once invoked), scanned A, original, MIT.

A browser-based framework for adding lightweight 2D CAD drawing to web applications. It supports drawing commands, layers, snapping, annotations, blocks, and DXF file import and export.

In plain words
What is it for?
Embedding a 2D drawing area, creating lines, circles, arcs, and polylines, organizing drawings into layers, and exchanging drawings through DXF files.
Why use it?
It lets a web application provide basic drafting tools without requiring users to install a full desktop CAD program.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Embedding a 2D drawing area, creating lines, circles, arcs, and polylines, organizing drawings into layers, and exchanging drawings through DXF files.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/znlgis/opengis-skills/lightcad
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add znlgis/opengis-skills --skill lightcad
Clone the repo
git clone --depth 1 https://github.com/znlgis/opengis-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for lightcad

README.md
[![agentmods](https://agentmods.dev/badge/skills/znlgis/opengis-skills/lightcad/github.svg)](https://agentmods.dev/skills/znlgis/opengis-skills/lightcad)
Your own site
<a href="https://agentmods.dev/skills/znlgis/opengis-skills/lightcad"><img src="https://agentmods.dev/badge/skills/znlgis/opengis-skills/lightcad/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for lightcad

Your own site · 80×15
<a href="https://agentmods.dev/skills/znlgis/opengis-skills/lightcad"><img src="https://agentmods.dev/badge/skills/znlgis/opengis-skills/lightcad.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,446 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00043 $0.02446
Opus 5 $0.00022 $0.01223
Sonnet 5 $0.00009 $0.00489
Haiku 4.5 $0.00004 $0.00245

Measured yesterday against content hash 9202d870e129, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

lightcad scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

cad/lightcad/SKILL.md · 252 lines

How it starts

The opening of the file, as written. The whole thing — 252 lines — stays where its author put it; the contents beside it link to each section on GitHub.

项目地址: 原仓库 github.com/light-CAD/lightcad 已404,请以 znlgis.github.io 为准

官网/演示: https://lightcad.cn/

许可证: MIT / Apache-2.0(视仓库声明)

概述

LightCAD 主要特性:

  • 纯前端 CAD:HTML5 Canvas / WebGL 渲染,无插件
  • AutoCAD 风格命令行:line / circle / pline / trim / mirror …
  • DXF 互通:导入导出 DXF(基于 dxf-parser/dxf-writer)
  • 图层 / 块 / 标注 / 文字
  • 可嵌入:iframe 或 Web Component
  • 二次开发 API:JS/TS 对应实体、命令、事件、UI

该项目处于活跃迭代阶段,下文以通用 Web CAD 二次开发为视角,如细节差异请以仓库 README 与 znlgis 教程为准。


安装与试用

在线试用

直接打开 https://lightcad.cn/ 体验。

嵌入 iframe

<iframe src="https://lightcad.cn/" style="width:100%;height:100vh;border:0"></iframe>

嵌入到自有应用(SDK)

<div id="cad" style="width:100%;height:100vh"></div>
<script type="module">
  // ⚠ npm 包可能已不可用,请以 znlgis 文档为准
  import { LightCAD } from '@lightcad/sdk';

  const app = new LightCAD({
    container: '#cad',
    locale: 'zh-CN'
  });
  await app.init();

  // 直接执行命令
  app.exec('line 0,0 100,100');
</script>

命令行用法(与 AutoCAD 类似)

命令 功能 示例
line / l 直线 line 0,0 100,0
circle / c c 50,50 r 20
pline / pl 多段线 pl 0,0 10,0 10,10
arc / a 圆弧(3点 / 起-中-终) a 0,0 10,10 20,0
rect / re 矩形 re 0,0 100,50
text 文字 text 0,0 "Hello"
dimlinear 线性标注
move/mv 平移
copy/cp 复制
mirror/mi 镜像
trim/tr 修剪
extend/ex 延伸
fillet/f 圆角 f 10 后选两条线
chamfer/cha 倒角

实体与图层(API)

// 添加实体
const id = app.add('LINE', { p1: [0,0], p2: [100,100] });
app.add('CIRCLE', { center: [50,50], radius: 20, layer: 'WALL' });

// 修改
app.update(id, { color: '#ff0000', lineWeight: 0.3 });

// 查询
const entities = app.query({ type: 'LINE', layer: 'WALL' });

// 删除
app.remove(id);

// 图层
app.layers.add('WALL', { color: '#0000ff', lineType: 'CONTINUOUS' });
app.layers.setCurrent('WALL');
app.layers.set('WALL', { visible: false });

Read the full file on GitHub · 252 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago Changed 1d04bf5ad3ba
  2. 11d ago First seen · 252 lines · 43 tokens per session scan A 9202d870e129

Subscribe to this mod's changes

lightcad is a skill published in the GitHub repository znlgis/opengis-skills (60 stars, last pushed 2d ago), licensed MIT. It adds 43 tokens to every session and 2,446 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

developing-genkit-js

Develop AI-powered applications using Genkit in Node.js/TypeScript. Use when the user asks about Genkit, AI agents, flows, or tools in JavaScript/TypeScript, or when encountering Genkit errors, validation issues, type errors, or API problems.

google/skills · 60 tokens

transformers-js

Use Transformers.js to run state-of-the-art machine learning models directly in JavaScript/TypeScript. Supports NLP (text classification, translation, summarization), computer vision (image classification, object detection), audio (speech recognition, audio classification), and multimodal tasks. Works in browsers and…

huggingface/skills · 89 tokens

ax-signature

This skill helps an LLM generate correct DSPy signature code using @ax-llm/ax. Use when the user asks about signatures, s(), f(), field types, string syntax, fluent builder API, validation constraints, or type-safe inputs/outputs.

ax-llm/ax · 57 tokens

ax-cpp-ai

Use when writing C++ code with axllm for named deployment profiles, generic provider clients, model selection, OpenAI-compatible calls, Responses, Gemini, Anthropic, routers, and balancers.

ax-llm/ax · 47 tokens

ax-cpp-gen

Use when writing C++ code with axllm for AxGen programs, forward calls, indexed multi-sampling, result pickers, streaming, tools, assertions, traces, usage, and output parsing.

ax-llm/ax · 48 tokens

ax-go-gen

Use when writing Go code with github.com/ax-llm/ax/packages/go for AxGen programs, forward calls, indexed multi-sampling, result pickers, streaming, tools, assertions, traces, usage, and output parsing.

ax-llm/ax · 54 tokens