@opendirectory.dev/skills 0.1.15 → 0.1.17
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/package.json +1 -1
- package/registry.json +19 -3
- package/skills/cold-email-verifier/.env.example +3 -0
- package/skills/cold-email-verifier/README.md +45 -0
- package/skills/cold-email-verifier/SKILL.md +59 -0
- package/skills/cold-email-verifier/requirements.txt +2 -0
- package/skills/cold-email-verifier/scripts/email_verifier.py +240 -0
- package/skills/human-tone/SKILL.md +521 -0
- package/skills/show-hn-writer/SKILL.md +218 -219
- package/skills/show-hn-writer/show-hn-writer-SKILL.md +0 -302
|
@@ -1,303 +1,302 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: show-hn-writer
|
|
3
|
-
description: ''
|
|
3
|
+
description: 'Draft a Show HN post backed by real HN performance data. Uses observed patterns from 250 top HN posts to maximise score.'
|
|
4
4
|
compatibility: [claude-code, gemini-cli, github-copilot]
|
|
5
|
-
author:
|
|
6
|
-
version:
|
|
5
|
+
author: Varnan / Paras Madan
|
|
6
|
+
version: 2.0.0
|
|
7
|
+
data-source: 250 top HN posts scraped April 18 2026
|
|
7
8
|
---
|
|
8
9
|
|
|
9
|
-
# Show HN Writer
|
|
10
|
+
# Show HN Writer — Data-Backed Edition
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
This skill drafts HN posts using patterns extracted from 250 real top-ranking posts.
|
|
13
|
+
Every rule below comes from observed data, not convention.
|
|
12
14
|
|
|
13
15
|
---
|
|
14
16
|
|
|
15
|
-
|
|
17
|
+
## What the data says (internalize this before writing anything)
|
|
16
18
|
|
|
17
|
-
|
|
19
|
+
These are the findings from 250 top HN posts scraped April 18 2026. They override
|
|
20
|
+
any received wisdom about HN writing.
|
|
21
|
+
|
|
22
|
+
**Title length is the single strongest predictor of score.**
|
|
23
|
+
- Under 40 chars: avg 248 pts (n=82)
|
|
24
|
+
- 40–59 chars: avg 192 pts (n=68)
|
|
25
|
+
- 60–79 chars: avg 150 pts (n=91)
|
|
26
|
+
- 80+ chars: avg 131 pts (n=9)
|
|
27
|
+
Default target: under 40 characters. Hard ceiling: 60.
|
|
18
28
|
|
|
19
|
-
|
|
29
|
+
**Body text does not affect score.**
|
|
30
|
+
90% of posts had no body. With-body avg: 189. Without-body avg: 193. Statistically
|
|
31
|
+
identical. A body is only worth writing if you have genuinely interesting technical
|
|
32
|
+
detail that won't fit in a title. Never write a body to pad credibility.
|
|
20
33
|
|
|
21
|
-
|
|
34
|
+
**Show HN prefix suppresses score.**
|
|
35
|
+
Show HN posts averaged 94 pts vs 186+ for plain statements. The label signals
|
|
36
|
+
"I want feedback on my thing" which triggers a more skeptical read. Only use "Show HN:"
|
|
37
|
+
when the project is genuinely novel. Always offer a plain-title alternative.
|
|
22
38
|
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
- Current state: alpha, beta, open source, free, paid, solo project, team
|
|
39
|
+
**First-person titles outperform anonymous statements.**
|
|
40
|
+
First-person ("I…", "My…", "We…"): avg 291 pts (n=9).
|
|
41
|
+
Plain statement: avg 186 pts (n=126).
|
|
42
|
+
If the builder's perspective is part of the story, lead with it.
|
|
28
43
|
|
|
29
|
-
|
|
44
|
+
**Questions generate comments more than upvotes.**
|
|
45
|
+
Question titles avg ratio of comments-to-score above 1.0×. Best for discussions,
|
|
46
|
+
not for raw score. Ask the user which they're optimising for before writing.
|
|
30
47
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
5. What's the current state: open source? free? alpha?"
|
|
48
|
+
**Themes that consistently outperform:**
|
|
49
|
+
- Security / backdoor / breach stories: avg 308 pts
|
|
50
|
+
- Privacy / surveillance / data stories: avg 282 pts
|
|
51
|
+
- AI / LLM releases: avg 266 pts (42 posts — largest category)
|
|
52
|
+
- Open source releases: avg 485 pts (small n, but strong signal)
|
|
37
53
|
|
|
38
|
-
|
|
54
|
+
**The highest-scoring titles share one trait: they are stories, not topics.**
|
|
55
|
+
"Someone bought 30 WordPress plugins and planted a backdoor in all of them" — 1192 pts.
|
|
56
|
+
"Google broke its promise to me – now ICE has my data" — 1688 pts.
|
|
57
|
+
A topic is "WordPress plugin security". A story has an actor, an action, and stakes.
|
|
39
58
|
|
|
40
59
|
---
|
|
41
60
|
|
|
42
|
-
## Step
|
|
61
|
+
## Step 1: Ask the user one question before anything else
|
|
43
62
|
|
|
44
|
-
|
|
63
|
+
Before drafting, ask:
|
|
45
64
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
ls package.json 2>/dev/null && echo "package.json found"
|
|
50
|
-
```
|
|
65
|
+
"Two quick questions:
|
|
66
|
+
1. Are you optimising for **score** (reach) or **comments** (discussion)?
|
|
67
|
+
2. What does the project do — one sentence, technical, no adjectives?"
|
|
51
68
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
If you find enough context in the files, skip the Step 1 questions entirely or ask only what's missing.
|
|
69
|
+
Do not proceed until you have both answers.
|
|
55
70
|
|
|
56
71
|
---
|
|
57
72
|
|
|
58
|
-
## Step
|
|
73
|
+
## Step 2: Determine the right post type
|
|
59
74
|
|
|
60
|
-
|
|
75
|
+
Based on the project and goal, decide which format to use:
|
|
61
76
|
|
|
62
|
-
**
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
```
|
|
77
|
+
**Plain title (recommended default)**
|
|
78
|
+
No prefix. Just what it is or what happened. Highest avg score.
|
|
79
|
+
Use when: sharing a release, article, tool, or event.
|
|
66
80
|
|
|
67
|
-
**
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
81
|
+
**Show HN: prefix (use sparingly)**
|
|
82
|
+
Use only when: the project is a working demo, the builder is present to answer
|
|
83
|
+
questions, and the technical implementation is the interesting part.
|
|
84
|
+
Avg score is low (94), but it signals authenticity when the project is genuinely novel.
|
|
85
|
+
Always also draft a plain-title alternative for comparison.
|
|
86
|
+
|
|
87
|
+
**Ask HN: prefix**
|
|
88
|
+
Use when: the goal is discussion, not promotion. Avg engagement ratio > 1.0×.
|
|
89
|
+
Best for "who is using X?" or "should I do Y?" posts.
|
|
71
90
|
|
|
72
|
-
**
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
- No adjectives ("fast", "simple", "easy", "powerful") unless they are literal technical specs
|
|
76
|
-
- The dash is an en dash (–), not a hyphen (-)
|
|
77
|
-
- No trailing punctuation
|
|
78
|
-
- Describe what it does, not what it could do for someone
|
|
79
|
-
|
|
80
|
-
Good examples:
|
|
81
|
-
- `Show HN: Zulip – Group chat that threads every conversation`
|
|
82
|
-
- `Show HN: Lite XL – A lightweight text editor written in C and Lua`
|
|
83
|
-
- `Show HN: Datasette – Instantly publish SQLite databases to the web`
|
|
84
|
-
|
|
85
|
-
Bad examples (never write these):
|
|
86
|
-
- `Show HN: The most powerful tool for managing your workflow` (adjective, no specifics)
|
|
87
|
-
- `Show HN: Check out my new project!` (no description, no name)
|
|
88
|
-
- `Show HN: I built a thing for developers` (vague)
|
|
89
|
-
|
|
90
|
-
Draft three title variants:
|
|
91
|
-
1. Product-First format
|
|
92
|
-
2. Outcome-Focused format
|
|
93
|
-
3. Technical-Angle format (lead with the interesting technical decision)
|
|
91
|
+
**Tell HN: prefix**
|
|
92
|
+
Whistleblowing, accountability, or disclosure. One data point at 819 pts.
|
|
93
|
+
Only use if the post is factual, verifiable, and the builder is named.
|
|
94
94
|
|
|
95
95
|
---
|
|
96
96
|
|
|
97
|
-
## Step
|
|
97
|
+
## Step 3: Draft the title
|
|
98
98
|
|
|
99
|
-
The
|
|
99
|
+
**The title is the entire post.** Treat the body as optional.
|
|
100
100
|
|
|
101
|
-
|
|
101
|
+
Rules derived from data:
|
|
102
|
+
- Target under 40 characters. Every 20 chars over that costs roughly 30 avg points.
|
|
103
|
+
- Write a story, not a category. Actor + action + stakes beats noun phrases.
|
|
104
|
+
- First person ("I…") adds ~100 pts avg vs plain statement when builder perspective matters.
|
|
105
|
+
- No marketing adjectives. Not "fast", "simple", "powerful", "lightweight" unless
|
|
106
|
+
it is a literal spec (e.g. "35B-A3B" is a spec, "powerful" is not).
|
|
107
|
+
- Specificity beats generality. "30 WordPress plugins" beats "popular CMS plugins".
|
|
108
|
+
- Year in brackets signals classic worth reading: (2008), (1956). Use when linking
|
|
109
|
+
older content that has aged well.
|
|
110
|
+
- En dash (–) for subtitle format: "Product Name – what it does". Not a hyphen (-).
|
|
102
111
|
|
|
103
|
-
|
|
112
|
+
Draft three variants:
|
|
113
|
+
1. Shortest possible (aim for under 35 chars) — strip everything non-essential
|
|
114
|
+
2. Story angle — actor + action + stakes
|
|
115
|
+
3. Technical angle — lead with the interesting engineering decision
|
|
104
116
|
|
|
105
|
-
|
|
117
|
+
Then apply the length test: count chars on each. Flag any over 60.
|
|
106
118
|
|
|
107
|
-
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## Step 4: Decide whether to write a body
|
|
108
122
|
|
|
109
|
-
|
|
123
|
+
Ask yourself: does the technical implementation have a detail that cannot fit in
|
|
124
|
+
the title and that HN engineers would find genuinely interesting?
|
|
110
125
|
|
|
111
|
-
|
|
126
|
+
If yes: write a body (see Step 5).
|
|
127
|
+
If no: stop at the title. No body is better than a padded body.
|
|
112
128
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
- No bullet points, no headers, no bold text
|
|
117
|
-
- No links in the body (the URL goes in the submission, not the body)
|
|
118
|
-
- No asking people to sign up, follow, or subscribe
|
|
119
|
-
- No comparison tables or feature lists
|
|
120
|
-
- If there's a demo or GitHub link, do NOT add it to the body: it goes in the URL field of the submission
|
|
129
|
+
The data shows bodies do not increase score. The only reason to write one is if
|
|
130
|
+
the implementation is interesting enough that engineers will ask "how does this work?"
|
|
131
|
+
and you want to pre-answer that.
|
|
121
132
|
|
|
122
133
|
---
|
|
123
134
|
|
|
124
|
-
## Step 5:
|
|
125
|
-
|
|
126
|
-
Write a Gemini request to evaluate the draft and check for Show HN anti-patterns:
|
|
127
|
-
|
|
128
|
-
```bash
|
|
129
|
-
cat > /tmp/show-hn-review-request.json << 'ENDJSON'
|
|
130
|
-
{
|
|
131
|
-
"system_instruction": {
|
|
132
|
-
"parts": [{
|
|
133
|
-
"text": "You are a longtime Hacker News member reviewing a Show HN post draft. Your job is to catch anything that will hurt its reception: marketing language, vague descriptions, third-person writing, requests for upvotes/shares, adjectives without specifics, titles over 80 characters. For each issue found, state: the exact phrase, why it hurts, and a specific suggested replacement. If the post passes, say 'Passes review.' Output only the review: no commentary, no preamble. Do not use em dashes. Do not praise the post."
|
|
134
|
-
}]
|
|
135
|
-
},
|
|
136
|
-
"contents": [{
|
|
137
|
-
"parts": [{
|
|
138
|
-
"text": "DRAFT_POST_HERE"
|
|
139
|
-
}]
|
|
140
|
-
}],
|
|
141
|
-
"generationConfig": {
|
|
142
|
-
"temperature": 0.2,
|
|
143
|
-
"maxOutputTokens": 1024
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
ENDJSON
|
|
147
|
-
|
|
148
|
-
curl -s -X POST \
|
|
149
|
-
"https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent?key=$GEMINI_API_KEY" \
|
|
150
|
-
-H "Content-Type: application/json" \
|
|
151
|
-
-d @/tmp/show-hn-review-request.json \
|
|
152
|
-
| python3 -c "import sys,json; d=json.load(sys.stdin); print(d['candidates'][0]['content']['parts'][0]['text'])"
|
|
153
|
-
```
|
|
135
|
+
## Step 5: Write the body (only if Step 4 said yes)
|
|
154
136
|
|
|
155
|
-
|
|
137
|
+
Structure — keep it tight:
|
|
156
138
|
|
|
157
|
-
**
|
|
139
|
+
**Line 1:** One sentence. What you built and why. First person.
|
|
140
|
+
Not "Introducing X." Not "X is a tool that." Just: "I built X because Y."
|
|
158
141
|
|
|
159
|
-
|
|
142
|
+
**Lines 2–4:** The real reason. Honest. Specific. Was it a problem you hit yourself?
|
|
143
|
+
Something frustrating at work? A curiosity? "I was annoyed that..." is better than
|
|
144
|
+
"Developers often struggle with...". The builder's voice is the point.
|
|
160
145
|
|
|
161
|
-
|
|
146
|
+
**Lines 5–8:** How it actually works. This is what HN reads for.
|
|
147
|
+
Name the specific technology choices. State the tradeoffs you made and why.
|
|
148
|
+
One interesting engineering decision is worth more than a feature list.
|
|
162
149
|
|
|
163
|
-
|
|
150
|
+
**Line 9:** Current state in one sentence. Open source? Free? Alpha? Solo?
|
|
151
|
+
How long you've been working on it.
|
|
164
152
|
|
|
165
|
-
**
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
- [ ] Contains no marketing adjectives
|
|
169
|
-
- [ ] Describes what the product does, not what it will do for someone
|
|
170
|
-
- [ ] No exclamation marks
|
|
153
|
+
**Line 10:** One closing sentence inviting feedback or questions.
|
|
154
|
+
"Happy to answer questions about the implementation." / "Criticism welcome."
|
|
155
|
+
Never ask for upvotes, shares, or sign-ups.
|
|
171
156
|
|
|
172
|
-
|
|
173
|
-
-
|
|
174
|
-
-
|
|
175
|
-
-
|
|
176
|
-
-
|
|
177
|
-
-
|
|
178
|
-
-
|
|
179
|
-
- [ ] No marketing words: "game-changer", "revolutionary", "powerful", "robust", "seamless", "innovative", "best-in-class", "streamline", "leverage", "transform"
|
|
180
|
-
|
|
181
|
-
If any check fails, fix before presenting.
|
|
157
|
+
Hard rules:
|
|
158
|
+
- 150–300 words. Under 200 is usually better.
|
|
159
|
+
- First person throughout.
|
|
160
|
+
- No bullet points. No headers. No bold.
|
|
161
|
+
- No links in body. URL goes in the submission field.
|
|
162
|
+
- No marketing words: game-changing, revolutionary, powerful, robust, seamless,
|
|
163
|
+
innovative, best-in-class, streamline, leverage, transform, cutting-edge.
|
|
182
164
|
|
|
183
165
|
---
|
|
184
166
|
|
|
185
|
-
## Step
|
|
186
|
-
|
|
187
|
-
If `HN_USERNAME` and `HN_PASSWORD` are set in the environment, offer to post directly.
|
|
167
|
+
## Step 6: Self-check before presenting
|
|
188
168
|
|
|
189
|
-
|
|
190
|
-
echo "HN_USERNAME: ${HN_USERNAME:-not set}"
|
|
191
|
-
echo "HN_PASSWORD: ${HN_PASSWORD:+set (hidden)}"
|
|
192
|
-
```
|
|
169
|
+
Run through this list. Fix anything that fails before outputting.
|
|
193
170
|
|
|
194
|
-
|
|
171
|
+
Title:
|
|
172
|
+
- [ ] Under 60 characters (count them)
|
|
173
|
+
- [ ] No marketing adjectives
|
|
174
|
+
- [ ] Is it a story or a topic? (story = better)
|
|
175
|
+
- [ ] First person if the builder's perspective adds something
|
|
176
|
+
- [ ] No exclamation marks
|
|
195
177
|
|
|
196
|
-
|
|
178
|
+
Body (if written):
|
|
179
|
+
- [ ] Opens with "I built…" or "For the past N months…"
|
|
180
|
+
- [ ] Contains at least one specific technology name or architecture decision
|
|
181
|
+
- [ ] Under 300 words
|
|
182
|
+
- [ ] No links
|
|
183
|
+
- [ ] Closes with feedback invitation, not call to action
|
|
184
|
+
- [ ] Zero marketing words (check the list in Step 5)
|
|
197
185
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
-d "acct=${HN_USERNAME}&pw=${HN_PASSWORD}&goto=news" \
|
|
203
|
-
-D /tmp/hn-headers.txt \
|
|
204
|
-
-L -o /dev/null -w "%{http_code}")
|
|
186
|
+
Post type:
|
|
187
|
+
- [ ] If using Show HN prefix: is a plain-title alternative also drafted?
|
|
188
|
+
- [ ] If goal is comments: is it a question or divisive framing?
|
|
189
|
+
- [ ] If goal is score: is it a statement, not a question?
|
|
205
190
|
|
|
206
|
-
|
|
207
|
-
grep -c "user?id=${HN_USERNAME}" /tmp/hn-headers.txt > /dev/null 2>&1 \
|
|
208
|
-
|| curl -s -b /tmp/hn-cookies.txt "https://news.ycombinator.com/" \
|
|
209
|
-
| grep -c "logout" > /dev/null 2>&1 \
|
|
210
|
-
&& echo "Login: success" || echo "Login: failed: check credentials"
|
|
211
|
-
```
|
|
191
|
+
---
|
|
212
192
|
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
**Step B: Fetch the submission form to get the CSRF token (fnid)**
|
|
216
|
-
```bash
|
|
217
|
-
FNID=$(curl -s -b /tmp/hn-cookies.txt \
|
|
218
|
-
"https://news.ycombinator.com/submit" \
|
|
219
|
-
| python3 -c "
|
|
220
|
-
import sys, re
|
|
221
|
-
html = sys.stdin.read()
|
|
222
|
-
m = re.search(r'name=\"fnid\" value=\"([^\"]+)\"', html)
|
|
223
|
-
print(m.group(1) if m else 'NOT_FOUND')
|
|
224
|
-
")
|
|
225
|
-
echo "fnid: $FNID"
|
|
226
|
-
```
|
|
193
|
+
## Step 7: Present output
|
|
227
194
|
|
|
228
|
-
|
|
195
|
+
Format exactly as follows. No commentary before or after.
|
|
229
196
|
|
|
230
|
-
|
|
197
|
+
```
|
|
198
|
+
## HN Post
|
|
231
199
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
curl -s -b /tmp/hn-cookies.txt \
|
|
235
|
-
-X POST "https://news.ycombinator.com/r" \
|
|
236
|
-
-d "title={ENCODED_TITLE}&url={ENCODED_URL}&fnid=${FNID}&fnop=submit-page" \
|
|
237
|
-
-D /tmp/hn-submit-headers.txt \
|
|
238
|
-
-L -o /tmp/hn-submit-response.html
|
|
200
|
+
### Recommended title
|
|
201
|
+
[title — the shortest, strongest variant]
|
|
239
202
|
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
```
|
|
203
|
+
### Alternative titles
|
|
204
|
+
1. [variant 2]
|
|
205
|
+
2. [variant 3]
|
|
244
206
|
|
|
245
|
-
|
|
246
|
-
```bash
|
|
247
|
-
curl -s -b /tmp/hn-cookies.txt \
|
|
248
|
-
-X POST "https://news.ycombinator.com/r" \
|
|
249
|
-
-d "title={ENCODED_TITLE}&text={ENCODED_BODY}&fnid=${FNID}&fnop=submit-page" \
|
|
250
|
-
-D /tmp/hn-submit-headers.txt \
|
|
251
|
-
-L -o /tmp/hn-submit-response.html
|
|
252
|
-
```
|
|
207
|
+
---
|
|
253
208
|
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
2. Tell the user: "Posted: https://news.ycombinator.com/item?id=[ID]"
|
|
257
|
-
3. Remind them: "Reply to comments within the first two hours. Do not reshare the link for 24 hours: HN penalizes vote rings."
|
|
209
|
+
### Body
|
|
210
|
+
[body text, or "Not recommended — title is sufficient." if Step 4 said no body]
|
|
258
211
|
|
|
259
|
-
|
|
212
|
+
---
|
|
260
213
|
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
214
|
+
### Notes
|
|
215
|
+
- Goal: [score / comments] — based on user's answer in Step 1
|
|
216
|
+
- Post type used: [plain / Show HN / Ask HN / Tell HN]
|
|
217
|
+
- Title length: [N chars]
|
|
218
|
+
- Best time to post: Tuesday–Thursday, 8–10 AM US Eastern
|
|
219
|
+
- After posting: respond to every comment in the first two hours
|
|
220
|
+
- Do not share the link elsewhere for 24 hours — HN penalises vote rings
|
|
264
221
|
```
|
|
265
222
|
|
|
266
|
-
If `HN_USERNAME` or `HN_PASSWORD` is not set: skip this step entirely and proceed to Step 8.
|
|
267
|
-
|
|
268
223
|
---
|
|
269
224
|
|
|
270
|
-
## Step 8:
|
|
271
|
-
|
|
272
|
-
Present in this order:
|
|
225
|
+
## Step 8: Optional — scrape current top HN posts for context
|
|
273
226
|
|
|
274
|
-
|
|
275
|
-
|
|
227
|
+
If the user wants to check whether similar posts have been submitted recently,
|
|
228
|
+
or wants to see what is performing in their category right now, run the scraper:
|
|
276
229
|
|
|
277
|
-
|
|
278
|
-
|
|
230
|
+
```python
|
|
231
|
+
import requests
|
|
232
|
+
from concurrent.futures import ThreadPoolExecutor
|
|
279
233
|
|
|
280
|
-
|
|
281
|
-
1. Show HN: [variant 1]
|
|
282
|
-
2. Show HN: [variant 2]
|
|
234
|
+
HN_API = "https://hacker-news.firebaseio.com/v0"
|
|
283
235
|
|
|
284
|
-
|
|
236
|
+
def fetch_item(id_):
|
|
237
|
+
try:
|
|
238
|
+
r = requests.get(f"{HN_API}/item/{id_}.json", timeout=10)
|
|
239
|
+
return r.json() if r.ok else None
|
|
240
|
+
except Exception:
|
|
241
|
+
return None
|
|
285
242
|
|
|
286
|
-
|
|
243
|
+
ids = requests.get(f"{HN_API}/topstories.json").json()[:250]
|
|
244
|
+
with ThreadPoolExecutor(max_workers=20) as ex:
|
|
245
|
+
items = [i for i in ex.map(fetch_item, ids) if i]
|
|
287
246
|
|
|
288
|
-
|
|
247
|
+
# Filter by keyword relevant to the user's project
|
|
248
|
+
keyword = "YOUR_KEYWORD_HERE"
|
|
249
|
+
matches = [i for i in items if keyword.lower() in i.get("title","").lower()]
|
|
289
250
|
|
|
290
|
-
|
|
251
|
+
for i, item in enumerate(matches, 1):
|
|
252
|
+
score = item.get("score", 0)
|
|
253
|
+
title = item.get("title", "")
|
|
254
|
+
by = item.get("by", "")
|
|
255
|
+
print(f"{i:>2}. [{score:>4}pts] {title} — {by}")
|
|
291
256
|
|
|
292
|
-
|
|
293
|
-
- URL field: [project URL or GitHub URL]
|
|
294
|
-
- Best time to post: Tuesday to Thursday, 8–10 AM US Eastern
|
|
295
|
-
- After posting: Respond to every comment in the first two hours
|
|
296
|
-
- Do not share the link elsewhere for the first 24 hours: HN flags vote rings
|
|
257
|
+
print(f"\nTotal matching: {len(matches)}")
|
|
297
258
|
```
|
|
298
259
|
|
|
299
|
-
|
|
300
|
-
|
|
260
|
+
Use the results to:
|
|
261
|
+
- Check if a near-identical post was submitted in the last 48 hours (avoid duplication)
|
|
262
|
+
- See which title patterns are landing in this category right now
|
|
263
|
+
- Identify the score floor for this topic area
|
|
301
264
|
|
|
265
|
+
Results are also appended to hn_log.csv automatically if the full scraper is used.
|
|
302
266
|
|
|
267
|
+
---
|
|
303
268
|
|
|
269
|
+
## Reference: observed top performers from dataset
|
|
270
|
+
|
|
271
|
+
These are real posts from the top 250. Study the title patterns.
|
|
272
|
+
|
|
273
|
+
Score | Title
|
|
274
|
+
------|-------
|
|
275
|
+
1941 | Claude Opus 4.7
|
|
276
|
+
1688 | Google broke its promise to me – now ICE has my data
|
|
277
|
+
1244 | Qwen3.6-35B-A3B: Agentic coding power, now open to all
|
|
278
|
+
1192 | Someone bought 30 WordPress plugins and planted a backdoor in all of them
|
|
279
|
+
1141 | DaVinci Resolve – Photo
|
|
280
|
+
990 | Codex for almost everything
|
|
281
|
+
982 | Stop Flock
|
|
282
|
+
909 | A new spam policy for "back button hijacking"
|
|
283
|
+
893 | GitHub Stacked PRs
|
|
284
|
+
819 | Tell HN: Fiverr left customer files public and searchable
|
|
285
|
+
668 | I wrote to Flock's privacy contact to opt out of their domestic spying program
|
|
286
|
+
619 | Measuring Claude 4.7's tokenizer costs
|
|
287
|
+
561 | God sleeps in the minerals
|
|
288
|
+
503 | Want to write a compiler? Just read these two papers (2008)
|
|
289
|
+
|
|
290
|
+
Best Show HN titles (by score):
|
|
291
|
+
341 | Show HN: Smol machines – subsecond coldstart, portable virtual machines
|
|
292
|
+
199 | Show HN: PanicLock – Close your MacBook lid disable TouchID → password unlock
|
|
293
|
+
187 | Show HN: Every CEO and CFO change at US public companies, live from SEC
|
|
294
|
+
177 | Show HN: I made a calculator that works over disjoint sets of intervals
|
|
295
|
+
152 | Show HN: MacMind – A transformer neural network in HyperCard on a 1989 Macintosh
|
|
296
|
+
|
|
297
|
+
Highest comment-to-score ratios (for discussion-optimised posts):
|
|
298
|
+
1.91× | Why is IPv6 so complicated?
|
|
299
|
+
1.43× | Ask HN: Building a solo business is impossible?
|
|
300
|
+
1.20× | Ohio prison inmates built computers and hid them in ceiling
|
|
301
|
+
1.13× | Ask HN: Who is using OpenClaw?
|
|
302
|
+
1.05× | The future of everything is lies, I guess: Where do we go from here?
|