rseng-code-qualitylisted
Install: claude install-skill fdiblen/rseng-agent-skills
# Readable code and project structure
Use this skill when writing or reviewing research code for readability, or
when laying out a project's directories. Both goals serve the same end:
code is read far more often than it is written (a commonly cited read/write
ratio is 7:1), so anything that helps a future reader - including the
original author months later - directly improves reusability, the "R" in
the FAIR research software principles.
Favour conventions others already recognise over clever, project-specific
inventions.
## Make code readable
Apply these rules when authoring or reviewing code:
- Use descriptive names for variables, functions, classes, and modules
that explain their purpose. Avoid single-letter names outside tight
loops or well-known math notation.
- Format consistently: consistent indentation and spacing throughout.
Consistency within a project or module matters more than any global
ideal - when joining existing code, adopt the conventions already in
place rather than imposing your own.
- Separate code into sections with blank lines (between classes,
functions, logical blocks) so structure is visible at a glance.
- Keep lines short. Prefer many short lines over few long ones - blocks
that are horizontally short and vertically long are easier to scan.
- Use indentation to show hierarchy and mark the beginning and end of
control structures.
- Add type annotations (type hints) for untyped or dynamically typed
languages such as Python or J