← 返回 Skills 市场
ivangdavila

C#

作者 Iván · GitHub ↗ · v1.0.1
linuxdarwinwin32 ✓ 安全检测通过
1308
总下载
3
收藏
4
当前安装
2
版本数
在 OpenClaw 中安装
/install csharp
功能描述
Avoid common C# mistakes — null traps, async pitfalls, LINQ gotchas, and disposal leaks.
使用说明 (SKILL.md)

Quick Reference

Topic File
Null reference, nullable types nulls.md
Async/await, deadlocks async.md
Deferred execution, closures linq.md
Value vs reference, boxing types.md
Iteration, equality collections.md
IDisposable, using, finalizers dispose.md

Critical Rules

  • ?. and ?? prevent NRE but ! overrides warnings — still crashes if null
  • .Result or .Wait() on UI thread — deadlock, use await or ConfigureAwait(false)
  • LINQ is lazy — query.Where(...) doesn't execute until iteration
  • Multiple enumeration of IEnumerable — may re-query database, call .ToList() first
  • Closure captures variable, not value — loop variable in lambda captures last value
  • Struct in async method — copied, modifications lost after await
  • String comparison culture — StringComparison.Ordinal for code, CurrentCulture for UI
  • GetHashCode() must be stable — mutable fields break dictionary lookup
  • Modifying collection while iterating — throws, use .ToList() to iterate copy
  • decimal for money — float/double have precision loss
  • readonly struct prevents defensive copies — use for performance
  • sealed prevents inheritance — enables devirtualization optimization
安全使用建议
This skill is a static collection of C# best-practice notes and appears internally consistent. The only minor oddity is the declared 'dotnet' binary requirement in the metadata despite there being no instructions that run code; that requirement is harmless but may be unnecessary. If you plan to allow the agent to execute example code, review any code before executing (running untrusted code with dotnet could be risky). Otherwise, it's safe from credential exfiltration or external network behavior — no secrets, no installers, no endpoints are present.
功能分析
Type: OpenClaw Skill Name: csharp Version: 1.0.1 The skill bundle consists entirely of metadata and documentation files (`.md`). The `SKILL.md` defines the skill and its requirement for the `dotnet` binary, which is appropriate for a C# skill. All other markdown files provide educational content on C# programming pitfalls. There is no executable code, no prompt injection attempts against the AI agent, and no indicators of malicious behavior such as data exfiltration, unauthorized command execution, or persistence mechanisms. The content is purely informational and aligned with the stated purpose of providing C# programming guidance.
能力评估
Purpose & Capability
The skill's name, description, and included .md files all align: they are C# guidance documents. The only minor mismatch is the declared required binary 'dotnet' in metadata — none of the instructions actually run dotnet or require it to read the docs. Requiring the dotnet binary is plausible if the agent were to compile/run examples, but the skill itself contains only static guidance.
Instruction Scope
SKILL.md and the included files only contain static advice about nulls, async, LINQ, disposal, types, and collections. There are no runtime commands, no references to reading arbitrary system files or environment variables, and no instructions to transmit data to external endpoints.
Install Mechanism
No install spec and no code files — this is the lowest-risk pattern (instruction-only). Nothing will be downloaded or written to disk by the skill itself.
Credentials
The skill requests no environment variables, credentials, or config paths. This is proportional to its purpose as a static reference.
Persistence & Privilege
The skill is not always-enabled and uses normal autonomous-invocation defaults. It does not request elevated persistence or cross-skill configuration changes.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install csharp
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /csharp 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
Initial release
v1.0.0
Initial release
元数据
Slug csharp
版本 1.0.1
许可证
累计安装 4
当前安装数 4
历史版本数 2
常见问题

C# 是什么?

Avoid common C# mistakes — null traps, async pitfalls, LINQ gotchas, and disposal leaks. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 1308 次。

如何安装 C#?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install csharp」即可一键安装,无需额外配置。

C# 是免费的吗?

是的,C# 完全免费(开源免费),可自由下载、安装和使用。

C# 支持哪些平台?

C# 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(linux, darwin, win32)。

谁开发了 C#?

由 Iván(@ivangdavila)开发并维护,当前版本 v1.0.1。

💬 留言讨论