Discover your coding patterns from AI conversations. Generate personalized .cursorrules, CLAUDE.md, and skills.
Project description
Motif
Discover your coding patterns. Generate personalized AI rules.
Motif reads your Cursor and Claude Code conversations, discovers your recurring patterns, and generates personalized CLAUDE.md / .cursorrules / skills files tuned to your actual working style.
No API key needed. No server. Your data stays on your machine.
How It Works
- Extract conversations from Cursor and/or Claude Code
- Analyze — Motif prepares your data and your IDE's agent does the analysis (no external LLM calls)
- Generate — turn analysis into CLAUDE.md, skills, and rules files routed to the right locations
Install
pip install motif-cli
Quick Start
Option A: Agent-driven (recommended)
If you use Cursor, install the Motif skill so your agent handles everything:
motif setup
Then just tell your agent: "analyze my coding patterns" — it handles extraction, analysis, and generation.
Option B: Manual CLI
# Extract conversations from all available sources
motif extract all
# See what was extracted
motif list
# Prepare data for analysis (your agent reads the output)
motif analyze --prepare
# After your agent produces analysis JSON, generate config files
motif rules analysis-output.json
# Generate a summary report
motif report analysis-output.json
Commands
motif extract
Extract conversations from AI coding tools into ~/.motif/conversations/.
motif extract cursor # Extract from Cursor
motif extract claude # Extract from Claude Code
motif extract all # Extract from all sources
motif list
Show all extracted projects with message counts and date ranges.
motif list
motif analyze
Prepare extracted data for pattern analysis. The output is a markdown file containing your conversation data and analysis instructions — your IDE's agent reads it and follows the embedded prompt.
motif analyze --prepare # Analyze current project
motif analyze --prepare --project myapp # Specify project
motif analyze --prepare --budget 50000 # Custom token budget
motif analyze --prepare --preview # Preview session relevance scores
motif analyze --prepare --no-filter # Skip relevance filtering
motif analyze --prepare --stats # Show pipeline stats only
motif rules
Parse analysis JSON output and generate configuration files (CLAUDE.md, skill files, .cursorrules).
motif rules analysis.json # Generate to ~/.motif/generated/
motif rules analysis.json --dry-run # Preview what would be generated
motif rules analysis.json --apply # Deploy to project/user directories
motif report
Generate a summary report from analysis output.
motif report analysis.json # Markdown report
motif report analysis.json --output report.md # Custom output path
motif setup
Install the motif-analyze Cursor skill for seamless agent integration.
motif setup
What It Extracts
Cursor IDE — Reads state.vscdb, extracts user/assistant dialogue organized by project. Captures messages, file references, tool usage, and model info.
Claude Code — Reads ~/.claude/projects/ session files. Same structured output with session tracking.
Example Output
See examples/ for a sample of what Motif generates from real conversation data — including a generated CLAUDE.md, skill files, and analysis report.
Validated
Tested on three real-world datasets with zero false positives:
| Dataset | Messages | Skills Found | Rules Found | Profile |
|---|---|---|---|---|
| Strategy/outreach project | 1,067 | 6-8 | 10 | Structured, proactive |
| Pure coding project | 218 | 4 | 6 | Technical, selective |
| External user (Claude Code) | 386 | 5 | 8 | Terse, delegates fully |
Roadmap
-
motif extract— Cursor + Claude Code extraction -
motif list— Project listing with merge detection -
motif analyze --prepare— Data pipeline with relevance filtering -
motif rules— Generate config files from analysis -
motif report— Summary report generation -
motif setup— Cursor skill installation -
motif analyze --all— Cross-project analysis -
motif import— Bring your own JSON/JSONL data -
motif export— JSON/markdown/text export -
motif badge— Static SVG for READMEs - PDF report generation
License
MIT
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 motif_cli-0.1.0.tar.gz.
File metadata
- Download URL: motif_cli-0.1.0.tar.gz
- Upload date:
- Size: 35.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f9b9752c6f07b41c4b5b90f97f2c1fc4b0b21ffbcd06b01b95ca6cb723cf89fd
|
|
| MD5 |
7f2794d22b0dc763fd7e773ffa3f1c1b
|
|
| BLAKE2b-256 |
fbdb05c3318534d0993d8a566dd742079e0800f9d7860e3fa47dfcc5b71d9acf
|
Provenance
The following attestation bundles were made for motif_cli-0.1.0.tar.gz:
Publisher:
publish.yml on Bulugulu/motif-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
motif_cli-0.1.0.tar.gz -
Subject digest:
f9b9752c6f07b41c4b5b90f97f2c1fc4b0b21ffbcd06b01b95ca6cb723cf89fd - Sigstore transparency entry: 1031335283
- Sigstore integration time:
-
Permalink:
Bulugulu/motif-cli@bca0cf88ef42f52120fa15269b336d9520238c4e -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Bulugulu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@bca0cf88ef42f52120fa15269b336d9520238c4e -
Trigger Event:
push
-
Statement type:
File details
Details for the file motif_cli-0.1.0-py3-none-any.whl.
File metadata
- Download URL: motif_cli-0.1.0-py3-none-any.whl
- Upload date:
- Size: 39.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0557034aebb83a799c97c867f88421a296dee2a792ec2a6fc8be95e4f2f13860
|
|
| MD5 |
ac286ab2088a0eda7ddb769631e9b1ef
|
|
| BLAKE2b-256 |
bb072e5274e12163233cdd8164ed9b9956a110caf5ca4a322c9cebaff9a4d97f
|
Provenance
The following attestation bundles were made for motif_cli-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on Bulugulu/motif-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
motif_cli-0.1.0-py3-none-any.whl -
Subject digest:
0557034aebb83a799c97c867f88421a296dee2a792ec2a6fc8be95e4f2f13860 - Sigstore transparency entry: 1031335349
- Sigstore integration time:
-
Permalink:
Bulugulu/motif-cli@bca0cf88ef42f52120fa15269b336d9520238c4e -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Bulugulu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@bca0cf88ef42f52120fa15269b336d9520238c4e -
Trigger Event:
push
-
Statement type: