DEV Community

Alex Bogle
Alex Bogle

Posted on

I Built a Multi-Platform Publishing CLI for AI Agents (And Merged It Into One Skill)

I Built a Multi-Platform Publishing CLI for AI Agents (And Merged It Into One Skill)

I contribute to open-source repos regularly. Every time, I'd manually copy-paste the same article to Dev.to, GitHub, LinkedIn — each with different formatting, different APIs, different auth flows. So I built a CLI that does it all from one command.

Then I realized the CLI shouldn't be a separate skill. It should be the final step of the contribution workflow. Here's how it evolved.

The Problem

When you contribute to an open-source project, you often want to:

  1. Write a blog post about it
  2. Push the code to GitHub
  3. Share on Dev.to for visibility
  4. Cross-post to social media

Each platform has its own API, auth method, and markdown handling. Doing this manually is tedious and error-prone.

The Solution: One Skill, Five Phases

I started with 2 separate skills — one for contributing, one for publishing. After testing, I merged them into one workflow:

Phase 1: Discovery — Find the gap, check repo activity, read CONTRIBUTING.md
Phase 2: Scope — Pick contribution type, confirm it's distinct
Phase 3: Write — Use their template, verify commands, document pitfalls
Phase 4: Submit — Branch, commit, open PR with evidence
Phase 5: Publish — Cross-post to Dev.to, GitHub, Mastodon, Bluesky from one command

The platform picker is Phase 5 — the last step after your PR merges.

The Platform Picker CLI

# One-time setup per platform (CLI prompts if key not provided)
python3 platform_picker.py setup devto
python3 platform_picker.py setup github
python3 platform_picker.py setup mastodon
python3 platform_picker.py setup bluesky

# Publish everywhere
python3 platform_picker.py publish --file article.md --platform devto --platform github

# Check what's configured
python3 platform_picker.py status
Enter fullscreen mode Exit fullscreen mode

Credentials are stored in ~/.hermes/config.yaml — never hardcoded in scripts. The CLI reads from config automatically. If a key is missing, it tells you to run setup.

Verified Platforms

These platforms have been researched and confirmed to work with programmatic posting:

Platform Auth Cost Limits Status
Dev.to API key Free 4 tags/article ✅ Tested
GitHub PAT Free Standard rate limits ✅ Tested
Mastodon App password Free 500 chars, open API ✅ Researched
Bluesky App password Free 3000 chars, open API ✅ Researched
HermesHub GitHub OAuth Free Web-only ✅ Tested

Why These Platforms?

I researched what actually works for programmatic posting in 2025/2026:

  • LinkedIn: Removed. Requires Marketing Developer Program approval. OAuth 2.0 is restrictive.
  • Twitter/X: Removed. Free tier killed. $100-$5000/month now.
  • Reddit: Removed. Self-service API access closed in 2025.
  • Mastodon: Added. Free, open API, no restrictions. App passwords work.
  • Bluesky: Added. Free, open API, no restrictions. App passwords work.

The rule: if it requires paid API access or special approval, it doesn't belong in a free tool.

Why Merge Into One Skill?

From the agent's perspective, contributing and sharing is one workflow: "contribute and share."

Having 2 skills meant:

  • The agent had to know to load both
  • The user had to think of them as separate things
  • Publishing felt disconnected from the contribution

One skill means:

  • One trigger: "I want to contribute to a repo and share it"
  • Publishing is just the final phase
  • Platform picker details loaded on demand via reference files

HermesHub Security Requirements

Publishing to HermesHub (the official skills marketplace for Hermes Agent) requires passing automated security review. Here are the key rules:

Automatic rejection triggers:

  • Curl/wget to external URLs with system data (exfiltration)
  • Base64-encoded or obfuscated shell commands
  • Instructions to bypass security prompts
  • Downloading and executing binaries from external URLs
  • Hidden instructions in referenced files
  • Prompt injection or jailbreak attempts

Required for approval:

  • All environment variables documented with setup instructions
  • No hardcoded credentials, tokens, or API keys
  • Destructive operations require explicit user confirmation
  • Network access patterns documented and justified
  • File system access scoped to relevant directories
  • allowed-tools field declared in frontmatter

Real-World Test

I tested the full workflow end-to-end:

# 1. Publish to Dev.to
$ python3 platform_picker.py publish --file article.md --platform devto
--- Publishing to devto ---
  Published! ID: 3868744
  URL: https://dev.to/saintchris_21/i-built-a-multi-platform-publishing-cli-for-ai-agents-2cji

# 2. Error handling (missing config)
$ python3 platform_picker.py publish --file article.md --platform github
Platform not configured: github. Run 'setup github' first.

# 3. Error handling (missing file)
$ python3 platform_picker.py publish --file missing.md --platform devto
File not found: missing.md
Enter fullscreen mode Exit fullscreen mode

The article went live with correct title, body, and tags — all from one command.

What's In The Skill

The merged open-source-contribution v3.0 skill includes:

  • 5 phases: Discovery → Scope → Write → Submit → Publish
  • Platform picker CLI: Dev.to, GitHub, Mastodon, Bluesky support
  • Quality test: "Did I actually improve or just document?"
  • Repo-specific notes: awesome-second-brain, HermesHub, chroma
  • Pitfalls: 8 learned mistakes
  • Reference files: Platform picker docs, HermesHub submission guide

HermesHub compliance: 17/17 checks passed.

Links

If you're building AI agent workflows, I'd love to hear what platforms you'd add.

Top comments (0)