alignment_geometry_audit

alignment_geometry_audit is a skill for Claude Code, Codex from nezolder/civil3d-mcp-roslyn. It costs 21 tokens per session (3,477 once invoked), scanned A, original, MIT.

A read-only inspection of an existing Civil 3D alignment’s horizontal shape and design-criteria settings. Civil 3D is software for designing roads, sites, and other civil-engineering projects.

In plain words
What is it for?
Use it to list lines, curves, and transition curves, check their geometry, and capture a baseline for later work.
Why use it?
It shows what the alignment contains and how it is configured before another operation changes it.

Skill for Claude CodeCodex

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

Good fit Use it to list lines, curves, and transition curves, check their geometry, and capture a baseline for later work.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/nezolder/civil3d-mcp-roslyn/alignment_geometry_audit
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 nezolder/civil3d-mcp-roslyn --skill alignment_geometry_audit
Clone the repo
git clone --depth 1 https://github.com/nezolder/civil3d-mcp-roslyn

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 alignment_geometry_audit

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/nezolder/civil3d-mcp-roslyn/alignment_geometry_audit"><img src="https://agentmods.dev/badge/skills/nezolder/civil3d-mcp-roslyn/alignment_geometry_audit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 21 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,477 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.
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.00021 $0.03477
Opus 5.5 $0.00008 $0.01391
Sonnet 5.5 $0.00004 $0.00695
Haiku 4.5 $0.00002 $0.00348

Measured 28d ago against content hash 320c26fcce94, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-02, from the pricing page.

Security

Grade A, and why

alignment_geometry_audit 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 28d 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.

skills/alignments/alignment_geometry_audit.skill.md · 387 lines

How it starts

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

Code Template

var alignmentHandle = "ALIGNMENT_HANDLE";
var limit = 100;

if (string.IsNullOrWhiteSpace(alignmentHandle)
    || !System.Text.RegularExpressions.Regex.IsMatch(alignmentHandle, "^[0-9A-Fa-f]{1,16}$"))
{
    return new { success = false, error = "alignmentHandle must be a non-empty hexadecimal handle." };
}

if (limit < 1 || limit > 200)
{
    return new { success = false, error = "limit must be an integer between 1 and 200.", limit };
}

ObjectId alignmentId;
try
{
    alignmentId = Database.GetObjectId(false, new Handle(System.Convert.ToInt64(alignmentHandle, 16)), 0);
}
catch
{
    return new { success = false, error = "alignmentHandle does not resolve to an object in this drawing.", alignmentHandle };
}

var alignment = Transaction.GetObject(alignmentId, OpenMode.ForRead) as Alignment;
if (alignment == null || alignment.IsErased)
{
    return new { success = false, error = "alignmentHandle must identify an existing Alignment.", alignmentHandle };
}

