Logo von Rseng Code Quality

Rseng Code Quality

Community
fdiblen
rseng-code-quality

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.

Übersicht

Herausgeberfdiblen
Repositoryrseng-agent-skills
Skill-Namerseng-code-quality
Sterne
26
Forks
2
Mitgelieferte Dateien
1
LizenzCC-BY-4.0
Links
  • Anweisungen in Markdown

    Eine SKILL.md-Datei, die das Modell bei Bedarf lädt. So werden nur dann Token verbraucht, wenn eine Anfrage tatsächlich dazu passt.

  • Funktioniert mit jedem LLM

    KI-Skills bestehen aus reinem Markdown, nicht aus anbieterspezifischem Code. Daher funktionieren sie mit GPT, Claude, Gemini, Grok oder einem lokalen Modell.

  • 1 mitgelieferte Dateien

    Skripte, Vorlagen und Referenzmaterial, die das Modell bei der Arbeit lesen kann. Die Dateien sind schreibgeschützt und werden niemals ausgeführt.

  • Open Source

    Von fdiblen auf GitHub veröffentlicht. Prüfen Sie den Quellinhalt vor der Installation.

Installation

Installieren Sie den KI-Skill Rseng Code Quality in TypingMind, um ihn mit jedem LLM zu nutzen, oder fügen Sie ihn einem anderen Agenten hinzu, der SKILL.md lesen kann.

1

In TypingMind installieren

TypingMind installiert einen Skill direkt aus seinem GitHub-Ordner — liest SKILL.md, bündelt die Ressourcendateien und speichert das Ergebnis lokal.

  1. Öffnen Sie die App und gehen Sie zu Plugins → Skills.
  2. Wählen Sie „Von GitHub installieren“.
  3. Fügen Sie die unten angegebene URL des Skill-Ordners ein und bestätigen Sie.
    https://github.com/fdiblen/rseng-agent-skills/tree/main/skills/rseng-code-quality
  4. Aktivieren Sie den Skill in jedem Chat, in dem er verfügbar sein soll.
Plugins → Skills → Skill anlegen → Über GitHub-URL. Fügen Sie dann die Ordner-URL ein und klicken Sie auf „Weiter“.
2

In einem anderen Agenten installieren

Jeder Agent, der das Agent-Skills-Format lesen kann, kann diesen Skill nutzen — kopieren Sie den Ordner in das Skill-Verzeichnis des jeweiligen Agenten.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/fdiblen/rseng-agent-skills.git /tmp/rseng-agent-skills
mkdir -p .claude/skills
cp -r /tmp/rseng-agent-skills/skills/rseng-code-quality .claude/skills/rseng-code-quality
Starten Sie Claude Code nach dem Kopieren neu, damit der neue Skill erkannt wird.

In TypingMind verwenden

Aktivieren Sie Rseng Code Quality in einem beliebigen Chat in TypingMind. Den Rest übernimmt das Modell. Name und Beschreibung des Skills stehen im System-Prompt. Sobald eine Anfrage passt, lädt das Modell selbstständig die vollständigen Anweisungen — Sie müssen den Skill nie manuell aufrufen, und er verbraucht erst Token, wenn er tatsächlich genutzt wird.

Das Modell lädt Rseng Code Quality automatisch, sobald eine passende Anfrage gestellt wird.

Funktioniert mit jedem KI-Modell

KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher ist Rseng Code Quality nicht an das Modell gebunden, für das der Skill geschrieben wurde. Installieren Sie ihn einmal in TypingMind und nutzen Sie ihn mit GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder einem selbst betriebenen lokalen Modell — alles mit Ihren eigenen API-Keys.

  • Wird nur bei Bedarf geladen

    Der System-Prompt enthält nur den Namen und die Beschreibung. Die Anweisungen werden bei der ersten passenden Anfrage geladen. Ein ungenutzter Skill verursacht daher keine Kosten.

  • Modell im laufenden Chat wechseln

    Da der Skill aus Anweisungen statt aus Code besteht, funktioniert er auch nach einem Modellwechsel — das nächste Modell liest dieselbe SKILL.md-Datei.

