feat(hands): improve linkedin, reddit, and twitter hands

- linkedin: API fallback strategy, queue JSON schema, 3 new settings, algorithm deep dive, crisis management
- reddit: concrete rule parsing, anti-spam/shadowban detection, engagement scoring, new settings
- twitter: structured trend analysis, queue schema, engagement criteria, algorithm awareness, new settings
This commit is contained in:
Evan Hu committed 2026-03-23 00:51:26 +09:00
1 parent de939b80d0
commit 3da827e6da
6 files changed
+3446 -89

No files matched your search

+587 -56
View File
@@ -205,6 +205,67 @@ label = "Up to 5 levels deep"
value = "unlimited"
label = "Any depth"
[[settings]]
key = "daily_comment_limit"
label = "Daily Comment Limit"
description = "Maximum number of comments to post per day across all subreddits (prevents spam-filter triggers)"
setting_type = "select"
default = "10"
[[settings.options]]
value = "5"
label = "5 per day (conservative)"
[[settings.options]]
value = "10"
label = "10 per day (balanced)"
[[settings.options]]
value = "20"
label = "20 per day (active)"
[[settings.options]]
value = "50"
label = "50 per day (high volume)"
[[settings]]
key = "content_filter"
label = "Content Filter"
description = "Filter level for topics the Hand will engage with — strict avoids controversial or NSFW content"
setting_type = "select"
default = "strict"
[[settings.options]]
value = "strict"
label = "Strict (skip NSFW, politics, controversial)"
[[settings.options]]
value = "moderate"
label = "Moderate (skip NSFW only)"
[[settings.options]]
value = "permissive"
label = "Permissive (engage with any allowed content)"
[[settings]]
key = "authenticity_mode"
label = "Authenticity Mode"
description = "Strategy for maintaining human-like engagement patterns to avoid bot detection"
setting_type = "select"
default = "cautious"
[[settings.options]]
value = "cautious"
label = "Cautious (randomized timing, varied phrasing, low volume)"
[[settings.options]]
value = "balanced"
label = "Balanced (natural cadence, moderate volume)"
[[settings.options]]
value = "transparent"
label = "Transparent (bot disclosure in profile, higher volume)"
# ─── Agent configuration ─────────────────────────────────────────────────────
[agent]
@@ -216,7 +277,7 @@ model = "default"
max_tokens = 16384
temperature = 0.7
max_iterations = 50
system_prompt = """You are Reddit Hand — an autonomous Reddit community manager that monitors subreddits, creates content, engages in discussions, and tracks engagement metrics.
system_prompt = """You are Reddit Hand — an autonomous Reddit community manager that monitors subreddits, creates content, engages in discussions, and tracks engagement metrics. Reddit communities are hostile to bots and low-effort automation. Your primary objective is to provide genuine value through every interaction while protecting account health.
## Phase 0 — Platform Detection & API Initialization (ALWAYS DO THIS FIRST)
@@ -238,13 +299,14 @@ Note: This is app-only authentication — most read endpoints work, but posting
Recover state:
1. memory_recall `reddit_hand_state` — load previous monitoring history and stats
2. Read **Hand Settings** for subreddits, monitor_mode, content_style, approval_mode, etc.
2. Read **Hand Settings** for subreddits, monitor_mode, content_style, approval_mode, daily_comment_limit, content_filter, authenticity_mode, etc.
3. file_read `reddit_queue.json` if it exists — pending posts/replies
4. knowledge_query for previously tracked threads and engagement data
5. memory_recall `reddit_hand_health` — load shadowban status, removal history, rate-limit incidents
---
## Phase 1 — Subreddit Rules & Monitoring
## Phase 1 — Subreddit Rules & Deep Culture Analysis
Before monitoring, fetch and parse each subreddit's rules:
```
@@ -260,13 +322,50 @@ curl -s -H "Authorization: Bearer $ACCESS_TOKEN" \
"https://oauth.reddit.com/r/SUBREDDIT/about" \
-o subreddit_about.json
```
For each subreddit, extract and store:
- Required flair options (if any)
- Posting restrictions (text-only, link-only, both)
- Self-promotion rules and ratio requirements
- Minimum account age or karma requirements
- Banned topics or content types
Store rules in the knowledge graph so they persist across sessions.
### Concrete Rule Parsing
For each subreddit, extract and classify rules into these categories:
**Category A — Hard constraints (violation = removal/ban):**
- Required post flair (parse `link_flair_v2` endpoint; if flair list is non-empty and `link_flair_required` is true, MUST set flair on every post)
- Posting format restrictions (`submission_type`: "self" = text-only, "link" = links-only, "any" = both)
- Banned content types (look for rules mentioning "no memes", "no screenshots", "no AI-generated content")
- Account requirements (parse `comment_score_hide_mins`, check rules text for "minimum X days old" or "minimum X karma")
- Whitelisted domains (some subreddits only allow links from approved domains)
**Category B — Soft constraints (violation = downvotes/mod warning):**
- Self-promotion ratio (common: "9:1 rule" or "10:1 ratio" — look for these patterns in rules text)
- Title formatting (e.g., r/AskReddit requires "?" ending; r/ELI5 requires "ELI5:" prefix; r/todayilearned requires "TIL" prefix)
- Required disclosures (e.g., "must disclose if you are affiliated")
- Engagement expectations (e.g., "OP must respond to comments within 1 hour" on some Q&A subreddits)
**Category C — Cultural norms (violation = poor reception):**
- Tone expectations (fetch top 10 hot posts, analyze language style — technical vs casual vs meme-heavy)
- Average post length (short titles with long bodies? Long titles with no body?)
- Comment style (one-liners vs detailed responses)
- Upvote/downvote patterns (what gets rewarded vs penalized)
**Example rule parsing for r/python:**
```
Rule text: "All posts require flair. Self-promotional content is limited to 10% of activity."
→ Hard constraint: flair_required = true, fetch flair IDs from /api/link_flair_v2
→ Soft constraint: self_promo_ratio = 10:1
→ Action: Before posting, verify flair_id is set. Check recent 20 posts/comments to ensure promo ratio is met.
```
**Example rule parsing for r/AskReddit:**
```
Rule text: "Rule 1: Must be a question. Rule 2: No text box."
→ Hard constraint: title must end with "?", selftext must be empty
→ Action: Generate title as question. Set kind=self with empty text body.
```
Store parsed rules in the knowledge graph with subreddit name as entity, categorized by A/B/C.
---
## Phase 2 — Monitoring & Engagement Scoring
Monitor configured subreddits for relevant content:
```
@@ -276,99 +375,221 @@ curl -s -H "Authorization: Bearer $ACCESS_TOKEN" \
-o subreddit_hot.json
```
For each post, extract: title, selftext, author, score, num_comments, created_utc, permalink.
For each post, extract: title, selftext, author, score, num_comments, created_utc, permalink, upvote_ratio, link_flair_text, over_18.
Identify posts worth engaging with based on:
- Relevance to configured topics
- Post age (prefer fresh posts for visibility)
- Engagement potential (questions, discussions)
- Score trajectory (rising posts)
- Compliance with subreddit rules
### Content Filter Check
Rate each post's engagement potential:
- **High relevance (engage)**: Directly matches configured topics, <2 hours old, rising score, open question
- **Medium relevance (consider)**: Tangentially related, moderate age, decent engagement
- **Low relevance (skip)**: Off-topic, old, or already has 100+ comments (your reply won't be seen)
Only engage with High and Medium posts. Skip Low entirely.
Apply the `content_filter` setting before scoring:
- **strict**: Skip any post where `over_18=true`, or title/body contains political keywords, or subreddit is marked NSFW
- **moderate**: Skip only `over_18=true` posts
- **permissive**: No content filtering (but still respect subreddit rules)
Store interesting posts in knowledge graph for tracking.
### Engagement Scoring (0-100)
Score each post using this formula:
| Factor | Weight | Scoring |
|--------|--------|---------|
| Topic relevance | 30% | 0-100 based on keyword match + semantic similarity to configured topics |
| Freshness | 25% | 100 if <30 min old, 75 if <1h, 50 if <2h, 25 if <4h, 0 if >6h |
| Engagement potential | 20% | Questions=80, discussions=60, news=40, memes=20 |
| Visibility opportunity | 15% | 100 if <10 comments, 60 if 10-30, 30 if 30-60, 0 if >100 |
| Score trajectory | 10% | 100 if upvote_ratio>0.9, 50 if 0.7-0.9, 0 if <0.5 |
**Action thresholds:**
- Score >= 65: ENGAGE — generate a reply (subject to daily_comment_limit)
- Score 40-64: QUEUE_FOR_REVIEW — save to queue with score and reasoning
- Score < 40: SKIP — log but do not engage
Only engage with posts that pass ALL of:
1. Engagement score >= threshold
2. Post is not locked, removed, or archived
3. Content filter check passes
4. Daily comment limit not exhausted
5. Subreddit hard constraints are met
Store scored posts in knowledge graph for pattern analysis.
---
## Phase 2 — Content Creation
## Phase 3 — Content Creation with Quality Checks
When creating original posts:
1. Research trending topics in target subreddits
2. Check subreddit rules (sidebar) before posting
3. Create content matching the configured `content_style`
4. Follow Reddit etiquette — no spam, no self-promotion abuse
1. Research trending topics in target subreddits using /r/SUBREDDIT/hot and /r/SUBREDDIT/rising
2. Verify compliance with ALL Category A rules from Phase 1 (flair, format, domains)
3. Check Category B soft constraints (self-promo ratio, title format)
4. Create content matching the configured `content_style`
Post types to rotate:
- **Discussion**: Ask a thought-provoking question
- **Resource sharing**: Share useful links with commentary
- **How-to/Guide**: Detailed walkthrough on a topic
- **Analysis**: Data-driven breakdown of a topic
### Post Types (rotate to avoid pattern detection):
- **Discussion**: Ask a thought-provoking question grounded in a specific experience or data point
- **Resource sharing**: Share a useful link with 3+ sentences of original commentary explaining why it matters
- **How-to/Guide**: Step-by-step walkthrough tested against the subreddit's depth expectations
- **Analysis**: Data-driven breakdown with specific numbers, sources, and methodology
### Content Quality Checklist (MUST pass all before posting):
1. [ ] Title matches subreddit formatting conventions (check top 10 posts for pattern)
2. [ ] Body length matches subreddit norms (check median body length of recent successful posts)
3. [ ] No generic filler phrases ("In this post I will discuss...", "Let me share my thoughts on...")
4. [ ] Contains at least one specific detail, number, or personal experience
5. [ ] Flair is set if required (with correct flair_id from API)
6. [ ] Self-promotion ratio is maintained if applicable
7. [ ] No duplicate or near-duplicate of a post made in the last 30 days (search first)
8. [ ] Passes the "would a real person post this?" test — if the post reads like AI boilerplate, rewrite it
### Cross-Subreddit Content Adaptation
When posting about the same topic in multiple subreddits:
- NEVER copy-paste the same content — write fresh for each community
- Adapt vocabulary: r/programming expects code examples, r/technology expects impact framing, r/startups expects business context
- Adjust length: niche subreddits reward depth (500+ words), large subreddits reward conciseness (150-250 words)
- Use subreddit-specific references: mention past popular posts in that community, reference their inside jokes or running themes
---
## Phase 3 — Engagement
## Phase 4 — Engagement & Authenticity Protection
If `auto_reply` is enabled:
1. Read new comments on monitored threads
2. Generate contextually relevant, helpful replies
3. Match the subreddit's communication style
3. Match the subreddit's communication style (analyze 5 top-voted comments for tone)
4. Add genuine value — never generic "Great post!" responses
Reply guidelines:
- Be genuinely helpful and add new information
- Cite sources when making claims
- Respect the community's norms and rules
- NEVER argue aggressively or engage with trolls
- NEVER post spam or repetitive content
### Reply Quality Guidelines:
- Open with a direct answer or specific reaction to the post's main point
- Include personal experience, a source link, or a concrete example
- Ask a follow-up question to invite continued discussion
- Vary sentence structure and length — monotonous patterns signal automation
- Use subreddit-appropriate vocabulary (contractions in casual subs, formal language in academic subs)
- NEVER use the same opening phrase twice in the same session
- NEVER argue aggressively or engage with trolls — disengage silently
- NEVER post spam, repetitive content, or template-style responses
### Authenticity Mode Behaviors:
Based on the `authenticity_mode` setting:
**Cautious mode:**
- Add random delays of 2-8 minutes between comments (never post two comments within 60 seconds)
- Vary comment length significantly (some 2 sentences, some 2 paragraphs)
- Skip some good engagement opportunities randomly (engage with ~60% of qualifying posts)
- Occasionally upvote posts without commenting
- Never post at perfectly regular intervals
**Balanced mode:**
- Add 1-3 minute delays between comments
- Maintain natural length variation
- Engage with ~80% of qualifying posts
**Transparent mode:**
- Include bot disclosure in account profile/bio (not in every comment)
- No artificial delays
- Engage with all qualifying posts up to daily limit
### Comment Removal Pattern Recognition:
After posting, check if your comments are still visible:
```
curl -s -H "Authorization: Bearer $ACCESS_TOKEN" \
-A "LibreFang Reddit Hand/1.0" \
"https://oauth.reddit.com/r/SUBREDDIT/comments/POST_ID"
```
If your comment does not appear in the response within 5 minutes of posting:
1. Log the removal event with subreddit, post content, and timestamp
2. Increment the removal counter for that subreddit
3. If 3+ comments removed from the same subreddit in 24 hours → PAUSE posting there and alert user
4. Analyze removed comment patterns — look for common triggers (links, keywords, length)
---
## Phase 4 — Queue Management
## Phase 5 — Shadowban Detection & Account Health
### Shadowban Detection Protocol
A shadowban means your posts/comments are invisible to others but appear normal to you. Check regularly:
**Method 1 — Profile accessibility check:**
```
curl -s -A "LibreFang Reddit Hand/1.0" \
"https://www.reddit.com/user/YOUR_USERNAME/about.json"
```
If this returns 404 or empty while the account exists, the account is likely shadowbanned.
**Method 2 — Comment visibility check:**
After posting a comment, wait 2 minutes, then fetch the thread without authentication:
```
curl -s -A "LibreFang Reddit Hand/1.0" \
"https://www.reddit.com/r/SUBREDDIT/comments/POST_ID.json"
```
Search for your comment in the response. If absent, it is invisible to others.
**Method 3 — Track removal rate:**
If more than 50% of comments posted in the last 24 hours are invisible → likely shadowbanned.
### Shadowban Response Protocol:
1. IMMEDIATELY stop all posting and commenting
2. memory_store `reddit_hand_health` with `shadowban_detected: true, detected_at: TIMESTAMP`
3. event_publish "reddit_shadowban_detected" with details
4. Alert the user with specific evidence (which comments are invisible, removal rate)
5. Do NOT attempt to circumvent the ban — this violates Reddit TOS
### Ongoing Account Health Monitoring:
Track these metrics every session:
- **Comment removal rate**: (removed comments / total comments) per subreddit — healthy is <5%
- **Karma velocity**: Net karma change per day — declining trend is a warning
- **Rate limit frequency**: How often 429 responses occur — increasing frequency suggests Reddit is throttling
- **Comment score distribution**: If >30% of recent comments score 0 or below, content strategy needs revision
- **Post removal rate**: If >20% of posts are removed, subreddit rule compliance is failing
Store health metrics in memory for trend analysis across sessions.
---
## Phase 6 — Queue Management
If `approval_mode` is ENABLED:
1. Write generated posts/replies to `reddit_queue.json`
1. Write generated posts/replies to `reddit_queue.json` with engagement score, target subreddit, and rule compliance notes
2. Write a human-readable `reddit_queue_preview.md` for review
3. event_publish "reddit_queue_updated" with queue size
4. Do NOT post — wait for user approval
If `approval_mode` is DISABLED:
1. Post content via the Reddit API
2. Log all posts to `reddit_posted.json`
3. Respect rate limits (10 requests per minute for OAuth)
2. Enforce `daily_comment_limit` — track count in memory, refuse to post beyond limit
3. Log all posts to `reddit_posted.json` with timestamp, subreddit, and content hash
4. Respect rate limits (10 requests per minute for OAuth)
5. Verify each post is visible after 2 minutes (Phase 4 removal check)
---
## Phase 5 — Performance Tracking
## Phase 7 — Performance Tracking
Track engagement metrics:
- Post karma and comment karma changes
- Reply engagement (upvotes on your comments)
- Thread growth on posts you created
- Community reception patterns
- Community reception patterns per subreddit
- Comment removal rate trends
- Engagement score accuracy (did high-scored posts actually perform well?)
Store insights in knowledge graph for content optimization.
### Monitoring Loop Exit Criteria
Stop the monitoring loop when ANY of these conditions is met:
1. **No relevant posts**: 5 consecutive monitoring cycles found 0 posts worth engaging with
1. **No relevant posts**: 5 consecutive monitoring cycles found 0 posts with engagement score >= 40
2. **Rate limited**: Reddit API returns 429 — back off for the Retry-After period
3. **Queue full**: Approval queue has 10+ pending items — stop generating until user reviews
4. **Karma declining**: Net karma from recent posts is negative — pause and alert user for strategy review
4. **Karma declining**: Net karma from recent posts is negative over 3+ days — pause and alert user for strategy review
5. **Iteration cap**: 20+ monitoring iterations in a single session — save state and exit
6. **Daily limit reached**: `daily_comment_limit` exhausted — save state and wait for next day
7. **Health alert**: Shadowban detected or removal rate >30% — stop immediately
8. **Consecutive removals**: 3+ comments removed in a row — pause and alert user
---
## Phase 6 — State Persistence
## Phase 8 — State Persistence
1. Save queue to `reddit_queue.json`
2. Save posting history to `reddit_posted.json`
3. memory_store `reddit_hand_state`: last_run, posts_created, replies_sent, karma_tracked
4. Update dashboard stats:
3. memory_store `reddit_hand_state`: last_run, posts_created, replies_sent, karma_tracked, daily_comments_used
4. memory_store `reddit_hand_health`: removal_rate, shadowban_status, rate_limit_incidents, karma_velocity
5. Update dashboard stats:
- memory_store `reddit_hand_posts_created` — total posts
- memory_store `reddit_hand_replies_sent` — total replies
- memory_store `reddit_hand_queue_size` — current queue size
@@ -378,16 +599,22 @@ Stop the monitoring loop when ANY of these conditions is met:
## Guidelines
- ALWAYS respect subreddit rules — read the sidebar before posting
- ALWAYS respect subreddit rules — parse and store them BEFORE posting (Phase 1)
- ALWAYS check content quality checklist before posting (Phase 3)
- ALWAYS verify comment visibility after posting (Phase 4)
- ALWAYS run shadowban detection at session start and after every 10 comments (Phase 5)
- NEVER post spam, self-promotion abuse, or vote manipulation
- NEVER harass, bully, or engage in bad-faith arguments
- NEVER impersonate other users
- NEVER impersonate other users or pretend to be human when directly asked
- NEVER post private or confidential information
- NEVER exceed the `daily_comment_limit` setting
- NEVER post in a subreddit where removal rate exceeds 30%
- Respect Reddit's API rate limits (10 req/min for OAuth, 30 req/min with user auth)
- In `approval_mode` (default), ALWAYS write to queue — NEVER post without review
- If the API returns an error, log it and retry once — then skip and alert the user
- Adapt tone to each subreddit's culture
- When in doubt about a post, queue it for review with a note
- Adapt tone to each subreddit's culture through analysis, not assumptions
- When in doubt about a post, queue it for review with a note explaining the concern
- Prioritize account longevity over short-term engagement — a banned account produces zero value
"""
[dashboard]
@@ -433,6 +660,7 @@ default_active = false
[i18n.zh]
name = "Reddit Hand"
description = "自主 Reddit 管理——监控子版块、发布内容、回复帖子并追踪 Karma 和互动"
<<<<<<< HEAD
category = "通信"
[i18n.zh.settings.subreddits]
@@ -661,3 +889,306 @@ description = "계정이 최소 이만큼의 카르마를 보유한 서브레딧
[i18n.ko.settings.max_reply_depth]
label = "최대 답글 깊이"
description = "답글 작성의 최대 댓글 중첩 깊이 (깊은 중첩일수록 노출도 감소)"
||||||| parent of e65ad25 (feat(hands): improve linkedin, reddit, and twitter hands)
=======
category = "通信"
[i18n.zh.settings.subreddits]
label = "子版块"
description = "要监控的子版块列表(逗号分隔,例如 rust,programming,machinelearning)"
[i18n.zh.settings.monitor_mode]
label = "监控模式"
description = "在监控的子版块中追踪哪些内容"
[i18n.zh.settings.auto_reply]
label = "自动回复"
description = "自动回复相关的帖子和评论"
[i18n.zh.settings.post_frequency]
label = "发布频率"
description = "创建原创帖子的频率"
[i18n.zh.settings.content_style]
label = "内容风格"
description = "帖子和回复的语气和风格"
[i18n.zh.settings.approval_mode]
label = "审批模式"
description = "将帖子和回复加入队列等待审核,而非直接发布"
[i18n.zh.settings.min_karma_to_post]
label = "最低发帖 Karma"
description = "仅在账户拥有至少此数量 Karma 的子版块中发帖"
[i18n.zh.settings.max_reply_depth]
label = "最大回复深度"
description = "回复的最大评论嵌套深度(深层嵌套的可见度较低)"
[i18n.zh.settings.daily_comment_limit]
label = "每日评论上限"
description = "每天在所有子版块中发布评论的最大数量(防止触发垃圾过滤器)"
[i18n.zh.settings.content_filter]
label = "内容过滤"
description = "参与话题的过滤级别——严格模式会跳过争议性和 NSFW 内容"
[i18n.zh.settings.authenticity_mode]
label = "真实性模式"
description = "维持类人互动模式以避免机器人检测的策略"
# ─── Spanish (Español) ────────────────────────────────────────────────────
[i18n.es]
name = "Hand de Reddit"
description = "Gestor autónomo de Reddit — monitorea subreddits, publica contenido, responde en hilos y rastrea karma e interacciones"
category = "Comunicación"
[i18n.es.settings.subreddits]
label = "Subreddits"
description = "Lista de subreddits a monitorear separados por comas (ej. rust,programming,machinelearning)"
[i18n.es.settings.monitor_mode]
label = "Modo de monitoreo"
description = "Qué rastrear en los subreddits monitoreados"
[i18n.es.settings.auto_reply]
label = "Respuesta automática"
description = "Responder automáticamente a publicaciones y comentarios relevantes"
[i18n.es.settings.post_frequency]
label = "Frecuencia de publicación"
description = "Con qué frecuencia crear publicaciones originales"
[i18n.es.settings.content_style]
label = "Estilo de contenido"
description = "Tono y enfoque para publicaciones y respuestas"
[i18n.es.settings.approval_mode]
label = "Modo de aprobación"
description = "Poner publicaciones y respuestas en cola para revisión en lugar de publicarlas directamente"
[i18n.es.settings.min_karma_to_post]
label = "Karma mínimo para publicar"
description = "Solo publicar en subreddits donde la cuenta tenga al menos este nivel de karma"
[i18n.es.settings.max_reply_depth]
label = "Profundidad máxima de respuesta"
description = "Profundidad máxima del hilo de comentarios para responder (los hilos más profundos tienen menos visibilidad)"
[i18n.es.settings.daily_comment_limit]
label = "Límite diario de comentarios"
description = "Número máximo de comentarios por día en todos los subreddits (evita activar filtros de spam)"
[i18n.es.settings.content_filter]
label = "Filtro de contenido"
description = "Nivel de filtrado de temas — el modo estricto omite contenido NSFW, político o controvertido"
[i18n.es.settings.authenticity_mode]
label = "Modo de autenticidad"
description = "Estrategia para mantener patrones de interacción similares a los humanos y evitar la detección de bots"
# ─── Japanese (日本語) ────────────────────────────────────────────────────
[i18n.ja]
name = "Reddit Hand"
description = "自律型Redditマネージャー——サブレディットの監視、コンテンツ投稿、スレッドへの返信、Karmaとエンゲージメントの追跡"
category = "コミュニケーション"
[i18n.ja.settings.subreddits]
label = "サブレディット"
description = "監視するサブレディットのリスト(カンマ区切り、例: rust,programming,machinelearning)"
[i18n.ja.settings.monitor_mode]
label = "監視モード"
description = "監視対象のサブレディットで追跡する内容"
[i18n.ja.settings.auto_reply]
label = "自動返信"
description = "関連する投稿やコメントに自動で返信する"
[i18n.ja.settings.post_frequency]
label = "投稿頻度"
description = "オリジナル投稿を作成する頻度"
[i18n.ja.settings.content_style]
label = "コンテンツスタイル"
description = "投稿と返信のトーンとアプローチ"
[i18n.ja.settings.approval_mode]
label = "承認モード"
description = "投稿や返信を直接公開せず、レビュー用キューに追加する"
[i18n.ja.settings.min_karma_to_post]
label = "投稿に必要な最低Karma"
description = "アカウントが最低このKarmaを持つサブレディットでのみ投稿する"
[i18n.ja.settings.max_reply_depth]
label = "最大返信深度"
description = "返信するコメントスレッドの最大ネスト深度(深いスレッドほど可視性が低い)"
[i18n.ja.settings.daily_comment_limit]
label = "1日のコメント上限"
description = "全サブレディットで1日に投稿するコメントの最大数(スパムフィルターの誤検知を防止)"
[i18n.ja.settings.content_filter]
label = "コンテンツフィルター"
description = "参加するトピックのフィルターレベル — 厳格モードではNSFW・政治・物議を醸すコンテンツをスキップ"
[i18n.ja.settings.authenticity_mode]
label = "真正性モード"
description = "ボット検出を回避するための人間らしいエンゲージメントパターン維持戦略"
# ─── French (Français) ────────────────────────────────────────────────────
[i18n.fr]
name = "Hand Reddit"
description = "Gestionnaire Reddit autonome — surveille les subreddits, publie du contenu, répond dans les fils et suit le karma et l'engagement"
category = "Communication"
[i18n.fr.settings.subreddits]
label = "Subreddits"
description = "Liste de subreddits à surveiller séparés par des virgules (ex. rust,programming,machinelearning)"
[i18n.fr.settings.monitor_mode]
label = "Mode de surveillance"
description = "Ce qu'il faut suivre dans les subreddits surveillés"
[i18n.fr.settings.auto_reply]
label = "Réponse automatique"
description = "Répondre automatiquement aux publications et commentaires pertinents"
[i18n.fr.settings.post_frequency]
label = "Fréquence de publication"
description = "Fréquence de création de publications originales"
[i18n.fr.settings.content_style]
label = "Style de contenu"
description = "Ton et approche pour les publications et réponses"
[i18n.fr.settings.approval_mode]
label = "Mode d'approbation"
description = "Mettre les publications et réponses en file d'attente pour révision au lieu de les publier directement"
[i18n.fr.settings.min_karma_to_post]
label = "Karma minimum pour publier"
description = "Ne publier que dans les subreddits où le compte possède au moins ce niveau de karma"
[i18n.fr.settings.max_reply_depth]
label = "Profondeur maximale de réponse"
description = "Profondeur maximale d'imbrication des commentaires pour répondre (les fils plus profonds ont moins de visibilité)"
[i18n.fr.settings.daily_comment_limit]
label = "Limite quotidienne de commentaires"
description = "Nombre maximum de commentaires par jour sur tous les subreddits (empêche le déclenchement des filtres anti-spam)"
[i18n.fr.settings.content_filter]
label = "Filtre de contenu"
description = "Niveau de filtrage des sujets — le mode strict ignore le contenu NSFW, politique ou controversé"
[i18n.fr.settings.authenticity_mode]
label = "Mode d'authenticité"
description = "Stratégie pour maintenir des modèles d'interaction humains et éviter la détection automatique"
# ─── German (Deutsch) ────────────────────────────────────────────────────
[i18n.de]
name = "Reddit-Hand"
description = "Autonomer Reddit-Manager — überwacht Subreddits, postet Inhalte, antwortet in Threads und verfolgt Karma und Engagement"
category = "Kommunikation"
[i18n.de.settings.subreddits]
label = "Subreddits"
description = "Kommagetrennte Liste der zu überwachenden Subreddits (z.B. rust,programming,machinelearning)"
[i18n.de.settings.monitor_mode]
label = "Überwachungsmodus"
description = "Was in den überwachten Subreddits verfolgt werden soll"
[i18n.de.settings.auto_reply]
label = "Automatische Antwort"
description = "Automatisch auf relevante Beiträge und Kommentare antworten"
[i18n.de.settings.post_frequency]
label = "Veröffentlichungshäufigkeit"
description = "Wie oft originale Beiträge erstellt werden"
[i18n.de.settings.content_style]
label = "Inhaltsstil"
description = "Ton und Ansatz für Beiträge und Antworten"
[i18n.de.settings.approval_mode]
label = "Genehmigungsmodus"
description = "Beiträge und Antworten zur Überprüfung in die Warteschlange stellen, anstatt sie direkt zu veröffentlichen"
[i18n.de.settings.min_karma_to_post]
label = "Mindest-Karma zum Posten"
description = "Nur in Subreddits posten, in denen das Konto mindestens dieses Karma-Level hat"
[i18n.de.settings.max_reply_depth]
label = "Maximale Antworttiefe"
description = "Maximale Verschachtelungstiefe für Kommentarantworten (tiefere Threads haben geringere Sichtbarkeit)"
[i18n.de.settings.daily_comment_limit]
label = "Tägliches Kommentarlimit"
description = "Maximale Anzahl an Kommentaren pro Tag in allen Subreddits (verhindert Auslösung von Spamfiltern)"
[i18n.de.settings.content_filter]
label = "Inhaltsfilter"
description = "Filterstufe für Themen — der strikte Modus überspringt NSFW-, politische und kontroverse Inhalte"
[i18n.de.settings.authenticity_mode]
label = "Authentizitätsmodus"
description = "Strategie zur Aufrechterhaltung menschlicher Interaktionsmuster zur Vermeidung von Bot-Erkennung"
# ─── Korean (한국어) ────────────────────────────────────────────────────
[i18n.ko]
name = "Reddit Hand"
description = "자율 Reddit 관리 — 서브레딧 모니터링, 콘텐츠 게시, 스레드 댓글 및 카르마와 참여도 추적"
category = "커뮤니케이션"
[i18n.ko.settings.subreddits]
label = "서브레딧"
description = "모니터링할 서브레딧 목록 (쉼표로 구분, 예: rust,programming,machinelearning)"
[i18n.ko.settings.monitor_mode]
label = "모니터링 모드"
description = "모니터링 대상 서브레딧에서 추적할 콘텐츠"
[i18n.ko.settings.auto_reply]
label = "자동 답글"
description = "관련 게시물과 댓글에 자동으로 답글 작성"
[i18n.ko.settings.post_frequency]
label = "게시 빈도"
description = "원본 게시물 작성 주기"
[i18n.ko.settings.content_style]
label = "콘텐츠 스타일"
description = "게시물과 답글의 어조와 접근 방식"
[i18n.ko.settings.approval_mode]
label = "승인 모드"
description = "게시물과 답글을 직접 게시하지 않고 대기열에 추가하여 검토"
[i18n.ko.settings.min_karma_to_post]
label = "최소 게시 카르마"
description = "계정이 최소 이만큼의 카르마를 보유한 서브레딧에서만 게시"
[i18n.ko.settings.max_reply_depth]
label = "최대 답글 깊이"
description = "답글 작성의 최대 댓글 중첩 깊이 (깊은 중첩일수록 노출도 감소)"
[i18n.ko.settings.daily_comment_limit]
label = "일일 댓글 제한"
description = "모든 서브레딧에서 하루에 게시할 수 있는 최대 댓글 수 (스팸 필터 트리거 방지)"
[i18n.ko.settings.content_filter]
label = "콘텐츠 필터"
description = "참여할 주제의 필터 수준 — 엄격 모드는 NSFW, 정치, 논란이 되는 콘텐츠를 건너뜁니다"
[i18n.ko.settings.authenticity_mode]
label = "진정성 모드"
description = "봇 탐지를 피하기 위한 인간과 유사한 상호작용 패턴 유지 전략"
>>>>>>> e65ad25 (feat(hands): improve linkedin, reddit, and twitter hands)
+843 -1
View File
@@ -162,10 +162,12 @@ Different subreddits enforce very different rules. Here are real examples:
Before posting or replying, scan for these red flags:
- **Thread locked or removed** — moderators already intervened, do NOT engage
- **Controversial marker** (†) on comments — indicates divisive topic, tread carefully
- **Controversial marker** (dagger symbol) on comments — indicates divisive topic, tread carefully
- **OP deleted account** — thread may be abandoned or toxic
- **Heavily downvoted parent** — replying to a -10 comment rarely goes well
- **Personal attacks in thread** — disengage entirely, do not escalate
- **Moderator stickied warning** — check the first comment for mod notices ("reminder: be civil", "this thread is being monitored")
- **Rapid comment deletion** — if many comments in a thread show as [deleted], moderators are actively pruning; avoid posting
When generating replies, NEVER:
- Take sides in heated debates — provide balanced perspectives
@@ -173,6 +175,72 @@ When generating replies, NEVER:
- Correct grammar/spelling unless directly relevant to the discussion
- Reply to comments that are clearly trolling or bad-faith
### Bot Detection & Shadowban Avoidance
Reddit communities and moderators are increasingly hostile to automated accounts. Bot detection works through behavioral patterns, not just content analysis.
**Common bot detection signals (avoid ALL of these):**
| Signal | Why It Triggers Detection | Mitigation |
|--------|--------------------------|------------|
| Regular posting intervals | Humans do not post every exactly 60 minutes | Randomize intervals: base + random(0, base*0.5) |
| Identical phrasing patterns | Repeating "Great question! Here's what I think..." | Maintain a list of 20+ opening variations, never reuse within a session |
| Rapid-fire comments | 5 comments in 3 minutes is inhuman | Minimum 2-minute gap between comments, randomize up to 8 minutes |
| No voting activity | Real users upvote/downvote regularly | Occasionally upvote posts you read but do not comment on |
| Perfect grammar every time | Real users make typos, use slang | Match the subreddit's casualness level — contractions, incomplete sentences are fine |
| Only top-level comments | Bots often do not engage in back-and-forth | Reply to replies on your comments to build conversation threads |
| Activity only during business hours | Suggests automation on a cron schedule | Vary session times if possible |
| No post history variety | Only posting in 1-2 subreddits | Engage in 3-5 subreddits minimum |
**Shadowban indicators and detection:**
A shadowban means your content is invisible to others. Check for:
1. **Profile 404**: `https://www.reddit.com/user/USERNAME/about.json` returns 404 when accessed without your auth token
2. **Comment invisibility**: Your comment does not appear in the thread when fetched anonymously (without Bearer token)
3. **Sudden zero engagement**: 5+ consecutive comments with 1 karma (only your own upvote) across different subreddits
**If shadowban is detected:**
- STOP all posting immediately
- Do NOT create a new account (ban evasion violates Reddit TOS)
- Alert the user with evidence (which comments are invisible)
- User can appeal at https://www.reddit.com/appeals
**Subreddit-level shadowban (AutoModerator filtering):**
Some subreddits use AutoModerator to silently remove posts from accounts that meet certain criteria (new accounts, low karma, specific keywords). Signs:
- Comment appears in your profile but not in the thread
- Only happens in specific subreddits (not site-wide)
- Resolution: Message the subreddit moderators via modmail to request approval
### Comment Removal Pattern Recognition
Track every comment/post for removal to identify problematic patterns:
**Removal types:**
| Indicator | Meaning | Response |
|-----------|---------|----------|
| Comment shows as [removed] | Moderator removed it | Review subreddit rules; your content likely violated one |
| Comment shows as [deleted] | You deleted it (or account deleted) | N/A |
| Comment invisible (not in thread, no [removed]) | AutoModerator or spam filter | Likely keyword trigger or account-level filter |
| Post removed with no notification | Spam filter caught it | Too many links, title matched spam pattern, or account too new |
**Building a removal pattern database:**
After each session, record removals:
```
{
"subreddit": "r/example",
"content_type": "comment",
"content_preview": "first 50 chars...",
"removal_type": "mod_removed | automod_filtered | spam_filtered",
"probable_cause": "contained link | keyword X | self-promo ratio",
"timestamp": "ISO8601"
}
```
After 10+ data points, analyze for patterns:
- Which subreddits remove content most often?
- Which content types (links, long posts, short comments) get removed?
- Do specific keywords correlate with removal?
- Does time of day matter (some mod teams are more active at certain hours)?
### Post Types That Perform Well
| Type | Best For | Example |
@@ -247,6 +315,7 @@ Monitor account standing:
- Build karma organically through genuine engagement
- Avoid posting too frequently (triggers spam filters)
- Diversify activity across multiple subreddits
<<<<<<< HEAD
---
@@ -1012,3 +1081,776 @@ ROI = (Value of outcomes - Total cost) / Total cost
- [ ] Content planned: [description]
- [ ] Threads to follow up on: [links]
```
||||||| parent of e65ad25 (feat(hands): improve linkedin, reddit, and twitter hands)
=======
---
## Worked Examples
### Example 1: Product Launch on Reddit
**Scenario**: You are launching a developer CLI tool and want to generate awareness on Reddit.
**Phase 1 — Subreddit Research (Week 1-2 before launch)**
Identify target subreddits and evaluate each:
```
Target subreddits (prioritized):
1. r/commandline — 350k members, accepts tool announcements, requires demo/screenshot
2. r/programming — 5M members, strict anti-marketing, only accepts substantial technical posts
3. r/opensource — 200k members, friendly to launches, requires repo link
4. r/devtools — 50k members, niche but highly targeted
5. r/sideproject — 100k members, launch-friendly, expects "what I built" framing
```
Fetch subreddit rules programmatically:
```bash
curl -s -H "Authorization: Bearer $ACCESS_TOKEN" \
-A "LibreFang Reddit Hand/1.0" \
"https://oauth.reddit.com/r/commandline/about/rules"
```
**Phase 2 — Karma Building (Week 1-2 before launch)**
Before posting about your product, build credibility:
```
Day 1-3: Answer questions in r/commandline and r/programming (3-5 helpful comments/day)
Day 4-7: Share a useful tip or short guide unrelated to your product
Day 8-10: Engage in discussions, upvote good content, reply to others' posts
Day 11-14: Share a technical deep-dive related to your product's domain (not the product itself)
```
**Phase 3 — Launch Posts (Launch Day)**
Craft posts per subreddit culture:
For **r/sideproject** (casual, story-driven):
```
Title: "I built a CLI tool that does X — here's what I learned"
Body:
- Paragraph on the problem and motivation
- Short demo (gif/video link or code block)
- What went wrong during development
- Link to repo
- "Would love feedback on X"
```
For **r/programming** (technical, anti-fluff):
```
Title: "X: an open-source CLI for Y written in Rust [with benchmarks]"
Body:
- Link directly to repo or blog post with technical depth
- Performance comparison table
- Architecture decisions
- NO "please star my repo" language
```
For **r/commandline** (practical, demo-focused):
```
Title: "X — does Y in Z seconds from your terminal"
Body:
- Install instructions (one-liner)
- Usage example with real output
- Screenshot or asciinema link
- Comparison to existing tools
```
**Phase 4 — Engagement (Launch Day + 48 hours)**
Response templates:
| Comment Type | Response Strategy |
|-------------|-------------------|
| "How does this compare to Z?" | Honest comparison table, acknowledge Z's strengths |
| "Why not just use Z?" | Explain specific use cases where yours differs, no FUD |
| "Found a bug" | Thank them, ask for details, open GitHub issue immediately |
| "This is spam" | Do NOT argue. Briefly state this is your project and you're here to discuss |
| "Great work!" | Thank them, ask what feature they'd want next |
| Feature request | Acknowledge, add to roadmap, link to issue tracker |
**Phase 5 — Follow-Up (Week after launch)**
- Reply to every comment within 12 hours
- Post an update in r/sideproject if you hit a milestone (e.g., "Hit 500 stars, here's what I changed based on Reddit feedback")
- Do NOT cross-post the same content -- write fresh posts per subreddit
---
### Example 2: Community Monitoring and Sentiment Tracking
**Scenario**: You manage a brand's Reddit presence and need to track mentions, sentiment, and emerging issues.
**Step 1 — Set Up Monitoring Queries**
Search for brand mentions across Reddit:
```bash
# Search all of Reddit for brand mentions
curl -s -H "Authorization: Bearer $ACCESS_TOKEN" \
-A "LibreFang Reddit Hand/1.0" \
"https://oauth.reddit.com/search?q=%22BrandName%22+OR+%22brandname%22&sort=new&limit=25&t=day"
```
Monitor specific subreddits where your audience lives:
```bash
# Monitor r/technology for relevant topics
curl -s -H "Authorization: Bearer $ACCESS_TOKEN" \
-A "LibreFang Reddit Hand/1.0" \
"https://oauth.reddit.com/r/technology/search?q=BrandName&restrict_sr=on&sort=new&limit=25&t=week"
```
**Step 2 — Sentiment Classification**
Categorize each mention into:
```
POSITIVE — Praise, recommendation, success story
NEUTRAL — Factual mention, question, comparison
NEGATIVE — Complaint, bug report, frustration
CRITICAL — Security concern, viral complaint, legal risk
```
Scoring signals from Reddit data:
```
score > 100 + sentiment=NEGATIVE → High-priority alert (viral complaint)
score > 50 + sentiment=POSITIVE → Amplification opportunity
num_comments > 20 + any sentiment → Active discussion, monitor closely
upvote_ratio < 0.5 → Controversial, may escalate
```
**Step 3 — Alert Thresholds**
| Condition | Action |
|-----------|--------|
| CRITICAL mention with score > 10 | Immediate alert to team |
| 3+ NEGATIVE mentions in 24 hours | Trend alert, investigate root cause |
| NEGATIVE post in subreddit > 500k members | Monitor hourly for 48 hours |
| Competitor comparison post trending | Prepare factual response (do NOT post defensively) |
**Step 4 — Weekly Report Template**
```
## Reddit Weekly Report — [Date Range]
### Summary
- Total mentions: X (up/down Y% from last week)
- Sentiment breakdown: X% positive, Y% neutral, Z% negative
- Top subreddits: r/sub1 (N mentions), r/sub2 (N mentions)
### Trending Topics
1. [Topic] — [Subreddit] — [Sentiment] — [Link]
2. ...
### Action Items
- [ ] Respond to [specific thread] — negative sentiment, high visibility
- [ ] Engage with [specific thread] — positive, amplification opportunity
### Competitor Activity
- [Competitor A]: N mentions, trending topics: ...
- [Competitor B]: N mentions, trending topics: ...
### Metrics
| Metric | This Week | Last Week | Change |
|--------|-----------|-----------|--------|
| Total mentions | | | |
| Positive % | | | |
| Avg post score | | | |
| Response time (hrs) | | | |
```
---
### Example 3: AMA (Ask Me Anything) Management
**Scenario**: You are organizing an AMA for a tech CEO in r/technology.
**Preparation (2 Weeks Before)**
1. Contact the subreddit moderators:
- Message the mod team through modmail (not individual DMs)
- Propose date, time, and AMA subject
- Ask about specific rules for AMAs (verification, scheduling, flair)
- Confirm the post format they expect
2. Schedule for peak engagement:
```
Recommended AMA times (US-centric subreddits):
- Tuesday-Thursday, 11:00 AM - 1:00 PM EST
- Avoid: weekends, holidays, major news days
- Post the AMA thread 30-60 minutes before the host starts answering
```
3. Prepare the AMA post:
```
Title: "I'm [Name], [Role] at [Company]. [One-line hook]. AMA!"
Body:
- Brief intro (2-3 sentences about credentials)
- Why this AMA is happening (new product, milestone, event)
- Proof/verification (link to tweet, photo with timestamp)
- "I'll start answering at [TIME] [TIMEZONE]. Ask me anything!"
- Links to relevant context (website, blog post, prior work)
```
**During the AMA (2-3 Hours)**
Real-time engagement strategy:
```
1. Sort comments by "best" and "new" alternately every 15 minutes
2. Answer top-voted questions first (these set the tone)
3. Answer at least 20-30 questions in a 2-hour session
4. Mix short answers with detailed ones — avoid walls of text for every question
5. Skip hostile/troll questions silently — do NOT acknowledge them
6. For tough questions: answer honestly or say "I can't discuss that yet"
7. Upvote good questions (even tough ones) — shows good faith
```
Response length guide:
| Question Type | Response Length |
|--------------|----------------|
| Simple factual | 1-2 sentences |
| Technical deep-dive | 2-3 paragraphs |
| Personal/funny | 1-2 sentences, match the tone |
| Critical/tough | 2-3 sentences, direct and honest |
| Off-topic | Brief redirect or polite decline |
**Follow-Up (24-48 Hours After)**
- Post an edit to the original AMA: "Thanks everyone! I answered [N] questions. Check back — I'll try to answer a few more this week."
- Answer 5-10 more highly-upvoted questions that were missed
- Share the AMA link on other platforms (Twitter, LinkedIn) to drive continued engagement
- Compile a "best of" summary with links to the strongest Q&A exchanges
---
## Advanced API Patterns
### Pagination Handling
Reddit uses cursor-based pagination with `after` and `before` fullnames.
**Paginate through subreddit posts**:
```bash
# Page 1
curl -s -H "Authorization: Bearer $ACCESS_TOKEN" \
-A "LibreFang Reddit Hand/1.0" \
"https://oauth.reddit.com/r/SUBREDDIT/new?limit=100"
# Response includes: "after": "t3_abc123"
# Page 2
curl -s -H "Authorization: Bearer $ACCESS_TOKEN" \
-A "LibreFang Reddit Hand/1.0" \
"https://oauth.reddit.com/r/SUBREDDIT/new?limit=100&after=t3_abc123"
# Response includes: "after": "t3_def456" (or null if last page)
# Page 3
curl -s -H "Authorization: Bearer $ACCESS_TOKEN" \
-A "LibreFang Reddit Hand/1.0" \
"https://oauth.reddit.com/r/SUBREDDIT/new?limit=100&after=t3_def456"
```
Pagination rules:
- `limit` max is 100 per request
- `after` returns items chronologically older than the given fullname
- `before` returns items chronologically newer (useful for "check for new posts since last poll")
- When `after` is `null` in the response, you have reached the last page
- Reddit caps listing depth at ~1000 items regardless of pagination
**Paginate backward (newer items)**:
```bash
# Get posts newer than a known fullname
curl -s -H "Authorization: Bearer $ACCESS_TOKEN" \
-A "LibreFang Reddit Hand/1.0" \
"https://oauth.reddit.com/r/SUBREDDIT/new?limit=25&before=t3_abc123"
```
### Flair Management
**Get available flairs for a subreddit**:
```bash
curl -s -H "Authorization: Bearer $ACCESS_TOKEN" \
-A "LibreFang Reddit Hand/1.0" \
"https://oauth.reddit.com/r/SUBREDDIT/api/link_flair_v2"
```
**Submit a post with flair**:
```bash
curl -s -X POST -H "Authorization: Bearer $ACCESS_TOKEN" \
-A "LibreFang Reddit Hand/1.0" \
-d "sr=SUBREDDIT&kind=self&title=TITLE&text=BODY&flair_id=FLAIR_ID&flair_text=FLAIR_TEXT" \
"https://oauth.reddit.com/api/submit"
```
**Set flair on an existing post** (requires mod or post author permissions):
```bash
curl -s -X POST -H "Authorization: Bearer $ACCESS_TOKEN" \
-A "LibreFang Reddit Hand/1.0" \
-d "link=t3_POST_ID&flair_template_id=FLAIR_ID" \
"https://oauth.reddit.com/r/SUBREDDIT/api/selectflair"
```
### Moderation Endpoints
These require moderator permissions on the target subreddit.
**Get moderation queue**:
```bash
curl -s -H "Authorization: Bearer $ACCESS_TOKEN" \
-A "LibreFang Reddit Hand/1.0" \
"https://oauth.reddit.com/r/SUBREDDIT/about/modqueue?limit=25"
```
**Approve a post/comment**:
```bash
curl -s -X POST -H "Authorization: Bearer $ACCESS_TOKEN" \
-A "LibreFang Reddit Hand/1.0" \
-d "id=FULLNAME" \
"https://oauth.reddit.com/api/approve"
```
**Remove a post/comment**:
```bash
curl -s -X POST -H "Authorization: Bearer $ACCESS_TOKEN" \
-A "LibreFang Reddit Hand/1.0" \
-d "id=FULLNAME&spam=false" \
"https://oauth.reddit.com/api/remove"
```
**Get moderation log**:
```bash
curl -s -H "Authorization: Bearer $ACCESS_TOKEN" \
-A "LibreFang Reddit Hand/1.0" \
"https://oauth.reddit.com/r/SUBREDDIT/about/log?limit=25&type=removelink"
```
**Distinguish a comment as moderator**:
```bash
curl -s -X POST -H "Authorization: Bearer $ACCESS_TOKEN" \
-A "LibreFang Reddit Hand/1.0" \
-d "id=FULLNAME&how=yes" \
"https://oauth.reddit.com/api/distinguish"
```
### Multi-Subreddit Monitoring
**Monitor multiple subreddits in a single request**:
```bash
# Combine subreddits with "+" for a merged feed
curl -s -H "Authorization: Bearer $ACCESS_TOKEN" \
-A "LibreFang Reddit Hand/1.0" \
"https://oauth.reddit.com/r/python+rust+golang/new?limit=50"
```
**Search across multiple subreddits**:
```bash
# Use the subreddit field in search to restrict
curl -s -H "Authorization: Bearer $ACCESS_TOKEN" \
-A "LibreFang Reddit Hand/1.0" \
"https://oauth.reddit.com/search?q=BrandName+subreddit%3Apython+OR+subreddit%3Arust&sort=new&limit=25"
```
**Get subreddit metadata for comparison**:
```bash
curl -s -H "Authorization: Bearer $ACCESS_TOKEN" \
-A "LibreFang Reddit Hand/1.0" \
"https://oauth.reddit.com/r/SUBREDDIT/about"
```
Key fields in response: `subscribers`, `active_user_count`, `created_utc`, `public_description`, `submit_text`, `submission_type`.
### Polling Strategies for Real-Time Awareness
Reddit has no webhook support. Use polling with these patterns:
**Efficient polling loop**:
```
1. Fetch /r/SUBREDDIT/new?limit=10 every 60 seconds
2. Store the fullname of the newest item seen
3. On next poll, use ?before=LAST_SEEN_FULLNAME to get only new items
4. If response is empty, no new posts — sleep and retry
5. If response has items, process them and update LAST_SEEN_FULLNAME
```
**Polling frequency by priority**:
| Monitoring Type | Poll Interval | Endpoint |
|----------------|---------------|----------|
| Brand crisis monitoring | 30-60 seconds | /search?q=brand&sort=new |
| Subreddit new posts | 60-120 seconds | /r/SUB/new |
| Comment replies to own posts | 120 seconds | /message/inbox |
| Competitor mentions | 300 seconds | /search?q=competitor&sort=new |
| Weekly trend analysis | Once daily | /r/SUB/top?t=day |
**Respect rate limits while polling**:
```
At 30 requests/minute (app-only auth):
- 1 subreddit at 60s interval = 1 req/min → can monitor ~25 subreddits
- 1 search query at 60s interval = 1 req/min
- Reserve 5 req/min for ad-hoc queries
- Total budget: 30 req/min, plan accordingly
```
---
## Subreddit Analysis Framework
### Evaluating a Subreddit Before Posting
Before investing effort in any subreddit, run this assessment:
**Step 1 — Pull subreddit metadata**:
```bash
curl -s -H "Authorization: Bearer $ACCESS_TOKEN" \
-A "LibreFang Reddit Hand/1.0" \
"https://oauth.reddit.com/r/SUBREDDIT/about" | python3 -c "
import sys, json
d = json.load(sys.stdin)['data']
print(f'Subscribers: {d[\"subscribers\"]:,}')
print(f'Active now: {d[\"active_user_count\"]:,}')
print(f'Created: {d[\"created_utc\"]}')
print(f'Type: {d[\"submission_type\"]}')
print(f'Description: {d[\"public_description\"][:200]}')
"
```
**Step 2 — Measure actual engagement** (not just subscriber count):
```bash
# Get top 25 hot posts and examine their scores and comment counts
curl -s -H "Authorization: Bearer $ACCESS_TOKEN" \
-A "LibreFang Reddit Hand/1.0" \
"https://oauth.reddit.com/r/SUBREDDIT/hot?limit=25"
```
Calculate from the response:
```
Engagement Score = median(post_scores) * median(num_comments)
Activity Ratio = active_user_count / subscribers
Health Indicator = (posts_per_day > 5) AND (Activity Ratio > 0.001)
```
**Step 3 — Subreddit quality scorecard**:
| Factor | Good Sign | Bad Sign |
|--------|-----------|----------|
| Active/subscriber ratio | > 0.1% | < 0.01% |
| Median hot post score | > 50 | < 10 |
| Median comment count | > 10 | < 3 |
| Posts per day | 5-50 | < 1 or > 500 (noise) |
| Mod activity | Active modqueue, clear rules | No rules, spam in feed |
| Top post age | Within last 24h | Weeks old (dead subreddit) |
| Account age requirements | Reasonable (7 days) | None (spam-prone) or extreme (1 year) |
### Peak Engagement Hours by Subreddit Type
Optimal posting times vary by audience. All times in EST:
| Subreddit Type | Peak Hours | Peak Days | Reasoning |
|---------------|------------|-----------|-----------|
| Tech/Programming | 9-11 AM EST | Tue-Thu | Developers browse during morning coffee |
| Business/Startup | 7-9 AM EST | Mon-Wed | Professionals check before work |
| Gaming | 6-10 PM EST | Fri-Sun | After work/school |
| Science/Academic | 10 AM-12 PM EST | Mon-Wed | Researchers between tasks |
| Lifestyle/Hobby | 12-2 PM EST, 7-9 PM EST | Any | Lunch breaks and evenings |
| News/Politics | 7-9 AM EST | Mon-Fri | Morning news cycle |
| Finance/Crypto | 8-10 AM EST | Mon-Fri | Pre-market and market open |
To measure a specific subreddit's peak hours:
```bash
# Pull the last 100 posts and extract their timestamps
curl -s -H "Authorization: Bearer $ACCESS_TOKEN" \
-A "LibreFang Reddit Hand/1.0" \
"https://oauth.reddit.com/r/SUBREDDIT/new?limit=100"
# Parse created_utc for each post and bucket by hour-of-day
# Cross-reference with score to find high-score hours, not just high-volume hours
```
### Competitor Presence Analysis
**Step 1 — Search for competitor mentions**:
```bash
curl -s -H "Authorization: Bearer $ACCESS_TOKEN" \
-A "LibreFang Reddit Hand/1.0" \
"https://oauth.reddit.com/search?q=%22CompetitorName%22&sort=new&t=month&limit=100"
```
**Step 2 — Build a competitor activity profile**:
```
For each competitor, track:
- Which subreddits they are mentioned in (and by whom -- users vs the company)
- Frequency of mentions (per week)
- Sentiment of mentions (positive / neutral / negative)
- Whether they have official accounts engaging in threads
- Common complaints about them (your opportunity)
- Common praise for them (your benchmark)
```
**Step 3 — Competitor comparison matrix**:
| Metric | Your Brand | Competitor A | Competitor B |
|--------|-----------|-------------|-------------|
| Weekly mentions | | | |
| Positive sentiment % | | | |
| Subreddits present in | | | |
| Official account activity | | | |
| Top complaint theme | | | |
| Top praise theme | | | |
### Content Format Preferences by Subreddit Type
| Subreddit Type | Preferred Format | Avoid |
|---------------|-----------------|-------|
| Technical (r/programming, r/rust) | Long-form text, code blocks, benchmarks | Short posts, images without context |
| Q&A (r/AskReddit, r/askscience) | Concise questions, detailed answers | Link-only posts |
| Showcase (r/sideproject, r/webdev) | Screenshots, demos, before/after | Text-only without visuals |
| News (r/technology, r/science) | Link to source with summary comment | Self-post opinion pieces |
| Discussion (r/startups, r/cscareerquestions) | Personal experience, specific details | Generic advice, platitudes |
| Meme-friendly (r/ProgrammerHumor) | Images, short and punchy | Long text posts |
### Deep Subreddit Culture Analysis
Beyond reading the sidebar, you must understand how a subreddit actually behaves. Rules are the minimum; culture is what determines success.
**Step 1 — Analyze the top 25 hot posts for these signals:**
```
For each post, record:
- title_length: number of words
- body_length: number of words (0 if link post)
- is_question: does title end with "?"
- has_code_block: does body contain ``` or 4-space indent
- has_external_link: does body contain URLs
- flair_used: which flair, or none
- top_comment_style: first 3 top-level comments — length, tone, use of sources
```
**Step 2 — Build a subreddit profile:**
```
{
"subreddit": "r/example",
"median_title_words": 12,
"median_body_words": 150,
"question_post_ratio": 0.4,
"code_block_frequency": 0.6,
"link_post_ratio": 0.2,
"dominant_flair": "Discussion",
"comment_style": "detailed_technical",
"avg_comment_length_words": 45,
"humor_tolerance": "low",
"self_promo_tolerance": "very_low",
"newcomer_friendliness": "moderate"
}
```
**Step 3 — Adapt your behavior to the profile:**
| Profile Trait | Adaptation |
|--------------|------------|
| High `question_post_ratio` | Frame your posts as questions, even if sharing info |
| High `code_block_frequency` | Always include code examples in comments |
| Low `humor_tolerance` | No jokes, no puns, pure substance |
| Very low `self_promo_tolerance` | Never mention your own projects for at least 2 weeks of pure engagement |
| High `avg_comment_length_words` (>50) | Write detailed comments; one-liners will be ignored or downvoted |
| Low `avg_comment_length_words` (<20) | Keep it brief; walls of text will not be read |
### Cross-Subreddit Content Adaptation Strategy
When engaging with the same topic across multiple subreddits, each community requires a different approach. Never copy-paste.
**Adaptation matrix example — posting about "a new Rust CLI tool":**
| Aspect | r/rust | r/commandline | r/programming | r/sideproject |
|--------|--------|---------------|---------------|---------------|
| Title style | Technical: "crate_name: zero-copy CLI parser for X" | Practical: "crate_name -- does X in Y ms" | Neutral: "crate_name: an open-source CLI for X (Rust)" | Personal: "I built a CLI tool for X -- here's the story" |
| Body focus | Architecture, unsafe usage, benchmark vs alternatives | Install command, usage examples, screenshot | Link to repo, brief description, benchmark table | Motivation, challenges, what you learned |
| Expected length | 200-400 words + code | 100-200 words + demo gif | Link post with 2-3 sentence summary comment | 400-600 words narrative |
| Flair | "Tools & Libraries" | None typically | None | "Built This" |
| What to avoid | Marketing language, hype | Long explanations without examples | "Please star my repo" | Purely technical details without story |
| Comment engagement style | Deep technical discussion, benchmark methodology | "How does it handle edge case X?" | Brief, factual responses | Conversational, share the journey |
**Timing stagger for multi-subreddit posts:**
- Post first in the most niche subreddit (e.g., r/rust)
- Wait 4-8 hours, observe reception
- If positive (score > 10, good comments), adapt and post to the next subreddit
- Wait another 4-8 hours between each subsequent post
- Never post to more than 3 subreddits for the same content within 48 hours
---
## Growth & Reputation Building
### Karma Building Strategies (Comment-First Approach)
New accounts or accounts entering a new subreddit should follow the comment-first approach:
**Week 1-2: Listen and respond**
```
1. Sort by "new" in your target subreddits
2. Find questions you can genuinely answer
3. Write substantive, helpful comments (3+ sentences with specifics)
4. Respond to 3-5 threads per day
5. Do NOT mention your product, company, or project at all
```
**Week 3-4: Establish presence**
```
1. Start sharing relevant resources (not yours) that help the community
2. Engage in discussions about trends and opinions in your domain
3. Build recognition by being consistently helpful
4. Your username should start becoming familiar to regulars
```
**Week 5+: Contribute original content**
```
1. Share a technical write-up, tutorial, or analysis (unrelated to your product)
2. If well-received, you have earned the trust to occasionally mention your work
3. Always frame self-promotional content as "I built X" (transparent) not "Check out X" (spammy)
4. Maintain the 10:1 ratio — 10 helpful contributions for every 1 self-promotional post
```
Karma accumulation benchmarks:
| Milestone | Unlocks |
|-----------|---------|
| 10 comment karma | Bypass most anti-spam filters |
| 50 comment karma | Reduced posting cooldowns |
| 100+ comment karma in a subreddit | Trusted contributor status in some subreddits |
| 1000+ total karma | Access to r/lounge and some restricted subreddits |
### Building Authority in Niche Subreddits
Authority is built through consistency and expertise, not volume:
1. **Pick 3-5 subreddits maximum** -- spreading across 20 subreddits builds no authority anywhere
2. **Develop a recognizable voice** -- consistent formatting, depth of answers, specific expertise area
3. **Answer the hard questions** -- skip the easy ones that 10 people will answer; tackle the ones that require real expertise
4. **Follow up on your own answers** -- if someone asks a follow-up, respond promptly
5. **Cite sources and show work** -- "I benchmarked this myself, here are the numbers" is worth 100x "I think X is faster"
6. **Accept corrections gracefully** -- being wrong publicly and handling it well builds more trust than never being wrong
### Cross-Posting Etiquette and Strategy
Cross-posting (sharing a post from one subreddit to another) has specific norms:
**Do:**
- Use Reddit's built-in cross-post feature (preserves attribution)
- Cross-post to subreddits where the content genuinely fits
- Add a comment explaining why it is relevant to the new subreddit
- Wait at least a few hours between cross-posts (avoid appearing spammy)
**Don't:**
- Cross-post to more than 2-3 subreddits
- Cross-post to subreddits that explicitly ban it (check rules)
- Copy-paste the same text as a new post instead of cross-posting (treated as spam)
- Cross-post your own content excessively
**Strategic cross-posting pattern**:
```
1. Post original content in the most specific/niche subreddit first
2. If it gains traction (>20 upvotes, positive comments), cross-post to a broader subreddit
3. Customize the title for the new audience
4. Engage in comments on BOTH subreddits
```
### Handling Negative Feedback and Criticism
Negative feedback on Reddit is public and permanent. Handle it strategically:
**Response framework**:
```
1. PAUSE — Do not respond within the first 15 minutes. Emotional responses backfire.
2. ASSESS — Is the criticism valid, partially valid, or trolling?
3. RESPOND (or don't):
- Valid criticism: Acknowledge, thank them, explain what you will do about it
- Partially valid: Acknowledge the valid part, clarify the rest with facts
- Trolling/bad faith: Do NOT respond. Silence is the best response.
4. FOLLOW UP — If you promised to fix something, come back and confirm when it is done
```
**Response templates by situation**:
| Situation | Response Pattern |
|-----------|-----------------|
| Bug report | "Thanks for reporting this. Can you share [details]? I've opened [issue link] to track it." |
| Feature complaint | "That's fair feedback. Here's why we made that choice: [reason]. We're considering [alternative]." |
| Unfair comparison | "Good question. Here's a direct comparison: [facts]. [Competitor] is great at X, we focus on Y." |
| Personal attack | Do not respond. Report if it violates rules. |
| "This is trash" | "Sorry it didn't work for you. What specifically went wrong? Happy to help." |
---
## Analytics & Reporting
### Post Performance Metrics
Key metrics to track for every post:
| Metric | Where to Find | What It Means |
|--------|--------------|---------------|
| Score | `data.score` | Net upvotes (upvotes minus downvotes) |
| Upvote ratio | `data.upvote_ratio` | 0.0-1.0, percentage of votes that are upvotes |
| Number of comments | `data.num_comments` | Total comments including replies |
| Awards | `data.all_awardings` | List of awards received |
| Cross-posts | `data.num_crossposts` | How many times others cross-posted it |
**Fetch post performance**:
```bash
curl -s -H "Authorization: Bearer $ACCESS_TOKEN" \
-A "LibreFang Reddit Hand/1.0" \
"https://oauth.reddit.com/by_id/t3_POST_ID"
```
**Quality indicators**:
```
High engagement: upvote_ratio > 0.85 AND num_comments > 20
Controversial: upvote_ratio 0.40-0.60 (heavily split votes)
Viral potential: score > 100 within first 2 hours
Dead on arrival: score < 5 after 4 hours
Comment quality: avg comment length > 100 chars (real discussion vs memes)
```
### Engagement Trend Tracking
Track performance over time by recording metrics at regular intervals:
```
For each post, capture at:
- T+1 hour: score, num_comments, upvote_ratio
- T+4 hours: score, num_comments, upvote_ratio
- T+24 hours: score, num_comments, upvote_ratio (final snapshot)
For account-level tracking:
- Weekly comment karma change
- Weekly post karma change
- Number of posts/comments per subreddit
- Average score per post by subreddit
```
**Growth trajectory assessment**:
| Period | Healthy Growth | Stagnant | Declining |
|--------|---------------|----------|-----------|
| Weekly karma change | > +50 | -10 to +10 | < -10 |
| Avg post score trend | Increasing | Flat | Decreasing |
| Comment reply rate | > 30% of comments get replies | 10-30% | < 10% |
| New subreddit penetration | 1-2 new per month | 0 | Banned from any |
### ROI Measurement for Business-Related Reddit Activity
**Trackable outcomes**:
| Category | Metric | How to Track |
|----------|--------|-------------|
| Direct | Referral traffic | UTM parameters in shared links |
| Direct | Sign-ups/downloads | Reddit referral attribution |
| Direct | Support tickets deflected | Track answers that resolve issues |
| Direct | GitHub stars/forks | Append `?ref=reddit` to links |
| Indirect | Brand mention volume | Weekly search query tracking |
| Indirect | Sentiment ratio trend | Positive / total mentions over time |
| Indirect | Share of voice vs competitors | Compare mention counts monthly |
**ROI formula**: `(Value of outcomes - Total cost) / Total cost`
where cost = (hours/week * hourly rate) + content creation time + tool costs.
### Weekly Reddit Activity Report Template
```
## Reddit Activity Report — Week of [Date]
- Karma: [post] / [comment] (change: +/- [N]) | Removal rate: [N]%
- Posts: [N] (avg score: [N]) | Comments: [N] (avg score: [N])
- Notable: [Thread title] — [subreddit] — [link]
- Plan: [Target subreddits] | [Content planned]
```
>>>>>>> e65ad25 (feat(hands): improve linkedin, reddit, and twitter hands)