PortCSharpToCpp

PortCSharpToCpp is an agent for coding agents from microsoft/foundry-local. It costs 52 tokens per session (1,940 once invoked), scanned A, original, no licence file.

A coding assistant for translating C# code into C++ while preserving what the original code is meant to do. It compares patterns and types between the two languages and records behavior that the new code must keep.

In plain words
What is it for?
Use it to analyze C# implementations, plan ports, compare C# and C++ SDKs, document behavior, and list the types and contracts that need to be recreated.
Why use it?
Moving code between C# and C++ involves different language conventions and can hide missing or changed behavior. This helps separate code that can be directly ported from code that needs a new design.

Agent

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.

agentmods
npx agentmods add agents/microsoft/foundry-local/portcsharptocpp
Clone the repo
git clone --depth 1 https://github.com/microsoft/foundry-local

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 PortCSharpToCpp

README.md
[![agentmods](https://agentmods.dev/badge/agents/microsoft/foundry-local/portcsharptocpp.svg)](https://agentmods.dev/agents/microsoft/foundry-local/portcsharptocpp)
Your own site
<a href="https://agentmods.dev/agents/microsoft/foundry-local/portcsharptocpp"><img src="https://agentmods.dev/badge/agents/microsoft/foundry-local/portcsharptocpp.svg" alt="Measured on agentmods" height="20"></a>
Per session 52 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,940 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin unknown 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 $0.00052 $0.01940
Opus 5 $0.00026 $0.00970
Sonnet 5 $0.00010 $0.00388
Haiku 4.5 $0.00005 $0.00194

Measured 3d ago against content hash 7163356509d4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

PortCSharpToCpp 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 3d 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.

.github/agents/PortCSharpToCpp.agent.md · 117 lines

The source is not reproduced here

No licence file

A repository with no LICENSE is all rights reserved by default, so the body is not copied here. The metadata, the measurements and the link are.

Read it on GitHub

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. 3d ago First seen · 117 lines · 52 tokens per session scan A 7163356509d4

Subscribe to this mod's changes

PortCSharpToCpp is an agent published in the GitHub repository microsoft/foundry-local (2,532 stars, last pushed 4d ago), with no licence file. It adds 52 tokens to every session and 1,940 once invoked, about $0.0003 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.

Related

Other agents, from other repositories

.NET-Notebook-Migration-Agent

Expert .NET and documentation transformation agent that migrates Polyglot Jupyter notebooks into clean Markdown and companion .NET sample code.

microsoft/ai-agents-for-beginners · 33 tokens

ROCKETRIDE_typescript_API

A TypeScript/JavaScript SDK for executing RocketRide pipelines using the Debug Adapter Protocol (DAP). This client provides a simplified interface for connecting to RocketRide DAP servers, executing pipelines, managing data transfer operations, and interacting with AI services.

rocketride-org/rocketride-server · 0 tokens

dotnet-code-review-agent

Reviews .NET code for correctness, performance, security, and architecture concerns. Triages findings and routes to specialist agents for deep analysis. Triggers on: review this, code review, PR review, what's wrong with this code.

novotnyllc/dotnet-artisan · 52 tokens

dotnet-maui-specialist

Builds .NET MAUI apps. Platform-specific development, Xamarin migration, Native AOT on iOS/Catalyst, .NET 11 improvements. Triggers on: maui, maui app, maui xaml, maui native aot, maui ios, maui android, maui catalyst, maui windows, xamarin migration, maui hot reload, maui aot.

novotnyllc/dotnet-artisan · 90 tokens

dependency-auditor

Dependency audit specialist — manifest-graph axis covering outdated versions, deprecation, license compatibility, transitive bloat, and lockfile drift across Node, Rust, Go, and Python ecosystems. Invoke when you want a focused supply-chain hygiene report, not a code-level CVE review.

lugassawan/swe-workbench · 62 tokens

type-reconstructor

Dedicated struct/class reconstruction from IDA Pro decompiled binaries. Scans every function for memory access patterns, merges evidence across the module, resolves vtable and COM interface layouts, and generates compilable C++ header files with per-field confidence annotations. Use for full-module or single-class…

marcosd4h/DeepExtractRuntime · 63 tokens