# Kindle Import

> Import reading notes from Kindle HTML exports into the slipbox. Use when the user sends a Kindle notebook export file (HTML/XHTML, including Telegram forwards as application/xml or text/plain).

- Skill: `jrswab/kindle-import` (Agent Skill)
- Install (CLI): `npx skillmds@latest add jrswab/kindle-import`
- Raw SKILL.md: https://api.skillmd.com/api/skills/jrswab/kindle-import/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Web & Frontend
- Author: jrswab (https://skillmd.com/u/jrswab)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/jrswab/kindle-import

---


# Kindle Import

Parse Kindle notebook exports (HTML/XHTML) and create slipbox entries for the user's own notes.

## Input Format

Kindle exports are XHTML files with this structure:

```html
<div class="bookTitle">Book Title Here</div>
<div class="authors">Author Name</div>
...
<div class="sectionHeading">Chapter/Section Name</div>
<div class="noteHeading">Highlight (yellow) - Section > Page X</div>
<div class="noteText">Highlighted text from book</div>
<div class="noteHeading">Note - Section > Page X</div>
<div class="noteText">User's own note</div>
```

- `noteHeading` starting with "Highlight" → book text → **skip**
- `noteHeading` starting with "Note" → user's own thoughts → **import** the following `.noteText`
- Section/page info in the heading (e.g., "Section > Page 28") → ignore

**Metadata fields:**
- Title: content of `.bookTitle` div
- Author: content of `.authors` div
- Source type: `book`

## Workflow

1. **Parse header** → extract book title and author. **Done when** title and author are both captured.
2. **Extract user notes** → collect the `.noteText` following every `noteHeading` starting with "Note"; decode HTML entities in each noteText before passing to slipbot. **Done when** every Note heading in the file has its following noteText accounted for.
3. **Precheck** → show user: book title, author, note count, ask for confirmation. **Done when** user confirms (or aborts).
4. **On confirmation** → for each note, invoke slipbot:
   - Type: note (`-` prefix)
   - Source: `~ book, {title} by {author}`
   - Let slipbot handle: filename, tags, links, graph update
5. **Report** → count of notes created. **Done when** the reported count matches the extracted count.

## Example

**Input noteText:**
```
Applications should not allow unsigned JWTs to be considered valid.
```

**Slipbot call:**
```
- Applications should not allow unsigned JWTs to be considered valid. ~ book, The JWT Handbook by Sebastian E Peyrott
```

## Edge Cases

- **No user notes** (only Highlights): Report "no notes to import"
- **Multiple authors**: Preserve as-is from the file
- **Missing author**: Use "Unknown" as author
- **Special characters in title/content**: Preserve as-is