Skill-Anweisungen

Dies ist der Inhalt von SKILL.md, den das Modell lädt. Lesen Sie ihn vor der Installation — ein Skill besteht aus Anweisungen, denen Ihr Modell folgt.

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 JavaScript, and validate them with a type checker (e.g. mypy for Python). Type checking catches faulty assumptions as well as faulty annotations.
  • Write informative comments and docstrings that convey intent and context - what the code is for and why - not a restatement of the syntax. Comment where logic is not self-evident.

Follow a style guide

  • Adopt the community-standard style guide for the language rather than inventing one: PEP 8 for Python, the Google R style guide for R; Google's style guides cover Python, Java, R, C++, and Shell.
  • A style guide is a shared set of conventions so everyone's contributions look similar. Consistency across the project is the point.
  • When contributing to an existing project, match its existing style even if it differs from your preference.

Automate style and quality checks

Do not enforce style by hand - let tools do it:

  • Run an auto-formatter to apply style mechanically (e.g. Black for Python). This removes formatting from code review entirely.
  • Run a linter - static analysis that flags inconsistencies, stylistic errors, suspicious constructs, and some real bugs (e.g. Pylint for Python).
  • Lean on editor/IDE support: VS Code, PyCharm, RStudio, and Eclipse can check conformance as you type, warn on deviations, and often autocorrect.
  • Wire formatters and linters into pre-commit hooks and CI so every change is checked automatically, not just when someone remembers.

