/rseng-agent-skills:rseng-code-qualityfrom rseng-agent-skills
Guides writing readable research code and structuring software projects: naming, formatting, style guides, linters, pre-commit hooks, modular design, and conventional directory layout.
Ships in rseng-agent-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
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.
Apply these rules when authoring or reviewing code:
Do not enforce style by hand - let tools do it:
The pre-commit framework runs the checks automatically at commit time, from one versioned config - the difference between "we have a linter" and "nothing unlinted lands":
.pre-commit-config.yaml at the repo root lists hook
repositories PINNED to revisions; start from the basics (trailing
whitespace, end-of-file, merge-conflict markers, large-file guard),
add the ecosystem's linter/formatter (ruff for Python), a secret
scanner (rseng-security), and project-specific local hooks where a
custom check earns automation.pre-commit run --all-files ONCE in its own commit - a dedicated
formatting commit keeps blame readable (the same reasoning as
avoiding repo-wide reformats in rseng-legacy-code).pre-commit autoupdate bumps pinned hook
revisions - treat it like any dependency update, on a cadence with
green tests (rseng-dependency-management).pre-commit run --all-files as a CI step or pre-commit.ci) so a
locally bypassed hook (--no-verify) cannot land unchecked
(rseng-ci-cd) - local hooks are convenience; CI is enforcement.A clear, conventional layout lets people (and you) locate things fast, keep code, config, and data separate, isolate issues quickly, and reproduce results - especially valuable for long-term or collaborative work. There is no single official standard, but the following is widely understood.
Put everything for the project in a single, meaningfully named directory.
Keep auxiliary information and metadata at the top level so others can tell what the project does and how to reuse it:
README - what the project is, how to install and run it, how to
reproduce results.LICENSE - the reuse terms.CITATION.cff - how to cite the project (Citation File Format).codemeta.json or a similar metadata standard - machine-readable
software metadata.Organise the rest into sub-directories labelled by content type:
src/ (or code, scripts) - source code.data/ - data, with raw kept separate and never modified: e.g.
data/raw, data/clean, data/processed. This prevents overwriting or
losing the original.results/ - analysis outputs, tables, summary statistics.figures/ (or fig) - generated plots and figures (or fold these into
results/).doc/ - documentation and guides.papers/, presentations/, or references/ - literature; consider
keeping these in a separate project so papers do not mix with a reusable
software package.README or LICENSE inside a sub-directory when its terms
differ (for example, code and data licensed differently)._v2, _final in filenames..gitignore in
Git); never version-control passwords or secrets.src/your_package/, tests/,
pyproject.toml, README, and .gitignore is the common modern shape.pyproject.toml, and scaffolds a new project
directory; it works well with the recommended src layout.A concrete reference stack (as encoded by the NLeSC python-template; see rseng-project-scaffolding): ruff as the single linter, formatter and import sorter; EditorConfig for cross-editor consistency; SonarCloud for hosted static analysis; and first-class type checking with Pyright (or Mypy) - treat type checks as part of linting, not an optional extra.
The generated references.md beside this file lists the source material and pointers:
Learn more (verified):
Check whether any of these applies before moving on:
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
67 skills in this plugin
/rseng-agent-securityCovers operating AI coding agents securely: auditing whether the agent runs sandboxed, permission and dangerous-command configuration, containerized environments, secrets kept out of context, network egress and token privileges, prompt-injection risk, and the privacy of agent use itself. Use PROACTIVELY when permission gating is broadly disabled (skip-permissions modes), when secrets are visible to the agent's shell, or when the agent processes untrusted code, issues or web content; when a project holds personal or confidential data while a cloud agent is active (what leaves the machine, retention, training use), or when the user asks how to run coding agents safely or privately. (Supply-chain security: rseng-security; disclosing agent contributions: rseng-ai-declaration.)/rseng-ai-declarationCovers declaring AI involvement with the AI Declaration Format (https://ai-declaration.org): creating and maintaining an aidecl.yaml that records which AI tools and agents were used, what each contributed, when and how much, plus the README disclosure footnote, JSON/JSON-LD export and CI validation. Machine-readable disclosure is the practice; this format is one implementation. Use PROACTIVELY when an AI assistant or agent creates or modifies a project's content - generate aidecl.yaml if missing, update it after AI-assisted changes. Also use when the user asks about AI transparency, provenance, disclosure or EU AI Act disclosure, wants to state that NO AI was used, or mentions aidecl. For concealment requests see rseng-honesty; for the human review duty see rseng-human-verification./rseng-archivingCovers long-term archiving of research software and data: Software Heritage save requests and SWHID persistent identifiers, Zenodo deposits with versioned DOIs and forge integration, choosing domain and institutional repositories, deciding what to archive (code, data, environments, documentation) and when, and archiving at project retirement. Use when the user wants software or data preserved beyond the life of a forge account, grant or lab, mentions Software Heritage, SWHIDs, Zenodo deposits or archiving, retires or hands over a project, prepares artifacts that must stay resolvable for a paper, or when funder policy requires long-term preservation. (Cutting the release itself is rseng-publishing-releasing; day-to-day data storage and repository choice is rseng-data-management.)/rseng-big-data-processingCovers processing research data that outgrows one machine's memory: out-of-core and chunked computation, Dask for scaling the scientific Python stack, Spark for distributed tabular pipelines, lazy evaluation, partitioning strategies, idempotent and restartable batch jobs, and knowing when NOT to distribute. Use when datasets no longer fit in memory, when the user mentions Dask, Spark, out-of-core or larger-than-memory data, when a pandas/NumPy workflow hits memory limits, or when designing batch pipelines over many files. (Cluster job submission and job arrays are rseng-hpc-computing; pipeline orchestration engines are rseng-workflows; profile first with rseng-performance-profiling.)/rseng-ci-cdCovers continuous integration and delivery for research software: CI/CD concepts, automating builds and tests with GitHub Actions and GitLab CI/CD, and wiring an organization's GitLab CI infrastructure to a GitHub-hosted project. Use when the user asks to set up CI, write a pipeline or workflow file (.github/workflows, .gitlab-ci.yml), add automated builds/tests on push or pull request, publish a package or deploy docs when a tag or release is cut, cache dependencies to speed up CI runs, choose between GitHub Actions and GitLab CI, use self-hosted or GPU runners, mirror a repo, or report external CI status back to GitHub. For what to test and shrinking a test matrix see rseng-testing; for linter and pre-commit policy see rseng-code-quality./rseng-citation-hygieneCovers verifying that every citation is real, correct and current: checking references in manuscripts, READMEs, references files and code metadata against Crossref and OpenAlex, screening cited DOIs against the Retraction Watch database, catching fabricated or mis-attributed citations (a documented AI failure mode), and keeping bibliographies and CITATION.cff files resolvable. Use PROACTIVELY before any bibliography, reference list or citation metadata is finalized or published, whenever the agent itself has produced citations, and when the user asks to check references, mentions broken DOIs, retracted papers or citation verification, or prepares a manuscript, README or software paper with references. (Making your own software citable is rseng-citation-metadata.)npx claudepluginhub fdiblen/rseng-agent-skills --plugin rseng-agent-skillsOther plugins' skills for the same job