puzle-read-skill
Connect to Puzle Read — an intelligent reading workbench that helps users turn articles and documents into searchable personal knowledge. Save web articles (by URL or pre-fetched content), upload documents and files to the user's reading library, and search across everything they've read to find relevant insights. Use this skill whenever the user wants to: save or read web articles, add documents to their reading library, look up something from their reading collection, process PDFs or other files for deeper understanding, or build knowledge workflows around their readings. This skill also applies when the user wants to: save something for later reading ("read it later", "bookmark this", "save this article"), get a summary or analysis of an article or document, upload a file (PDF, image, audio, etc.) for processing, or organize their reading collection. Also trigger when you see imports of `puzle_reading` or `PuzleReadingClient`, or when the user mentions Puzle.
What this skill does
# Puzle Read Skill
Save web articles, documents and files to your personal reading library powered by Puzle.
AI analyzes the full text and enables semantic search across everything you've read.
## First-time Setup (show this on skill install)
When this skill is first activated, immediately greet the user and guide them through setup:
1. **Check if a token is already configured**:
```python
from puzle_reading import PuzleReadingClient
if PuzleReadingClient.token_is_configured():
# Token exists, ready to go
```
If yes, tell the user: "Puzle Read Skill is ready! You can send me any URL, file, or text
and I'll save it to your reading library. You can also search across everything you've read."
2. **If no token is configured**, walk the user through it:
- Tell the user: "To get started, I need your Puzle token. Here's how to get it:"
- Send the `get_token.gif` file (located at `<this-skill-directory>/get_token.gif`) to the
user as an attachment so they can see the visual guide.
- In OpenClaw: send via channel as a file attachment
- In other environments: provide the file path for the user to open
- Tell the user to open **https://read-web-test.puzle.com.cn**, log in, then follow the
GIF to copy their token and paste it back.
- Once received, save it with `PuzleReadingClient.save_token(token)` and confirm.
3. **After setup is complete**, briefly explain what the skill can do:
- "You can now send me any URL, article, PDF, or text and I'll save it to your Puzle
reading library. I can also summarize articles, search across your readings, and more.
Just try sending me a link!"
## Prerequisites
The bundled Client SDK lives at `scripts/puzle_reading.py` relative to this skill directory.
It requires the `requests` library.
```python
import sys
sys.path.insert(0, "<this-skill-directory>/scripts")
from puzle_reading import PuzleReadingClient
```
## Token Management
Token is stored in `~/.config/puzle/config.json` with file permission `0o600` (owner read/write only).
The SDK looks for a token in the following priority order:
1. Constructor argument `PuzleReadingClient(token="...")`
2. Environment variable `PUZLE_TOKEN`
3. Config file `~/.config/puzle/config.json`
### User sends a token directly
If the user sends a token in the conversation (typically a long string starting with `eyJ...`),
**save it immediately**:
```python
PuzleReadingClient.save_token(token)
client = PuzleReadingClient() # auto-loads from config file
```
After saving, tell the user: "Token saved to `~/.config/puzle/config.json`. You won't need to
provide it again in future sessions."
### User does not have a token
Guide them step by step:
1. Tell the user to open Puzle Read: **https://read-web-test.puzle.com.cn** and log in
2. Send the tutorial GIF to the user as an attachment so they can see how to get the token.
The GIF is located at `get_token.gif` relative to this skill directory.
- In OpenClaw: send it via the channel as a file attachment
- In other environments: provide the file path for the user to open
3. The GIF shows: open browser DevTools → Application → Cookies → copy the JWT token value
4. Ask the user to paste the token back to you
Once received, save it using the steps above.
### Token already configured (most common case)
Once a token has been saved, all subsequent calls work automatically — no need to ask the user again:
```python
client = PuzleReadingClient() # auto-reads from ~/.config/puzle/config.json
```
You can check beforehand:
```python
if not PuzleReadingClient.token_is_configured():
# Guide the user to provide a token
...
```
### Token expired (401 error)
The token is valid for approximately **7 days**. When you receive `PuzleAPIError(code=401)`:
1. Tell the user their token has expired
2. Ask them to obtain a new token from Puzle
3. Save the new token: `PuzleReadingClient.save_token(new_token)`
### Environment variable method (optional)
Users can also configure via environment variable, which takes precedence over the config file:
```bash
export PUZLE_TOKEN="eyJhbG..."
```
## Two Modes of Use
### Mode A: Save for later ("Read It Later")
When the user just wants to **save** content — no need to wait for processing. Create the reading,
give user the web link, done.
```python
result = client.create_reading_from_url("https://example.com/article")
# result.web_url → "https://read.puzle.com.cn/read/42"
# Tell the user: "Saved! You can view it here: {result.web_url}"
```
Use this mode when:
- "save this" / "bookmark" / "read it later" / "store this link"
- "save all of these" — batch-saving multiple links
- User uploads a file but doesn't ask for any analysis — "just store this PDF"
- User shares a link in passing without asking a question about its content
- "keep it for later"
### Mode B: Analyze now (background processing)
When the user wants to **understand, summarize, or work with** the content, processing takes
30–90 seconds. To avoid blocking the conversation:
1. **Create the reading and immediately give user the web link**
2. **Spawn a background task / subagent** to run `wait_for_reading()` + analysis
3. **When the background task completes**, present the result to the user
```python
# Step 1: Create and immediately respond to user
result = client.create_reading_from_url("https://example.com/article")
# Tell user: "Processing now. You can preview it here: {result.web_url}"
# Step 2: In a background task / subagent, wait and analyze
detail = client.wait_for_reading(result.reading_id, result.resource_type)
content = detail["data"]["content"]
# Generate summary / answer questions based on content
# Step 3: When done, present results to user
```
**Why background processing?** `wait_for_reading()` blocks for 30–90 seconds. Running it in
a subagent or background process keeps the conversation responsive. The user gets the web link
instantly and can start reading there, while the analysis runs in parallel.
Use this mode when:
- "what does this article say" / "summarize this" / "give me a summary"
- "what are the key findings in this PDF" — need to read and analyze
- "compare the viewpoints of these two articles" — need content from multiple readings
- User asks a specific question about the article content
- You need to search across readings afterwards
## When to Use Which Method
### User shares a URL — Decision Chain
When the user gives you a link, **do NOT call `create_reading_from_url()` directly**.
Try the following approaches in order, falling through to the next step only on failure:
```
User sends a URL
│
▼
┌─────────────────────────────────────────────────┐
│ Step 1: Fetch the page yourself │
│ │
│ Use WebFetch, browser, or any available tool │
│ to retrieve the page content. │
│ │
│ Success (got meaningful content)? │
│ → Extract using readability (or use the │
│ tool's formatted output directly) │
│ → Extract: title, body HTML, plain text, │
│ author, site name │
│ → Call create_reading_from_html() │
│ ✅ Done │
│ │
│ Benefits of this approach: │
│ - Skips Puzle's fetching phase, faster │
│ - Handles JS-rendered dynamic pages │
│ - Handles pages with anti-scraping measures │
│ - Higher content quality (you can preprocess) │
└────────────┬────────────────────────────────────┘
│ Failed: empty content, 401/403,
│ auth wall, login required, timeout
▼
┌─────────────────────────────────────────────────┐
│ Step 2: Check for internal/specialized tools │
│ │
│ The URL might be an internal or auth-Related in Image & Video
watch
IncludedWatch a video (URL or local path). Downloads with yt-dlp, extracts auto-scaled frames with ffmpeg, pulls the transcript from captions (or Whisper API fallback), and hands the result to Claude so it can answer questions about what's in the video.
physical-ai-defect-image-generation
IncludedUse when the user wants to orchestrate defect image generation, run associated setup, or handle outputs on OSMO. The Day 0 path handles cold-start with USD-to-ROI, image-edit augmentation, and AnomalyGen to create initial PCBA datasets. The Day 1 path performs inference and labeling on real images. This skill helps with first-time asset setup, creation of finetuning checkpoints, and configuring deployment. Trigger keywords: defect image generation, dig workflow, dig pipeline, defect image detection workflow, aoi pipeline, aoi anomalygen, usd2roi anomalygen, day 0 pcba, day 1 pcba, day 1 real-photo alignment, day 1 manual roi, metal surface anomaly, glass defect, anomalygen finetune, setup_pcb, setup_metal, setup_glass, setup_pretrained, dig setup, dig datasets, dig pretrained checkpoint, dig image-edit endpoint.
accelint-react-best-practices
IncludedReact performance optimization and best practices. ALWAYS use this skill when working with any React code - writing components, hooks, JSX; refactoring; optimizing re-renders, memoization, state management; reviewing for performance; fixing hydration mismatches; debugging infinite re-renders, stale closures, input focus loss, animations restarting; preventing remounting; implementing transitions, lazy initialization, effect dependencies. Even simple React tasks benefit from these patterns. Covers React 19+ (useEffectEvent, Activity, ref props). Triggers - useEffect, useState, useMemo, useCallback, memo, inline components, nested components, components inside components, re-render, performance, hydration, SSR, Next.js, useDeferredValue, combined hooks.
elevenlabs-agents
IncludedBuild conversational AI voice agents with ElevenLabs Platform using React, JavaScript, React Native, or Swift SDKs. Configure agents, tools (client/server/MCP), RAG knowledge bases, multi-voice, and Scribe real-time STT. Use when: building voice chat interfaces, implementing AI phone agents with Twilio, configuring agent workflows or tools, adding RAG knowledge bases, testing with CLI "agents as code", or troubleshooting deprecated @11labs packages, Android audio cutoff, CSP violations, dynamic variables, or WebRTC config. Keywords: ElevenLabs Agents, ElevenLabs voice agents, AI voice agents, conversational AI, @elevenlabs/react, @elevenlabs/client, @elevenlabs/react-native, @elevenlabs/elevenlabs-js, @elevenlabs/agents-cli, elevenlabs SDK, voice AI, TTS, text-to-speech, ASR, speech recognition, turn-taking model, WebRTC voice, WebSocket voice, ElevenLabs conversation, agent system prompt, agent tools, agent knowledge base, RAG voice agents, multi-voice agents, pronunciation dictionary, voice speed control, elevenlabs scribe, @11labs deprecated, Android audio cutoff, CSP violation elevenlabs, dynamic variables elevenlabs, case-sensitive tool names, webhook authentication
humanizer
IncludedHumanize AI-generated text by detecting and removing patterns typical of LLM output. Rewrites text to sound natural, specific, and human. Uses 28 pattern detectors, 560+ AI vocabulary terms across 3 tiers, and statistical analysis (burstiness, type-token ratio, readability) for comprehensive detection. Use when asked to humanize text, de-AI writing, make content sound more natural/human, review writing for AI patterns, score text for AI detection, or improve AI-generated drafts. Covers content, language, style, communication, and filler categories.
generating-mermaid-diagrams
IncludedSalesforce architecture diagrams using Mermaid with ASCII fallback. Use this skill when generating text-based diagrams for Salesforce architecture, OAuth flows, ERDs, integration sequences, or Agentforce structure. TRIGGER when: user says "diagram", "visualize", "ERD", or asks for sequence diagrams, flowcharts, class diagrams, or architecture visualizations in Mermaid. DO NOT TRIGGER when: user wants PNG/SVG image output (use generating-visual-diagrams), or asks about non-Salesforce systems.