How geekjourneyx/md2wechat-skill works
md2wechat is an agent-oriented CLI for creating, checking, formatting, and preparing WeChat Official Account content. Its main article workflow is Markdown input → structured readiness inspection → HTML conversion and preview → optional image upload and draft creation in WeChat. Separate capabilities cover AI-assisted writing and image generation, layout discovery and validation, and preparation of cross-platform drafts for a host agent to complete. The README documents these branches; sampled source confirms key preview, publishing, draft, and provider behavior, but not every command’s internal wiring.
Main entry points: preview.go Preview command · converter.go Markdown converter · service.go Publish pipeline · inspect.go Readiness inspection
Components 24
Article workflow
- Readiness inspection
internal/inspect/inspect.go - Inspect command
cmd/md2wechat/inspect.go - Preview command
cmd/md2wechat/preview.go - Convert command
cmd/md2wechat/convert.go - Markdown converter
internal/converter/converter.go - Theme catalog
internal/converter/theme.go - Layout catalog
internal/layoutcatalog/loader.go
WeChat publishing
- Publish pipeline
internal/publish/service.go - WeChat draft service
internal/draft/service.go - WeChat API service
internal/wechat/service.go
Content creation
- Article writing
internal/writer/generator.go - Article humanizer
internal/humanizer/humanizer.go - Title suggestions
internal/title/suggest.go - Image generation commands
cmd/md2wechat/generate_image.go - Image provider layer
internal/image/provider.go
Agent capabilities
- Capability discovery
cmd/md2wechat/discovery.go - Configuration check
internal/doctor/doctor.go
Platform preparation
- Cross-platform preparation
internal/syncprepare/prepare.go
Other components
- Author / Agent
- Markdown article
- Preview HTML
- WeChat Official Account
- Image providers
internal/image - Host browser agent
Connections 29
- Author / Agent → Inspect command: requests check
- Markdown article → Inspect command: provides article
- Inspect command → Readiness inspection: inspects input
- Readiness inspection → Markdown converter: parses metadata
- Author / Agent → Preview command: requests preview
- Markdown article → Preview command: provides article
- Preview command → Readiness inspection: checks readiness
- Preview command → Markdown converter: converts Markdown
- Markdown converter → Theme catalog: uses theme
- Preview command → Preview HTML: writes HTML
- Author / Agent → Convert command: requests conversion
- Markdown article → Convert command: provides article
- Convert command → Publish pipeline: runs conversion
- Publish pipeline → Markdown converter: converts content
- Publish pipeline → WeChat draft service: creates draft
- WeChat draft service → WeChat API service: submits articles
- WeChat API service → WeChat Official Account: calls API
- Author / Agent → Image generation commands: requests image
- Image generation commands → Image provider layer: generates image
- Image provider layer → Image providers: dispatches generation
- Author / Agent → Article writing: requests article
- Author / Agent → Article humanizer: requests rewrite
- Author / Agent → Title suggestions: requests titles
- Author / Agent → Layout catalog: browses or validates
- Layout catalog → Markdown converter: defines layout syntax
- Author / Agent → Capability discovery: requests capabilities
- Author / Agent → Configuration check: requests diagnosis
- Author / Agent → Cross-platform preparation: prepares draft
- Cross-platform preparation → Host browser agent: returns instructions