chatlectify
Compile your AI chat history into a writing-style skill.
chatlectify turns your exported AI conversations (Claude, ChatGPT, Gemini) or
any corpus of your own writing into a portable SKILL.md file. Drop that
file into a Claude skill folder, paste the system_prompt.txt into any LLM,
and the model writes like you — not like the factory-default assistant.
It's a small, local CLI. Your chat data never leaves your machine except when it makes the single LLM call that distills the style file.
Why
Every large model speaks the same corporate-cheerful dialect out of the box:
"Certainly!", "Great question!", "In conclusion...". If you've spent a year
chatting with it, you have a voice and it has no idea. chatlectify mines
that voice from your own messages and hands you back a reusable style artifact.
What you get
Running the pipeline on one export produces:
| File | Purpose |
|---|---|
SKILL.md |
Claude-compatible skill file (frontmatter + rules + exemplars + anti-patterns + quantified targets) |
system_prompt.txt |
Drop-in system prompt for any LLM |
style_metrics.json |
Raw stylometric features (TTR, sentence length, punctuation histograms, …) |
exemplars.json |
Stratified sample of your best messages |
gate_report.json |
Quality-gate pass/fail reasons |
pipeline_report.json |
End-to-end run summary |
benchmark_report.json |
(optional) Fidelity measurement vs. a baseline prompt |
Install
pip install chatlectify
Or from source:
git clone https://github.com/0x1Adi/chatlectify
cd chatlectify
pip install -e ".[dev]"
Requires Python 3.11+.
Auth
The synth step needs one LLM call. chatlectify auto-detects either:
- An API key:
ANTHROPIC_API_KEY(default) orOPENAI_API_KEY. - A local CLI: the
claudeCLI (default) orcodexCLI.
If neither is available, the pipeline still runs and emits a deterministic fallback skill using your extracted features.
Quick start
1. Export your chat history
- Claude — Settings → Privacy → Export data. Unzip; you need
conversations.json. - ChatGPT — Settings → Data Controls → Export. Unzip; you need
conversations.json. - Gemini — Takeout; the
.htmlfile works. - Your own writing — any folder of
.txt/.md/.markdown/.rstfiles.
2. Build the skill
chatlectify all ./conversations.json --out-dir ./skill
That's it. Open ./skill/SKILL.md.
3. Use the skill
With Claude Code / Claude Desktop:
Copy the folder into ~/.claude/skills/<skill_name>/.
With any other LLM:
Paste ./skill/system_prompt.txt as the system prompt.
CLI
chatlectify ingest <input> Normalize an export into messages.
chatlectify features <input> Extract stylometric features only.
chatlectify build <input> Build SKILL.md (skip benchmark).
chatlectify benchmark ... Measure fidelity vs. baseline.
chatlectify all <input> Full pipeline.
Common options:
--out-dir PATH— where to write artifacts.--provider {anthropic,openai}— defaultanthropic.--model MODEL— override the default model.--benchmark— opt in to fidelity measurement (makes2Nextra LLM calls).--n N— benchmark sample size (default 100).--force— bypass quality gates (use at your own risk).
Run chatlectify <cmd> --help for full flags.
Pipeline
ingest -> clean -> features -> gates -> synth -> (benchmark) -> emit
- ingest — parses export formats (Claude, ChatGPT, Gemini, plaintext) into a normalized
Message[]. - clean — strips code fences, URLs, emails; dedupes near-duplicates; flags pastes.
- features — computes 20+ stylometric metrics (lexical, syntactic, structural).
- gates — blocks low-quality runs:
<200messages,<20kcharacters,>50%pastes. - synth — asks one LLM call to distill features + exemplars + anti-patterns into a
SKILL.md. Falls back to a deterministic template if the call fails or produces invalid output. - benchmark (optional) — generates
Npairs of baseline vs. skill-prompted completions and measures (a) char-n-gram ROC-AUC between your text and each (lower = more indistinguishable from you) and (b) feature-distance reduction. - emit — writes all artifacts to
--out-dir.
Privacy
- Everything runs locally. The only egress is the single synth call (and optional benchmark calls) to your chosen provider.
- Default
.gitignoreexcludesconversations.json,SKILL.md, and all intermediate JSON — your data and voice stay yours. - Nothing is telemetered; no analytics; no cloud component.
Development
pip install -e ".[dev]"
ruff check src/ tests/
pytest -ra
pytest --cov=chatlectify --cov-report=term-missing
See CONTRIBUTING.md for contribution guidelines and SECURITY.md to report vulnerabilities.
License
MIT — see LICENSE.
Metadata
Release files for chatlectify 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| chatlectify-0.1.0.tar.gz | 29.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| chatlectify-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 54.4 kB
Release files / chatlectify-0.1.0.tar.gz
| Download URL | chatlectify-0.1.0.tar.gz |
|---|---|
| Size | 29.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9f9e4f8ac3c2167a9e91a5dece3492fe319cd2a03c4323bde0f53bf8642dfb96
|
|
BLAKE2b-256 checksum How to use checksums |
b2e346dac8b49455259278f93869610679379dde567647b5829b7a961ba47ff4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 19, 2026.
Transparency logRelease files / chatlectify-0.1.0-py3-none-any.whl
| Download URL | chatlectify-0.1.0-py3-none-any.whl |
|---|---|
| Size | 24.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6851ef821952d157e8ee51d1a7bc11f6fecb46ca7a8a50088521ecc9d113887b
|
|
BLAKE2b-256 checksum How to use checksums |
fc20f77dc28416b39403237052723440972d4e1e81a95cf5d45c53f5dc2757e7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 19, 2026.
Transparency log