mugpeng/oh-my-skills-diy/peng-post-to-hackernews
Claude Code and agent skill by mugpeng/oh-my-skills-diy
- community
Checking that the SKILL.md file is still in the repository.
Posts URL stories to Hacker News from Markdown. Uses curl-based HTTP authentication (no browser required). Supports preview mode (verify session) and auto-submit. Use when user asks to "post to Hacker News", "submit to HN", "share on Hacker News", or provides a markdown file for HN submission.
Install
npx vskill@latest install mugpeng/oh-my-skills-diy/peng-post-to-hackernewsSKILL.md
The same SKILL.md was published earlier as mugpeng/oh-my-skills-diy/peng-post-to-hackernews.
Post to Hacker News
Post a URL story to Hacker News from a Markdown file using curl-based HTTP authentication. No browser required — works entirely via HTTP requests.
Script Directory
{baseDir} = this SKILL.md's directory. Resolve ${BUN_X}: prefer bun; else npx -y bun; else suggest brew install oven-sh/bun/bun.
| Script | Purpose | |
|---|---|---|
scripts/hn-post.ts | Post a markdown file to Hacker News | |
scripts/md-to-hn.ts | Parse and preview HN post structure |
Prerequisites
bunruntime (brew install oven-sh/bun/bun)curl(usually pre-installed)- Environment variables set:
HN_USERNAME— your Hacker News usernameHN_PASSWORD— your Hacker News password
Environment Variables
| Variable | Required | Description | |
|---|---|---|---|
HN_USERNAME | Yes | Hacker News account username | |
HN_PASSWORD | Yes | Hacker News account password | |
HN_PROXY | No | HTTP proxy URL (e.g. http://127.0.0.1:7890) | |
HN_CHROME_PATH | No | Chrome executable path (for profile detection only) |
Set them in your shell:
Or in a .env file in the project root.
Markdown Format
Use YAML frontmatter with title and url fields.
See references/hn-format.md for full spec.
Preview Post Structure
Before posting, preview how the markdown will be parsed:
Post to Hacker News
Preview mode (default)
Verifies your HN session (logs in if needed), fetches the submit form, and confirms credentials are valid. Does not submit. You can then manually submit via the browser.
Auto-submit
Logs in (if needed), fetches the CSRF token (fnid), and submits the story automatically. Reports the posted item URL.
With options
Parameters
| Parameter | Description | |
|---|---|---|
<file.md> | Markdown file with frontmatter (required) | |
--submit | Submit automatically (default: preview mode) | |
--profile <dir> | Cookies/profile directory (default: ~/.baoyu-skills/hn-profile) | |
--chrome <path> | Chrome executable path (for profile detection) |
Workflow
Troubleshooting
| Issue | Fix | |
|---|---|---|
HN_USERNAME not set | export HN_USERNAME="your_username" | |
HN_PASSWORD not set | export HN_PASSWORD="your_password" | |
Login failed | Check credentials; password may have changed | |
This URL has already been posted | HN does not allow duplicate URL submissions | |
Could not retrieve fnid | Session expired; delete cookies file and retry | |
Submission failed | Check .err message in response; may need to re-login |
Notes
- Session cookies are persisted in the profile directory for subsequent runs
- HN does not allow posting the same URL twice — check if already submitted
- Only URL posts are supported (not text posts like Ask HN / Show HN)
- Cross-platform: macOS, Linux, Windows (requires curl)
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingpeng-post-to-hackernews/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/mugpeng/oh-my-skills-diy/peng-post-to-hackernews)