var entities = new List<object>();
var warnings = new List<object>();
var lineCount = 0;
var arcCount = 0;
var spiralCount = 0;
var otherCount = 0;
var geometryItems = new List<object>();
var geometryTotal = 0;
var geometryLineCount = 0;
var geometryArcCount = 0;
var geometrySpiralCount = 0;
var geometryOtherCount = 0;
var allEntities = new List<AlignmentEntity>();
var parentEntityIndexes = new Dictionary<int, int>();
foreach (AlignmentEntity entity in alignment.Entities)
{
    parentEntityIndexes[entity.EntityId] = allEntities.Count;
    allEntities.Add(entity);
}
var geometryEntities = new List<AlignmentEntity>();
var geometryEntityIds = new HashSet<int>();
var geometryUsesConnectedOrder = true;
for (var chainIndex = 0; chainIndex < allEntities.Count; chainIndex++)
{
    try
    {
        var entity = alignment.Entities.GetEntityByOrder(chainIndex);
        if (!geometryEntityIds.Add(entity.EntityId))
        {
            geometryUsesConnectedOrder = false;
            break;
        }
        geometryEntities.Add(entity);
    }
    catch
    {
        geometryUsesConnectedOrder = false;
        break;
    }
}
var geometryConnectedEntityCount = geometryEntities.Count;
if (geometryEntities.Count != allEntities.Count)
{
    geometryUsesConnectedOrder = false;
    foreach (var entity in allEntities)
    {
        if (geometryEntityIds.Add(entity.EntityId)) geometryEntities.Add(entity);
    }
}
var index = 0;
foreach (AlignmentEntity entity in allEntities)
{
    var entityType = entity.EntityType.ToString();
    var isLine = entity is AlignmentLine;
    var isArc = entity is AlignmentArc;
    var isSpiral = entity is AlignmentSpiral;
    if (isLine) lineCount++;
    else if (isArc) arcCount++;
    else if (isSpiral) spiralCount++;
    else otherCount++;

    double? startStation = null;
    double? endStation = null;
    double? length = null;
    if (entity is AlignmentCurve geometryCurve)
    {
        startStation = geometryCurve.StartStation;
        endStation = geometryCurve.EndStation;
        length = geometryCurve.Length;
    }
    if (entities.Count < limit)
    {
        var item = new Dictionary<string, object>
        {
            ["index"] = index,
            ["entityType"] = entityType,
            ["entityId"] = entity.EntityId.ToString(),
            ["constraint"] = entity.Constraint1.ToString(),
            ["subentityCount"] = entity.SubEntityCount,
            ["startStation"] = startStation,
            ["endStation"] = endStation,
            ["length"] = length
        };

        if (entity is AlignmentCurve curve)
        {
            item["startXY"] = new { x = curve.StartPoint.X, y = curve.StartPoint.Y };
            item["endXY"] = new { x = curve.EndPoint.X, y = curve.EndPoint.Y };
            try
            {
                var entityHighestDesignSpeed = curve.HighestDesignSpeed;
                item["highestDesignSpeed"] = entityHighestDesignSpeed > 0.0
                    ? (double?)entityHighestDesignSpeed
                    : null;
            }
            catch { item["highestDesignSpeed"] = null; }
        }

        if (entity is AlignmentLine line)
        {
            item["direction"] = line.Direction;
        }
        else if (entity is AlignmentArc arc)
        {
            item["radius"] = arc.Radius;
            item["clockwise"] = arc.Clockwise;
            item["delta"] = arc.Delta;
            try
            {
                var minimumRadius = arc.MinimumRadius;
                item["minimumRadius"] = minimumRadius > 0.0 ? (double?)minimumRadius : null;
                item["meetsMinimumRadius"] = minimumRadius > 0.0
                    ? (bool?)(arc.Radius + 1e-9 >= minimumRadius)
                    : null;
            }
            catch
            {
                item["minimumRadius"] = null;
                item["meetsMinimumRadius"] = null;
            }
        }
        else if (entity is AlignmentSpiral spiral)
        {
            item["a"] = spiral.A;
            item["startRadius"] = Double.IsNaN(spiral.RadiusIn) || Double.IsInfinity(spiral.RadiusIn) ? null : (object)spiral.RadiusIn;
            item["endRadius"] = Double.IsNaN(spiral.RadiusOut) || Double.IsInfinity(spiral.RadiusOut) ? null : (object)spiral.RadiusOut;
            item["startIsTangent"] = Double.IsInfinity(spiral.RadiusIn);
            item["endIsTangent"] = Double.IsInfinity(spiral.RadiusOut);
            item["startRadiusUnknown"] = Double.IsNaN(spiral.RadiusIn);
            item["endRadiusUnknown"] = Double.IsNaN(spiral.RadiusOut);
            item["definition"] = spiral.SpiralDefinition.ToString();
            try
            {
                var minimumTransitionLength = spiral.MinimumTransitionLength;
                item["minimumTransitionLength"] = minimumTransitionLength > 0.0
                    ? (double?)minimumTransitionLength
                    : null;
                item["meetsMinimumTransitionLength"] = minimumTransitionLength > 0.0
                    ? (bool?)(spiral.Length + 1e-9 >= minimumTransitionLength)
                    : null;
            }
            catch
            {
                item["minimumTransitionLength"] = null;
                item["meetsMinimumTransitionLength"] = null;
            }
        }

        entities.Add(item);
    }
    index++;
}

