Borrowing it
Nothing to install: this file belongs to gaoconggit/SharpPad. 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/gaoconggit/SharpPad/main/AGENTS.mdgit clone --depth 1 https://github.com/gaoconggit/SharpPadWrote 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/instructions/gaoconggit/sharppad/agents-md)<a href="https://agentmods.dev/instructions/gaoconggit/sharppad/agents-md"><img src="https://agentmods.dev/badge/instructions/gaoconggit/sharppad/agents-md/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/instructions/gaoconggit/sharppad/agents-md"><img src="https://agentmods.dev/badge/instructions/gaoconggit/sharppad/agents-md.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.01394 | $0.01394 |
| Opus 5.5 | $0.00558 | $0.00558 |
| Sonnet 5.5 | $0.00279 | $0.00279 |
| Haiku 4.5 | $0.00139 | $0.00139 |
Grade A, and why
SharpPad AGENTS.md 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 13d 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 — 68 lines — stays where its author put it; the contents beside it link to each section on GitHub.
SharpPad 项目总览
SharpPad 是一个面向 C# 开发者的代码实验与 AI 辅助平台,结合 Monaco 编辑器、Roslyn 编译服务与多实例管理,在浏览器或桌面端提供即时运行、补全与聊天体验。
解决方案结构
SharpPad/:ASP.NET Core 8/9 Web 应用,提供代码执行、语言服务 API 与静态资源托管。SharpPad.Desktop/:基于 Avalonia 的跨平台桌面壳层,嵌入 WebView 并复用 Web 项目。MonacoRoslynCompletionProvider/:Roslyn 驱动的语言服务库,对外暴露补全、格式化与多文件分析能力。Program.cs:命令行入口演示InstanceManager的端口分配策略,便于调试多实例场景。KingOfTool/:示例脚本与配置集合,可导入到应用中快速体验常用片段。
Web 应用 (SharpPad)
后端 API
CompletionController调用 MonacoRoslynCompletionProvider,提供补全、签名提示、Hover、格式化、语义 Token 与多文件诊断。CodeRunController使用CodeRunner运行单文件或多文件 C# 程序,通过通道与 SSE 流式推送输出和错误。ChatController作为 AI 对话代理,从X-Endpoint头读取目标模型地址,保持授权信息和响应流。
框架配置
Program.cs结合InstanceManager自动选择端口,开启静态文件、CORS、Swagger 与控制器路由。- 依赖
Microsoft.AspNetCore.Mvc.NewtonsoftJson、Swashbuckle等组件,并在SharpPad.csproj中复制运行期 DLL 与资源。 Services/InstanceManager默认占用 5090 端口,检测冲突后回退到可用端口,同时提供占用端口查询。
前端模块
wwwroot/index.js作为入口,按需加载 Monaco、初始化文件系统、NuGet 管理、执行管线与通知。editor/管理编辑器状态与命令绑定,execution/负责运行、输出面板和状态提示。fileSystem/维护本地存储、导入导出与目录视图,支持多目录和只看当前目录模式。components/nuget/构建包引用 UI,chat/与utils/提供 AI 交互、API 调用与公共工具。- 静态资源包含
monaco-editor、样式、Markdown 和图标,并支持多模型切换与语义着色。
桌面宿主 (SharpPad.Desktop)
- 使用 Avalonia 11 + WebView.Avalonia,Windows/非 Windows 统一以
net10.0目标编译。 App.axaml与MainWindow配置 WebView,配合WebServerManager启动/停止嵌入的 ASP.NET Core 服务。WebServerManager处理发布包与开发环境路径,托管SharpPad.Program.ConfigureServices/Configure。SharpPad.Desktop.csproj发布阶段复制wwwroot与appsettings.json,并清理多余语言资源。
MonacoRoslynCompletionProvider
- 以 .NET 8/9 为目标,引用 Microsoft.CodeAnalysis 4.14 系列包并使用
IgnoresAccessChecksTo解锁内部特性。 MonacoRequestHandler集成补全、签名帮助、Hover、Definition、语义 Token、格式化与多文件 CodeCheck。CodeRunner支持多文件运行、NuGet 包解析、语言版本选择与流式回调,用于 Web 与桌面端的执行功能。
多实例与工具
SharpPad.Services.InstanceManager与桌面端同名实现负责端口探测,确保主实例 5090、其余实例使用动态端口。- 根目录
Program.cs和TestInstanceManager.cs可用于验证端口分配逻辑,TestInstance.csproj提供轻量入口。 publish/、SharpPad.app/与脚本如package-macos.sh、docker-compose.yml帮助分发与容器化部署。
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.
- 13d ago First seen · 68 lines · 1,394 tokens per session scan A a124d768e894
SharpPad AGENTS.md is an instructions file published in the GitHub repository gaoconggit/SharpPad (83 stars, last pushed 7mo ago), licensed MIT. It adds 1,394 tokens to every session, about $0.0056 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-02.
Other instructions, from other repositories
plan-forge dapr.instructions.md
Dapr patterns for .NET — building blocks, component config, sidecar architecture, multi-tenant isolation, workflows, state management, secrets.
plan-forge auth.instructions.md
.NET authentication & authorization — JWT/OIDC, policy-based auth, multi-tenant isolation, API keys, testing.
plan-forge api-patterns.instructions.md
API patterns for .NET — REST conventions, ProblemDetails, pagination, versioning, error responses.
plan-forge messaging.instructions.md
Messaging patterns for .NET — Dapr Pub/Sub, MassTransit, NATS, RabbitMQ, CloudEvents.
plan-forge errorhandling.instructions.md
Error handling patterns — Exception hierarchy, ProblemDetails responses, error boundaries, global exception middleware.
plan-forge multi-environment.instructions.md
Multi-environment configuration — Dev/staging/production settings, environment detection, config management.