Publish to Hacker News
Treat this as a manual, explicitly authorized release. Hacker News receives the
English article URL and title; it does not receive the Markdown body.
Enforce Boundaries
- Never add
hacker-news to publishing/schedule.json, a platform group, a
pipeline stage, or --platforms.
- Never call
pnpm publish:queue or Wechatsync for this workflow.
- Require the English post to set
publish.autoSyndication: false before it can
become public.
- Use only the user's main Chrome session for Hacker News. Never use direct HTTP
submission, an isolated browser, copied cookies, or a separate profile.
- Do not submit unless the user explicitly requested Hacker News publication.
If the user requested only a translation or preparation, stop after creating
and validating the draft.
- Do not publish an AI-generated Hacker News comment, solicit votes, or ask
others to comment.
Run Preflight
- Read
../publish-blog-article/SKILL.md and follow its Git, deployment, live
verification, and main-Chrome constraints.
- Resolve one source file under
content/posts/. Require it to be tracked,
unchanged, on main, and explicitly draft: false.
- Derive its canonical URL and verify that the public page contains the exact
source title. Do not translate an unpublished source for this workflow.
- Inspect
git status --short. Apply the repository's -c/-i rule to
unrelated changes and never stage them.
- Read the current official Hacker News Guidelines and FAQ before submission:
https://news.ycombinator.com/newsguidelines.html and
https://news.ycombinator.com/newsfaq.html.
Prepare the English Counterpart
- Use filename-based Hugo translations. For
content/posts/topic.md, create
content/posts/topic.en.md. Keep the same path and base filename so Hugo
links both language versions.
- Derive the English slug from the source
slug, falling back to the source
basename. Require an explicit site-root URL /en/posts/<slug>/ so the
publisher's canonical URL matches Hugo's multilingual output.
- Translate the title, summary, headings, prose, tables, captions, and useful
image alt text. Preserve code, commands, identifiers, URLs, Markdown
structure, shortcodes, formulas, and product names unless an established
English form exists.
- Preserve factual meaning. Do not add claims, examples, endorsements, or
promotional language that the source does not contain.
- Add a short note linking to the verified Chinese original and identifying
the page as its English translation.
- Preserve relevant tags, categories, cover, and local image references. Use
an English summary and an English page title.
- Use this front matter contract:
---
title: "<English page title>"
slug: <source-slug>
url: /en/posts/<source-slug>/
draft: true
summary: "<English summary>"
publish:
autoSyndication: false
hackerNews:
title: "<Hacker News title>"
---
- Default
publish.hackerNews.title to the English page title. Remove a site
name, gratuitous capitalization, exclamation marks, or clickbait; otherwise
do not editorialize. Do not add Show HN: unless the user explicitly asks
and the linked work satisfies the current Show HN rules.
- If the English file already exists, preserve intentional edits. If it has a
verified
publish.hackerNews.itemUrl, follow Recover or Re-run instead
of retranslating or resubmitting it.
- Run
hugo --gc --minify, inspect the rendered English page, and confirm
that links, code blocks, images, and the source note remain correct.
- Commit only the English draft with
docs: add English translation for <slug>. This clean checkpoint is required before the normal publisher can
run. For a preparation-only request, stop here and report the draft path.
Publish the English Page
- Reconfirm
publish.autoSyndication: false, draft: true, and the exact
/en/posts/<slug>/ URL.
- When the worktree is clean, run:
pnpm publish:article content/posts/<source>.en.md
- If unrelated changes remain under an authorized
-i path, use the scoped
site-publication fallback from publish-blog-article; do not stash, commit,
or discard unrelated files.
- Wait for the GitHub Pages deployment associated with the publication commit.
- Fetch the exact English canonical URL. Require a successful response, the
exact English title, and an English document language before proceeding.
Avoid Duplicate Submissions
- Search for the exact English canonical URL before opening the submit form.
Use the HN Algolia read API for lookup, then verify any candidate against its
public
news.ycombinator.com/item?id=... page. Fall back to the official HN
site/domain listings if the search service is unavailable.
- Normalize only a trailing slash when comparing URLs. Do not treat a title or
domain-only match as the same submission.
- If an exact public submission already exists, do not submit again. Verify it
and continue to Record the Result.
Submit with Main Chrome
- Use
publish.hackerNews.title when present; otherwise use the exact English
page title.
- Open the prefilled main-Chrome submission URL:
https://news.ycombinator.com/submitlink?u=<encoded-English-URL>&t=<encoded-title>
- Confirm the title and URL in the form, then submit once. Do not add a text
body or an automated first comment.
- If login, CAPTCHA, account confirmation, or another user-only checkpoint is
required, leave the main Chrome tab open and ask the user to complete it.
- Treat submission as complete only after a public item page contains the
exact English URL and submitted title. A filled form or redirect alone is
not completion.
Record the Result
After verifying the public item, update only the English post metadata:
publish:
autoSyndication: false
hackerNews:
title: "<submitted title>"
itemUrl: "https://news.ycombinator.com/item?id=<id>"
submittedAt: "<ISO-8601 timestamp>"
Preserve the article body, date, and draft: false. Run hugo --gc --minify,
stage only the English post, commit with chore: record Hacker News submission for <slug>, push main, and verify that the main branch is synchronized.
Recover or Re-run
- If
itemUrl is present, verify that it still points to the exact English URL
and return it without resubmitting.
- If submission outcome is ambiguous, search for the exact URL before retrying.
- If Hacker News succeeded but recording failed, recover the existing item and
backfill the metadata without another submission.
- If English site publication fails, do not open or submit the Hacker News form.
- If the English page is live but Hacker News is blocked, leave the page live,
report the exact blocker, and keep Hacker News outside the automated queue.
Report the source URL, English URL, translation/publication commit, Hacker News
item URL, result-record commit, any pushed pre-existing commits, and unrelated
working-tree changes left intact.
1---2name: publish-hacker-news3description: Translate a formally published Hugo post into English, publish the English counterpart under /en/posts/, and submit its verified URL to Hacker News through the user's main Chrome session. Use when the user explicitly asks to prepare an English Hacker News translation or to translate and publish/submit a blog post to Hacker News. Never run this workflow from scheduled publishing, and never submit to Hacker News without explicit authorization.4---56# Publish to Hacker News78Treat this as a manual, explicitly authorized release. Hacker News receives the9English article URL and title; it does not receive the Markdown body.1011## Enforce Boundaries1213- Never add `hacker-news` to `publishing/schedule.json`, a platform group, a14 pipeline stage, or `--platforms`.15- Never call `pnpm publish:queue` or Wechatsync for this workflow.16- Require the English post to set `publish.autoSyndication: false` before it can17 become public.18- Use only the user's main Chrome session for Hacker News. Never use direct HTTP19 submission, an isolated browser, copied cookies, or a separate profile.20- Do not submit unless the user explicitly requested Hacker News publication.21 If the user requested only a translation or preparation, stop after creating22 and validating the draft.23- Do not publish an AI-generated Hacker News comment, solicit votes, or ask24 others to comment.2526## Run Preflight27281. Read `../publish-blog-article/SKILL.md` and follow its Git, deployment, live29 verification, and main-Chrome constraints.302. Resolve one source file under `content/posts/`. Require it to be tracked,31 unchanged, on `main`, and explicitly `draft: false`.323. Derive its canonical URL and verify that the public page contains the exact33 source title. Do not translate an unpublished source for this workflow.344. Inspect `git status --short`. Apply the repository's `-c`/`-i` rule to35 unrelated changes and never stage them.365. Read the current official Hacker News Guidelines and FAQ before submission:37 `https://news.ycombinator.com/newsguidelines.html` and38 `https://news.ycombinator.com/newsfaq.html`.3940## Prepare the English Counterpart41421. Use filename-based Hugo translations. For `content/posts/topic.md`, create43 `content/posts/topic.en.md`. Keep the same path and base filename so Hugo44 links both language versions.452. Derive the English slug from the source `slug`, falling back to the source46 basename. Require an explicit site-root URL `/en/posts/<slug>/` so the47 publisher's canonical URL matches Hugo's multilingual output.483. Translate the title, summary, headings, prose, tables, captions, and useful49 image alt text. Preserve code, commands, identifiers, URLs, Markdown50 structure, shortcodes, formulas, and product names unless an established51 English form exists.524. Preserve factual meaning. Do not add claims, examples, endorsements, or53 promotional language that the source does not contain.545. Add a short note linking to the verified Chinese original and identifying55 the page as its English translation.566. Preserve relevant tags, categories, cover, and local image references. Use57 an English summary and an English page title.587. Use this front matter contract:5960```yaml61---62title: "<English page title>"63slug: <source-slug>64url: /en/posts/<source-slug>/65draft: true66summary: "<English summary>"67publish:68 autoSyndication: false69 hackerNews:70 title: "<Hacker News title>"71---72```73748. Default `publish.hackerNews.title` to the English page title. Remove a site75 name, gratuitous capitalization, exclamation marks, or clickbait; otherwise76 do not editorialize. Do not add `Show HN:` unless the user explicitly asks77 and the linked work satisfies the current Show HN rules.789. If the English file already exists, preserve intentional edits. If it has a79 verified `publish.hackerNews.itemUrl`, follow **Recover or Re-run** instead80 of retranslating or resubmitting it.8110. Run `hugo --gc --minify`, inspect the rendered English page, and confirm82 that links, code blocks, images, and the source note remain correct.8311. Commit only the English draft with `docs: add English translation for84 <slug>`. This clean checkpoint is required before the normal publisher can85 run. For a preparation-only request, stop here and report the draft path.8687## Publish the English Page88891. Reconfirm `publish.autoSyndication: false`, `draft: true`, and the exact90 `/en/posts/<slug>/` URL.912. When the worktree is clean, run:9293```bash94pnpm publish:article content/posts/<source>.en.md95```96973. If unrelated changes remain under an authorized `-i` path, use the scoped98 site-publication fallback from `publish-blog-article`; do not stash, commit,99 or discard unrelated files.1004. Wait for the GitHub Pages deployment associated with the publication commit.1015. Fetch the exact English canonical URL. Require a successful response, the102 exact English title, and an English document language before proceeding.103104## Avoid Duplicate Submissions1051061. Search for the exact English canonical URL before opening the submit form.107 Use the HN Algolia read API for lookup, then verify any candidate against its108 public `news.ycombinator.com/item?id=...` page. Fall back to the official HN109 site/domain listings if the search service is unavailable.1102. Normalize only a trailing slash when comparing URLs. Do not treat a title or111 domain-only match as the same submission.1123. If an exact public submission already exists, do not submit again. Verify it113 and continue to **Record the Result**.114115## Submit with Main Chrome1161171. Use `publish.hackerNews.title` when present; otherwise use the exact English118 page title.1192. Open the prefilled main-Chrome submission URL:120121```text122https://news.ycombinator.com/submitlink?u=<encoded-English-URL>&t=<encoded-title>123```1241253. Confirm the title and URL in the form, then submit once. Do not add a text126 body or an automated first comment.1274. If login, CAPTCHA, account confirmation, or another user-only checkpoint is128 required, leave the main Chrome tab open and ask the user to complete it.1295. Treat submission as complete only after a public item page contains the130 exact English URL and submitted title. A filled form or redirect alone is131 not completion.132133## Record the Result134135After verifying the public item, update only the English post metadata:136137```yaml138publish:139 autoSyndication: false140 hackerNews:141 title: "<submitted title>"142 itemUrl: "https://news.ycombinator.com/item?id=<id>"143 submittedAt: "<ISO-8601 timestamp>"144```145146Preserve the article body, `date`, and `draft: false`. Run `hugo --gc --minify`,147stage only the English post, commit with `chore: record Hacker News submission148for <slug>`, push `main`, and verify that the main branch is synchronized.149150## Recover or Re-run151152- If `itemUrl` is present, verify that it still points to the exact English URL153 and return it without resubmitting.154- If submission outcome is ambiguous, search for the exact URL before retrying.155- If Hacker News succeeded but recording failed, recover the existing item and156 backfill the metadata without another submission.157- If English site publication fails, do not open or submit the Hacker News form.158- If the English page is live but Hacker News is blocked, leave the page live,159 report the exact blocker, and keep Hacker News outside the automated queue.160161Report the source URL, English URL, translation/publication commit, Hacker News162item URL, result-record commit, any pushed pre-existing commits, and unrelated163working-tree changes left intact.