← ClaudeAtlas

rseng-code-qualitylisted

Covers writing readable research code and structuring software projects: naming, formatting, style guides, linters and formatters, pre-commit hooks, modular design, and a conventional directory layout with top-level metadata files. Use when the user asks how to make code readable or clean, pick or enforce a style guide, set up linting/formatting or pre-commit, name variables and functions, organise a repo, or decide where files and data go. For generating a new project from a maintained template see rseng-project-scaffolding; for quantitative complexity and duplication measurement see rseng-software-metrics; for architecture-level structure see rseng-software-design.
fdiblen/rseng-agent-skills · ★ 20 · Code & Development · score 81
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