Logo von Repo Entropy Audit

Repo Entropy Audit

Community
liqiongyu
repo-entropy-audit

Full-repository entropy scan across six axes: structure (dependency graph, layering, SCC), semantics (naming diversity, state model fragmentation), behavior (error model variants, boundary handling), context (doc freshness, instruction-file coverage), protocol (instruction-file consistency), and control (rule enforcement gaps). Produces a module-level heatmap, trend comparison, and prioritized cleanup targets. Activate when the user asks for "entropy audit", "repo health scan", "heatmap", "tech debt scan", or "full entropy report". Do NOT use for PR-level review (use entropy-review) or control-plane audit (use control-plane-auditor).

Übersicht

Herausgeberliqiongyu
Repositorymy-agents
Skill-Namerepo-entropy-audit
Sterne
29
Forks
3
Mitgelieferte Dateien
5
LizenzMIT
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.

  • Mitgelieferte Dateien: 5

    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 liqiongyu auf GitHub veröffentlicht. Prüfen Sie vor der Installation die Quelldateien.

Installation

Installieren Sie den KI-Skill Repo Entropy Audit 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. Dabei liest die App 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/liqiongyu/my-agents/tree/main/skills/repo-entropy-audit
  4. Aktivieren Sie den Skill in jedem Chat, in dem er verfügbar sein soll.
Plugins → Skills → Skill hinzufügen → Ü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 unterstützt, 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/liqiongyu/my-agents.git /tmp/my-agents
mkdir -p .claude/skills
cp -r /tmp/my-agents/skills/repo-entropy-audit .claude/skills/repo-entropy-audit
Starten Sie Claude Code nach dem Kopieren neu, damit der neue Skill erkannt wird.

In TypingMind verwenden

Aktivieren Sie Repo Entropy Audit 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 Repo Entropy Audit 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 Repo Entropy Audit 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-Schlüsseln.

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

Repo Entropy Audit

Scan an entire repository for entropy across six axes and produce a module-level heatmap, trend comparison against a stored baseline, and prioritized cleanup targets.

This skill examines the code itself for entropy patterns. For auditing the control system (instruction files, rules, guards), use control-plane-auditor. For PR-level consistency checks, use entropy-review.

When To Use

  • Periodic health check (monthly, quarterly, or before major releases)
  • User asks for a full entropy scan, heatmap, or tech debt overview
  • User wants to compare current state against a previous baseline
  • User asks "where should we focus cleanup effort?"

When Not To Use

  • Reviewing a specific PR or diff → entropy-review
  • Auditing instruction files and control infrastructure → control-plane-auditor
  • Reviewing code for correctness → review
  • Auditing dependencies → dependency-audit

Phase 1 — Scope

1a. Determine scan scope

  • Full repo (default): scan all source directories
  • Specific modules: user can specify a subset of modules/directories
  • Exclude: node_modules/, dist/, .git/, vendored code, generated output

1b. Identify module structure

Detect the project's module/package layout:

bash
# Monorepo packages
ls apps/ packages/ libs/ services/ 2>/dev/null

# Or single-app with directory-based modules
ls src/

Build a module list. Each module becomes a row in the heatmap.

1c. Check for existing baseline

bash
ls .entropy-baseline/latest.json 2>/dev/null

If a baseline exists, load it for trend comparison in Phase 3.

1d. Load constraint context

Read available instruction files and extract any defined constraints (glossary, dependency rules, error model, naming conventions). These improve scan accuracy but are not required.


Phase 2 — Scan

For each module, scan across six axes. Use Scan Dimensions for detailed methods.

Adapt commands to the project's tech stack. The reference methods target TypeScript/JavaScript but the principles apply to any language.

2a. Structure

For each module:

  • Dependency direction: identify imports, check for layer violations
  • Circular dependencies: check for SCCs in the import graph
  • Utility coupling: measure util/common/helpers directory size and who depends on them
  • File size distribution: find oversized files (> 500 lines)

Score: 🟢 low / 🟡 medium / 🔴 high per Heatmap Format.

2b. Semantics

For each module:

  • Naming diversity: for core domain concepts, count identifier variants
  • State definition scatter: count files defining status/state enums per entity
  • Glossary compliance: if glossary exists, check canonical vs alias usage

Score per heatmap guidelines.

2c. Behavior

For each module:

  • Error handling patterns: classify (try-catch, promise catch, Result type, null return, silent default)
  • Error envelope variants: count distinct error response shapes (API modules)
  • Boundary behavior: sample null/empty handling for consistency

Score per heatmap guidelines.

2d. Context

For each module:

  • Instruction file presence: does the module have a substantive AGENTS.md/CLAUDE.md?
  • Doc freshness: compare doc last-modified vs code last-modified
  • Dead references: check for broken links in instruction files

Score per heatmap guidelines.

2e. Protocol

For each module:

  • Template compliance: does the instruction file follow the project's standard template?
  • Verification consistency: are verification commands present and consistent with peers?
  • CI gate alignment: does CI enforce the same gates for this module as for others?

