agentleFS
anneheartrecordanneheartrecord/charles-skill/skills/doc-memory-extractor/SKILL.md

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.

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
  1. Distinctive:

    Directory path: Read all supported files in the directory

    line 42
  2. Distinctive:

    Single file path: Read that one file

    line 43
  3. Distinctive:

    Read all files but sample strategically — pick diverse documents by length and topic

    line 49
  4. Distinctive:

    Read all files completely

    line 54
  5. Distinctive:

    Use of metaphors and analogies (what domains do they draw from?)

    line 67
  6. Distinctive:

    Use of rhetorical devices (repetition, contrast, parallelism)

    line 69
  7. Distinctive:

    Use of bold, italic, headers

    line 89
  8. Distinctive:

    Use of tables, code blocks, quotes

    line 91
  9. Distinctive:

    Create a structured Markdown file with the analysis results.

    line 96
  10. Distinctive:

    Write the profile to the target memory file

    line 128
  11. Distinctive:

    If the user specifies where to save:

    line 146
  12. Very specific:

    Default save location: ~/.claude/writing-style.md

    line 151
  13. Distinctive:

    If a memory file already exists at the target path, ask the user if they want to overwrite or merge

    line 157

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

extract-memory

Analyze a collection of documents and extract a personal writing style profile into a Claude Code memory file.

What This Skill Does

  1. Reads all documents from a given directory or file
  2. Analyzes writing patterns, style, tone, vocabulary, themes
  3. Generates a structured writing style profile
  4. 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-lakebook first)

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
  • .lakebook file: First convert to Markdown using python3 ~/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

  1. Write the profile to the target memory file
  2. 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.md before 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.md

With Custom Output Path

If the user specifies where to save:

/extract-memory ~/Documents/posts/ --save-to ~/.claude/my-style.md

Default 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

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.