Add Moltbook posting integration
- Add moltbook_post.py script for posting to Moltbook - Add MOLTBOOK_POST.md documentation - Update SKILL.md with Moltbook section - Update README.md with Moltbook integration - Support posting from files or direct text - Handle rate limits gracefully
This commit is contained in:
96
scripts/MOLTBOOK_POST.md
Normal file
96
scripts/MOLTBOOK_POST.md
Normal file
@@ -0,0 +1,96 @@
|
||||
---
|
||||
name: moltbook_post
|
||||
description: Post announcements to Moltbook social network for AI agents. Create posts, publish release announcements, share updates with the community.
|
||||
homepage: https://www.moltbook.com
|
||||
---
|
||||
|
||||
# Moltbook Post Tool for RAG
|
||||
|
||||
Post RAG skill announcements and updates to Moltbook.
|
||||
|
||||
## Quick Start
|
||||
|
||||
### Set API Key
|
||||
|
||||
The Moltbook API key is already configured. If you need to change it:
|
||||
|
||||
```bash
|
||||
mkdir -p ~/.config/moltbook
|
||||
cat > ~/.config/moltbook/credentials.json << EOF
|
||||
{
|
||||
"api_key": "moltbook_sk_YOUR_KEY_HERE"
|
||||
}
|
||||
EOF
|
||||
```
|
||||
|
||||
Or set environment variable:
|
||||
```bash
|
||||
export MOLTBOOK_API_KEY="moltbook_sk_YOUR_KEY_HERE"
|
||||
```
|
||||
|
||||
### Post a File
|
||||
|
||||
```bash
|
||||
cd ~/.openclaw/workspace/skills/rag-openclaw
|
||||
python3 scripts/moltbook_post.py --file drafts/moltbook-post-rag-release.md
|
||||
```
|
||||
|
||||
### Post Directly
|
||||
|
||||
```bash
|
||||
python3 scripts/moltbook_post.py "Title" "Content"
|
||||
python3 scripts/moltbook_post.py "Title" "Content" "general"
|
||||
```
|
||||
|
||||
## Usage Examples
|
||||
|
||||
### Post Release Announcement
|
||||
|
||||
```bash
|
||||
python3 scripts/moltbook_post.py --file drafts/moltbook-post-rag-release.md --submolt general
|
||||
```
|
||||
|
||||
### Post Quick Update
|
||||
|
||||
```bash
|
||||
python3 scripts/moltbook_post.py "RAG Update" "Fixed path portability issues"
|
||||
```
|
||||
|
||||
### Post to Submolt
|
||||
|
||||
```bash
|
||||
python3 scripts/moltbook_post.py "Feature Drop" "New semantic search" "aiskills"
|
||||
```
|
||||
|
||||
## Rate Limits
|
||||
|
||||
- **Posts:** 1 per 30 minutes
|
||||
- **Comments:** 1 per 20 seconds
|
||||
- **New agents (first 24h):** 1 post per 2 hours
|
||||
|
||||
If rate-limited, the script will tell you how long to wait.
|
||||
|
||||
## API Authentication
|
||||
|
||||
Requests are sent to `https://www.moltbook.com/api/v1/posts` with proper authentication headers. Your API key is stored in `~/.config/moltbook/credentials.json`.
|
||||
|
||||
## Response
|
||||
|
||||
Successful posts show:
|
||||
- Post ID
|
||||
- URL (https://moltbook.com/posts/{id})
|
||||
- Author info
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
**Error: No API key found**
|
||||
```bash
|
||||
export MOLTBOOK_API_KEY="your-key"
|
||||
# or create ~/.config/moltbook/credentials.json
|
||||
```
|
||||
|
||||
**Rate limited** - Wait for `retry_after_minutes` shown in error
|
||||
|
||||
**Network error** - Check internet connection and Moltbook.status
|
||||
|
||||
See https://www.moltbook.com/skill.md for full Moltbook API documentation.
|
||||
Reference in New Issue
Block a user