fortran-namelist

fortran-namelist is a skill for Claude Code, Codex from cxcscmu/SkillLearnBench. It costs 18 tokens per session (1,222 once invoked), scanned A, original, MIT.

Guidance for reading and changing Fortran namelist files, which are human-readable configuration files used by many scientific programs. These files group settings into sections with names and values.

In plain words
What is it for?
Use it to read configuration values, change individual parameters or arrays, write the file back, or parse simple settings with regular expressions.
Why use it?
Namelists have syntax details such as sections, arrays, comments, and flexible spacing that can make manual editing error-prone. This helps update settings while preserving the file structure.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to read configuration values, change individual parameters or arrays, write the file back, or parse simple settings with regular expressions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cxcscmu/skilllearnbench/fortran-namelist
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add cxcscmu/SkillLearnBench --skill fortran-namelist
Clone the repo
git clone --depth 1 https://github.com/cxcscmu/SkillLearnBench

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for fortran-namelist

README.md
[![agentmods](https://agentmods.dev/badge/skills/cxcscmu/skilllearnbench/fortran-namelist.svg)](https://agentmods.dev/skills/cxcscmu/skilllearnbench/fortran-namelist)
Your own site
<a href="https://agentmods.dev/skills/cxcscmu/skilllearnbench/fortran-namelist"><img src="https://agentmods.dev/badge/skills/cxcscmu/skilllearnbench/fortran-namelist.svg" alt="Measured on agentmods" height="20"></a>
Per session 18 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,222 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00018 $0.01222
Opus 5 $0.00009 $0.00611
Sonnet 5 $0.00004 $0.00244
Haiku 4.5 $0.00002 $0.00122

Measured 8d ago against content hash efac5c972337, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

fortran-namelist 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 8d 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.

skills/b1-one-shot-claude-haiku-4-5/temperature-simulation/fortran-namelist/SKILL.md · 165 lines

How it starts

The opening of the file, as written. The whole thing — 165 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Fortran Namelist Skill

Overview

Fortran namelists are human-readable configuration files used by many scientific models. They use &section syntax and key=value pairs. Parsing requires careful handling of Fortran syntax quirks.

File Format

&section_name
   parameter1 = value1
   parameter2 = value2, value3, value4
   array_param = 1, 2, 3, 4, 5
/

Key features:

  • Sections enclosed with &name and /
  • Each section ends with /
  • Values can be scalars or comma-separated arrays
  • Comments may appear (starting with !)
  • Spaces and newlines are flexible

Reading Namelists

Using f90nml Library (Recommended)

import f90nml

# Read entire namelist
nml = f90nml.read('/path/to/config.nml')

# Access values
kw = nml['light']['Kw']
coef_mix = nml['mixing']['coef_mix_hyp']

# Modify values
nml['light']['Kw'] = 0.35
nml['mixing']['wind_factor'] = 1.1

# Write back
nml.write('/path/to/config.nml', force=True)

Installation

pip install f90nml

Manual Parsing with Regex

For simple changes without additional dependencies:

import re

def read_nml_parameter(nml_file, section, param):
    """Extract single parameter value from namelist"""
    with open(nml_file, 'r') as f:
        content = f.read()

    # Pattern: find section, then parameter
    pattern = (r'&' + section + r'.*?' +
               r'(\s+' + param + r'\s*=\s*)' +
               r'([^,\n/]+)')
    match = re.search(pattern, content, re.DOTALL)

    if match:
        value_str = match.group(2).strip()
        try:
            return float(value_str)
        except ValueError:
            return value_str
    return None

def update_nml_parameter(nml_file, section, param, value):
    """Update a parameter in namelist"""
    with open(nml_file, 'r') as f:
        content = f.read()

    # Pattern to find and replace parameter in section
    pattern = (r'(&' + section + r'.*?)' +
               r'(\s+' + param + r'\s*=\s*)' +
               r'([^,\n/]+)')
    replacement = r'\g<1>\g<2>' + str(value)

    new_content = re.sub(pattern, replacement, content,
                        count=1, flags=re.DOTALL)

    with open(nml_file, 'w') as f:
        f.write(new_content)

Read the full file on GitHub · 165 lines

Changes

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.

  1. 8d ago First seen · 165 lines · 18 tokens per session scan A efac5c972337

Subscribe to this mod's changes

fortran-namelist is a skill published in the GitHub repository cxcscmu/SkillLearnBench (83 stars, last pushed 2mo ago), licensed MIT. It adds 18 tokens to every session and 1,222 once invoked, about $0.0001 per session on Opus 5. 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-08-30.

Related

Other skills, from other repositories

rdkit

Cheminformatics toolkit for fine-grained molecular control. SMILES/SDF parsing, descriptors (MW, LogP, TPSA), fingerprints, substructure search, 2D/3D generation, similarity, reactions. For standard workflows with simpler interface, use datamol (wrapper around RDKit). Use rdkit for advanced control, custom…

benchflow-ai/skillsbench · 80 tokens

pymatgen

Materials science toolkit. Crystal structures (CIF, POSCAR), phase diagrams, band structure, DOS, Materials Project integration, format conversion, for computational materials science.

benchflow-ai/skillsbench · 38 tokens

python-packages

Installing and using common Python packages in SkillBench containers. Covers scientific computing, data analysis, and file format libraries.

A-EVO-Lab/a-evolve · 27 tokens

qutip

Quantum mechanics simulations and analysis using QuTiP (Quantum Toolbox in Python). Use when working with quantum systems including: (1) quantum states (kets, bras, density matrices), (2) quantum operators and gates, (3) time evolution and dynamics (Schrödinger, master equations, Monte Carlo), (4) open quantum systems…

benchflow-ai/skillsbench · 149 tokens

sympy

Use this skill when working with symbolic mathematics in Python. This skill should be used for symbolic computation tasks including solving equations algebraically, performing calculus operations (derivatives, integrals, limits), manipulating algebraic expressions, working with matrices symbolically, physics…

benchflow-ai/skillsbench · 98 tokens

hotpath_init

Configure hotpath profiling in a Rust project. Adds the hotpath dependency with feature-gated setup, instruments main with hotpath::main, functions with measure/measureall, and wraps channels, mutexes, rwlocks, streams, futures, reqwest clients, axum routers and byte-level I/O with hotpath macros. Use when the user…

pawurb/hotpath-rs · 88 tokens