首页龙虾技能列表 › C# — 技能工具

💜 C# — 技能工具

v1.0.1

Avoid common C# mistakes — null traps, async pitfalls, LINQ gotchas, and disposal leaks.

3· 1,200·4 当前·4 累计
by @ivangdavila (Iván)·MIT-0
下载技能包
License
MIT-0
最后更新
2026/2/26
安全扫描
VirusTotal
无害
查看报告
OpenClaw
安全
high confidence
This is an instruction-only C# reference skill that provides static guidance on common C# pitfalls and does not request secrets, install code, or contact external endpoints.
评估建议
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 behavio...
详细分析 ▾
用途与能力
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.
指令范围
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.
安装机制
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.
凭证需求
The skill requests no environment variables, credentials, or config paths. This is proportional to its purpose as a static reference.
持久化与权限
The skill is not always-enabled and uses normal autonomous-invocation defaults. It does not request elevated persistence or cross-skill configuration changes.
安全有层次,运行前请审查代码。

License

MIT-0

可自由使用、修改和再分发,无需署名。

运行时依赖

🖥️ OSLinux · macOS · Windows

版本

latestv1.0.12026/2/10

Initial release

● 无害

安装命令 点击复制

官方npx clawhub@latest install csharp
镜像加速npx clawhub@latest install csharp --registry https://cn.clawhub-mirror.com

技能文档

Quick Reference

TopicFile
Null reference, nullable typesnulls.md
Async/await, deadlocksasync.md
Deferred execution, closureslinq.md
Value vs reference, boxingtypes.md
Iteration, equalitycollections.md
IDisposable, using, finalizersdispose.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
数据来源:ClawHub ↗ · 中文优化:龙虾技能库
OpenClaw 技能定制 / 插件定制 / 私有工作流定制

免费技能或插件可能存在安全风险,如需更匹配、更安全的方案,建议联系付费定制

了解定制服务