social-autoposter 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/SKILL.md +160 -202
- package/bin/cli.js +14 -6
- package/bin/server.js +241 -63
- package/config.example.json +10 -0
- package/package.json +2 -3
- package/schema-postgres.sql +55 -3
- package/scripts/dm_conversation.py +421 -0
- package/scripts/find_threads.py +261 -26
- package/scripts/log_fazm_linkedin.py +62 -0
- package/scripts/log_fazm_linkedin_batch2.py +111 -0
- package/scripts/moltbook_post.py +300 -0
- package/scripts/octolens_threads.py +276 -0
- package/scripts/phase_d_edit.py +99 -0
- package/scripts/phase_d_new_comments.py +74 -0
- package/scripts/phase_d_resolve.py +226 -0
- package/scripts/reply_db.py +8 -1
- package/scripts/scan_dm_candidates.py +187 -0
- package/scripts/scan_github_replies.py +167 -0
- package/scripts/scan_replies.py +132 -20
- package/scripts/scrape_linkedin_stats.py +144 -0
- package/scripts/update_stats.py +525 -64
- package/setup/SKILL.md +0 -3
- package/skill/engage.sh +262 -26
- package/skill/github.sh +31 -8
- package/skill/run.sh +10 -11
- package/skill/stats.sh +275 -10
- package/skill/SKILL.md +0 -634
package/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Automated social posting pipeline for Reddit, X/Twitter, LinkedIn, and Moltbook. Install as an AI agent skill or use the standalone Python scripts.
|
|
4
4
|
|
|
5
|
+
The current storage backend is Neon Postgres via `DATABASE_URL` in `~/social-autoposter/.env`. Any legacy `database` key in old local configs or leftover `*.db` files are not used by the current scripts.
|
|
6
|
+
|
|
5
7
|
## Install as a skill
|
|
6
8
|
|
|
7
9
|
```bash
|
package/SKILL.md
CHANGED
|
@@ -1,149 +1,120 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: social-autoposter
|
|
3
|
-
description: "Automate social media posting across Reddit, X/Twitter, LinkedIn,
|
|
3
|
+
description: "Automate social media posting across Reddit, X/Twitter, LinkedIn, and Moltbook. Find threads, post comments, create original posts, track engagement stats. Use when: 'post to social', 'social autoposter', 'find threads to comment on', 'create a post', 'audit social posts', 'update post stats', or after completing any task (mandatory per CLAUDE.md)."
|
|
4
4
|
user_invocable: true
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Social Autoposter
|
|
8
8
|
|
|
9
|
-
Automates finding, posting, and tracking social media comments
|
|
9
|
+
Automates finding, posting, and tracking social media comments and original posts across Reddit, X/Twitter, LinkedIn, and Moltbook.
|
|
10
10
|
|
|
11
11
|
## Quick Start
|
|
12
12
|
|
|
13
13
|
| Command | What it does |
|
|
14
14
|
|---------|-------------|
|
|
15
|
-
| `/social-autoposter` |
|
|
16
|
-
| `/social-autoposter
|
|
15
|
+
| `/social-autoposter` | Comment run — find threads + post comment + log (cron-safe) |
|
|
16
|
+
| `/social-autoposter post` | Create an original post/thread (manual only, never cron) |
|
|
17
17
|
| `/social-autoposter stats` | Update engagement stats via API |
|
|
18
18
|
| `/social-autoposter engage` | Scan and reply to responses on our posts |
|
|
19
19
|
| `/social-autoposter audit` | Full browser audit of all posts |
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
**View your posts live:** `https://s4l.ai/stats/[your_handle]`
|
|
22
|
+
— e.g. `https://s4l.ai/stats/m13v_` (Twitter handle without `@`), `https://s4l.ai/stats/Deep_Ad1959` (Reddit), `https://s4l.ai/stats/matthew-autoposter` (Moltbook).
|
|
23
|
+
The handles come from `config.json → accounts.*.handle/username`. Each platform account has its own URL.
|
|
22
24
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
Key fields:
|
|
26
|
-
- `accounts` — platform usernames/handles
|
|
27
|
-
- `subreddits` — target subreddits to monitor
|
|
28
|
-
- `content_angle` — your unique perspective for authentic comments
|
|
29
|
-
- `projects` — your products/repos to mention when relevant (with topic keywords)
|
|
30
|
-
- `database` — unused (DB is Neon Postgres via `DATABASE_URL` in `.env`)
|
|
31
|
-
|
|
32
|
-
## Helper Scripts
|
|
25
|
+
---
|
|
33
26
|
|
|
34
|
-
|
|
27
|
+
## FIRST: Read config
|
|
35
28
|
|
|
36
|
-
|
|
37
|
-
|--------|-------------|
|
|
38
|
-
| `scripts/find_threads.py` | Find candidate threads via Reddit JSON + Moltbook API |
|
|
39
|
-
| `scripts/scan_replies.py` | Scan for new replies to our posts via API |
|
|
40
|
-
| `scripts/update_stats.py` | Fetch engagement stats via API, update DB |
|
|
29
|
+
Before doing anything, read `~/social-autoposter/config.json`. Everything — accounts, projects, subreddits, content angle — comes from there.
|
|
41
30
|
|
|
42
|
-
Examples:
|
|
43
31
|
```bash
|
|
44
|
-
|
|
45
|
-
python3 scripts/scan_replies.py
|
|
46
|
-
python3 scripts/update_stats.py --quiet
|
|
32
|
+
cat ~/social-autoposter/config.json
|
|
47
33
|
```
|
|
48
34
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
## Critical: No Parallel Posting
|
|
52
|
-
|
|
53
|
-
**NEVER launch multiple agents or parallel tasks for posting.** All posting operations (comments, replies, thread creation) MUST be done sequentially in a single agent. Reasons:
|
|
54
|
-
- There is only one shared browser — parallel agents fight over it and cause timeouts
|
|
55
|
-
- Parallel agents cause duplicate posts (same comment posted twice on the same thread)
|
|
56
|
-
- Browser lock conflicts lead to unpredictable failures
|
|
35
|
+
Key fields you'll use throughout every workflow:
|
|
57
36
|
|
|
58
|
-
|
|
37
|
+
- `accounts.reddit.username` — Reddit handle to post as
|
|
38
|
+
- `accounts.twitter.handle` — X/Twitter handle
|
|
39
|
+
- `accounts.linkedin.name` — LinkedIn display name
|
|
40
|
+
- `accounts.moltbook.username` — Moltbook username
|
|
41
|
+
- `subreddits` — list of subreddits to monitor and post in
|
|
42
|
+
- `content_angle` — the user's unique perspective for writing authentic comments
|
|
43
|
+
- `projects` — products/repos to mention naturally when relevant (each has `name`, `description`, `website`, `github`, `topics`)
|
|
44
|
+
- `database` — unused (DB is Neon Postgres via `DATABASE_URL` in `.env`)
|
|
59
45
|
|
|
60
|
-
|
|
46
|
+
Use these values everywhere below instead of any hardcoded names or links.
|
|
61
47
|
|
|
62
48
|
---
|
|
63
49
|
|
|
64
|
-
##
|
|
65
|
-
|
|
66
|
-
Find a thread, draft a comment, post it, log it.
|
|
50
|
+
## Helper Scripts
|
|
67
51
|
|
|
68
|
-
|
|
52
|
+
Standalone Python scripts — no LLM needed.
|
|
69
53
|
|
|
70
|
-
```
|
|
71
|
-
|
|
54
|
+
```bash
|
|
55
|
+
python3 ~/social-autoposter/scripts/find_threads.py --include-moltbook
|
|
56
|
+
python3 ~/social-autoposter/scripts/scan_replies.py
|
|
57
|
+
python3 ~/social-autoposter/scripts/update_stats.py --quiet
|
|
72
58
|
```
|
|
73
|
-
If 40+ posts in the last 24 hours, stop. Max 40/day.
|
|
74
59
|
|
|
75
|
-
|
|
60
|
+
---
|
|
76
61
|
|
|
77
|
-
|
|
62
|
+
## Workflow: Post (`/social-autoposter`)
|
|
63
|
+
|
|
64
|
+
### 1. Find candidate threads
|
|
65
|
+
|
|
66
|
+
**Option A — Script (preferred):**
|
|
78
67
|
```bash
|
|
79
|
-
python3 scripts/find_threads.py --include-moltbook
|
|
68
|
+
python3 ~/social-autoposter/scripts/find_threads.py --include-moltbook
|
|
80
69
|
```
|
|
81
|
-
This returns a JSON list of candidate threads with dedup already applied.
|
|
82
70
|
|
|
83
|
-
**Option B — Browse manually
|
|
84
|
-
Browse `/new` and `/hot`
|
|
71
|
+
**Option B — Browse manually:**
|
|
72
|
+
Browse `/new` and `/hot` on the subreddits from `config.json`. Also check Moltbook via API.
|
|
85
73
|
|
|
86
|
-
###
|
|
74
|
+
### 2. Pick the best thread
|
|
87
75
|
|
|
88
|
-
|
|
89
|
-
-
|
|
90
|
-
-
|
|
91
|
-
- Your last 5 comments don't repeat the same talking points:
|
|
76
|
+
- You have a genuine angle from `content_angle` in config.json
|
|
77
|
+
- Not already posted in: `SELECT thread_url FROM posts`
|
|
78
|
+
- Last 5 comments don't repeat the same talking points:
|
|
92
79
|
```sql
|
|
93
80
|
SELECT our_content FROM posts ORDER BY id DESC LIMIT 5
|
|
94
81
|
```
|
|
95
|
-
- If
|
|
82
|
+
- If nothing fits naturally, **stop**. Better to skip than force a bad comment.
|
|
96
83
|
|
|
97
|
-
###
|
|
84
|
+
### 3. Read the thread + top comments
|
|
98
85
|
|
|
99
|
-
|
|
100
|
-
- Check tone (casual/technical/professional)
|
|
101
|
-
- Read top comments for length and style cues
|
|
102
|
-
- Note thread age (skip stale threads)
|
|
103
|
-
- Identify the best comment to reply to (high-upvote comments get more visibility)
|
|
86
|
+
Check tone, length cues, thread age. Find best comment to reply to (high-upvote comments get more visibility).
|
|
104
87
|
|
|
105
|
-
###
|
|
88
|
+
### 4. Draft the comment
|
|
106
89
|
|
|
107
|
-
Follow
|
|
108
|
-
- 2-3 sentences max, match thread energy
|
|
109
|
-
- First person, specific details from your experience
|
|
110
|
-
- No product links in top-level comments (use Tiered Reply Strategy for that)
|
|
111
|
-
- If it sounds like a blog post, rewrite it
|
|
90
|
+
Follow Content Rules below. 2-3 sentences, first person, specific details from `content_angle`. No product links in top-level comments.
|
|
112
91
|
|
|
113
|
-
###
|
|
92
|
+
### 5. Post it
|
|
114
93
|
|
|
115
94
|
**Reddit** (browser automation):
|
|
116
95
|
- Navigate to `old.reddit.com` thread URL
|
|
117
|
-
-
|
|
118
|
-
-
|
|
119
|
-
- Wait 2-3 seconds, verify the comment appeared
|
|
120
|
-
- Capture the permalink of the new comment
|
|
121
|
-
- Close the tab
|
|
96
|
+
- Reply box → type comment → submit → wait 2-3s → verify comment appeared → capture permalink → close tab
|
|
97
|
+
- Post as the username in `config.json → accounts.reddit.username`
|
|
122
98
|
|
|
123
99
|
**X/Twitter** (browser automation):
|
|
124
|
-
- Navigate to
|
|
125
|
-
-
|
|
126
|
-
- Verify the reply posted
|
|
127
|
-
- Capture the URL
|
|
100
|
+
- Navigate to tweet → reply box → type → Reply → verify → capture URL
|
|
101
|
+
- Post as the handle in `config.json → accounts.twitter.handle`
|
|
128
102
|
|
|
129
103
|
**LinkedIn** (browser automation):
|
|
130
|
-
- Navigate to
|
|
131
|
-
-
|
|
132
|
-
- No stable URL available, note as posted
|
|
104
|
+
- Navigate to post → comment box → type → Post → close tab
|
|
105
|
+
- Post as the name in `config.json → accounts.linkedin.name`
|
|
133
106
|
|
|
134
107
|
**Moltbook** (API — no browser needed):
|
|
135
108
|
```bash
|
|
136
109
|
source ~/social-autoposter/.env
|
|
137
|
-
curl -s -X POST -H "Authorization: Bearer $MOLTBOOK_API_KEY" \
|
|
138
|
-
-H "Content-Type: application/json" \
|
|
110
|
+
curl -s -X POST -H "Authorization: Bearer $MOLTBOOK_API_KEY" -H "Content-Type: application/json" \
|
|
139
111
|
-d '{"title": "...", "content": "...", "type": "text", "submolt_name": "general"}' \
|
|
140
112
|
"https://www.moltbook.com/api/v1/posts"
|
|
141
113
|
```
|
|
114
|
+
On Moltbook: write as agent ("my human" not "I"). Max 1 post per 30 min.
|
|
142
115
|
Verify: fetch post by UUID, check `verification_status` is `"verified"`.
|
|
143
|
-
On Moltbook, write as an agent: "my human" not "I".
|
|
144
|
-
Rate limit: max 1 post per 30 minutes.
|
|
145
116
|
|
|
146
|
-
### 7. Log
|
|
117
|
+
### 7. Log + sync
|
|
147
118
|
|
|
148
119
|
```sql
|
|
149
120
|
INSERT INTO posts (platform, thread_url, thread_author, thread_author_handle,
|
|
@@ -152,182 +123,169 @@ INSERT INTO posts (platform, thread_url, thread_author, thread_author_handle,
|
|
|
152
123
|
VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, 'active', NOW());
|
|
153
124
|
```
|
|
154
125
|
|
|
155
|
-
|
|
126
|
+
Use the account value from `config.json` for `our_account`.
|
|
156
127
|
|
|
157
|
-
|
|
128
|
+
If `sync_script` is set in config.json, run it after logging.
|
|
158
129
|
|
|
159
|
-
|
|
130
|
+
---
|
|
160
131
|
|
|
161
|
-
|
|
162
|
-
**X/Twitter**: reply to your own tweet with the link.
|
|
163
|
-
**Moltbook**: use the comment API to reply to your own post.
|
|
132
|
+
## Workflow: Create Post (`/social-autoposter post`)
|
|
164
133
|
|
|
165
|
-
|
|
166
|
-
- "fwiw I built something for this - [project.website]"
|
|
167
|
-
- "we open sourced the thing I mentioned if anyone wants to poke around [project.github]"
|
|
168
|
-
- "here's the repo if useful [project.github]"
|
|
134
|
+
**Manual only — never run from cron.** Original posts are high-stakes and need human review.
|
|
169
135
|
|
|
170
|
-
|
|
171
|
-
- No project in `config.json` is relevant to the thread topic
|
|
172
|
-
- The comment is on a thread you authored (use the post body for links instead)
|
|
136
|
+
### 1. Cross-posting check
|
|
173
137
|
|
|
174
|
-
|
|
138
|
+
```sql
|
|
139
|
+
SELECT platform, thread_title, posted_at FROM posts
|
|
140
|
+
WHERE source_summary LIKE '%' || %s || '%' AND posted_at >= NOW() - INTERVAL '30 days'
|
|
141
|
+
ORDER BY posted_at DESC;
|
|
142
|
+
```
|
|
175
143
|
|
|
176
|
-
|
|
144
|
+
**NEVER post the same or similar content to multiple subreddits.** This is the #1 AI detection red flag. Each post must be unique to its community.
|
|
177
145
|
|
|
178
|
-
|
|
146
|
+
### 3. Pick one target community
|
|
179
147
|
|
|
180
|
-
|
|
181
|
-
```bash
|
|
182
|
-
python3 scripts/update_stats.py
|
|
183
|
-
python3 scripts/update_stats.py --quiet # summary only
|
|
184
|
-
python3 scripts/update_stats.py --json # machine-readable output
|
|
185
|
-
```
|
|
148
|
+
Choose the single best subreddit from `config.json → subreddits` for this topic. Tailor the post to that community's culture and tone.
|
|
186
149
|
|
|
187
|
-
|
|
188
|
-
- **Reddit**: comment scores and thread stats via public JSON API. Detects deleted/removed.
|
|
189
|
-
- **Moltbook**: upvotes and comment counts via REST API. Detects deleted posts.
|
|
150
|
+
### 4. Draft the post
|
|
190
151
|
|
|
191
|
-
|
|
152
|
+
**Anti-AI-detection checklist** (must pass ALL before posting):
|
|
192
153
|
|
|
193
|
-
|
|
154
|
+
- [ ] No em dashes (—). Use regular dashes (-) or commas instead
|
|
155
|
+
- [ ] No markdown headers (##) or bold (**) in Reddit posts
|
|
156
|
+
- [ ] No numbered/bulleted lists — write in paragraphs
|
|
157
|
+
- [ ] No "Hi everyone" or "Hey r/subreddit" openings
|
|
158
|
+
- [ ] Title doesn't use clickbait patterns ("What I wish I'd known", "A guide to")
|
|
159
|
+
- [ ] Contains at least one imperfection: incomplete thought, casual aside, informality
|
|
160
|
+
- [ ] Reads like a real person writing on their phone, not an essay
|
|
161
|
+
- [ ] Does NOT link to any project in the post body — earn attention first
|
|
162
|
+
- [ ] Not too long — 2-4 short paragraphs max for Reddit
|
|
194
163
|
|
|
195
|
-
|
|
164
|
+
**Read it out loud.** If it sounds like a blog post or a ChatGPT response, rewrite it.
|
|
196
165
|
|
|
197
|
-
|
|
166
|
+
### 5. Post it
|
|
167
|
+
|
|
168
|
+
**Reddit**: old.reddit.com → Submit new text post → paste title + body → submit → verify → capture permalink.
|
|
169
|
+
|
|
170
|
+
### 6. Log it
|
|
171
|
+
|
|
172
|
+
```sql
|
|
173
|
+
INSERT INTO posts (platform, thread_url, thread_author, thread_author_handle,
|
|
174
|
+
thread_title, thread_content, our_url, our_content, our_account,
|
|
175
|
+
source_summary, status, posted_at)
|
|
176
|
+
VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, 'active', NOW());
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
For original posts: `thread_url` = `our_url`, `thread_author` = our account from config.json.
|
|
198
180
|
|
|
199
|
-
|
|
181
|
+
### 7. Mandatory engagement plan
|
|
200
182
|
|
|
201
|
-
|
|
183
|
+
After posting, you MUST:
|
|
184
|
+
- Check for comments within 2-4 hours
|
|
185
|
+
- Reply to every substantive comment within 24 hours
|
|
186
|
+
- Replies should be casual, conversational, expand the topic — NOT polished paragraphs
|
|
187
|
+
- If someone accuses the post of being AI: respond genuinely, mention a specific personal detail
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
## Workflow: Stats (`/social-autoposter stats`)
|
|
202
192
|
|
|
203
193
|
```bash
|
|
204
|
-
python3 scripts/
|
|
194
|
+
python3 ~/social-autoposter/scripts/update_stats.py
|
|
205
195
|
```
|
|
206
196
|
|
|
207
|
-
|
|
197
|
+
After running, view updated stats at `https://s4l.ai/stats/[handle]`. The DB syncs to Neon Postgres via `syncfield.sh` (called automatically by `stats.sh`). Changes appear on the website within ~5 minutes.
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
## Workflow: Engage (`/social-autoposter engage`)
|
|
208
202
|
|
|
209
|
-
|
|
203
|
+
### Phase A: Scan for replies (no browser)
|
|
204
|
+
```bash
|
|
205
|
+
python3 ~/social-autoposter/scripts/scan_replies.py
|
|
206
|
+
```
|
|
210
207
|
|
|
211
|
-
### Phase B: Respond to pending replies
|
|
208
|
+
### Phase B: Respond to pending replies
|
|
212
209
|
|
|
213
|
-
Query pending replies:
|
|
214
210
|
```sql
|
|
215
211
|
SELECT r.id, r.platform, r.their_author, r.their_content, r.their_comment_url,
|
|
216
212
|
r.depth, p.thread_title, p.our_content
|
|
217
|
-
FROM replies r
|
|
218
|
-
|
|
219
|
-
WHERE r.status='pending'
|
|
220
|
-
ORDER BY r.discovered_at ASC LIMIT 10
|
|
213
|
+
FROM replies r JOIN posts p ON r.post_id = p.id
|
|
214
|
+
WHERE r.status='pending' ORDER BY r.discovered_at ASC LIMIT 10
|
|
221
215
|
```
|
|
222
216
|
|
|
223
|
-
|
|
224
|
-
1. Draft a response (2-4 sentences, casual, expand the topic, ask follow-ups)
|
|
225
|
-
2. Apply the **Tiered Reply Strategy** for project mentions
|
|
226
|
-
3. Post via browser (Reddit/X) or API (Moltbook)
|
|
227
|
-
4. Update the reply record:
|
|
228
|
-
```sql
|
|
229
|
-
UPDATE replies SET status='replied', our_reply_content=%s, our_reply_url=%s,
|
|
230
|
-
replied_at=NOW() WHERE id=%s
|
|
231
|
-
```
|
|
217
|
+
Draft replies: 2-4 sentences, casual, expand the topic. Apply Tiered Reply Strategy. Max 5 replies per run.
|
|
232
218
|
|
|
233
|
-
|
|
219
|
+
Post via browser (Reddit/X) or API (Moltbook). Update:
|
|
220
|
+
```sql
|
|
221
|
+
UPDATE replies SET status='replied', our_reply_content=%s, our_reply_url=%s,
|
|
222
|
+
replied_at=NOW() WHERE id=%s
|
|
223
|
+
```
|
|
234
224
|
|
|
235
225
|
### Phase C: X/Twitter replies (browser required)
|
|
236
226
|
|
|
237
|
-
|
|
238
|
-
1. Navigate to `https://x.com/notifications/mentions`
|
|
239
|
-
2. Extract mentions replying to your account
|
|
240
|
-
3. Filter out already-tracked reply IDs, light acknowledgments, and your own replies
|
|
241
|
-
4. Respond to substantive replies (max 5)
|
|
242
|
-
5. Log everything to `replies` table
|
|
227
|
+
Navigate to `https://x.com/notifications/mentions`. Find replies to the handle in config.json. Respond to substantive ones (max 5). Log to `replies` table.
|
|
243
228
|
|
|
244
229
|
---
|
|
245
230
|
|
|
246
231
|
## Workflow: Audit (`/social-autoposter audit`)
|
|
247
232
|
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
1. Query all posts with URLs:
|
|
251
|
-
```sql
|
|
252
|
-
SELECT id, platform, our_url, status, upvotes, views, comments_count
|
|
253
|
-
FROM posts WHERE our_url IS NOT NULL ORDER BY posted_at DESC
|
|
254
|
-
```
|
|
255
|
-
|
|
256
|
-
2. Visit each URL via browser automation. Check:
|
|
257
|
-
- `active`: visible and accessible
|
|
258
|
-
- `deleted`: 404 or "this tweet has been deleted"
|
|
259
|
-
- `removed`: marked as removed by moderator
|
|
260
|
-
- `inactive`: thread locked or archived
|
|
261
|
-
|
|
262
|
-
3. Capture engagement metrics (upvotes, views, comments) and update DB.
|
|
263
|
-
|
|
264
|
-
4. Report summary: total checked, by status, top performers.
|
|
233
|
+
Visit each post URL via browser. Check status (active/deleted/removed/inactive). Update engagement metrics. Report summary.
|
|
265
234
|
|
|
266
235
|
---
|
|
267
236
|
|
|
268
237
|
## Content Rules
|
|
269
238
|
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
2. **First person, specific.** Use concrete numbers and real experiences, not generalizations. Say "I" not "you" or "one."
|
|
273
|
-
|
|
274
|
-
3. **Reply to top comments, not just OP.** High-upvote comments get more eyeballs.
|
|
239
|
+
### Tone & Voice
|
|
275
240
|
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
7. **Log everything.**
|
|
283
|
-
|
|
284
|
-
###
|
|
285
|
-
|
|
286
|
-
|
|
241
|
+
1. **Write like you're texting a coworker.** Lowercase fine. Sentence fragments fine. Never start with "Makes sense" or "The nuance here is." If it sounds like a blog post, rewrite it.
|
|
242
|
+
2. **First person, specific.** Use concrete details from `content_angle` in config.json. Real numbers, real experiences, not generalizations.
|
|
243
|
+
3. **Reply to top comments, not just OP.**
|
|
244
|
+
4. **Only comment when there's a genuine angle from the user's work.** Use `content_angle` from config.json. If the thread doesn't connect, skip it.
|
|
245
|
+
5. **No product links in top-level comments or original posts.** Earn attention first. Only link in deeper replies when someone asks.
|
|
246
|
+
6. **On Moltbook, write as an agent.** "my human" not "I".
|
|
247
|
+
7. **Log everything.**
|
|
248
|
+
|
|
249
|
+
### Anti-AI-Detection (applies to ALL content)
|
|
250
|
+
|
|
251
|
+
8. **No em dashes (—).** Use commas, periods, or regular dashes (-) instead. Em dashes are the #1 "ChatGPT tell."
|
|
252
|
+
9. **No markdown formatting in Reddit.** No headers (##), no bold (**text**), no numbered lists. Write in plain paragraphs.
|
|
253
|
+
10. **Never cross-post.** One post per topic per community.
|
|
254
|
+
11. **Space posts out.** Max 1 original post per day, max 3 per week. Don't spam.
|
|
255
|
+
12. **Include imperfections.** Contractions, sentence fragments, casual asides, occasional lowercase.
|
|
256
|
+
13. **Vary your openings.** Don't always start with credentials. Sometimes just jump into the topic.
|
|
257
|
+
14. **Reply to comments on your posts.** Zero engagement on your own post = bot signal. Reply within 24h.
|
|
258
|
+
|
|
259
|
+
### Bad vs Good (Comments)
|
|
260
|
+
|
|
261
|
+
BAD: "Makes sense — Claude already tries to tail the output on its own but by then the tokens are already in context."
|
|
287
262
|
GOOD: "gonna try this, I run 5 agents in parallel and my API bill is becoming a second rent payment"
|
|
288
263
|
|
|
289
264
|
BAD: "What everyone here is describing is basically specification-driven development."
|
|
290
265
|
GOOD: "I spend more time writing CLAUDE.md specs than I ever spent writing code. the irony is I'm basically doing waterfall now and shipping faster than ever."
|
|
291
266
|
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
## Tiered Reply Strategy
|
|
295
|
-
|
|
296
|
-
When replying to comments on our posts, escalate project mentions based on conversation context.
|
|
297
|
-
|
|
298
|
-
**Tier 1 — Default (no link):** Genuine engagement. Expand the topic, ask follow-ups. Most replies.
|
|
267
|
+
### Bad vs Good (Original Posts)
|
|
299
268
|
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
- They describe a problem matching a project's `topics` from `config.json`
|
|
303
|
-
- Conversation is 2+ replies deep (genuine interest)
|
|
269
|
+
BAD title: "What I Wish I'd Known Before My First Vipassana Retreat: A Complete Guide"
|
|
270
|
+
GOOD title: "just did my 7th course, some things that surprised me"
|
|
304
271
|
|
|
305
|
-
|
|
272
|
+
BAD body: Structured with headers, bold, numbered lists, "As a tech founder..."
|
|
273
|
+
GOOD body: Paragraphs, incomplete thoughts, personal details, casual tone, ends with a genuine question
|
|
306
274
|
|
|
307
275
|
---
|
|
308
276
|
|
|
309
|
-
##
|
|
277
|
+
## Tiered Reply Strategy
|
|
310
278
|
|
|
311
|
-
|
|
312
|
-
-- Core tables (see schema.sql for full DDL)
|
|
313
|
-
posts -- everything we post (platform, urls, content, engagement, status)
|
|
314
|
-
threads -- threads we've discovered
|
|
315
|
-
our_posts -- backward-compat post tracking
|
|
316
|
-
replies -- replies to our posts and our responses
|
|
317
|
-
```
|
|
279
|
+
**Tier 1 — Default (no link):** Genuine engagement. Expand topic, ask follow-ups. Most replies.
|
|
318
280
|
|
|
319
|
-
|
|
281
|
+
**Tier 2 — Natural mention:** Conversation touches a topic matching one of the user's projects (from `config.json → projects[].topics`). Mention casually, link only if it adds value. Triggers: "what tool do you use", problem matches a project topic, 2+ replies deep.
|
|
320
282
|
|
|
321
|
-
|
|
283
|
+
**Tier 3 — Direct ask:** They ask for link/try/source. Give it immediately using `projects[].website` or `projects[].github` from config.json.
|
|
322
284
|
|
|
323
285
|
---
|
|
324
286
|
|
|
325
|
-
##
|
|
326
|
-
|
|
327
|
-
**Reddit:** Use `old.reddit.com` for reliable automation. Comment box: textarea with class `usertext-edit`. No posting API — browser only.
|
|
328
|
-
|
|
329
|
-
**X/Twitter:** Reply to existing tweets. 1-2 sentences ideal. No public API for notifications — browser only.
|
|
287
|
+
## Database Schema
|
|
330
288
|
|
|
331
|
-
|
|
289
|
+
`posts`: id, platform, thread_url, thread_title, our_url, our_content, our_account, posted_at, status, upvotes, comments_count, views, source_summary
|
|
332
290
|
|
|
333
|
-
|
|
291
|
+
`replies`: id, post_id, platform, their_author, their_content, our_reply_content, status (pending|replied|skipped|error), depth
|
package/bin/cli.js
CHANGED
|
@@ -22,7 +22,7 @@ const COPY_TARGETS = [
|
|
|
22
22
|
];
|
|
23
23
|
|
|
24
24
|
// Never overwrite these user files during update
|
|
25
|
-
const USER_FILES = new Set(['config.json', '.env']);
|
|
25
|
+
const USER_FILES = new Set(['config.json', '.env', 'SKILL.md']);
|
|
26
26
|
|
|
27
27
|
function copyDir(src, dest) {
|
|
28
28
|
fs.mkdirSync(dest, { recursive: true });
|
|
@@ -170,11 +170,15 @@ function init() {
|
|
|
170
170
|
console.log(' psycopg2-binary already installed');
|
|
171
171
|
}
|
|
172
172
|
|
|
173
|
-
//
|
|
173
|
+
// Remove stale skill/SKILL.md if it exists (SKILL.md lives at repo root only)
|
|
174
|
+
const skillMd = path.join(DEST, 'skill', 'SKILL.md');
|
|
175
|
+
try { fs.rmSync(skillMd, { force: true }); } catch {}
|
|
176
|
+
|
|
177
|
+
// Skill symlinks — point to repo root so Claude loads SKILL.md directly
|
|
174
178
|
const skillsDir = path.join(os.homedir(), '.claude', 'skills');
|
|
175
179
|
fs.mkdirSync(skillsDir, { recursive: true });
|
|
176
|
-
linkOrRelink(
|
|
177
|
-
console.log(' ~/.claude/skills/social-autoposter ->',
|
|
180
|
+
linkOrRelink(DEST, path.join(skillsDir, 'social-autoposter'));
|
|
181
|
+
console.log(' ~/.claude/skills/social-autoposter ->', DEST);
|
|
178
182
|
linkOrRelink(path.join(DEST, 'setup'), path.join(skillsDir, 'social-autoposter-setup'));
|
|
179
183
|
console.log(' ~/.claude/skills/social-autoposter-setup ->', path.join(DEST, 'setup'));
|
|
180
184
|
|
|
@@ -214,10 +218,14 @@ function update() {
|
|
|
214
218
|
// Regenerate launchd plists with correct paths
|
|
215
219
|
generatePlists();
|
|
216
220
|
|
|
217
|
-
//
|
|
221
|
+
// Remove stale skill/SKILL.md if it exists (SKILL.md lives at repo root only)
|
|
222
|
+
const skillMd = path.join(DEST, 'skill', 'SKILL.md');
|
|
223
|
+
try { fs.rmSync(skillMd, { force: true }); } catch {}
|
|
224
|
+
|
|
225
|
+
// Re-symlink skills — point to repo root so Claude loads SKILL.md directly
|
|
218
226
|
const skillsDir = path.join(os.homedir(), '.claude', 'skills');
|
|
219
227
|
try {
|
|
220
|
-
linkOrRelink(
|
|
228
|
+
linkOrRelink(DEST, path.join(skillsDir, 'social-autoposter'));
|
|
221
229
|
console.log(' re-linked ~/.claude/skills/social-autoposter');
|
|
222
230
|
} catch {}
|
|
223
231
|
try {
|