double? previousPrimitiveEndStation = null;
for (var chainIndex = 0; chainIndex < geometryEntities.Count; chainIndex++)
{
    var entity = geometryEntities[chainIndex];
    var parentEntityIndex = parentEntityIndexes[entity.EntityId];

    for (var subentityIndex = 0; subentityIndex < entity.SubEntityCount; subentityIndex++)
    {
        var subentity = entity[subentityIndex];
        var isSubentityLine = subentity is AlignmentSubEntityLine;
        var isSubentityArc = subentity is AlignmentSubEntityArc;
        var isSubentitySpiral = subentity is AlignmentSubEntitySpiral;
        if (isSubentityLine) geometryLineCount++;
        else if (isSubentityArc) geometryArcCount++;
        else if (isSubentitySpiral) geometrySpiralCount++;
        else geometryOtherCount++;
        geometryTotal++;

        if (geometryUsesConnectedOrder && warnings.Count < 20)
        {
            if (subentity.Length <= 0.0)
            {
                warnings.Add(new { index = parentEntityIndex, parentEntityIndex, subentityIndex, code = "nonpositive_length", length = subentity.Length });
            }
            if (previousPrimitiveEndStation.HasValue)
            {
                var stationDifference = subentity.StartStation - previousPrimitiveEndStation.Value;
                if (Math.Abs(stationDifference) > 1e-6 && warnings.Count < 20)
                {
                    warnings.Add(new {
                        index = parentEntityIndex,
                        parentEntityIndex,
                        subentityIndex,
                        code = stationDifference > 0.0 ? "station_gap" : "station_overlap",
                        previousEndStation = previousPrimitiveEndStation.Value,
                        startStation = subentity.StartStation,
                        difference = stationDifference
                    });
                }
            }
            previousPrimitiveEndStation = subentity.EndStation;
        }

        if (geometryItems.Count >= limit) continue;

        var geometryItem = new Dictionary<string, object>
        {
            ["index"] = geometryTotal - 1,
            ["chainIndex"] = chainIndex,
            ["parentEntityIndex"] = parentEntityIndex,
            ["parentEntityId"] = entity.EntityId.ToString(),
            ["subentityIndex"] = subentityIndex,
            ["subentityType"] = subentity.SubEntityType.ToString(),
            ["startStation"] = subentity.StartStation,
            ["endStation"] = subentity.EndStation,
            ["length"] = subentity.Length,
            ["startXY"] = new { x = subentity.StartPoint.X, y = subentity.StartPoint.Y },
            ["endXY"] = new { x = subentity.EndPoint.X, y = subentity.EndPoint.Y }
        };

        if (subentity is AlignmentSubEntityLine subentityLine)
        {
            geometryItem["direction"] = subentityLine.Direction;
        }
        else if (subentity is AlignmentSubEntityArc subentityArc)
        {
            geometryItem["radius"] = subentityArc.Radius;
            geometryItem["clockwise"] = subentityArc.Clockwise;
            geometryItem["delta"] = subentityArc.Delta;
            geometryItem["startDirection"] = subentityArc.StartDirection;
            geometryItem["endDirection"] = subentityArc.EndDirection;
        }
        else if (subentity is AlignmentSubEntitySpiral subentitySpiral)
        {
            geometryItem["a"] = subentitySpiral.A;
            geometryItem["startRadius"] = Double.IsNaN(subentitySpiral.RadiusIn) || Double.IsInfinity(subentitySpiral.RadiusIn) ? null : (object)subentitySpiral.RadiusIn;
            geometryItem["endRadius"] = Double.IsNaN(subentitySpiral.RadiusOut) || Double.IsInfinity(subentitySpiral.RadiusOut) ? null : (object)subentitySpiral.RadiusOut;
            geometryItem["startIsTangent"] = Double.IsInfinity(subentitySpiral.RadiusIn);
            geometryItem["endIsTangent"] = Double.IsInfinity(subentitySpiral.RadiusOut);
            geometryItem["startRadiusUnknown"] = Double.IsNaN(subentitySpiral.RadiusIn);
            geometryItem["endRadiusUnknown"] = Double.IsNaN(subentitySpiral.RadiusOut);
            geometryItem["curveType"] = subentitySpiral.CurveType.ToString();
            geometryItem["definition"] = subentitySpiral.SpiralDefinition.ToString();
            geometryItem["direction"] = subentitySpiral.Direction.ToString();
            geometryItem["startDirection"] = subentitySpiral.StartDirection;
            geometryItem["endDirection"] = subentitySpiral.EndDirection;
        }

        geometryItems.Add(geometryItem);
    }
}

