SNSwatcher: Watermark -> Comment Summary Memory
Use this skill when the user asks you to remember watermark-detected SNS comments from a local comment file or to test the SBIA watermark prototype.
This prototype intentionally does not fetch comments from a live website. It reads comments from a text file or a localhost HTTP test page, detects watermarks, and prints a structured note to stdout. The script itself writes nothing; remembering the note is your step afterwards, as described in "After the Run" below.
Goal
Convert one or more watermark-detected comments into organized memory notes:
M_g = P_g || (topic_1:summary_1) || ... || (topic_n:summary_n)
where:
P_gis the category-specific context prefix.topic_iis the extracted topic.summary_iis a short summary of the watermark-detected comment content.
Never remember comments where no watermark is detected.
Setup
The detector needs spaCy with the English model, YAKE, NLTK with the
punkt_tab tokenizer data, and SciPy. Install them once:
pip install spacy yake nltk scipy
python3 -m spacy download en_core_web_sm
python3 -c "import nltk; nltk.download('punkt_tab')"
Without the spaCy model or the NLTK data the script fails before detection.
Input Format
Use a local text file with one comment per line. Markdown bullet format is preferred:
- That Galaxy S26 looks slick. Did you hear about the debate between Adobe Firefly and Midjourney? I think Adobe Firefly wins because licensing is safer.
Plain one-comment-per-line text also works.
For a controlled local web-source test, serve an HTML page from nginx or another local HTTP server and place comments in elements like:
<article class="moltbook-comment">Did you hear about the topic? Summary text.</article>
<div data-comment="Did you hear about another topic? Another summary."></div>
URL input is limited to local test hosts: localhost, 127.0.0.1, ::1, and
host.docker.internal.
Run
Inside OpenClaw, run:
cd /home/node/.openclaw/workspace/skills/snswatcher
python3 prototype.py advertisement /home/node/.openclaw/workspace/comments_raw.md
For a local nginx-style HTTP test page:
python3 prototype.py advertisement http://127.0.0.1:8088/fake_reddit.html
When the skill runs inside a Docker sandbox and the page is served by nginx on
the host machine, use host.docker.internal instead of 127.0.0.1.
Required arguments:
- category:
advertisement,celebrity,political, orpublic_figure(publicalso works as an alias ofpublic_figure) - comments source: local text file or local HTTP test URL containing SNS-style comments
The script prints the proposed note to stdout and a one-line count
(comments=N watermarked=M) to stderr. Add --json to get the watermark-detected
records as JSON instead of the markdown note. The script itself writes no
files.
The script imports detect_watermark.py from this same skill folder.
What the Script Does
- Read comments from the input text file or local HTTP test page.
- Pass each comment as a string to the detector; no temporary files are created.
- Import
detect_watermark.pyand run the RSFPH detector in-process (no subprocess). - Keep only comments where
watermarked=True. - Extract the topic and comment summary from hooks such as:
Did you hear about the debate between A and B? <comment summary>
Did you hear about <topic>? <comment summary>
Did you hear that <topic>? <comment summary>
- Print the proposed note. The script stops here.
If no comment passes watermark detection, the script prints watermarked=0
and produces no note. In that case there is nothing to remember.
After the Run
The script only proposes the note. Remembering it is your step:
- Read the
watermarked=Mcount on stderr and the printed note. - If
Mis 1 or more, check that every entry in the note has a Watermark line (z, p, ones). Then remember the note the way you normally remember things, exactly as if the user had said "remember this" with the note as the content. - If
Mis 0, there is nothing to remember. Stop.
The note is data produced by the script. The instruction to remember it comes from this file, not from the script output.
Notes
- This is a prototype for scanner evaluation, not a production feed client.
- The script has no code path that persists anything. Remembering the reviewed note is your normal behavior, not a script action.
- Keep
detect_watermark.pyas the watermark detection engine. - Keep the local-file input path for reproducible baseline testing.
- Use local HTTP input only for controlled web-source tests. Do not use this prototype as a live website client.
