extract-memory
Skill3 starsChanged 3 months agoMITView on GitHub
Extract writing style, personality traits, and key insights from a collection of documents (Markdown, PDF, TXT, DOCX) and save them as a Claude Code memory file. Use when the user wants to capture their writing DNA, build a personal style guide, or create a reusable memory profile from their existing content.
In this repository18 other files it gives its agents.
- agent-mbtiSkill
- de-ai-flavorSkill
- duanyongping-perspectiveSkill
- tashanzhishiSkill
- github-recruiterSkill
- graphifySkill
- convert-lakebookSkill
- offer-radarSkill
- resume-tuningSkill
- spoolSkill
- mbti-analysisSkill
- generate-weekly-reportSkill
- weread-digestSkill
- x-account-auditSkill
- x-content-reviewSkill
- x-hotspot-radarSkill
- x-post-gateSkill
- x-postSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. About 0 are common, 12 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈12
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 42
Directory path: Read all supported files in the directory
- Distinctive: line 43
Single file path: Read that one file
- Distinctive: line 49
Read all files but sample strategically — pick diverse documents by length and topic
- Distinctive: line 54
Read all files completely
- Distinctive: line 67
Use of metaphors and analogies (what domains do they draw from?)
- Distinctive: line 69
Use of rhetorical devices (repetition, contrast, parallelism)
- Distinctive: line 89
Use of bold, italic, headers
- Distinctive: line 91
Use of tables, code blocks, quotes
- Distinctive: line 96
Create a structured Markdown file with the analysis results.
- Distinctive: line 128
Write the profile to the target memory file
- Distinctive: line 146
If the user specifies where to save:
- Very specific: line 151
Default save location: ~/.claude/writing-style.md
- Distinctive: line 157
If a memory file already exists at the target path, ask the user if they want to overwrite or merge
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
extract-memory
Analyze a collection of documents and extract a personal writing style profile into a Claude Code memory file.
What This Skill Does
- Reads all documents from a given directory or file
- Analyzes writing patterns, style, tone, vocabulary, themes
- Generates a structured writing style profile
- Saves the profile to a memory file (default:
~/.claude/writing-style.md)
Supported Input Formats
.md— Markdown files.txt— Plain text files.pdf— PDF documents (read via the Read tool).lakebook— Yuque exports (auto-detected, will run/convert-lakebookfirst)
Workflow
Step 1: Identify Input
Determine what the user provided:
- Directory path: Read all supported files in the directory
- Single file path: Read that one file
.lakebookfile: First convert to Markdown usingpython3 ~/Desktop/lakebook-converter/convert.py, then process the output directory
Step 2: Sample Documents
For large collections (20+ files):
- Read all files but sample strategically — pick diverse documents by length and topic
- Aim to read at least 15-20 substantial documents (>500 chars each)
- Prioritize longer, more expressive documents over short notes
For small collections (<20 files):
- Read all files completely
Step 3: Analyze Writing Style
Examine the documents and extract the following dimensions:
Structure Patterns
- How do they open articles? (Hook style, question, statement, story)
- What's the typical article structure? (Sections, numbering, flow)
- How do they close? (Summary, call-to-action, question, open-ended)
Language Characteristics
- Vocabulary level and preferences
- Use of metaphors and analogies (what domains do they draw from?)
- Sentence length patterns (short and punchy? Long and flowing?)
- Use of rhetorical devices (repetition, contrast, parallelism)
- Multilingual patterns (code-switching, foreign terms)
Tone & Voice
- Formality level
- Emotional range (analytical, passionate, humorous, serious)
- Relationship with reader (teacher, peer, friend, mentor)
- Confidence level and how they handle uncertainty
Thinking Patterns
- How do they approach problems? (First principles, analogy, data-driven)
- Common frameworks and mental models they use
- How do they handle disagreement or controversial topics?
Content Themes
- Recurring topics and interests
- Core beliefs and values that surface across multiple pieces
- What they reference frequently (books, people, concepts)
Formatting Habits
- Use of bold, italic, headers
- List styles (numbered, bullet, emoji)
- Use of tables, code blocks, quotes
- Paragraph length preferences
Step 4: Generate Profile
Create a structured Markdown file with the analysis results. Use this template:
# Writing Style DNA — [Name/Alias]
## Structure Patterns
[findings]
## Language Characteristics
[findings]
## Tone & Voice
[findings]
## Thinking Patterns
[findings]
## Content Themes
[findings]
## Formatting Habits
[findings]
## Core Identity
[one paragraph summary of the writer's essence]
## One-Line Summary
> [single sentence that captures their writing DNA]Step 5: Save & Report
- Write the profile to the target memory file
- Report to the user:
- How many documents were analyzed
- Key findings summary (3-5 bullet points)
- Where the file was saved
- How to use it: "You can now tell Claude to read
~/.claude/writing-style.mdbefore writing tasks"
Usage Examples
/extract-memory ~/Desktop/lakebook-converter/output/
/extract-memory ~/Documents/blog-posts/
/extract-memory ~/Desktop/export.lakebook
/extract-memory ~/Desktop/my-article.mdWith Custom Output Path
If the user specifies where to save:
/extract-memory ~/Documents/posts/ --save-to ~/.claude/my-style.mdDefault save location: ~/.claude/writing-style.md
Important Notes
- Do NOT store the full document content in the memory file — only the distilled style analysis
- Keep the output under 3KB to avoid excessive token consumption when loaded as context
- If a memory file already exists at the target path, ask the user if they want to overwrite or merge
- The analysis should be specific and actionable, not generic — include actual examples from the user's writing
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

