Chat Dataset Format Cleaner

    1

    Convert local chat JSONL records into prompt/completion pairs and a reproducible train/validation split.

    $12

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Chat Dataset Format Cleaner

    Example session with this skill installed

    Clean examples/conversations.jsonl and write the train/validation files to /tmp/chat-clean with seed 42.

    • Read your context and instructions
    • Compiled the chat dataset format

    Ran: python3 scripts/chat_dataset_cleaner.py examples/conversations.jsonl --output-dir /tmp/chat-clean --seed 42

    Read 3 records; converted 3; rejected 0; filtered 0.
    Train: /tmp/chat-clean/train.jsonl (2 records)
    Validation: /tmp/chat-clean/validation.jsonl (1 records)

    Each saved line is a JSON object with exactly two keys: prompt and completion. This is the actual output of the bundled example file (3 sample records).

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Turn local chat JSONL into portable prompt/completion JSONL files. The command accepts OpenAI-style messages records and direct prompt/completion records, strips common turn wrapper tags, maps human and model aliases, and uses the last assistant turn as the answer. Input files are read only; output goes to a directory you choose.

    What it does

    • Reads one or more JSONL files, or the immediate *.jsonl files in a folder.
    • Converts message arrays into a labeled prompt plus the final assistant completion; keeps direct prompt/completion pairs after whitespace and wrapper cleanup.
    • Skips malformed JSON lines and unsupported records and reports how many were skipped.
    • Splits train and validation sets with a repeatable seed and a configurable ratio.
    • Optional minimum prompt and completion length filters, a record limit, and a JSON summary for automation.

    Requirements

    Python 3.10 or newer, standard library only. No network access, no uploads.

    Included

    SKILL.md, README, the script (scripts/chat_dataset_cleaner.py), 22 unit tests, a 3-record example file, and a license for personal or commercial projects.

    Limitations

    It does not judge semantic quality, remove personal information, deduplicate examples, or preserve non-text content blocks. Use a new output directory if you need to keep earlier generated files.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for LLM Ops.

    No PII removal or deduplication. Ignores tool-call semantics and non-text blocks. Requires Python 3 environment.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 8 days ago

    Software
    Python

    Permissions

    Terminal / Shell
    Write Files
    Read Files
    Listed11 days ago
    Updated8 days ago

    What's inside

    Frequently Asked Questions

    This skill is a local Python-based utility script designed to process JSONL files. It is framework-agnostic, meaning it creates standardized outputs compatible with any LLM training pipeline, including Hugging Face, OpenAI, or PyTorch.

    Yes, the skill includes a robust role-mapping feature that recognizes and normalizes various labels like 'human', 'user', 'assistant', and 'model' into a consistent structure for your training data.

    The skill is designed specifically for text-based chat logs; it extracts text content and ignores non-text blocks or complex tool-call semantics to ensure a clean, text-only training pair.

    Upon purchase, you receive the production-ready Python utility script, detailed documentation on configuration, and a sample dataset to test your setup immediately.

    The skill includes a deterministic splitting feature that uses a fixed seed to divide your cleaned data into training and validation sets, ensuring your experiments are reproducible.

    While this skill excels at structural normalization and role mapping, it does not perform PII (Personally Identifiable Information) removal or semantic quality filtering.

    New in LLM Ops