xiaohongshu-session-readerlisted
Install: claude install-skill codingSamss/all-my-ai-needs
# Xiaohongshu Session Reader
## Scope
- Reuse local Chrome logged-in session only.
- Prefer HTTP/API extraction for stability and speed.
- Use Codex Chrome plugin when HTTP/API path is blocked and visible logged-in browser state is needed.
- Use Playwright only when explicitly requested/enabled and Chrome plugin cannot complete the fallback.
- Support:
- profile card titles (for 谁是卧底词组 collection)
- note detail (title/desc/author)
- comments when API permits; otherwise explicit fallback signal
- Do not forge identity, bypass captcha, or brute-force anti-bot checks.
## Prerequisite Check
Before extraction:
```bash
python3 --version
```
Fallback-only prerequisite:
```bash
codex mcp get playwright-ext # only for explicit Playwright fallback
```
## Workflow
1. Run HTTP-first reader:
```bash
python3 <skill_dir>/scripts/xhs_http_reader.py \
--url "<xhslink_or_xiaohongshu_url>" \
--mode auto \
--max-items 40 \
--max-comments 20 \
--pretty
```
2. If response has `fallback.required=false`, use returned data directly.
3. If response has `fallback.required=true`, switch to Codex Chrome plugin fallback:
- profile: open profile page and read visible card titles.
- note comments: open note detail and read comments from DOM snapshot.
- use Playwright only if the user explicitly asks for it and `playwright-ext` is enabled.
4. Normalize four-word groups with `scripts/undercover_parser.py`.
5. Persist progress in `.cache/xhs_undercover_progress.json` for ba