Universal-Code-Splitter für KI

Teilt Codeblöcke für KI (Alt+S zum Umschalten)

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

Autor
_XPK_
Installationen heute
2
Installationen gesamt
2
Bewertungen
0 0 0
Version
1.0
Erstellt am
06.01.2026
Letzte Aktualisierung
06.01.2026
Größe
13,4 KB
Lizenz
MIT
Wird angewandt auf
Alle Seiten

# Universal Code Splitter for AI / Universal-Code-Splitter für KI

[English Description below / Deutsche Beschreibung unten]

---

## 🇬🇧 English Description

**Struggling with ChatGPT's character limit?**
This userscript is the ultimate utility for developers who need to feed large codebases or log files into AI models like ChatGPT, Claude, DeepSeek, or Gemini.

Instead of manually cutting your code and losing context, this tool automatically splits your clipboard content into safe chunks and adds smart headers to keep the AI on track.

### 🚀 Key Features
* **Smart Splitting:** Automatically divides text into chunks (default 8KB, adjustable slider).
* **Context Headers:** Adds `[PART 1 OF X]` to every message so the AI knows it's receiving a multi-part file.
* **Anti-Hallucination Prompt:** Automatically includes a system note: *"Do not analyze until Part X is received"*. This prevents the AI from trying to answer incomplete code.
* **Clean Workflow:** Detects and removes old headers if you copy-paste code back and forth, preventing duplicate markers.
* **Universal Compatibility:** Works on any website (Alt+S overlay).
* **Trusted Types Fix:** Includes a bypass for strict websites like YouTube or Google to ensure the UI renders correctly.

### 🛠️ How to use
1. **Copy** your large code or text to your clipboard (Ctrl+C).
2. Press **Alt + S** to open the overlay panel.
3. Click **"Read Clipboard"**.
4. The script will calculate the size and generate numbered buttons (1, 2, 3...).
5. Click button **1** to copy the first part, paste it into the AI chat.
6. Repeat for the remaining buttons. The buttons turn green when clicked so you don't lose your place.

You can also use this script to safely inspect very long third‑party userscripts or code you found online. By splitting them into multiple parts and sending them piece by piece to ChatGPT, Claude, or other models, you can ask what the script actually does and whether it contains potential security risks (such as hidden tracking, redirects, or data exfiltration), even if the original script is too long to paste at once.

Feel free to use, modify, share or even steal this code.

---

## 🇩🇪 Deutsche Beschreibung

**Probleme mit dem Zeichenlimit von ChatGPT?**
Dieses Userscript ist das perfekte Werkzeug für Entwickler, die großen Code oder lange Log-Dateien in KI-Modelle wie ChatGPT, Claude oder DeepSeek eingeben müssen.

Anstatt den Code mühsam manuell zu stückeln, teilt dieses Tool den Inhalt deiner Zwischenablage automatisch in sichere Häppchen und fügt intelligente Header hinzu.

### 🚀 Hauptfunktionen
* **Intelligente Aufteilung:** Teilt Text in Blöcke (Standard 8KB, per Schieberegler anpassbar).
* **Kontext-Header:** Fügt jeder Nachricht `[PART 1 OF X]` hinzu, damit die KI weiß, dass es sich um eine mehrteilige Datei handelt.
* **Warte-Befehl:** Fügt automatisch die Anweisung hinzu: *"Do not analyze until Part X is received"*. Das verhindert, dass die KI versucht, unvollständigen Code sofort zu analysieren.
* **Sauberer Workflow:** Entfernt automatisch alte Header, falls du Code hin und her kopierst, um Duplikate zu vermeiden.
* **Überall verfügbar:** Funktioniert als Overlay auf jeder Webseite (Alt+S).
* **Trusted Types Fix:** Funktioniert auch auf strengen Seiten wie YouTube oder Google.

### 🛠️ Anleitung
1. **Kopiere** deinen langen Code in die Zwischenablage (Strg+C).
2. Drücke **Alt + S**, um das Panel zu öffnen.
3. Klicke auf **"Read Clipboard"**.
4. Das Script berechnet die Größe und erstellt nummerierte Buttons (1, 2, 3...).
5. Klicke auf Button **1**, um den ersten Teil zu kopieren, und füge ihn in den Chat ein.
6. Wiederhole das für die restlichen Teile. Die Buttons werden grün markiert, damit du den Überblick behältst.


Du kannst dieses Script auch verwenden, um sehr lange fremde Userscripts oder Code aus dem Internet zuerst in Teile zu splitten und sie dann nacheinander an ChatGPT, Claude oder andere KIs zu schicken. So kannst du die KI fragen, was das Script genau macht und ob es mögliche Sicherheitsrisiken (z.B. versteckte Tracker, unerwünschte Redirects oder Datendiebstahl) enthält, ohne an Längenlimits zu scheitern.

Feel free to use, modify, share or even steal this code.