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/.claude/commands/add-assembly-reference.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/commands/gaoconggit/sharppad/add-assembly-reference)<a href="https://agentmods.dev/commands/gaoconggit/sharppad/add-assembly-reference"><img src="https://agentmods.dev/badge/commands/gaoconggit/sharppad/add-assembly-reference/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/commands/gaoconggit/sharppad/add-assembly-reference"><img src="https://agentmods.dev/badge/commands/gaoconggit/sharppad/add-assembly-reference.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.00000 | $0.01374 |
| Opus 5.5 | $0.00000 | $0.00550 |
| Sonnet 5.5 | $0.00000 | $0.00275 |
| Haiku 4.5 | $0.00000 | $0.00137 |
Grade A, and why
add-assembly-reference 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 — 205 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/add-assembly-reference - Add Missing Assembly Reference
Automatically adds missing .NET assembly references to CompletionWorkspace for dynamic code execution.
Syntax
/add-assembly-reference <type_name> [assembly_name]
Description
When users encounter errors like "未能在命名空间中找到类型名" (Type not found in namespace) during dynamic code execution in SharpPad, this command automatically:
- Identifies the missing assembly based on the error message
- Adds the appropriate
TryAddType()call toCompletionWorkspace.cs - Adds the assembly name to the assembly list if needed
- Rebuilds the MonacoRoslynCompletionProvider project
Common Assembly Issues
WebSocket Support
Error: 未能在命名空间"System.Net.WebSockets"中找到类型名"ClientWebSocket"
Solution: /add-assembly-reference System.Net.WebSockets.ClientWebSocket
Task Parallel Library
Error: 未能在命名空间"System.Threading.Tasks"中找到类型名"Parallel"
Solution: /add-assembly-reference System.Threading.Tasks.Parallel
HTTP Client
Error: 未能在命名空间"System.Net.Http"中找到类型名"HttpClient"
Solution: /add-assembly-reference System.Net.Http.HttpClient
JSON Serialization
Error: 未能在命名空间"System.Text.Json"中找到类型名"JsonSerializer"
Solution: /add-assembly-reference System.Text.Json.JsonSerializer
Error Pattern Recognition
The command recognizes common error patterns:
Type Forward Errors
未能在命名空间"X.Y.Z"中找到类型名"TypeName"。
此类型已转发到程序集"AssemblyName, Version=X.X.X.X, ..."
Action: Extracts both the type name and assembly name from error message
Missing Reference Errors
找不到类型或命名空间名"TypeName"
Action: Searches for the type in common .NET assemblies
How It Works
1. Type Reference Addition
Adds TryAddType() call in BuildDefaultAssemblyPaths():
TryAddType(typeof(System.Net.WebSockets.WebSocket));
2. Assembly Name Addition
Adds assembly name to the assembly list:
foreach (var assemblyName in new[]
{
"System.Runtime",
// ... existing entries
"System.Net.WebSockets",
"System.Net.WebSockets.Client" // ← Added
})
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 · 205 lines · 0 tokens per session scan A 0a3773ad99f5
add-assembly-reference is a command published in the GitHub repository gaoconggit/SharpPad (83 stars, last pushed 7mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,374 tokens. 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 commands, from other repositories
baryon-mode
IF .NET warnings need extermination THEN use this. One-shot Noble Phantasm: snapshots reality (Rider MCP + NuGet MCP), 8 aspects burst at T0, headless/reckless, cross-repo. Full MCP access.
new-config
Scaffold strongly-typed configuration with IOptions , validation, and environment-specific overrides.
new-dto
Scaffold request/response DTOs with records, validation attributes, and mapping from domain entities.
new-middleware
Scaffold ASP.NET Core middleware with request/response pipeline, DI support, structured logging, and proper ordering.
new-worker
Scaffold a background worker using BackgroundService with PeriodicTimer, structured logging, graceful shutdown, and health checks.
types
Run bun run typecheck or tsc or npx tsc and fix all type errors.