reddit-engagement
Create and execute robust Reddit engagement workflows (create post, add comment, upvote) using browser accessibility-tree semantics instead of brittle DOM ids/CSS selectors. Use when asked to automate Reddit actions with high success rate across UI changes, A/B tests, and localization differences; especially when reliability and intent-based element targeting are required.
Packaged view
This page reorganizes the original catalog entry around fit, installability, and workflow context first. The original raw source lives below.
Install command
npx @skill-hub/cli install openclaw-skills-reddit-engagement
Repository
Skill path: skills/alvinperson/reddit-engagement
Create and execute robust Reddit engagement workflows (create post, add comment, upvote) using browser accessibility-tree semantics instead of brittle DOM ids/CSS selectors. Use when asked to automate Reddit actions with high success rate across UI changes, A/B tests, and localization differences; especially when reliability and intent-based element targeting are required.
Open repositoryBest for
Primary workflow: Ship Full Stack.
Technical facets: Full Stack, Frontend, Testing.
Target audience: everyone.
License: Unknown.
Original source
Catalog source: SkillHub Club.
Repository owner: openclaw.
This is still a mirrored public skill entry. Review the repository before installing into production workflows.
What it helps with
- Install reddit-engagement into Claude Code, Codex CLI, Gemini CLI, or OpenCode workflows
- Review https://github.com/openclaw/skills before adding reddit-engagement to shared team environments
- Use reddit-engagement for development workflows
Works across
Favorites: 0.
Sub-skills: 0.
Aggregator: No.
Original source / Raw SKILL.md
---
name: reddit-engagement
description: Create and execute robust Reddit engagement workflows (create post, add comment, upvote) using browser accessibility-tree semantics instead of brittle DOM ids/CSS selectors. Use when asked to automate Reddit actions with high success rate across UI changes, A/B tests, and localization differences; especially when reliability and intent-based element targeting are required.
---
# Reddit Engagement
Execute Reddit actions by intent and semantics, not static selectors.
## ⚠️ Content Policy — Read Before Writing Anything
1. **Read `PERSONA.md`** (workspace root) before composing any comment or post.
2. **Never fabricate personal stories** — no invented family members, relationships, health events, or "I personally experienced..." narratives unless the fact is recorded in `PERSONA.md`.
3. Use only: documented personal facts from `PERSONA.md`, opinion-based responses, or general observations that don't claim specific personal experience.
4. After posting, **log it** in the "已使用的故事/内容记录" table in `PERSONA.md` to prevent contradictions across posts.
---
## Core Operating Rules
1. Use accessibility snapshots (`snapshot` with `refs="aria"`) before every critical step.
2. Target elements by role+label+context, never by fixed DOM id/class/XPath.
3. Re-snapshot after each navigation, modal open/close, submit, or failure.
4. Validate page state before action (logged-in, subreddit resolved, composer visible, button enabled).
5. Require confirmation text for destructive/high-visibility actions when user did not explicitly pre-authorize immediate send.
## Resource Index
| Resource | Location | Purpose |
|----------|----------|---------|
| **Post Strategy** | `references/post-strategy.md` | Content angles, anti-AI rules, subreddit cultures, engagement triggers |
| **Comment Strategy** | `references/comment-strategy.md` | (Reserved) Reply patterns, comment-specific tactics |
| **Interaction Patterns** | `references/interaction-patterns.md` | UI automation playbooks (how to click/type/verify) |
| **Sub Archives** | `references/sub-archives.md` | Core info for all subreddits (one file) |
| **Persona Facts** | `PERSONA.md` (workspace root) | Authentic personal facts to use in content |
---
## Subreddit Name Index
### Pre-defined Archives (in `post-strategy.md`)
These subreddits have curated cultural profiles:
| Subreddit | Focus | Posting Bar |
|-----------|-------|-------------|
| `r/Startup_Ideas` | Idea validation, feedback | Medium — show research |
| `r/SaaS` | SaaS building, metrics, growth | Medium-High — data expected |
| `r/TheFounders` | Founder experiences, support | Medium — authenticity valued |
| `r/openclaw` | OpenClaw tool discussions | Low-Medium — technical |
### Dynamic Archive System
For subreddits NOT listed above:
1. **Check for existing archive:** Read `references/sub-archives.md`, find the sub section
2. **If not found:** Execute `interaction-patterns.md` §0 (Dynamic Subreddit Analysis Framework)
3. **Append to file:** Add new sub info to `references/sub-archives.md` using the template at bottom
4. **Use for content generation:** Treat like pre-defined profile
### Supported Subreddit Categories
| Category | Example Subs | Strategy |
|----------|--------------|----------|
| **Startup/Business** | r/Entrepreneur, r/smallbusiness, r/marketing | Use r/Startup_Ideas baseline |
| **Technology** | r/technology, r/programming, r/webdev | Use r/openclaw baseline |
| **AI/ML** | r/artificial, r/MachineLearning, r/LocalLLaMA | Technical + data-driven tone |
| **Productivity** | r/productivity, r/Notion, r/Obsidian | Workflow-focused, practical |
| **General Discussion** | r/CasualConversation, r/AskReddit | Casual, low bar |
**Rule:** If no archive exists in `sub-archives.md` and category match is unclear → always run dynamic analysis (§0) before posting.
---
## Workflow Router
### Create Post
**Trigger:** user asks to publish in a subreddit.
**Content Generation Flow:**
1. **Determine Input Type**
- If user provides full content (title + body) → use as-is, skip strategy
- If user provides fuzzy request (e.g., "post about OpenClaw") → execute strategy flow below
2. **Strategy Flow** (for fuzzy requests)
a. **Identify Target Subreddit** — extract from user request or ask
b. **Load Sub Profile** — read `references/post-strategy.md` §1 for subreddit rules/tone
c. **Select Content Angle** — read `references/post-strategy.md` §3 for angle matching intent
d. **Load Persona Facts** — read workspace `PERSONA.md` for authentic personal facts
e. **Apply Anti-AI Rules** — read `references/post-strategy.md` §2 to avoid AI-sounding language
f. **Draft Content** — combine sub profile + angle + persona facts + anti-AI rules
g. **Add Engagement Hook** — read `references/post-strategy.md` §4 for comment triggers
h. **Craft Title** — read `references/post-strategy.md` §1 for subreddit-specific title patterns
3. **Confirmation**
- Echo generated content to user for approval (unless user pre-authorized immediate send)
4. **Publish**
- Execute `references/interaction-patterns.md` §1 (Create Post workflow)
5. **Log Usage**
- Update `PERSONA.md` "已使用内容登记" table to prevent future contradictions
**Flow Reference:** `references/interaction-patterns.md` §1
---
### Create Comment
**Trigger:** user asks to reply to a post or comment.
**Content Generation Flow:**
1. **Determine Input Type**
- If user provides full comment text → use as-is
- If user provides fuzzy request (e.g., "comment on this post") → execute strategy flow below
2. **Strategy Flow** (for fuzzy requests)
a. **Read Target Post/Comment** — understand context and existing discussion
b. **Check Subreddit Info**
- Read `references/sub-archives.md` for this sub
- **If NOT found:** Execute `interaction-patterns.md` §0 (Dynamic Subreddit Analysis Framework), then append sub info to `references/sub-archives.md`
- **If found:** Use existing info (tone, rules, restrictions)
c. **Load Comment Strategy** — read `references/comment-strategy.md` (when available) or apply `post-strategy.md` Human-First rules
d. **Load Persona Facts** — read workspace `PERSONA.md` for authentic personal facts
e. **Apply Anti-AI Rules** — read `references/post-strategy.md` (Word Razor, Two-Beat Flow, etc.)
f. **Draft Comment** — ensure information increment, not just "+1"; match sub tone from step b
3. **Confirmation**
- Echo generated comment to user for approval (unless pre-authorized)
4. **Publish**
- Execute `references/interaction-patterns.md` §2 (Create Comment workflow)
5. **Log Usage**
- Update `PERSONA.md` "已使用内容登记" table if persona facts were used
**Flow Reference:** `references/interaction-patterns.md` §2
---
### Upvote
**Trigger:** user asks to like/upvote a post or comment.
**Flow:** Execute `references/interaction-patterns.md` §3 (Upvote workflow)
**No content generation needed.**
## Universal Reliability Loop
For each action step:
1. Snapshot current tab with aria refs.
2. Resolve target candidates by semantic cues (role, accessible name, nearby headings/text).
3. Score candidates (exact intent match > synonym match > position-based guess).
4. Execute one action.
5. Verify outcome with independent evidence (state change, toast, button state, new content visible).
6. If verification fails, rollback one step (or refresh context) and retry with next candidate.
Stop after 3 failed attempts and return a clear diagnostic with:
- last confirmed state
- failing intent
- top 2 alternate hypotheses
## Semantic Targeting Standard
Prefer these signals (highest to lowest confidence):
1. Accessible role + accessible name exact match (e.g., button "Post", "Comment", "Upvote").
2. Accessible name synonym match (e.g., "Submit", "Reply", "Send").
3. Relative context anchor (inside composer region; under post action row; near subreddit title).
4. Visibility and enabled state checks.
Never rely on:
- hardcoded CSS selectors
- hardcoded DOM ids/classes
- absolute XPath
- static child index paths
## Submission Safety Gates
Before clicking final submit:
1. Echo target summary: subreddit/post URL/action/content preview.
2. Ensure required fields are non-empty and within Reddit limits.
3. Confirm account/session is authenticated.
4. Confirm no blocking validation/errors are visible.
If explicit user request already includes immediate-send intent, submit directly.
Otherwise ask one short confirmation.
## Output Contract
After completion, return:
- Action performed
- Target (subreddit/post/comment)
- Result (`success` | `partial` | `failed`)
- Evidence (what changed in UI)
- If failed: next best recovery step
## Fast Troubleshooting
- Login wall/captcha: pause and ask user to complete challenge, then resume from latest snapshot.
- Button exists but disabled: inspect missing required fields or rate limits.
- Multiple matching buttons: choose candidate within nearest semantic container (composer/action row).
- UI redesign: rely on role/name/context fallback chain from `references/interaction-patterns.md`.
---
## Referenced Files
> The following files are referenced in this skill and included for context.
### references/post-strategy.md
```markdown
Reddit "Human-First" Posting Strategy
The First Principle: Reddit is a Bar, Not a Library
Reddit users don't want "content"; they want a shared moment. To be indistinguishable from a human, the AI must stop "writing a post" and start "joining a conversation."
The Razor: Strip the Polish
If a sentence sounds like it belongs in a blog or a textbook, cut it. Humans on Reddit are often distracted, typing on mobile, and emotionally biased.
1. Title Strategy: The "Unfinished Thought"
Avoid titles that summarize the post. Instead, use titles that feel like the middle of a realization.
❌ AI-Style (Informative) | ✅ Human-Style (Impulsive)
Why OpenClaw is Important for Gaming | Literally just realized OpenClaw is still alive?
A Guide to Fix Level 3 Crashes | Is Level 3 in Claw actually broken for everyone?
My Thoughts on Game Preservation | We're gonna lose every 90s game if we don't fix this
The Hook Rule: Use "Wait," "Actually," "Is it just me or..." or start with a specific detail. Low-effort titles often get the highest engagement because they feel "real."
2. Anti-AI Signal: Embrace Imperfection
AI defaults to "The Goldilocks Zone" (too balanced, too clear). We must intentionally introduce Linguistic Entropy.
- Syntax: Use lowercase "i", fragments, and "..." to simulate thinking.
- Bias: Do not be neutral. Have a "hot take" or a specific frustration.
- The "Mobile" Feel: Humans don't use perfectly nested bullet points. They use raw paragraphs or simple dashes.
The Word Razor
Delete these words from the AI's vocabulary: Furthermore, Additionally, In conclusion, It is important to note, Transformative, Comprehensive, Navigating.
Use these instead: Plus, Also, Ngl (not gonna lie), Basically, Idk, Actually.
3. Body Structure: The "Two-Beat" Flow
Occam's Razor says: Keep it simple. Most viral Reddit posts follow only two steps:
1. The Specific Spark: A very narrow, personal observation. ("I was trying to run X on my Steam Deck and it just...")
2. The Sudden End: No summary. End with a question or a "vent." ("Is there even a fix for this? I'm about to give up.")
4. Subreddit "Vibe" Alignment
Tribe | Tone Requirement | AI-Fix
Technical (r/linux) | Blunt, detail-heavy, skeptical | Mention a specific error code or a niche config file.
Casual (r/gaming) | Opinionated, nostalgic, funny | Use hyperbole (e.g., "This game is literally unplayable").
Debate (r/unpopularopinion) | Contrarian, slightly aggressive | Start with "I don't get why people like X..."
5. Final Quality Checklist (The "Human" Test)
- [ ] The "I" Count: Does every paragraph contain a personal pronoun?
- [ ] The "Summary" Test: Did you delete the conclusion? (If yes, good).
- [ ] The "Politeness" Check: Is the AI being too helpful? (If yes, make it more annoyed or obsessed).
- [ ] The Format: Are there more than 3 bullet points? (If yes, convert them to a messy paragraph).
```
### references/comment-strategy.md
```markdown
Reddit "Low-Friction" Commenting Strategy
The First Principle: Comments are "Micro-Moments"
A Reddit comment is not a response to a prompt; it is a reaction to a human. The goal isn't to be "correct"—it's to be relatable. A comment succeeds if it either validates the OP (Original Poster), adds a missing detail, or cracks a joke that fits the "room."
The Razor: The "Single-Point" Rule
If a comment tries to address three different points, it's a bot. Pick one specific sentence from the post and react only to that.
1. The Three Engagement Modes
To keep it simple, the AI should only ever operate in one of these three modes:
| Mode | Goal | The "Hook" |
|------|------|------------|
| **The "Yes, And"** | Build on the OP's point | "This. Especially the part about [Specific Detail]..." |
| **The "Wait, What?"** | Ask a sharp, niche question | "Wait, are you saying [Specific Thing] actually works?" |
| **The "Perspective"** | Offer a brief, biased anecdote | "I had the exact same issue last week, turns out..." |
2. Anti-AI Signal: Kill the "Polite Assistant"
AI is naturally "too nice." Humans on Reddit are often blunt, sarcastic, or use "inside baseball" terminology.
**No Validation Loops:** Never start with "Great post!" or "Thanks for sharing!" This is the #1 bot giveaway.
**The "One-Liner" Power:** Often, a 5-word comment gets more upvotes than a 500-word essay.
**Lowercase & Slang:** Use "lmao," "idk," "tbh," and "rn" (right now). Skip the period at the end of the last sentence.
---
## The Word Razor (Comment Version)
**Forbidden:** Valuable, Insightful, Comprehensive, I recommend, Indeed, Furthermore.
**Essential:** Literally, Lowkey, Wild, Ngl, Facts, Bruh.
---
3. The "Two-Sentence" Structure
Occam's Razor suggests that the shortest path to a reply is the best.
1. **The Reaction:** A gut-level response to one part of the post.
2. **The "Tail":** A short follow-up thought or a "throwaway" line.
**Example:** "That level 3 crash is literally the reason I stopped playing. Thought it was just my GPU lol."
---
4. How to Spot "The Vibe"
| Sub Type | Tone Requirement | Example |
|----------|------------------|---------|
| **Humor-Heavy** (r/funny, r/memes) | Sarcasm or self-deprecation | "Me when I accidentally click the ad and immediately close it like that's gonna help" |
| **High-IQ** (r/askscience, r/linux) | Incredibly specific, mention version numbers | "This is a known issue in kernel 5.15+, downgrade to 5.14 or patch the driver" |
| **Support** (r/advice, r/techsupport) | Empathetic but brief | "I've been there, it sucks. Try clearing the CMOS first" |
---
5. Comment Quality Checklist
- [ ] Is it a lecture? (If yes, delete and rewrite as a reaction).
- [ ] Is the first sentence "polite"? (If yes, delete the first sentence).
- [ ] Did you use a period at the end? (Try removing it; it feels more casual).
- [ ] Does it look like a ChatGPT output? (If it has "Firstly, Secondly," it's a fail).
---
_Last updated: 2026-03-06_
```
### references/interaction-patterns.md
```markdown
# Reddit Interaction Patterns (Accessibility-First)
## 0) Dynamic Subreddit Analysis Framework
**Purpose:** Handle new/unseen subreddits that don't have pre-defined cultural profiles in `post-strategy.md`.
### When to Use
Trigger this framework when:
- User requests posting/commenting in a subreddit NOT listed in `post-strategy.md` §1
- Subreddit name is extracted from user request (e.g., "去 r/Entrepreneur 发个帖")
- No cached archive exists in `sub-archives/` directory
### Step-by-Step Analysis Flow
#### Step 1: Navigate to Subreddit About Page
```
URL: https://www.reddit.com/r/<subname>/about
```
- Navigate to the about page
- Snapshot with `refs=aria`, `depth=12`
#### Step 2: Extract Community Metadata
Locate and extract these elements by semantic cues:
| Field | Semantic Locator | Fallback |
|-------|------------------|----------|
| **Member count** | text containing "members" / "Members" | regex: `[\d,\.]+[kKmM]?` near "member" |
| **Online count** | text containing "online" / "Online" | same as above |
| **Description** | paragraph under "About Community" heading | first non-nav paragraph in sidebar |
| **Created date** | text containing "Created" | regex: `[A-Z][a-z]+ \d+, \d{4}` |
#### Step 3: Extract Community Rules
```
Target: "R/<SUBNAME> RULES" section (may need to expand)
```
**Expand Rules Section (if collapsed):**
1. Find button/heading with text "Rules" or "R/<subname> RULES"
2. If rules not visible, look for expand arrow (role=button, name contains "expand" or "show")
3. Click to expand, wait 500ms, re-snapshot
**Extract Each Rule:**
For each rule item in the rules list:
- Rule number/title (e.g., "Rule 1: Be respectful")
- Rule description (paragraph under the rule title)
- Any associated icons (warning/restriction indicators)
Store rules as structured list:
```markdown
### Rules
1. **Rule Name**: Description
2. **Rule Name**: Description
...
```
#### Step 4: Analyze Recent Posts (Optional but Recommended)
```
URL: https://www.reddit.com/r/<subname>/new
```
Navigate to /new tab and snapshot to analyze:
| Signal | What to Look For |
|--------|------------------|
| **Post frequency** | Timestamp of last 5-10 posts |
| **Common flairs** | Flair text near post titles |
| **Title patterns** | Common prefixes/suffixes, question vs statement ratio |
| **Engagement level** | Comment counts and upvote ratios |
| **Content type** | Text posts vs links vs images |
#### Step 5: Generate Subreddit Profile
Create a concise profile following the format in `sub-archives.md`:
```markdown
## r/{SUBNAME}
| Field | Value |
|-------|-------|
| **Members** | X |
| **Posting Threshold** | |
| **AI Detection** | |
| **Language** | |
| **Tone** | |
| **Self-promo** | |
### Top 3 Rules
1.
2.
3.
### What Works
-
### Title Patterns
-
### Notes
```
#### Step 6: Append to Archive File
Append the generated profile to:
```
references/sub-archives.md
```
Use the template format at the bottom of `sub-archives.md`. Keep it concise — only core info needed for posting decisions.
### Integration with Content Generation
After generating the dynamic archive:
1. **Load the archive** as if it were a pre-defined profile in `post-strategy.md` §1
2. **Extract cultural signals** (tone, welcome/avoid patterns, title styles)
3. **Apply to content generation** following `SKILL.md` Workflow Router
4. **Flag for user review** if confidence is low (e.g., rules unclear, sparse data)
### Confidence Scoring
After analysis, assign confidence level:
| Level | Criteria | Action |
|-------|----------|--------|
| **High** | Rules clear + 10+ recent posts analyzed | Proceed with content generation |
| **Medium** | Rules clear but few posts, or vice versa | Generate content but flag for user review |
| **Low** | Rules missing/unclear + sparse data | Ask user for more context or manual review |
### Error Handling
| Error | Recovery |
|-------|----------|
| About page blocked (private sub) | Report "Subreddit is private" and ask for alternate |
| Rules section not found | Proceed without rules, flag as "unmoderated or rules hidden" |
| Rate limited / captcha | Pause and ask user to complete challenge |
| Subreddit doesn't exist | Check spelling, suggest similar subs |
---
## 1) Create Post
### Strategy Layer (Content Generation)
**Before executing this playbook:**
- If user provided fuzzy request (e.g., "post about OpenClaw") → execute content generation flow in `SKILL.md` Workflow Router first
- Load `references/post-strategy.md` for:
- Subreddit cultural profile (§1)
- Anti-AI writing rules (§2)
- Content angle selection (§3)
- Engagement triggers (§4)
- Load `PERSONA.md` for authentic personal facts
- Generate title and body content
- Obtain user confirmation (unless pre-authorized)
**This playbook assumes content is ready to publish.**
---
### Preconditions
- User provides: subreddit + title + body (or content generated via strategy layer)
- Browser is open on reddit and authenticated
- Content confirmed by user (if not pre-authorized)
### Steps
1. Navigate to subreddit URL (`/r/<name>`).
2. Snapshot (`refs=aria`).
3. Find post composer entry by semantic labels like:
- "Create post"
- "Create"
- "Post"
4. Open composer and re-snapshot.
5. Fill title field (role textbox, name includes "Title").
6. Fill body field when provided (textbox/editor region named "Body", "Text", or "Post body").
7. Optional type switch (Text/Image/Link/Poll) by tab/button role with matching names.
8. Verify submit button semantic name in {"Post", "Submit", "Publish"} and enabled.
9. Click submit.
10. Verify success via one or more:
- Post detail page opens
- New post title visible
- Success toast/banner
### Failure Recovery
- If composer not found: search global "Create" button from top nav.
- If subreddit posting restricted: return restriction reason and ask alternate subreddit.
---
## 2) Create Comment
### Strategy Layer (Content Generation)
**Before executing this playbook:**
- If user provided fuzzy request (e.g., "comment on this post") → execute content generation flow in `SKILL.md` Workflow Router first
- Load `references/comment-strategy.md` for comment-specific tactics (when available)
- Load `references/post-strategy.md` §2 for anti-AI writing rules (shared)
- Load `PERSONA.md` for authentic personal facts
- Read target post/comment to understand context
- Generate comment content with information increment (not just "+1")
- Obtain user confirmation (unless pre-authorized)
**This playbook assumes content is ready to publish.**
---
### Preconditions
- User provides: post URL + comment text (or content generated via strategy layer)
- Browser is open on reddit and authenticated
- Content confirmed by user (if not pre-authorized)
### Steps
1. Open target post URL.
2. Snapshot (`refs=aria`, depth=10) to find initial placeholder textbox.
3. Locate placeholder textbox (typically `textbox [ref=e267]` with `/placeholder: Join the conversation`).
- ⚠️ Do NOT type into this placeholder ref — it is a custom web component (`faceplate-textarea-input`), not a real textarea.
4. **Click** the placeholder textbox ref to activate the Slate editor.
5. **Re-snapshot at depth=13** — this is required. The active editor appears deeply nested inside the ad block's thumbnail link element in the ARIA tree (an Reddit layout quirk). At shallower depths it won't appear.
6. Find `textbox [active] [ref=eXXXX]` — the high-numbered ref is the real Slate editor. Also note `button "Comment" [ref=eYYYY]` at the same level — you'll need it for submit.
7. Type comment text into the **active** textbox ref.
8. Click the `button "Comment"` ref found in step 6 (do NOT use evaluate to click "Comment" — use the direct ref to avoid hitting wrong elements).
9. Verify: evaluate `document.body.innerText.includes('<unique snippet>')`.
### ARIA Tree Quirk — Where the Editor Lives
After clicking the placeholder, Reddit renders the full Slate editor nested inside:
```
generic [ad block] [ref=e205]:
link [Thumbnail image: ...] [ref=e253]:
paragraph [ref=eXXX]
textbox [active] [ref=eXXXX] ← your typing target
paragraph [ref=eXXX]
button "Comment" [ref=eYYYY] ← your submit target
button "Cancel" [ref=eZZZZ]
button "Show formatting options" [ref=...]
```
This structure is consistent across posts — always depth=13 to see it.
### Failure Recovery
- If locked thread/mod restrictions: report exact restriction text.
- If submit disabled: ensure non-empty content and no markdown-mode validation blocks.
- If "The field is required and cannot be empty" appears: you clicked submit on an empty editor. Reload the page and restart from step 2.
- If comment not found after submit: page may have redirected to user profile (normal Reddit behavior after submit) — navigate back to post and verify with evaluate.
---
## 3) Upvote
### Preconditions
- User provides target URL (post/comment) or clear target description.
### Steps
1. Open target context.
2. Snapshot (`refs=aria`).
3. Locate vote control near intended entity (post card or comment container).
4. Pick control whose accessible name implies upvote semantics:
- "Upvote"
- "Vote up"
- localized equivalent with up-arrow context
5. Click once.
6. Verify state change via one or more:
- button pressed/selected state
- score increment (if visible)
- control style/state indicates active vote
### Failure Recovery
- If already upvoted, return idempotent success.
- If ambiguous (multiple upvotes), anchor to nearest container that matches target title/snippet.
---
## 4) Candidate Scoring Heuristic
Use weighted scoring when multiple elements match.
- +8 exact role match
- +10 exact/strong accessible-name intent match
- +6 synonym match
- +7 in expected semantic container (composer/action row/comment item)
- +5 visible in viewport
- +2 enabled
- -3 outside viewport and no scroll evidence
- -5 conflicts with target entity context
Pick highest score above threshold 10.
If top-2 delta < 4, mark as ambiguous and do not click yet.
## 4.1) Uniqueness + Context-Lift Fallback
When selector returns multiple nodes:
1. Stop action.
2. Lift context to nearest parent semantic region.
3. Re-score with composite conditions:
- role
- aria-label / placeholder / accessible text
- parent region match
4. If still ambiguous, return top 3–5 candidates and let planner choose.
5. Never spin on the same ambiguous ref id.
This avoids deadlocks caused by volatile refs like `e47` that map to multiple nodes.
---
## 5) Synonym Bank (EN/ZH)
- Post submit: Post / Submit / Publish / 发布 / 提交
- Comment submit: Comment / Reply / Post / 评论 / 回复 / 发布
- Upvote: Upvote / Vote up / 顶 / 赞同 / 点赞
- Composer: Create post / Start a post / 创建帖子 / 发帖
---
## 6) Anti-Brittle Rules
- Do not bind to `id`, dynamic class hashes, or nth-child paths.
- Do not assume fixed layout for old/new Reddit.
- Always refresh semantic map after action-induced rerender.
- Prefer intent anchor + local container instead of global first match.
---
## 7) Known Pitfalls (Hard-Won)
| Pitfall | Cause | Fix |
|---------|-------|-----|
| Typed text disappears / textbox stays empty | Reddit uses React — raw DOM `.value` JS assignment is silently ignored | Always use CDP `act type` (not `evaluate` to set `.value`) |
| `faceplate-textarea-input` doesn't accept input | It's a custom web component shell, not a real textarea | Click it first to expand the real Slate editor, then re-snapshot and target the new `textbox [active]` ref |
| "The field is required" error on submit | Clicked Comment button while textbox was still empty (typed into wrong ref) | Reload page, restart from step 1, be sure to click placeholder → snapshot → find `[active]` ref before typing |
| Comment not visible after clicking Comment | Reddit redirected to user profile (`/user/szy1840/`) after submit — this is normal | Navigate back to the post URL and verify with `evaluate document.body.innerText.includes(...)` |
| `textbox [active]` not visible in snapshot | Snapshot depth too shallow (< 13) | Always use `depth=13` after activating the editor |
| Wrong element clicked when using evaluate | `querySelectorAll('button')` may match multiple "Comment" buttons on the page | Use the direct `ref` from snapshot, not evaluate-based queries, for submit |
| Locked post — no comment box | Some subreddit posts are locked by mods | Check ARIA tree for "Locked post" text before attempting; skip and move to next post |
```
### references/sub-archives.md
```markdown
# Subreddit Archives
**Purpose:** Store only core info for each subreddit. One file, minimal data.
**Format:** Just 2 things per sub:
1. Description (what this sub is about)
2. Top Rules (the ones that get you banned)
---
## r/Entrepreneur
**Description:** Community for entrepreneurs focused on problem-solving, networking, and collaborative innovation. Welcomes side projects, small businesses, venture-backed startups, and solo ventures. NOT for self-promotion.
**Top Rules:**
1. Must have 10 comment karma in this sub to post (auto-mod enforced)
2. No Promotion — permanent ban for selling your course/book/service
3. No "Get Rich Quick" posts
4. AI-generated content detected and removed
---
## r/Startup_Ideas
**Description:** Place to validate startup ideas and get feedback. Focus on market analysis and humble discussion.
**Top Rules:**
1. No obvious self-promotion
2. Must show market research (no empty "I have an idea")
3. Be humble, welcome criticism
---
## r/SaaS
**Description:** Community for SaaS builders. Data-driven discussions about MRR, growth, tech stacks, and failures.
**Top Rules:**
1. No "I have a SaaS idea" posts (go to r/Startup_Ideas)
2. No affiliate links
3. Must show traction for any promotion
---
## r/TheFounders
**Description:** Support community for founders. Honest sharing about the emotional side of building companies.
**Top Rules:**
1. No theoretical preaching — share real experience only
2. No toxic positivity
3. Respect mental health discussions
---
## r/openclaw
**Description:** Technical community for OpenClaw users. Config sharing, workflows, bug reports, comparisons.
**Top Rules:**
1. Read docs first — no basic "how to use" questions
2. Include error logs when asking for help
3. No pure promotion
---
## r/OnePiece
**Description:** Community for Eiichiro Oda's manga and anime series One Piece. From East Blue to New World, anything related to One Piece belongs here. Spoiler warnings enforced for new chapters/anime episodes.
**Top Rules:**
1. Be mindful of spoilers — no unreleased chapter spoilers outside spoiler threads
2. No separate chapter discussion posts for 24h after release (use megathread)
3. Fanart/cosplay must link to original source
4. Plain panels/scenes must create discourse, not just repost
5. Posts must be directly related to One Piece
6. No self-promotion
7. No low-effort memes
8. No hentai
9. No game posts except news
10. No questions answered in FAQ/sidebar
11. Don't be rude
12. Flair your posts
---
## Template for New Sub
```markdown
## r/{SUBNAME}
**Description:** (1-2 sentences: what this sub is about)
**Top Rules:**
1.
2.
3.
```
---
_Last updated: 2026-03-06_
```
---
## Skill Companion Files
> Additional files collected from the skill directory layout.
### _meta.json
```json
{
"owner": "alvinperson",
"slug": "reddit-engagement",
"displayName": "Reddit Engagement",
"latest": {
"version": "1.0.0",
"publishedAt": 1772856663817,
"commit": "https://github.com/openclaw/skills/commit/bfb8b2b7d16fb3ae1be6a779b5aa97a1d15fc3ee"
},
"history": []
}
```