Pre-commit: the guardrail framework

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":

  • Anatomy: a .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.
  • Adoption on an existing repo: install the hooks, then run 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).
  • Keep hooks fast: commit-time checks have a seconds budget - slow checks (test suites, type-checking large trees) belong in CI, not in the hook, or people bypass hooks entirely and the guardrail is gone.
  • Update deliberately: pre-commit autoupdate bumps pinned hook revisions - treat it like any dependency update, on a cadence with green tests (rseng-dependency-management).
  • SKIP honestly: skipping a hook (SKIP=) is legitimate when the hook itself is broken or inapplicable to the change - record why in the commit; skipping to silence a real finding just moves the failure to CI or review.
  • Mirror in CI: run the same hooks in the pipeline (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.

Write modular, reusable code

  • Split code into small functions that each achieve a single, clear purpose - easier to read, test, and reuse.
  • Group related functions into reusable libraries and packages.
  • Reach for established design patterns for common, well-defined problems instead of reinventing a solution; this saves time and raises quality.
  • Prefer existing, well-tested libraries for common tasks (e.g. reading and writing standard data formats) over bespoke, error-prone code.

Structure the project directory

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.
  • Add a nested README or LICENSE inside a sub-directory when its terms differ (for example, code and data licensed differently).

Name files and directories consistently

  • Use standard, self-explanatory directory names (as above).
  • Avoid spaces and special characters - they break tools; use underscores or hyphens and stay consistent.
  • Name files to reflect their contents; let version control track versions rather than encoding _v2, _final in filenames.

Version-control the project

  • Put the whole project under version control in its own repository; at minimum version-control code and data sub-directories, plus anything written by hand (docs, manuscripts) rather than generated.
  • Untrack files too large or too sensitive to expose (use .gitignore in Git); never version-control passwords or secrets.
  • Use tags/releases to mark specific versions (a journal submission, a dissertation version) instead of proliferating dated filenames.

Scaffold new projects with tooling

  • For Python, a src-layout with src/your_package/, tests/, pyproject.toml, README, and .gitignore is the common modern shape.
  • Poetry manages dependencies, virtual environments, versioning, and publishing from a single pyproject.toml, and scaffolds a new project directory; it works well with the recommended src layout.
  • Project templates/skeletons enforce a standardised layout and modern tooling, cutting setup time and keeping teams consistent.

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.

Working with this skill

The generated references.md beside this file lists the source material and pointers:

  • references.md - verified Learn more pointers

Learn more (verified):

Related skills

Check whether any of these applies before moving on:

  • rseng-documentation - docstrings and README quality
  • rseng-fair-software - readability serves reusability
  • rseng-language-guides - per-language style and tool choice
  • rseng-legacy-code - repo-wide reformat cautions
  • rseng-project-scaffolding - templates encode this tooling baseline
  • rseng-software-metrics - quantifying complexity and duplication

Mitgelieferte Dateien

Das Modell liest diese Dateien bei Bedarf, während der Skill geladen ist. Sie werden als lesbare Dateien bereitgestellt und niemals ausgeführt.

Häufig gestellte Fragen

Was macht der KI-Skill Rseng Code Quality?

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

Warum Rseng Code Quality in TypingMind nutzen?

Weil Sie den Skill einmal installieren und mit jedem Modell verwenden können. Rseng Code Quality besteht aus reinem Markdown statt aus anbieterspezifischem Code. So funktioniert derselbe Skill mit GPT-5, Claude, Gemini, Grok oder einem lokalen Modell – und Sie können das Modell mitten im Chat wechseln, ohne dass der Skill seine Funktion verliert. TypingMind verwendet Ihre eigenen API-Schlüssel. Sie bezahlen die Anbieter daher direkt statt über ein Abonnement pro Nutzerplatz, und Ihre Skills und Chats bleiben in Ihrem eigenen Speicher.

Wie installiere ich Rseng Code Quality in TypingMind?

Öffnen Sie in TypingMind Plugins → Skills → Von GitHub installieren und fügen Sie https://github.com/fdiblen/rseng-agent-skills/tree/main/skills/rseng-code-quality ein. TypingMind liest die Datei SKILL.md, bündelt die zugehörigen Dateien und installiert alles als Skill, den Sie für jeden Chat einzeln aktivieren können.

Welche KI-Modelle können Rseng Code Quality nutzen?

Jedes Modell, das Sie in TypingMind verbinden. KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher können GPT, Claude, Gemini, Grok und lokale Modelle diesen Skill laden, wenn eine Anfrage dazu passt.

Wie viele KI-Modelle kann ich mit Rseng Code Quality verwenden?

So viele Sie möchten. Solange ein Modell Skills unterstützt, können Sie Rseng Code Quality damit verwenden – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama und weitere – alles in TypingMind mit Ihren eigenen API-Schlüsseln.

Ist der KI-Skill Rseng Code Quality kostenlos?

Ja. Der Skill wird von fdiblen auf GitHub unter der Lizenz CC-BY-4.0 veröffentlicht. Sie bezahlen nur Ihren eigenen KI-Anbieter für die verwendeten Token.

Was sind KI-Skills?

Ein KI-Skill ist ein wiederverwendbares Anweisungspaket, das einem KI-Modell vermittelt, wie es eine bestimmte Aufgabe erledigt. Es folgt dem offenen Format Agent Skills: eine Datei namens SKILL.md mit einem Namen und einer Beschreibung sowie allen Skripten, Vorlagen oder Referenzdateien, die das Modell möglicherweise benötigt. Das Modell liest die Anweisungen nur, wenn Ihre Anfrage zum Skill passt. Ein installierter Skill verursacht daher erst Kosten, wenn er verwendet wird.

Wie unterscheiden sich KI-Skills von Plugins oder MCP-Servern?

Ein Plugin oder MCP-Server stellt einem Modell neue aufrufbare Tools bereit – Code, der auf einem System ausgeführt wird und ein Ergebnis zurückgibt. Ein KI-Skill vermittelt dem Modell stattdessen Wissen und Vorgehensweisen: wie es eine Aufgabe angeht, welche Schritte es befolgt und wie eine gute Ausgabe aussieht. Skills bestehen aus reinem Markdown und benötigen daher weder Server noch API-Schlüssel oder Laufzeitumgebung. Sie funktionieren mit jedem Modell.

Alle

Jetzt eigenen KI-Arbeitsbereich einrichten

Abonnieren Sie unseren Newsletter und erfahren Sie mehr über neue Funktionen und kommende Gewinnspiele 👇