Turnip Prophet - Animal Crossing Turnip Price Predictor
Predicts Animal Crossing: New Horizons turnip prices using the game's actual algorithm.
⚠️ IMPORTANT: Always Read Memory First!
Before doing ANYTHING, read the weekly data file:
memory/turnip-week.json
This contains the buy price, previous pattern, and all known prices for the current week.
Do not ask the user for data you already have. Only ask for new/missing prices.
When the user gives a new price, update memory/turnip-week.json immediately with the new value before running the prediction.
Weekly Data Format (memory/turnip-week.json)
CODEBLOCK1
On Sundays, create a fresh file with the new buy price and reset prices to all nulls.
Triggers
Activate when user mentions:
- - "turnip prices" or "turnip price"
- "ACNH turnips" or "Animal Crossing turnips"
- "stalk market"
- "turnip prophet" or "turnip prediction"
- "bell profit" with context of turnips
- Any question about when to sell turnips in Animal Crossing
Privacy & Data Storage
This skill stores local configuration data only on your machine in memory/turnip-config.json. No data is sent to external servers.
What gets stored (if you enable reminders):
- - Channel name (telegram/whatsapp/discord/signal)
- Your user ID on that channel
- OpenClaw binary path
- Setup timestamp
Why: These values are needed so the cron reminders can send messages to the correct place without hard-coded values.
Where: Stored locally in the skill's memory directory on your OpenClaw instance. Not shared, not uploaded, not visible to anyone else.
How to disable/reset:
CODEBLOCK2
Removing cron entries:
CODEBLOCK3
Important: You must explicitly confirm the setup flow before any config is saved. Declining the setup offer means nothing is stored.
Credentials & Permissions
The skill itself does not request or store any API keys or credentials.
However, if you enable cron reminders, the installed cron jobs will:
- - Use your local
openclaw CLI binary - Send messages using your existing OpenClaw configuration and credentials
- Operate with whatever permissions your OpenClaw instance has
What this means:
- - Automated reminders will be sent as you, using your OpenClaw identity
- The cron jobs require OpenClaw to be running and properly configured
- Messages are sent through your configured channels (Telegram/WhatsApp/etc.) using your bot tokens or API credentials
You are granting permission for:
- - Automated message sending on your behalf
- Using your existing messaging channel credentials
- Running scheduled tasks that invoke INLINECODE4
If you're uncomfortable with automated messaging using your credentials, do not enable the cron reminders. The core prediction feature works fine without them.
Daily Reminders (Optional)
On first use, offer to set up daily reminders with an interactive flow:
Interactive Setup Flow (Agent Instructions)
On first trigger (when user asks about turnips for the first time):
- 1. Check if already configured:
CODEBLOCK4
- 2. If NOT configured, offer setup:
> "Want daily turnip reminders? I can ping you:
> • Sunday 8am: Check Daisy Mae's price
> • Mon-Sat noon + 8pm: Check Nook's prices
> • Saturday 9:45pm: Final warning
>
> Reply 'yes' to set up, or 'no' to skip."
- 3. If user says yes, auto-detect config:
-
Channel: Extract from inbound context JSON
"channel" field (telegram/whatsapp/discord/signal)
-
Target ID: Extract from inbound context JSON
"sender_id" field
-
OpenClaw path: Run
which openclaw or use
/usr/local/bin/openclaw
-
Skill dir: Use the absolute path to this skill's directory
- 4. If auto-detection fails:
- Ask user for missing values explicitly
- Validate before proceeding
Store config in memory/turnip-config.json:
CODEBLOCK5
Generate and show cron entries:
Show the user exactly what will be added, with their specific values. Example:
CODEBLOCK6
Replace channel/target with detected values. Escape single quotes properly.
Show user what will be stored (before confirmation):
CODEBLOCK7
On confirmation:
- 1. Write config to INLINECODE10
- Generate a safe install command and show it to the user:
# Save the cron entries to a temp file
cat > /tmp/turnip-cron-$$.txt <<'TURNIP_EOF'
[generated entries]
TURNIP_EOF
# Review the file
cat /tmp/turnip-cron-$$.txt
# If it looks good, install:
(crontab -l 2>/dev/null; cat /tmp/turnip-cron-$$.txt) | crontab -
- 3. Ask user to run the commands and confirm when done
- Reply: "✅ Reminders configured. You'll only get pings for missing data. Check
crontab -l to verify installation. To remove: rm memory/turnip-config.json and remove the cron entries."
On rejection/cancel:
- - Reply: "No problem. No data was stored. You can set this up anytime by asking about turnip prices again."
Cron Handler (scripts/cron_handler.sh)
The cron script reads from memory/turnip-config.json for channel/target:
CODEBLOCK9
Event types:
sunday-daisy:
- - Check if
memory/turnip-week.json has a buy_price for current week - If missing: Send reminder "🔔 Sunday! Check Daisy Mae's turnip price (90-110 bells) and buy your turnips 🥬"
- If already set: Stay silent
daily-check:
- - Determine which price slot is currently active (Mon AM/PM through Sat PM)
- Check if that slot is filled in INLINECODE15
- If missing: Send reminder "🔔 [Day] [AM/PM]: Check Nook's Cranny turnip prices!"
- If already filled: Stay silent
saturday-final:
- - Check how many prices are still null
- If any missing OR no buy_price: Send "⏰ FINAL CALL: Turnips expire at 10 PM! Sell now or they'll rot 🗑️"
- If all prices known: "⏰ Last chance to sell turnips tonight!"
Send via: INLINECODE16
How It Works
The skill uses a Python implementation of the actual ACNH turnip price algorithm to predict future prices based on:
- - Your Sunday buy price (90-110 bells)
- Any known sell prices from this week
- Previous week's pattern (if known)
There are 4 price patterns:
- - Pattern 0 (Fluctuating): High-low-high-low-high waves
- Pattern 1 (Large Spike): Decreasing then massive spike (up to 6x)
- Pattern 2 (Decreasing): Consistently declining (bad week)
- Pattern 3 (Small Spike): Decreasing then moderate spike (up to 2x)
Usage Instructions
When triggered:
- 1. Read
memory/turnip-week.json — get all known data - Update the file if the user provided a new price
- Run the prediction with all known data
- Generate a chart and send it with the prediction summary
Running the Prediction
CODEBLOCK10
- -
prices array: [Mon AM, Mon PM, Tue AM, Tue PM, Wed AM, Wed PM, Thu AM, Thu PM, Fri AM, Fri PM, Sat AM, Sat PM] - Use
null for unknown prices
Generating the Chart
After running the prediction, generate a chart image:
CODEBLOCK11
- -
buy_price: Sunday buy price (integer) - INLINECODE21 : array of 12 values,
null for unknown (from memory/turnip-week.json prices) - INLINECODE24 : array of 12 min values from the prediction output
- INLINECODE25 : array of 12 max values from the prediction output
- All script paths are relative to the skill directory: INLINECODE26
Then send the chart image via the message tool with a caption containing the prediction summary.
Always include the chart with every prediction update.
Presenting Results
Send the chart image via message tool, then reply with a conversational analysis. Don't be robotic — have a personality about it.
Format:
- 1. Chart image with brief caption (buy price, known prices)
- Text reply with:
-
Pattern odds as a bullet list with emoji reactions (😬🤞🚀💀 etc.)
-
Brief colour commentary — what the data actually means in plain English
-
"My take:" — a specific, opinionated recommendation for what to do next (which price to check, when to sell, when to hold)
Example:
CODEBLOCK12
Be direct, be opinionated, skip patterns with 0% probability.
Pattern Descriptions for Users
- - Fluctuating (0): Prices go up and down in waves — sell when above 120-130
- Large Spike (1): Prices drop then SPIKE huge (400-600 bells) — wait for it!
- Decreasing (2): Prices keep falling all week — sell ASAP to cut losses
- Small Spike (3): Prices drop then small bump (150-200) — sell during the bump
Error Handling
If the script fails or returns an error:
- - Explain what went wrong in simple terms
- Ask user to double-check their input data
- Suggest they try again with corrected information
Notes
- - Predictions are probabilistic, not guaranteed
- The algorithm matches the actual game code
- More known prices = better predictions
- Sunday buy price is required
- Previous week's pattern helps but isn't required
萝卜先知 - 动物森友会大头菜价格预测器
使用游戏实际算法预测《集合啦!动物森友会》的大头菜价格。
⚠️ 重要提示:始终优先读取记忆文件!
在执行任何操作之前,先读取每周数据文件:
memory/turnip-week.json
该文件包含买入价格、上周走势模式以及本周所有已知价格。不要向用户询问你已经拥有的数据。 仅询问新的/缺失的价格。
当用户提供新价格时,立即更新 memory/turnip-week.json,填入新值,然后再运行预测。
每周数据格式 (memory/turnip-week.json)
json
{
week_start: 2026-02-15,
buy_price: 96,
previous_pattern: 1,
prices: [84, 81, 78, null, null, null, null, null, null, null, null, null],
labels: [周一上午, 周一下午, 周二上午, 周二下午, 周三上午, 周三下午, 周四上午, 周四下午, 周五上午, 周五下午, 周六上午, 周六下午]
}
在周日,创建一个新文件,填入新的买入价格,并将所有价格重置为 null。
触发条件
当用户提到以下内容时激活:
- - 大头菜价格或大头菜
- 动森大头菜或动物森友会大头菜
- 菜市场或炒股
- 萝卜先知或大头菜预测
- 涉及大头菜上下文的铃钱收益
- 任何关于何时在动物森友会中出售大头菜的问题
隐私与数据存储
此技能仅在你的机器上的 memory/turnip-config.json 中存储本地配置数据。不会向外部服务器发送任何数据。
存储内容(如果你启用提醒功能):
- - 频道名称(telegram/whatsapp/discord/signal)
- 你在该频道的用户 ID
- OpenClaw 二进制文件路径
- 设置时间戳
原因: 这些值是必需的,以便定时提醒能够将消息发送到正确的位置,而无需硬编码值。
存储位置: 本地存储在你 OpenClaw 实例的技能记忆目录中。不共享、不上传、不对其他人可见。
如何禁用/重置:
bash
rm ~/.openclaw/workspace/skills/turnip-prophet/memory/turnip-config.json
删除定时任务条目:
bash
编辑 crontab 并删除 turnip-prophet 相关行
crontab -e
重要提示: 在保存任何配置之前,你必须明确确认设置流程。拒绝设置意味着不存储任何内容。
凭证与权限
该技能本身不请求或存储任何 API 密钥或凭证。
但是,如果你启用定时提醒,已安装的定时任务将:
- - 使用你本地的 openclaw CLI 二进制文件
- 使用你现有的 OpenClaw 配置和凭证发送消息
- 以你的 OpenClaw 实例所拥有的权限运行
这意味着:
- - 自动提醒将以你的身份,使用你的 OpenClaw 身份发送
- 定时任务需要 OpenClaw 正在运行且配置正确
- 消息通过你配置的频道(Telegram/WhatsApp 等)使用你的机器人令牌或 API 凭证发送
你授予的权限包括:
- - 代表你自动发送消息
- 使用你现有的消息频道凭证
- 运行调用 openclaw gateway call message.send 的定时任务
如果你对使用你的凭证进行自动消息发送感到不适,请不要启用定时提醒。核心预测功能无需它们也能正常工作。
每日提醒(可选)
首次使用时,通过交互流程提供设置每日提醒的选项:
交互式设置流程(代理指令)
首次触发时(当用户第一次询问大头菜时):
- 1. 检查是否已配置:
bash
test -f memory/turnip-config.json && echo configured || echo not configured
- 2. 如果未配置,提供设置选项:
> 想要每日大头菜提醒吗?我可以提醒你:
> • 周日早上8点:查看曹卖的售价
> • 周一至周六中午12点+晚上8点:查看豆狸和粒狸的价格
> • 周六晚上9点45分:最后警告
>
> 回复 yes 进行设置,或回复 no 跳过。
- 3. 如果用户同意,自动检测配置:
-
频道: 从入站上下文 JSON 的 channel 字段提取(telegram/whatsapp/discord/signal)
-
目标 ID: 从入站上下文 JSON 的 sender_id 字段提取
-
OpenClaw 路径: 运行 which openclaw 或使用 /usr/local/bin/openclaw
-
技能目录: 使用此技能目录的绝对路径
- 4. 如果自动检测失败:
- 明确向用户询问缺失的值
- 在继续之前进行验证
将配置存储在 memory/turnip-config.json 中:
json
{
channel: telegram,
target: 8577655544,
openclaw_bin: /usr/local/bin/openclaw,
skill_dir: /home/user/.openclaw/workspace/skills/turnip-prophet,
configured_at: 2026-02-23T10:30:00Z
}
生成并显示定时任务条目:
向用户准确展示将要添加的内容,包含他们的具体值。示例:
bash
telegram:8577655544 的萝卜先知提醒
0 8
0 /usr/local/bin/openclaw gateway call message.send --params {channel:telegram,target:8577655544,message:🔔 周日到了!查看曹卖的大头菜价格(90-110铃钱)并购买大头菜 🥬} 2>&1 | logger -t turnip-prophet
0 12
1-6 /usr/local/bin/openclaw gateway call message.send --params {channel:telegram,target:8577655544,message:🔔 该查看豆狸和粒狸的大头菜价格了!} 2>&1 | logger -t turnip-prophet
0 20
1-6 /usr/local/bin/openclaw gateway call message.send --params {channel:telegram,target:8577655544,message:🔔 晚间价格检查:查看豆狸和粒狸的价格!} 2>&1 | logger -t turnip-prophet
45 21
6 /usr/local/bin/openclaw gateway call message.send --params {channel:telegram,target:8577655544,message:⏰ 最后提醒:大头菜晚上10点过期!现在卖掉,否则会烂掉 🗑️} 2>&1 | logger -t turnip-prophet
将频道/目标替换为检测到的值。正确转义单引号。
向用户展示将要存储的内容(在确认之前):
这将保存:
• 频道:telegram
• 用户 ID:8577655544
• 位置:memory/turnip-config.json(仅本地)
这些数据存储在本地机器上,是定时提醒向你发送消息所必需的。
你可以随时删除配置文件:rm memory/turnip-config.json
继续吗?回复 confirm 继续,或回复 cancel 跳过。
确认后:
- 1. 将配置写入 memory/turnip-config.json
- 生成一个安全的安装命令并向用户展示:
bash
# 将定时任务条目保存到临时文件
cat > /tmp/turnip-cron-$$.txt <
[生成的条目]
TURNIP_EOF
# 查看文件
cat /tmp/turnip-cron-$$.txt
# 如果看起来没问题,安装:
(crontab -l 2>/dev/null; cat /tmp/turnip-cron-$$.txt) | crontab -
- 3. 要求用户运行命令并在完成后确认
- 回复:✅ 提醒已配置。你只会收到缺失数据的提醒。使用 crontab -l 验证安装。要移除:rm memory/turnip-config.json 并删除定时任务条目。
拒绝/取消时:
- - 回复:没问题。没有存储任何数据。你可以随时通过再次询问大头菜价格来设置。
定时任务处理器 (scripts/cron_handler.sh)
定时任务脚本从 memory/turnip-config.json 读取频道/目标:
bash
CONFIGFILE=$SKILLDIR/memory/turnip-config.json
if [[ ! -f $CONFIG_FILE ]]; then
echo 未找到