用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/cxcscmu/SkillLearnBench --skill glm-nml-edit命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | glm-nml-edit |
| description | A skill to edit GLM's namelist file (glm3.nml) by safely updating parameter values within specific blocks. |
The General Lake Model (GLM) uses Fortran namelist (.nml) files for configuration. This skill covers how to parse and update specific parameters in these files.
No special installation is required if using standard CLI tools like sed or python for string replacement. For more robust parsing, use a regex-based approach.
import re
def update_nml(file_path, section, parameter, value):
with open(file_path, 'r') as f:
content = f.read()
# Find the section and update the parameter within it
pattern = rf"(&{section}.*?\b{parameter}\s*=\s*)[^,\n]*"
replacement = rf"\g<1>{value}"
# Use flags=re.DOTALL to match across lines if needed,
# but GLM parameters are usually on one line.
new_content = re.sub(pattern, replacement, content, flags=re.IGNORECASE | re.DOTALL)
with open(file_path, 'w') as f:
f.write(new_content)
# Update Kw in &light section
sed -i '/&light/,/\// s/Kw *= *[0-9.]*/Kw = 0.45/' glm3.nml
&glm_setup, &light).the_depths = 0.0, 1.0, 2.0). Update these carefully to maintain format.grep after modification.基于 SOC 职业分类