SharpPad: Instructions file for Codex

AGENTS.md

SharpPad AGENTS.md is an instructions file for Codex, OpenCode from gaoconggit/SharpPad. It costs 1,394 tokens per session, scanned A, original, MIT.

Project instructions for SharpPad, a C# coding playground and AI-assisted platform. C# is a programming language; the project includes a browser and desktop interface, code execution, editor support, and server APIs.

In plain words
What is it for?
They are for developing SharpPad's web and desktop applications, C# code execution, editor language features, server endpoints, file management, package management, and AI chat.
Why use it?
They give an agent the project's structure and explain where key editor, execution, file, package, and chat features live.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md.

This is gaoconggit/SharpPad's own configuration. It tells Codex and OpenCode how to work on SharpPad itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything SharpPad configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/gaoconggit/SharpPad/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/gaoconggit/SharpPad

Made for: Codex, OpenCode.

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 SharpPad AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/gaoconggit/sharppad/agents-md/github.svg)](https://agentmods.dev/instructions/gaoconggit/sharppad/agents-md)
Your own site
<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.

agentmods 80×15 button for SharpPad AGENTS.md

Your own site · 80×15
<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>
Per session 1,394 This file is loaded in full into every session.
When invoked 1,394 The same file — it is already loaded in full.
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.01394 $0.01394
Opus 5.5 $0.00558 $0.00558
Sonnet 5.5 $0.00279 $0.00279
Haiku 4.5 $0.00139 $0.00139

Measured 13d ago against content hash a124d768e894, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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.

AGENTS.md · 68 lines

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 帮助分发与容器化部署。

Read the full file on GitHub · 68 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. 13d ago First seen · 68 lines · 1,394 tokens per session scan A a124d768e894

Subscribe to this mod's changes

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.