Compile your AI chat history into a writing-style skill.
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file chatlectify-0.1.0.tar.gz.
File metadata
- Download URL: chatlectify-0.1.0.tar.gz
- Upload date:
- Size: 29.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f9e4f8ac3c2167a9e91a5dece3492fe319cd2a03c4323bde0f53bf8642dfb96
|
|
| MD5 |
af95e8fe8f00168b3685d14c78205315
|
|
| BLAKE2b-256 |
b2e346dac8b49455259278f93869610679379dde567647b5829b7a961ba47ff4
|
Provenance
The following attestation bundles were made for chatlectify-0.1.0.tar.gz:
Publisher:
release.yml on 0x1Adi/chatlectify
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
chatlectify-0.1.0.tar.gz -
Subject digest:
9f9e4f8ac3c2167a9e91a5dece3492fe319cd2a03c4323bde0f53bf8642dfb96 - Sigstore transparency entry: 1340724645
- Sigstore integration time:
-
Permalink:
0x1Adi/chatlectify@b03f869708883f0649785bd18b724e60fd5ca58c -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/0x1Adi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b03f869708883f0649785bd18b724e60fd5ca58c -
Trigger Event:
push
-
Statement type:
File details
Details for the file chatlectify-0.1.0-py3-none-any.whl.
File metadata
- Download URL: chatlectify-0.1.0-py3-none-any.whl
- Upload date:
- Size: 24.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6851ef821952d157e8ee51d1a7bc11f6fecb46ca7a8a50088521ecc9d113887b
|
|
| MD5 |
9ccd3fe2ed1f15fb13be64252e43e2e9
|
|
| BLAKE2b-256 |
fc20f77dc28416b39403237052723440972d4e1e81a95cf5d45c53f5dc2757e7
|
Provenance
The following attestation bundles were made for chatlectify-0.1.0-py3-none-any.whl:
Publisher:
release.yml on 0x1Adi/chatlectify
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
chatlectify-0.1.0-py3-none-any.whl -
Subject digest:
6851ef821952d157e8ee51d1a7bc11f6fecb46ca7a8a50088521ecc9d113887b - Sigstore transparency entry: 1340724656
- Sigstore integration time:
-
Permalink:
0x1Adi/chatlectify@b03f869708883f0649785bd18b724e60fd5ca58c -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/0x1Adi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b03f869708883f0649785bd18b724e60fd5ca58c -
Trigger Event:
push
-
Statement type: