ifoxcad

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

A .NET/C# framework for building plugins that extend AutoCAD and compatible CAD programs. It provides wrappers for drawing objects, layers, blocks, commands, geometry, and database transactions.

In plain words
What is it for?
Creating AutoCAD plugins that draw entities, manage layers and blocks, register commands, handle user selections, and transform coordinates.
Why use it?
It reduces the repetitive code needed to work safely with CAD databases and user commands.

Skill for Claude CodeCodex

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

Good fit Creating AutoCAD plugins that draw entities, manage layers and blocks, register commands, handle user selections, and transform coordinates.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/znlgis/opengis-skills/ifoxcad
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 ifoxcad
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 ifoxcad

README.md
[![agentmods](https://agentmods.dev/badge/skills/znlgis/opengis-skills/ifoxcad/github.svg)](https://agentmods.dev/skills/znlgis/opengis-skills/ifoxcad)
Your own site
<a href="https://agentmods.dev/skills/znlgis/opengis-skills/ifoxcad"><img src="https://agentmods.dev/badge/skills/znlgis/opengis-skills/ifoxcad/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 ifoxcad

Your own site · 80×15
<a href="https://agentmods.dev/skills/znlgis/opengis-skills/ifoxcad"><img src="https://agentmods.dev/badge/skills/znlgis/opengis-skills/ifoxcad.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,549 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.00044 $0.02549
Opus 5 $0.00022 $0.01274
Sonnet 5 $0.00009 $0.00510
Haiku 4.5 $0.00004 $0.00255

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

Security

Grade A, and why

ifoxcad 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 today.

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/ifoxcad/SKILL.md · 306 lines

How it starts

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

项目地址: https://gitee.com/inspirefunction/ifoxcad

GitHub 镜像: https://github.com/inspirefunction/ifoxcad

NuGet: IFoxCAD.Cad

许可证: LGPL-2.1

概述

IFoxCAD 通过统一的事务封装和大量扩展方法,让 AutoCAD .NET API 的开发体验大幅提升:

  • 统一事务using var tr = new DBTrans();
  • 链式扩展db.AddEntityToModelSpace(line, circle, ...)
  • 多 CAD 兼容:源码版宏控制 AutoCAD/ZWCAD/GstarCAD
  • 常用工具:选择集、用户交互、图层、块、文字、标注、坐标变换、几何
  • 依赖注入:内置 IoC 容器
  • 菜单与命令:声明式命令注册

安装

NuGet(推荐)

dotnet add package IFoxCAD.Cad

项目需引用对应 CAD 的 acdbmgdacmgdaccoremgd,并设置 Copy Local = false

项目模板

参考官方模板:https://gitee.com/inspirefunction/ifoxcad


项目骨架

using IFoxCAD.Cad;
using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.Geometry;
using Autodesk.AutoCAD.Runtime;

[assembly: ExtensionApplication(typeof(MyApp))]
[assembly: CommandClass(typeof(MyCommands))]

public class MyApp : IExtensionApplication
{
    public void Initialize() { /* 加载时执行 */ }
    public void Terminate()  { /* 卸载时执行 */ }
}

事务封装:DBTrans

[CommandMethod("DRAWLINE")]
public void DrawLine()
{
    using var tr = new DBTrans();           // 自动管理 Database/Transaction
    var line = new Line(Point3d.Origin, new Point3d(100, 100, 0));
    tr.CurrentSpace.AddEntity(line);        // 加入当前空间
    tr.Commit();
}

DBTrans 自动持有:

  • Database / Transaction
  • BlockTable / BlockTableRecord / LayerTable / TextStyleTable / LinetypeTable ...
  • CurrentSpace / ModelSpace / PaperSpace

用户交互(Editor 扩展)

var ed = Env.Editor;

// 取一个点
if (ed.GetPoint("\n请选择起点:").GetPointResult(out var p)) {
    // p 是 Point3d
}

// 取角度、整数、关键字
ed.GetDouble("\n请输入半径:").GetDoubleResult(out var r);
ed.GetKeyword("\n请选择 [圆(C)/矩形(R)]:", "C", "R").GetStringResult(out var k);

// 选择集
var sel = ed.SelectAll(new SelectionFilter(new[] {
    new TypedValue((int)DxfCode.Start, "LINE")
}));

实体创建与样式

using var tr = new DBTrans();

var line = new Line(Point3d.Origin, new Point3d(10, 0, 0)) {
    LayerId  = tr.LayerTable.GetOrCreate("墙体", l => l.Color = ColorIndex.Red),
    ColorIndex = 1
};
var circle = new Circle(new Point3d(5, 0, 0), Vector3d.ZAxis, 2);
var text   = new DBText { Position = new Point3d(0, -5, 0),
                          TextString = "Hello", Height = 2 };

tr.CurrentSpace.AddEntity(line, circle, text);
tr.Commit();

Read the full file on GitHub · 306 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. today Changed e1c25ca813f3
  2. 8d ago Changed bddcb33f5d19
  3. 12d ago First seen · 306 lines · 44 tokens per session scan A f58a504b9ab7

Subscribe to this mod's changes

ifoxcad is a skill published in the GitHub repository znlgis/opengis-skills (61 stars, last pushed today), licensed MIT. It adds 44 tokens to every session and 2,549 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

autocad-dotnet

Comprehensive AutoCAD .NET API reference for plugin development. Use when writing AutoCAD .NET plugins, working with ObjectARX managed wrappers, creating commands, manipulating entities, or needing exact API signatures. Covers AutoCAD 2025 and 2026 (both net8.0) with patterns, gotchas, and full API index. TRIGGER…

joseguiaCES/autocad-dotnet-claude-skill · 115 tokens

solidworks-automation

An automation skill for SolidWorks, a computer-aided design program used to create 3D parts, assemblies, and engineering drawings. It covers verified CAD operations and marks less-tested operations for human review.

wzyn20051216/solidworks-automation-skill · 56 tokens

autocad-automation

An automation skill for AutoCAD, a computer-aided design program commonly used for 2D technical drawings. It works with drawing formats such as DWG and DXF and can use Windows automation or other supported scripting routes.

wzyn20051216/solidworks-automation-skill · 151 tokens

solidworks-fillet-chamfer-cnc

A SolidWorks skill for creating CNC parts with multiple rounded edges and chamfers, which are angled or softened edges used in manufacturing. It includes parameter checks, edge selection, and evidence after rebuilding the model.

wzyn20051216/solidworks-automation-skill · 107 tokens

solidworks-threaded-holes

A SolidWorks skill for creating and checking ISO metric internal threaded holes, such as M6, in new parts. It covers supported blind and through holes, chamfers, thread direction, and delivery evidence.

wzyn20051216/solidworks-automation-skill · 150 tokens

solidworks-vibecad

A planning guide for turning natural-language mechanical design requests into structured, parameterized SolidWorks plans that can be reviewed before execution.

wzyn20051216/solidworks-automation-skill · 96 tokens