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 nezolder/civil3d-mcp-roslyn --skill plan_section_sheet_fitgit clone --depth 1 https://github.com/nezolder/civil3d-mcp-roslynWrote 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/nezolder/civil3d-mcp-roslyn/plan_section_sheet_fit)<a href="https://agentmods.dev/skills/nezolder/civil3d-mcp-roslyn/plan_section_sheet_fit"><img src="https://agentmods.dev/badge/skills/nezolder/civil3d-mcp-roslyn/plan_section_sheet_fit/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/nezolder/civil3d-mcp-roslyn/plan_section_sheet_fit"><img src="https://agentmods.dev/badge/skills/nezolder/civil3d-mcp-roslyn/plan_section_sheet_fit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.00035 | $0.03854 |
| Opus 5.5 | $0.00014 | $0.01542 |
| Sonnet 5.5 | $0.00007 | $0.00771 |
| Haiku 4.5 | $0.00003 | $0.00385 |
Grade A, and why
plan_section_sheet_fit 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 16d 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 — 269 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Code Template
var sampleLineGroupHandle = "SAMPLE_LINE_GROUP_HANDLE";
var templatePath = "";
var layoutNames = "";
var sectionViewStyleName = "";
var bandSetStyleName = "";
var referenceSourceHandle = "";
var clearance = 2.0;
var topClearance = 0.5;
var heightStep = 0.5;
var startStation = double.NaN;
var endStation = double.NaN;
var isHandle = new Func<string, bool>(value =>
!string.IsNullOrWhiteSpace(value)
&& System.Text.RegularExpressions.Regex.IsMatch(value, "^[0-9A-Fa-f]{1,16}$"));
if (!isHandle(sampleLineGroupHandle) || !isHandle(referenceSourceHandle))
return new { success = false, error = "sampleLineGroupHandle and referenceSourceHandle must be hexadecimal handles." };
if (string.IsNullOrWhiteSpace(templatePath) || templatePath.Length > 1024 || templatePath.Any(char.IsControl))
return new { success = false, error = "templatePath is required." };
if (layoutNames == null || layoutNames.Length > 4000 || layoutNames.Any(char.IsControl)
|| string.IsNullOrWhiteSpace(sectionViewStyleName) || bandSetStyleName == null)
return new { success = false, error = "layoutNames must be \"|\"-separated names, and sectionViewStyleName is required." };
if (!double.IsFinite(clearance) || clearance < 0 || clearance > 1000 || !double.IsFinite(topClearance) || topClearance < 0 || topClearance > 1000
|| !double.IsFinite(heightStep) || heightStep <= 0 || heightStep > 100)
return new { success = false, error = "clearance and topClearance must be 0..1000 and heightStep greater than 0, at most 100." };
if (double.IsInfinity(startStation) || double.IsInfinity(endStation))
return new { success = false, error = "startStation and endStation must be finite or NaN." };
if (!System.IO.File.Exists(templatePath))
return new { success = false, error = "The template file does not exist.", templatePath };
ObjectId? ResolveId(string handle)
{
try { return Database.GetObjectId(false, new Handle(System.Convert.ToInt64(handle, 16)), 0); }
catch { return null; }
}
var groupId = ResolveId(sampleLineGroupHandle);
var group = groupId.HasValue ? Transaction.GetObject(groupId.Value, OpenMode.ForRead) as SampleLineGroup : null;
if (group == null || group.IsErased)
return new { success = false, error = "sampleLineGroupHandle must identify an existing sample line group." };
var sourceId = ResolveId(referenceSourceHandle);
if (!sourceId.HasValue)
return new { success = false, error = "referenceSourceHandle does not resolve." };
ObjectId LookupStyle(Func<ObjectId> lookup)
{
try { return lookup(); }
catch { return ObjectId.Null; }
}
var viewStyleId = LookupStyle(() => CivilDoc.Styles.SectionViewStyles[sectionViewStyleName]);
var bandSetId = bandSetStyleName == "" ? ObjectId.Null : LookupStyle(() => CivilDoc.Styles.SectionViewBandSetStyles[bandSetStyleName]);
if (viewStyleId.IsNull || (bandSetStyleName != "" && bandSetId.IsNull))
return new { success = false, error = "The section view style or band set style does not exist.", sectionViewStyleName, bandSetStyleName };
var viewStyle = (Autodesk.Civil.DatabaseServices.Styles.SectionViewStyle)Transaction.GetObject(viewStyleId, OpenMode.ForRead);
var verticalExaggeration = viewStyle.GraphStyle.VerticalExaggeration;
if (!double.IsFinite(verticalExaggeration) || verticalExaggeration <= 0)
return new { success = false, error = "The section view style has no usable vertical exaggeration." };
// Band heights are plotted sizes; with a metre drawing they read as paper metres.
var bandsPaperMm = 0.0;
var bands = new List<object>();
if (!bandSetId.IsNull)
{
var bandSet = (Autodesk.Civil.DatabaseServices.Styles.SectionViewBandSetStyle)Transaction.GetObject(bandSetId, OpenMode.ForRead);
foreach (var (location, items) in new[] { ("bottom", bandSet.GetBottomBandSetItems()), ("top", bandSet.GetTopBandSetItems()) })
foreach (Autodesk.Civil.DatabaseServices.Styles.BandSetItem item in items)
{
var bandStyle = (Autodesk.Civil.DatabaseServices.Styles.BandStyle)Transaction.GetObject(item.BandStyleId, OpenMode.ForRead);
bandsPaperMm += (bandStyle.BandHeight + item.Gap) * 1000.0;
bands.Add(new { location, name = bandStyle.Name, heightMm = bandStyle.BandHeight * 1000.0, gapMm = item.Gap * 1000.0 });
}
bandsPaperMm = Math.Max(0, bandsPaperMm);
}
// Sample lines: total width along the line and the reference section's range.
var lines = new List<(string name, double station, double width, double low, double high)>();
var missingSections = new List<object>();
foreach (ObjectId id in group.GetSampleLineIds())
{
if (!(Transaction.GetObject(id, OpenMode.ForRead) is SampleLine line) || line.IsErased) continue;
if ((!double.IsNaN(startStation) && line.Station < startStation - 1e-6)
|| (!double.IsNaN(endStation) && line.Station > endStation + 1e-6)) continue;
var width = 0.0;
for (var k = 1; k < line.Vertices.Count; k++)
width += line.Vertices[k - 1].Location.DistanceTo(line.Vertices[k].Location);
var sectionId = line.GetSectionId(sourceId.Value);
var section = sectionId.IsNull ? null : Transaction.GetObject(sectionId, OpenMode.ForRead) as Autodesk.Civil.DatabaseServices.Section;
if (section == null || !double.IsFinite(section.MinmumElevation) || !double.IsFinite(section.MaximumElevation)
|| Math.Abs(section.MinmumElevation) > 1e6 || Math.Abs(section.MaximumElevation) > 1e6)
{
missingSections.Add(new { line.Name, line.Station });
continue;
}
lines.Add((line.Name, line.Station, width, section.MinmumElevation, section.MaximumElevation));
}
if (lines.Count == 0)
return new { success = false, error = "No sample line in the range has a section of the reference source.", missingSections };
// Template layouts: the first viewport of a layout is its paper space viewport; the largest other one shows the model.
var wanted = new HashSet<string>(layoutNames.Split('|').Select(n => n.Trim()).Where(n => n != ""), StringComparer.OrdinalIgnoreCase);
var sheets = new List<(string layout, double vpWidthMm, double vpHeightMm, double customScale)>();
var skipped = new List<object>();
var paperLayouts = new HashSet<string>(StringComparer.OrdinalIgnoreCase);
try
{
using (var side = new Database(false, true))
{
side.ReadDwgFile(templatePath, Autodesk.AutoCAD.DatabaseServices.FileOpenMode.OpenForReadAndAllShare, true, null);
using (var tr = side.TransactionManager.StartTransaction())
{
var layouts = (DBDictionary)tr.GetObject(side.LayoutDictionaryId, OpenMode.ForRead);
foreach (DBDictionaryEntry entry in layouts)
{
var layout = (Layout)tr.GetObject(entry.Value, OpenMode.ForRead);
if (layout.ModelType) continue;
paperLayouts.Add(layout.LayoutName);
if (wanted.Count > 0 && !wanted.Contains(layout.LayoutName)) continue;
var space = (BlockTableRecord)tr.GetObject(layout.BlockTableRecordId, OpenMode.ForRead);
var viewports = new List<Viewport>();
foreach (ObjectId id in space)
if (tr.GetObject(id, OpenMode.ForRead) is Viewport viewport) viewports.Add(viewport);
var modelViewport = viewports.Skip(1).OrderByDescending(v => v.Width * v.Height).FirstOrDefault();
if (modelViewport == null || !(modelViewport.CustomScale > 0))
{
skipped.Add(new { layout = layout.LayoutName, reason = "No scaled model viewport." });
continue;
}
sheets.Add((layout.LayoutName, modelViewport.Width, modelViewport.Height, modelViewport.CustomScale));
}
tr.Commit();
}
}
}
catch (System.Exception ex)
{
return new { success = false, error = "The template could not be read.", templatePath, detail = ex.Message };
}
var unknownLayouts = wanted.Where(n => !paperLayouts.Contains(n)).ToList();
if (sheets.Count == 0)
return new { success = false, error = "No candidate layout with a scaled model viewport.", skipped, unknownLayouts, available = paperLayouts.ToList() };
var maxRelief = lines.Max(l => l.high - l.low);
var maxWidth = lines.Max(l => l.width);
var plans = new List<(double area, object plan, bool fitsAll)>();
foreach (var sheet in sheets)
{
// CustomScale is paper millimetres per model unit (10 for 1:100 with metres).
var modelWidth = sheet.vpWidthMm / sheet.customScale;
var modelHeight = sheet.vpHeightMm / sheet.customScale;
var bandsModel = bandsPaperMm / sheet.customScale;
var graphHeight = modelHeight - bandsModel;
var height = graphHeight > 0 ? Math.Floor(graphHeight / verticalExaggeration / heightStep + 1e-9) * heightStep : 0;
var checks = lines
.Select(l => new { l.name, l.station, l.width, needed = (l.high - l.low) + clearance + topClearance })
.Select(l => new { l.name, l.station, l.width, l.needed, wide = l.width > modelWidth + 1e-6, tall = l.needed > height + 1e-6 })
.ToList();
var notFitting = checks.Where(l => l.wide || l.tall).OrderBy(l => l.station)
.Select(l => new { l.name, l.station, l.width, l.needed, reason = l.wide && l.tall ? "width and height" : l.wide ? "width" : "height" })
.ToList();
var fitsAll = height > 0 && notFitting.Count == 0;
plans.Add((sheet.vpWidthMm * sheet.vpHeightMm, new {
layout = sheet.layout,
viewportMm = new { width = sheet.vpWidthMm, height = sheet.vpHeightMm },
scale = "1:" + Math.Round(1000.0 / sheet.customScale, 3).ToString(System.Globalization.CultureInfo.InvariantCulture),
modelViewport = new { width = modelWidth, height = modelHeight },
bandsModelHeight = bandsModel,
viewWidth = modelWidth,
elevationHeight = height,
fitsAll,
fittingCount = lines.Count - notFitting.Count,
notFittingCount = notFitting.Count,
tooWideCount = checks.Count(l => l.wide),
tooTallCount = checks.Count(l => l.tall),
notFitting = notFitting.Take(10).ToList(),
shiftParams = height > 0 ? new { mode = "belowLowest", clearance, height, referenceSourceHandle } : null
}, fitsAll));
}
var ordered = plans.OrderBy(p => p.area).ToList();
var recommended = ordered.Where(p => p.fitsAll).Select(p => p.plan).FirstOrDefault();
return new {
success = true,
sampleLineGroup = new { name = group.Name, handle = group.Handle.ToString() },
sectionViewStyle = new { name = viewStyle.Name, verticalExaggeration },
bandSet = bandSetId.IsNull ? null : new { name = bandSetStyleName, totalHeightMm = bandsPaperMm, bands },
clearance,
topClearance,
sampleLines = new { count = lines.Count, maxWidth, maxRelief, maxNeeded = maxRelief + clearance + topClearance },
missingSections,
recommended,
sheets = ordered.Select(p => p.plan).ToList(),
skipped,
unknownLayouts
};
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.
- 16d ago First seen · 269 lines · 35 tokens per session scan A c69175ac78ba
plan_section_sheet_fit is a skill published in the GitHub repository nezolder/civil3d-mcp-roslyn (3 stars, last pushed 16d ago), licensed MIT. It adds 35 tokens to every session and 3,854 once invoked, about $0.0001 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-10-12.
Other skills, from other repositories
shopify-theme-development
Build and customize Shopify themes using Liquid templating, JSON sections, dynamic blocks, and theme app extensions for added functionality.
web-section-splitter
Breaks a long-form article into web-optimized sections with subheadings, pull-quote suggestions, image placement markers, and reading-time estimates — ready for a web editor to drop into a CMS.
local-ai-agents
Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
next-cache-components-adoption
Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…
chat-pet-sprite-creation
Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.