var designSpeeds = new List<object>();
try
{
    foreach (DesignSpeed designSpeed in alignment.DesignSpeeds)
    {
        if (designSpeeds.Count >= 50) break;
        designSpeeds.Add(new { station = designSpeed.Station, value = designSpeed.Value, comment = designSpeed.Comment });
    }
}
catch
{
    designSpeeds.Add(new { unavailable = true });
}

bool? useDesignSpeed = null;
bool? useDesignCriteriaFile = null;
bool? useDesignCheckSet = null;
string criteriaFileName = null;
string designCheckSetName = null;
try { useDesignSpeed = alignment.UseDesignSpeed; } catch { }
try { useDesignCriteriaFile = alignment.UseDesignCriteriaFile; } catch { }
try { useDesignCheckSet = alignment.UseDesignCheckSet; } catch { }
try { designCheckSetName = alignment.DesignCheckSetName; } catch { }
var isReference = alignment.IsReferenceObject;
bool? isReferenceStale = null;
if (isReference)
{
    try { isReferenceStale = alignment.IsReferenceStale; } catch { }
}

return new {
    success = true,
    alignment = new {
        name = alignment.Name,
        handle = alignment.Handle.ToString(),
        type = alignment.GetType().Name,
        length = alignment.Length,
        startStation = alignment.StartingStation,
        endStation = alignment.EndingStation,
        style = alignment.StyleName,
        layer = alignment.Layer,
        isSiteless = alignment.SiteId.IsNull,
        isReference,
        isReferenceStale
    },
    entities = new {
        total = alignment.Entities.Count,
        returned = entities.Count,
        truncated = alignment.Entities.Count > entities.Count,
        limit,
        counts = new { line = lineCount, arc = arcCount, spiral = spiralCount, other = otherCount },
        items = entities
    },
    geometry = new {
        total = geometryTotal,
        returned = geometryItems.Count,
        truncated = geometryTotal > geometryItems.Count,
        limit,
        ordering = new {
            connectedChainOrder = geometryUsesConnectedOrder,
            connectedEntityCount = geometryConnectedEntityCount,
            fallbackEntityCount = geometryEntities.Count - geometryConnectedEntityCount
        },
        counts = new { line = geometryLineCount, arc = geometryArcCount, spiral = geometrySpiralCount, other = geometryOtherCount },
        items = geometryItems
    },
    warnings,
    criteria = new {
        useDesignSpeed,
        designSpeeds,
        useDesignCriteriaFile,
        criteriaFileName,
        useDesignCheckSet,
        designCheckSetName
    },
    standardCompliance = "not_evaluated",
    unverified = new[] {
        "Road class, design-speed applicability, and local standard applicability are not decided by this audit.",
        "Superelevation is not evaluated by this audit."
    },
    dbmod = System.Convert.ToInt32(Application.GetSystemVariable("DBMOD"))
};

Read the full file on GitHub · 387 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. 28d ago First seen · 387 lines · 21 tokens per session scan A 320c26fcce94

Subscribe to this mod's changes

alignment_geometry_audit is a skill published in the GitHub repository nezolder/civil3d-mcp-roslyn (3 stars, last pushed today), licensed MIT. It adds 21 tokens to every session and 3,477 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-09-04.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

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…

vercel/next.js · 95 tokens

next-partial-prefetching-adoption

Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…

vercel/next.js · 103 tokens

chronicle

Analyze Copilot session history for standup reports, usage tips, session search, and session reindexing. Use when the user asks for a standup, daily summary, usage tips, workflow recommendations, wants to search or find past sessions by keyword/file/PR, wants to reindex their session store, or asks about deleting…

microsoft/vscode · 72 tokens

auto-perf-optimize

Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.

microsoft/vscode · 62 tokens

chat-perf

Run chat perf benchmarks and memory leak checks against the local dev build or any published VS Code version. Use when investigating chat rendering regressions, validating perf-sensitive changes to chat UI, or checking for memory leaks in the chat response pipeline.

microsoft/vscode · 51 tokens