Borrowing it
Nothing to install: this file belongs to lewing/helix.mcp. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/lewing/helix.mcp/main/.copilot/skills/path-boundary-comparison/SKILL.mdgit clone --depth 1 https://github.com/lewing/helix.mcpWrote 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/lewing/helix.mcp/path-boundary-comparison)<a href="https://agentmods.dev/skills/lewing/helix.mcp/path-boundary-comparison"><img src="https://agentmods.dev/badge/skills/lewing/helix.mcp/path-boundary-comparison/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/lewing/helix.mcp/path-boundary-comparison"><img src="https://agentmods.dev/badge/skills/lewing/helix.mcp/path-boundary-comparison.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.00021 | $0.00400 |
| Opus 5 | $0.00010 | $0.00200 |
| Sonnet 5 | $0.00004 | $0.00080 |
| Haiku 4.5 | $0.00002 | $0.00040 |
Grade A, and why
path-boundary-comparison 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 8d 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.
What it actually says
Context
Use this when code must verify that a computed file path stays inside a trusted root directory. This commonly appears in cache stores, download helpers, extraction code, and any path traversal defense.
Patterns
- Normalize both the candidate path and the root with
Path.GetFullPath(...)before comparing. - Preserve the root directory boundary explicitly by trimming trailing separators from the root and then adding exactly one
Path.DirectorySeparatorCharfor child-path checks. - Compare security boundaries with
StringComparison.Ordinal, not ignore-case comparisons. Case folding can make a sibling path appear to be under the trusted root on case-sensitive filesystems. - Allow the exact root path as a special case in addition to child paths.
- Add a regression test for a sibling path that differs only by casing (for example
rootvsROOT) so the security fix stays pinned if someone later reintroduces ignore-case comparisons.
Examples
var fullPath = Path.GetFullPath(path);
var fullRoot = Path.GetFullPath(root);
var rootWithoutSeparator = Path.TrimEndingDirectorySeparator(fullRoot);
var rootedPrefix = rootWithoutSeparator + Path.DirectorySeparatorChar;
if (!fullPath.StartsWith(rootedPrefix, StringComparison.Ordinal) &&
!string.Equals(fullPath, rootWithoutSeparator, StringComparison.Ordinal))
{
throw new ArgumentException("Resolved path escapes the trusted root.");
}
Anti-Patterns
- Using
StartsWith(..., StringComparison.OrdinalIgnoreCase)for a security boundary check. - Comparing against a root string without enforcing a separator boundary, which can make
/tmp/root2look like it is inside/tmp/root. - Comparing raw user input paths before canonicalizing them with
Path.GetFullPath(...).
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 First seen · 37 lines · 21 tokens per session scan A c1da10477271
path-boundary-comparison is a skill published in the GitHub repository lewing/helix.mcp (4 stars, last pushed yesterday), licensed MIT. It adds 21 tokens to every session and 400 once invoked, about $0.0001 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-31.
Other skills, from other repositories
diagrams
Mermaid diagrams following the C4 model: context, container, component, sequence, ER and deployment. Use when saying "diagram", "visualize", or "architecture diagram".
e2e
Generate and run Playwright E2E tests traced to spec.md acceptance criteria, with an optional accessibility audit. Use when saying "e2e tests" or "a11y audit".
release-expert
Multi-repo release coordination: version alignment, RC lifecycle, release waves, rollback planning. Use when saying "release", "version alignment", or "cut an RC".
tdd-cycle
Execute full TDD red-green-refactor cycle with validation gates. Use when saying "TDD cycle", "test-driven development", or "full TDD workflow".
debug
Systematic 4-phase debugging with escalation protocol. Use when saying "debug", "investigate bug", "find root cause", "why is this failing", or "fix this bug".
increment
Plan a unit of work as a SpecWeave increment - spec.md with Problem, Scope, numbered ACs and an Approach, plus tasks.md. Use when starting a feature, bug, hotfix or refactor.