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.01930 |
| Opus 5 | $0.00041 | $0.00965 |
| Sonnet 5 | $0.00016 | $0.00386 |
| Haiku 4.5 | $0.00008 | $0.00193 |
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 2d 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 — 219 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
概述
OpenCSG.NET 是一个面向 .NET 的 构造实体几何(CSG)建模库。提供基础形体(立方体、球体、圆柱体)、布尔运算(并集、差集、交集)以及 STL 文件导出。零依赖,netstandard2.0,MIT 授权。
核心特性
| 特性 | 说明 |
|---|---|
| 零依赖 | 无任何外部 NuGet 依赖 |
| 跨平台 | netstandard2.0,支持 .NET 6/7/8/9+ |
| CSG 布尔运算 | Union / Subtract / Intersect |
| 基础形体 | Cube / Sphere / Cylinder |
| 变换 | Translate / RotateX/Y/Z / Scale |
| STL 导出 | ASCII + Binary 两种格式 |
| 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
核心 API
基础形体
using Csg;
using static Csg.Solids;
// 立方体
var cube = Cube(size: 2, center: true);
var cube2 = Cube(x: 3, y: 2, z: 1); // 自定义尺寸
// 球体
var sphere = Sphere(r: 1, center: true);
// 圆柱体
var cylinder = Cylinder(r: 0.5, h: 3, center: true);
布尔运算
// 并集
var union = Union(cube, sphere);
// 差集
var difference = cube.Subtract(sphere);
// 交集
var intersection = cube.Intersect(sphere);
变换
var transformed = cube
.Translate(x: 5, y: 0, z: 0)
.RotateZ(45)
.Scale(0.5);
// 单独旋转
var rotated = cube.RotateX(30);
var rotated2 = cube.RotateY(45);
var rotated3 = cube.RotateZ(60);
STL 导出
// ASCII STL
using (var fs = File.Create("output.stl"))
using (var wr = new StreamWriter(fs))
{
union.WriteStl("union", wr);
}
// Binary STL(更小的文件体积)
using (var fs = File.Create("output.stl"))
using (var wr = new BinaryWriter(fs))
{
union.WriteStl("union", wr);
}
典型工作流
创建机械零件
using Csg;
using static Csg.Solids;
// 创建一个带孔的圆柱体
var cylinder = Cylinder(r: 2, h: 3, center: true);
var hole = Cylinder(r: 0.5, h: 3.1, center: true); // 稍高确保穿透
var part = cylinder.Subtract(hole);
// 添加侧面凸台
var boss = Cylinder(r: 0.8, h: 1.5, center: true)
.RotateY(90)
.Translate(x: 2, y: 0, z: 0);
var result = part.Union(boss);
// 导出
using var fs = File.Create("part.stl");
using var wr = new BinaryWriter(fs);
result.WriteStl("mechanical_part", wr);
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.
- 8d ago Changed 43da62d80402
- 12d 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 (61 stars, last pushed today), licensed MIT. It adds 82 tokens to every session and 1,930 once invoked, about $0.0004 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.
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…
mvvm
Implement the Model-View-ViewModel pattern in .NET applications with proper separation of concerns, data binding, commands, and testable ViewModels using MVVM Toolkit. USE FOR: implementing UI separation with Model-View-ViewModel; using MVVM Toolkit (CommunityToolkit.Mvvm) for ViewModels; designing testable UI…