OpenLum.Core/Skills/coding/SKILL.md
Local coding workflow: read/write/list_dir/exec,加上 Grep + Glob 的纯文本搜索。Use when: editing code, building, refactoring, or exploring a codebase. Success = compile passes; user runs the program.
npx skillsauth add ldotjdot/openlum codingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
工作区内进行通用编码工作的基础 Skill:使用 read、write、list_dir、exec,并结合 Grep + Glob 做代码 / 文本搜索。
铁律:编译通过 = 完成。禁止 exec 运行程序(如 dotnet run、python xxx.py)。用户自行运行。
csharp 的 SKILL 约定,再结合本 coding 与 search skill。python skill,在 script/任务目录 下组织脚本。editing skill,通过 exec 执行其提供的 PowerShell 片段。Success = compile passes. Do not run the program; let the user run it.
按以下顺序执行,形成「分析 → 规划 → 执行 → 验证」的闭环,减少返工、提高一次通过率。
list_dir、read、Grep、Glob 找到相关文件与调用关系;若有编译/运行错误,记录完整错误信息与行号。read/write,定位用 Grep/Glob,构建用 exec;涉及 C# 时先读 csharp skill。read 目标文件及周边上下文,保持命名、格式、异常处理与项目一致。dotnet build),避免一次改太多再排查。write。exec 执行 build(如 dotnet build -v normal),以编译通过为完成标志。dotnet run / python xxx.py 等;运行与测试由用户本地完成。search skill:
rg/grep);;,禁止 &&、cmd /c、bash 风格。含空格路径用 & "path"。当前没有单独的「按行号读」「按片段替换」工具,可用 exec 执行 PowerShell 实现;更完整的编辑方法(ReadRange、ReplaceRangeWithText、ReplaceAll、InsertLines、DeleteRange、AppendLines 等)见 editing skill,均用 Shell 命令行实现,可直接在编程时复用。
Grep 得到行号后,用下面命令只读出该区间(避免 read 只读前 N 行、读不到后面):
$path = '.\src\Foo.cs'; $s = 101; $e = 150; (Get-Content $path)[$s-1..$e-1]
$path:文件路径,工作区相对(如 .\src\Foo.cs)或绝对均可。$s、$e:起始行、结束行(1-based);PowerShell 数组 0-based,故用 [$s-1..$e-1]。只改第 S 行~第 E 行,其余行不动(整文件会重写,但逻辑上是“按段改”):
$path = '.\src\Foo.cs'; $s = 101; $e = 110
$lines = Get-Content $path
$new = @(' // 新代码行1', ' // 新代码行2')
$lines[$s-1..$e-1] = $new
$lines | Set-Content $path -Encoding UTF8
$new 为要替换成的若干行;行数可与原段不同。$path 时用单引号;若路径在变量中,注意转义或引号。已知要改的字符串或简单模式时,可直接整文件替换:
$path = '.\src\Foo.cs'
(Get-Content $path) -replace '旧片段', '新片段' | Set-Content $path -Encoding UTF8
-replace 支持正则;若只替换字面串,注意转义正则特殊字符(如 [、$)。development
浏览网页。与 read skill 风格一致:直接 exec 调用 exe,传参执行,stdout 为结果。
development
在缺少专用工具时,优先使用本地 Python 脚本完成复杂任务。临时脚本统一放在工作区 script 目录下的独立子文件夹中。
tools
用于在 C# / .NET 项目中进行规划、实现、重构和调试。优先使用 dotnet CLI 完成项目管理与编译,结合 Grep / Glob / 子代理 / 网络搜索进行代码定位与 Debug。禁止执行 dotnet run / dotnet test,编译通过即视为任务完成。
development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.