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.
npx skills add znlgis/opengis-skills --skill opencsg-netgit clone --depth 1 https://github.com/znlgis/opengis-skillsWrote 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.
[](https://agentmods.dev/skills/znlgis/opengis-skills/opencsg-net)<a href="https://agentmods.dev/skills/znlgis/opengis-skills/opencsg-net"><img src="https://agentmods.dev/badge/skills/znlgis/opengis-skills/opencsg-net/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.
<a href="https://agentmods.dev/skills/znlgis/opengis-skills/opencsg-net"><img src="https://agentmods.dev/badge/skills/znlgis/opengis-skills/opencsg-net.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00082 | $0.04347 |
| Opus 5.5 | $0.00033 | $0.01739 |
| Sonnet 5.5 | $0.00016 | $0.00869 |
| Haiku 4.5 | $0.00008 | $0.00435 |
Grade A, and why
opencsg-net 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 13d ago.
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.
How it starts
The opening of the file, as written. The whole thing — 319 lines — stays where its author put it; the contents beside it link to each section on GitHub.
项目地址: https://github.com/znlgis/OpenCSG.NET
NuGet: https://www.nuget.org/packages/OpenCSG.NET
许可证: MIT | 最新版本:
1.4.0(GitHub tagv1.4.0与 NuGet 一致;csproj 里<Version>0.0.0</Version>只是占位,版本由 CI 在打包时注入)
概述
OpenCSG.NET 是一个面向 .NET 的 构造实体几何(CSG)建模库。提供基础形体(立方体、球体、圆柱体、圆锥、拉伸体、楔形体)、布尔运算(并集、差集、交集)、型钢截面库、声明式 CSG 树(含 JSON 序列化)、STL 导出,以及把实体投影成三视图的制图能力。netstandard2.0,MIT 授权。
核心特性
| 特性 | 说明 |
|---|---|
| 依赖 | 唯一 PackageReference 是 System.Text.Json 8.0.6(供 CSG 树 JSON 序列化用),其余无外部依赖 |
| 跨平台 | netstandard2.0;测试/样例/性能工程为 net8.0 |
| CSG 布尔运算 | Union / Subtract / Intersect(params 支持一次传多个) |
| 基础形体 | Cube / Sphere / Cylinder / Cone / Extrude / Wedge |
| 变换 | Translate / RotateX-Y-Z / Scale / Transform(Matrix4x4) |
| 声明式 CSG 树 | CsgNode 记录类型 + CsgNodes 工厂 + CsgEvaluator.Evaluate + CsgSerialization JSON 往返 |
| 型钢截面 | Profiles:Rectangle / HBeam / Channel / SquareTube / Trapezoid / Capsule / LShape |
| STL 导出 | Solid.WriteStl(TextWriter / BinaryWriter)与 StlWriter.WriteAscii/WriteBinary(path) |
| 三视图投影 | ViewProjector + ViewDirections(主/俯/左)+ ViewArcFitter(投影线段的圆弧识别) |
| BSP 树 | 迭代式 BSP 树实现(非递归),不会栈溢出 |
上游关系
OpenJsCad csg.js (JavaScript)
└── praeclarum/Csg (手工 C# 移植)
└── hypar-io/Csg
├── Csg (Union 原点居中修复、NaN 校验)
└── DotNetCsg (二进制 STL、迭代 BSP、RotateX/Y/Z)
└── OpenCSG.NET (本项目 — 合并两者改进)
环境准备
安装
dotnet add package OpenCSG.NET
前置条件
- .NET Standard 2.0+(库本身)
- .NET 8+(构建/测试/示例)
- 构建整个解决方案需要 .NET 9+ SDK:
dotnet build OpenCSG.NET.slnx - 数值口径:布尔运算按 绝对容差 1e-5 合并顶点/平面,坐标量级到 1e6 仍然正确(仓库有测量坐标回归测试)
精度与网格约定(官方 README 固化)
- 布尔结果可能出现 T 顶点接缝(没有 T 顶点清理 pass):面没有面积洞(按体积累等式
A ∪ B = A + B − A ∩ B验证过),但不保证是严格闭合的二维流形 - 负缩放(镜像)矩阵会按行列式识别并翻转顶点缠绕与平面法线,镜像体仍朝外
核心 API
基础形体
using Csg;
using static Csg.Solids;
// 立方体
var cube = Cube(size: 2, center: true);
var cube2 = Cube(width: 3, height: 2, depth: 1); // 三边尺寸
var cube3 = Cube(new Vector3D(3, 2, 1), center: false); // 或按向量给尺寸
// 球体
var sphere = Sphere(r: 1, center: true);
// 圆柱体
var cylinder = Cylinder(r: 0.5, h: 3, center: true);
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.
- 13d ago Changed · +100 lines 6982f341459c
- 1mo ago Changed 920840bdbb4b
- 1mo ago Changed 43da62d80402
- 1mo ago First seen · 219 lines · 82 tokens per session scan A 493be7b29726
opencsg-net is a skill published in the GitHub repository znlgis/opengis-skills (75 stars, last pushed today), licensed MIT. It adds 82 tokens to every session and 4,347 once invoked, about $0.0003 per session on Opus 5.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.
Other skills, from other repositories
opentelemetry-net-instrumentation
Provides guidance for implementing OpenTelemetry instrumentation in .NET codebases, covering tracing (Activities/Spans), metrics, logs, naming conventions, error handling, performance, SDK setup, resources, context propagation, and API design best practices.
wpf
Build and modernize WPF applications on .NET with correct XAML, data binding, commands, threading, styling, and Windows desktop migration decisions. USE FOR: working on WPF UI, MVVM, binding, commands, or desktop modernization; migrating WPF from .NET Framework to .NET; integrating newer Windows capabilities into a…
mcp
Build or consume Model Context Protocol (MCP) servers and clients in .NET using the official MCP C# SDK, including stdio, Streamable HTTP, tools, prompts, resources, and capability negotiation. USE FOR: .NET MCP servers or clients; stdio versus HTTP transport choices; tools, resources, prompts, completions, and…
migrate-xunit-to-xunit-v3
Migrate .NET test projects from xUnit.net v2 to xunit.v3 and fix v3 breaks. Use for package/CPM conversion, OutputType=Exe, preserving the VSTest or MTP runner (including projects currently using YTest.MTP.XUnit2), incompatible TFMs, async void tests, string-to-Type attributes, custom Fact/Theory/BeforeAfterTest…
semantic-kernel
Build AI-enabled .NET applications with Semantic Kernel using services, plugins, prompts, and function-calling patterns that remain testable and maintainable. USE FOR: adding AI-driven prompts, plugins, or orchestration to a .NET app; reviewing kernel construction, service registration, or plugin usage; building…
sharpconsoleui
Use SharpConsoleUI to build full terminal (TUI) applications in .NET — equally suited to full-screen single-window apps and multi-window desktops with overlapping draggable windows — using a compositor, a DOM layout engine, and 40+ reactive controls (data tables, tree views, forms, an embedded PTY terminal, markdown…