Score per heatmap guidelines.

2f. Control

For each module:

  • Rule enforcement ratio: documented rules vs automated enforcement
  • Cleanup markers: count TODO/FIXME/HACK/deprecated markers
  • Health check coverage: is this module included in doctor/health scripts?

Score per heatmap guidelines.


Phase 3 — Synthesize

3a. Module-Level Heatmap

Produce the heatmap table using the format in Heatmap Format.

Each module gets a row with scores on all six axes plus a derived priority column.

3b. Trend Comparison

If a previous baseline exists:

  • Compare module scores: which improved, which worsened, which are new
  • Compare aggregate metrics: total high-entropy modules, instruction file count, etc.
  • Highlight the most significant changes

Format per Baseline Format § Trend Comparison.

3c. High-Spread Patterns

Identify the patterns with highest replication risk:

  • Which problematic patterns appear in multiple modules?
  • Which patterns are still being actively copied (evidence from recent commits)?
  • How many files/modules are affected?

Rank by: (occurrence count) × (recency of replication).

3d. Cleanup Priorities

Rank cleanup targets by (impact × inverse effort):

  1. High-spread, low-effort items first (e.g., naming unification with search-replace)
  2. High-spread, medium-effort items next (e.g., error model unification)
  3. High-spread, high-effort items last (e.g., structural decomposition of SCC)

For each target, suggest which tool or skill can help:

  • Naming unification → refactoring task
  • Error model → review + architecture decision
  • Structural issues → implementation-planning for phased refactor
  • Doc gaps → project-documentation or control-plane-auditor

Phase 4 — Baseline

4a. Generate snapshot

Write a baseline snapshot to .entropy-baseline/latest.json using the format in Baseline Format.

If a previous latest.json exists, rename it to .entropy-baseline/<date>.json before writing the new one.

4b. Confirm with user

Before writing the baseline file, show the user:

  • Summary of what will be stored
  • File location
  • Whether a previous baseline will be archived

Proceed only with user confirmation.


Methodology References

Example Prompts

  • "Run an entropy audit on this repo"
  • "Generate an entropy heatmap"
  • "Where should we focus cleanup effort?"
  • "Compare entropy against last month's baseline"
  • "Scan packages/api for entropy"

Caveats

  • Full-repo scans on large monorepos may consume significant tokens. Consider scanning modules individually for very large codebases.
  • Scores are trend signals, not absolute measurements. A 🟡 in one project may represent a different absolute level than 🟡 in another. Do not compare across projects.
  • The heatmap identifies where entropy is concentrated, not why. Understanding root causes requires reading the code. Use findings as starting points for investigation, not as definitive judgments.
  • Detection methods use heuristic shell commands and pattern matching. They will miss some issues and may flag false positives. Judgment is still required.
  • Baseline files contain project metadata. Consider whether they should be gitignored or committed, depending on your project's preferences.
  • This skill writes only to .entropy-baseline/. It does not modify source code, tests, or documentation.

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 Repo Entropy Audit?

Full-repository entropy scan across six axes: structure (dependency graph, layering, SCC), semantics (naming diversity, state model fragmentation), behavior (error model variants, boundary handling), context (doc freshness, instruction-file coverage), protocol (instruction-file consistency), and control (rule enforcement gaps). Produces a module-level heatmap, trend comparison, and prioritized cleanup targets. Activate when the user asks for "entropy audit", "repo health scan", "heatmap", "tech debt scan", or "full entropy report". Do NOT use for PR-level review (use entropy-review) or cont...

Warum Repo Entropy Audit in TypingMind nutzen?

Weil Sie den Skill einmal installieren und mit jedem Modell verwenden können. Repo Entropy Audit 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 Repo Entropy Audit in TypingMind?

Öffnen Sie in TypingMind Plugins → Skills → Von GitHub installieren und fügen Sie https://github.com/liqiongyu/my-agents/tree/main/skills/repo-entropy-audit 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 Repo Entropy Audit nutzen?

Jedes Modell, das Sie mit 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 Repo Entropy Audit verwenden?

So viele Sie möchten. In TypingMind können Sie Repo Entropy Audit mit jedem Modell verwenden, das Skills unterstützt, etwa mit GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama. Dabei nutzen Sie Ihre eigenen API-Schlüssel.

Ist der KI-Skill Repo Entropy Audit kostenlos?

Ja. Der Skill wird von liqiongyu auf GitHub unter der Lizenz MIT 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: Die Datei SKILL.md enthält den Namen und die Beschreibung des Skills. Hinzu kommen bei Bedarf Skripte, Vorlagen oder Referenzdateien für das Modell. 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 kommen daher ohne Server, API-Schlüssel und Laufzeitumgebung aus. Sie funktionieren mit jedem Modell.

Alle anzeigen

Jetzt eigenen KI-Arbeitsbereich einrichten

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