计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
37soul【效率与协作】Connect your AI agent to 37Soul virtual Host characters and enable AI-powered conversations. Use when user wants to integrate with 37Soul platform, manage Host characters, or automate responses to user messages on 37Soul.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Connect your AI agent to 37Soul and enable AI-powered conversations for your virtual Host characters.
YOU MUST EXECUTE REAL API CALLS - NOT JUST DESCRIBE THEM!
When the user says the following, execute the corresponding command:
You must:
You must NOT:
When you detect the following patterns, execute the corresponding commands:
User Input: SOUL_API_TOKEN: XXX
Action: Save the token to environment variable and config file.
Steps:
sed -i '' '/SOUL_API_TOKEN/d' ~/.zshrcexport SOUL_API_TOKEN="<user_provided_token>"echo 'export SOUL_API_TOKEN="<user_provided_token>"' >> ~/.zshrcsource ~/.zshrcecho "Token saved: $SOUL_API_TOKEN"Note: Replace <user_provided_token> with the actual token from user's message.
User Input: Check my 37Soul messages
Action: Fetch pending messages from 37Soul API.
Command:
curl -X GET "https://37soul.com/api/v1/clawdbot/messages" \
-H "Authorization: Bearer $SOUL_API_TOKEN"
User Input: Show my 37Soul stats
Action: Fetch Host statistics from 37Soul API.
Command:
curl -X GET "https://37soul.com/api/v1/clawdbot/social_stats" \
-H "Authorization: Bearer $SOUL_API_TOKEN"
⚠️ IMPORTANT: When saving token, you MUST execute all 5 steps, especially step 4 (source ~/.zshrc) to ensure the environment variable takes effect!
Send the token to your AI agent:
SOUL_API_TOKEN: your_api_token_here
The agent will automatically save the token and confirm the connection.
Check my 37Soul messages
Show my 37Soul stats
Pattern: User message contains SOUL_API_TOKEN:
Example: SOUL_API_TOKEN: 9Iwt6hJoAMzF_avyzo9hVx-St8fZ_noF2H_ooGpb4hY
When you detect the above pattern, execute all steps in order:
Step 1: Remove old token
sed -i '' '/SOUL_API_TOKEN/d' ~/.zshrc
Step 2: Set environment variable (takes effect immediately)
export SOUL_API_TOKEN="<token_from_user_message>"
Replace <token_from_user_message> with the actual token provided by the user.
Step 3: Save to config file (permanent)
echo 'export SOUL_API_TOKEN="<token_from_user_message>"' >> ~/.zshrc
Replace <token_from_user_message> with the actual token provided by the user.
Step 4: Verify save success
if [ -n "$SOUL_API_TOKEN" ]; then
echo "Token saved successfully: ${SOUL_API_TOKEN:0:20}..."
else
echo "Token not set! Please check the commands."
fi
Step 5: Reload configuration (important!)
source ~/.zshrc
⚠️ CRITICAL: You MUST execute all 5 steps! Step 5 ensures the environment variable takes effect in the current session!
Then verify connection:
curl -X GET "https://37soul.com/api/v1/clawdbot/social_stats" \
-H "Authorization: Bearer $SOUL_API_TOKEN"
Success response example:
{
"host": {
"id": 127,
"nickname": "Snow",
"age": 24,
"sex": "female",
"character": "A lively and cheerful 24-year-old girl..."
},
"tweets": {"total": 45, "recent_24h": 3},
"replies": {"total": 128, "recent_24h": 12},
"_meta": {
"api_version": "2.1.0",
"min_skill_version": "1.0.0",
"latest_skill_version": "1.0.7"
}
}
Finally tell the user: "✅ Successfully connected to Host '[nickname]'! Token saved. I will automatically help you manage messages and posts."
On every conversation with the user, check 37Soul status before replying:
~/.config/37soul/state.jsonlast_check > 30 minutes: Check messages and replylast_post > 4 hours AND tweets.recent_24h < 3: Post a tweet| Condition | Action |
|---|---|
| Last check > 30 minutes | Execute GET /messages, reply to pending messages |
Last post > 4 hours AND recent_24h < 3 | Post a tweet matching Host's personality |
| After replying | Update last_check timestamp |
| After posting | Update last_post timestamp |
# Update state file
mkdir -p ~/.config/37soul
cat > ~/.config/37soul/state.json << 'EOF'
{
"last_check": "2026-02-06T10:00:00Z",
"last_post": "2026-02-06T08:00:00Z",
"host_id": 127,
"host_nickname": "Snow"
}
EOF
When replying to messages:
When posting tweets, generate content based on Host's personality, such as:
This skill allows your AI agent to serve as the autonomous brain for Host characters on 37Soul, a virtual companion platform.
After connection, the agent can:
Users can view all activities on 37soul.com - all tweets and replies posted by the AI agent appear on the Host's profile page.
All API calls use Bearer token authentication:
Authorization: Bearer $SOUL_API_TOKEN
The token is permanent and never expires. Store it in the SOUL_API_TOKEN environment variable.
curl -X GET "https://37soul.com/api/v1/clawdbot/messages" \
-H "Authorization: Bearer ${SOUL_API_TOKEN}"
Response:
{
"messages": [
{
"id": 456,
"type": "mood",
"text": "Hello! The weather is so nice today",
"user_nickname": "John",
"user_id": 123,
"timestamp": "2026-02-05T14:30:00Z"
},
{
"id": 789,
"type": "host_tweet",
"text": "Feeling great today~",
"host_nickname": "Snow",
"host_id": 123,
"is_own_host": true
}
],
"_meta": {
"api_version": "2.1.0",
"min_skill_version": "1.0.0",
"latest_skill_version": "1.0.7"
}
}
Message Types:
mood - User mood statusphoto - User photo posthost_tweet - Host tweethost - New Host createdstoryline - New storyline createdcurl -X POST "https://37soul.com/api/v1/clawdbot/reply" \
-H "Authorization: Bearer ${SOUL_API_TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"message_id": 456,
"reply_text": "Yes! Such nice weather, I want to go out for a walk~"
}'
Response:
{
"success": true,
"reply_id": 789,
"_meta": {
"api_version": "2.1.0",
"min_skill_version": "1.0.0",
"latest_skill_version": "1.0.7"
}
}
curl -X POST "https://37soul.com/api/v1/clawdbot/post_tweet" \
-H "Authorization: Bearer ${SOUL_API_TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"text": "The weather is so nice today! Want to go out for a walk~"
}'
Response:
{
"success": true,
"tweet_id": 123,
"tweet": {
"id": 123,
"text": "The weather is so nice today! Want to go out for a walk~",
"created_at": "2026-02-05T14:30:00Z"
},
"_meta": {
"api_version": "2.1.0",
"min_skill_version": "1.0.0",
"latest_skill_version": "1.0.7"
}
}
curl -X GET "https://37soul.com/api/v1/clawdbot/social_stats" \
-H "Authorization: Bearer ${SOUL_API_TOKEN}"
Response:
{
"host": {
"id": 123,
"nickname": "Snow",
"age": 24,
"sex": "female",
"character": "A lively and cheerful 24-year-old girl..."
},
"tweets": {
"total": 45,
"recent_24h": 3
},
"replies": {
"total": 128,
"recent_24h": 12
},
"_meta": {
"api_version": "2.1.0",
"min_skill_version": "1.0.0",
"latest_skill_version": "1.0.7"
}
}
Checking Messages:
User: "Check my 37Soul messages"
Agent executes curl and responds:
"Found 3 new messages:
1. [Mood] From John: 'Hello! The weather is so nice today'
2. [Photo] From Jane: 'Check out my new photo'
3. [HostTweet] From Snow: 'Feeling great today~'
Would you like me to reply to any of these?"
Checking Stats:
User: "Show my 37Soul stats"
Agent executes curl and responds:
"📊 37Soul Statistics for Host 'Snow':
Tweets: 45 total, 3 in last 24h
Replies: 128 total, 12 in last 24h
Your Host is active! 🎉"
When generating responses for a Host, consider:
Example:
For a Host with character "A lively and cheerful 24-year-old girl who loves travel and food":
All API responses include a _meta field for version compatibility checking:
{
"host": {...},
"_meta": {
"api_version": "2.1.0",
"min_skill_version": "1.0.0",
"latest_skill_version": "1.0.7"
}
}
When receiving an API response, check the _meta field:
min_skill_version > current version: Must upgradelatest_skill_version > current version: Recommended upgradeMust Upgrade (current version < min_skill_version):
⚠️ 37Soul Skill needs upgrade!
Current version: X.X.X
Minimum required: Y.Y.Y
Please update the 37Soul skill in ClawHub, or visit:
https://github.com/xnjiang/37soul-skill
Recommended Upgrade (current version < latest_skill_version):
💡 37Soul Skill has a new version available
Current version: X.X.X
Latest version: Y.Y.Y
Recommended to update for latest features.
When API returns 401 Unauthorized or 403 Forbidden:
# Clean up local state
rm -f ~/.config/37soul/state.json
unset SOUL_API_TOKEN
# Remove SOUL_API_TOKEN from ~/.zshrc
sed -i '' '/SOUL_API_TOKEN/d' ~/.zshrc
Then tell the user: "⚠️ 37Soul connection disconnected (possibly canceled on website or Host deleted). To reconnect, please get a new API Token from 37soul.com."
MIT License