build-dotnet-agent-service

build-dotnet-agent-service is a skill for Claude Code, Codex from gaelic-ghost/socket. It costs 36 tokens per session (593 once invoked), scanned A, original, Apache-2.0.

A guide for building a local-first .NET service that uses Semantic Kernel to let an AI model call explicitly defined functions. It covers model checks, typed inputs and outputs, tests, and reviewing results before changes are written.

In plain words
What is it for?
Use it to build an F# or C# agent service, define narrow tools, test tool-call behavior, handle malformed responses, and stop excessive model steps.
Why use it?
It keeps model behavior separate from application rules and places authorization, validation, limits, and write approval under the host application's control.

Skill for Claude CodeCodex

Part of the dotnet-skills plugin — 12 skills shipped together

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 skills/gaelic-ghost/socket/build-dotnet-agent-service
Any agent
npx skills add gaelic-ghost/socket --skill build-dotnet-agent-service
Clone the repo
git clone --depth 1 https://github.com/gaelic-ghost/socket

Made for: Claude Code, Codex.

Or install dotnet-skills, the plugin that ships this one along with the rest of its 12 skills.

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 build-dotnet-agent-service

README.md
[![agentmods](https://agentmods.dev/badge/skills/gaelic-ghost/socket/build-dotnet-agent-service.svg)](https://agentmods.dev/skills/gaelic-ghost/socket/build-dotnet-agent-service)
Your own site
<a href="https://agentmods.dev/skills/gaelic-ghost/socket/build-dotnet-agent-service"><img src="https://agentmods.dev/badge/skills/gaelic-ghost/socket/build-dotnet-agent-service.svg" alt="Measured on agentmods" height="20"></a>
Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 593 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00036 $0.00593
Opus 5 $0.00018 $0.00296
Sonnet 5 $0.00007 $0.00119
Haiku 4.5 $0.00004 $0.00059

Measured yesterday against content hash ec6b302bc6aa, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

build-dotnet-agent-service 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 yesterday.

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.

plugins/dotnet-skills/skills/build-dotnet-agent-service/SKILL.md · 58 lines

How it starts

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

Build .NET Agent Service

Use this skill when Semantic Kernel's plugin/function orchestration solves a real .NET application need. Preserve F# and C# equality: ask for the language when a new project has no established choice, and do not add C# only to host an agent.

Source Check

Workflow

  1. Establish the deterministic baseline, typed input/output, chosen language, exact model endpoint/model, tool permissions, and no-op result.
  2. Use Semantic Kernel only for a named plugin/function, planning, or orchestration requirement. Keep domain logic in F# modules or C# domain types rather than embedding it in prompt or endpoint code.
  3. Start with narrow read-only functions. The host validates authorization, schemas, timeouts, and output independently of model responses.
  4. Prove valid tool-call JSON, structured output, no-call behavior, malformed call recovery, maximum-step stopping, and grounded observations on the exact local/self-hosted server and model; HTTP compatibility alone is insufficient.
  5. Add memory, planners, background work, or an ASP.NET endpoint only when the application requires it. Name retention, restart, and failure behavior.
  6. Add fake-plugin tests, structured-result tests, denied-write tests, and opt-in local-model smoke tests. External writes remain draft-only until an exact auto-with-escalation approval gate is satisfied.

Validation

Run the repository's narrowest dotnet build and dotnet test commands. Separate fake-tool behavior from model-adapter smoke evidence, and report attempted versus executed side effects.

Guardrails

  • Do not add Semantic Kernel to a library or service that only needs one direct model request.
  • Do not store secrets, local endpoint credentials, prompts, or traces in source control.
  • Do not start a background agent, schedule, or public endpoint by default.
  • Do not use model output as permission to call a destructive plugin.

Read the full file on GitHub · 58 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. yesterday First seen · 58 lines · 36 tokens per session scan A ec6b302bc6aa

Subscribe to this mod's changes

build-dotnet-agent-service is a skill published in the GitHub repository gaelic-ghost/socket (7 stars, last pushed 9d ago), licensed Apache-2.0. It adds 36 tokens to every session and 593 once invoked, about $0.0002 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-09-03.

Related

Other skills, from other repositories

ai-workflow-architect

Designs AI systems, automations, and agent workflows for a business — identifying which manual work is worth automating, how to structure the system, which tools fit, and what could go wrong. Use this to automate part of an operation, design an agent or MCP workflow, reduce repetitive manual work, connect tools into a…

cbrock84/headcount · 89 tokens

prompt-cookbook

Build a prompt cookbook for one company's actual vertical and roles rather than generic examples. Each recipe names the job it does, who runs it, the prompt itself, what good output looks like, and how to tell when it went wrong. Written for people who have never written a prompt and will not read documentation about…

enalbenerraw/blanewarrene · 69 tokens

chief-data-officer

Owns data as an asset — governance, quality, the warehouse and semantic layer, analytics capability, and the governance of models built on top. Use this for a decision about how data is collected, stored, defined, or shared; when numbers disagree between teams; when deciding what to build in-house versus buy; when…

cbrock84/headcount · 88 tokens

ai-ml-governance

Governs models and AI systems in production — intended use, evaluation, monitoring, human oversight, documentation, and the decision to deploy or retire. Use this before deploying a model or AI feature, when defining evaluation criteria, when a model's behavior has drifted, when assessing AI risk or regulatory…

cbrock84/headcount · 83 tokens

data-engineering

Builds and operates data pipelines — ingestion, transformation, orchestration, quality testing, and reliability of data delivery. Use this to design or debug a pipeline, decide batch versus streaming, add data quality checks, handle late or duplicate data, or work out why a dashboard's numbers changed without anyone…

cbrock84/headcount · 67 tokens

laravel-ai-sdk

Use when integrating AI agents, tool calling, embeddings, structured output, or streaming in Laravel 13 via the laravel/ai package.

fusengine/agents · 35 tokens