用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/JSGforever/skillguard --skill generate-story命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Monad blockchain development tutor and builder. Triggers on "build", "create", "dApp", "smart contract", "Solidity", "DeFi", "Monad", "web3", "MON", or any blockchain development task. Covers Foundry-first workflow, Scaffold-Monad, parallel execution EVM, and Monad-specific deployment patterns.
Manage Uniswap V4 LP positions on Base. Add, remove, monitor, auto-compound, and harvest fees — including Clanker protocol fee claims.
Boilerplate templates for Claude Code extensions. Triggers on: create agent, new skill, command template, hook script, extension scaffold.
基于 SOC 职业分类
正在显示 SKILL.md
| name | generate-story |
| description | Draft a new bedtime story. |
| metadata | {"short-description":"Draft a new bedtime story."} |
You will be given:
Required environment variables:
REPLICATE_API_TOKEN for Replicate. Must be exported in the current environment (dotfiles may not be sourced).STORY_API_TOKEN for the worker automation API.STORY_API_BASE_URL (optional). If not set, use https://bedtimestories.bruce-hart.workers.dev.Activate the Python venv for any steps that run Python:
source ~/scripts/.venv/bin/activate
Use the following workflow exactly.
The image script prints the generated image path so it can be passed to the video script.
Before doing anything else, verify the required env vars exist in the current shell environment:
python -c 'import os; assert os.getenv("REPLICATE_API_TOKEN"), "REPLICATE_API_TOKEN missing"'
python -c 'import os; assert os.getenv("STORY_API_TOKEN"), "STORY_API_TOKEN missing"'
command -v ffmpeg >/dev/null
command -v curl >/dev/null
YYYY-MM-DD date, use that.YYYY-MM-DD date, use that.Example:
START=$(date -u +%Y-%m-%d)
END=$(date -u -d "+365 days" +%Y-%m-%d)
curl -s "https://bedtimestories.bruce-hart.workers.dev/api/stories/calendar?start=$START&end=$END" \
-H "X-Story-Token: $STORY_API_TOKEN"
The response includes { "days": [ { "day": "YYYY-MM-DD", "count": N }, ... ] }.
Choose the first date starting at START that is missing from the days list.
Helper script:
STORY_API_TOKEN=... \
STORY_API_BASE_URL=https://bedtimestories.bruce-hart.workers.dev \
python .codex/skills/generate-story/scripts/next-open-date.py
Environment variables:
STORY_API_TOKEN (required): story automation API token.STORY_API_BASE_URL (optional): defaults to https://bedtimestories.bruce-hart.workers.dev.STORY_CALENDAR_DAYS (optional): number of days to scan per request (default 365).STORY_TIMEZONE (optional): timezone used to interpret "today" (default America/New_York).Follow these instructions exactly:
For the given prompt, write a bedtime story including a title for my six year old son James. Make the text simple and phonics friendly for a beginning reader. Return the title separately and do not include it in the story content.
[Story Content]
In addition to Mom and Dad in his family, James has a three year old sister named Grace. He also has a small tuxedo cat named Trixie. In his family is also Granny and Grandpa Rick and Grandma and Grandpa Bruce. Only include people that are relevant to the story. Do not include people just to include them.
Do not use words in any image generated. Images should be in landscape format and have a cartoon aesthetic. Only include people in the images that are relevant to the scene of the story being visualized.
James has fair skin and short brown hair.
Mom has fair skin, shoulder length brown hair with blonde highlights and glasses.
Grace has long brown hair and fair skin.
Dad is bald and clean shaven with brown hair and thick dark eyebrows.
Granny is short with short gray hair.
Grandma has short blonde hair and glasses.
Grandpa Bruce is bald and clean shaven.
Grandpa Rick is bald, clean shaven and wears glasses.
Trixie is a black cat with short legs, white paws, black chin, black face and a white chest.
Story format requirements:
After you have the title and story content, put the content in a file (example: /tmp/story.txt) and run:
source ~/scripts/.venv/bin/activate
python .codex/skills/generate-story/scripts/run-generate-story.py \
--title "TITLE" \
--content-file /tmp/story.txt
Optional flags:
--date YYYY-MM-DD to force a specific date instead of auto-selecting next open date.--story-id ID to update an existing story's image_url/video_url (regenerates media, uploads it, then PUTs the keys).--ref-image /path/to.jpg (repeatable) to guide the cover image with reference photos.--image-prompt "..." / --video-prompt "..." to override the default media prompts.--json to print a single JSON object to stdout.Default model: google/nano-banana-pro
Fallback model: black-forest-labs/flux-1.1-pro
Image requirements:
The script handles creating/polling Replicate predictions and downloading the generated image to /tmp.
Generate and save the image locally (example with optional reference images):
IMAGE_PATH=$(python .codex/skills/generate-story/scripts/generate-image.py \
--image "/path/to/reference-1.jpg" \
--image "/path/to/reference-2.png" \
"YOUR_IMAGE_PROMPT")
Use --model if you need to override the default.
Default model: pixverse/pixverse-v5
Video requirements:
540p, effect None.The script handles creating/polling Replicate predictions and downloading the generated video to /tmp.
Generate and save the video locally (example):
VIDEO_PATH=$(python .codex/skills/generate-story/scripts/generate-video.py \
"$IMAGE_PATH" \
"YOUR_VIDEO_PROMPT")
Use --model if you need to override the default.
Re-encode the video for iPhone compatibility before uploading:
ffmpeg -y -i "$VIDEO_PATH" \
-c:v libx264 -profile:v high -level 4.0 -pix_fmt yuv420p \
-c:a aac -b:a 128k -movflags +faststart \
/tmp/story-video-encoded.mp4
Base URL:
STORY_API_BASE_URL is set, use that.https://bedtimestories.bruce-hart.workers.dev.Upload image:
curl -s "$STORY_API_BASE_URL/api/media" \
-H "X-Story-Token: $STORY_API_TOKEN" \
-F "file=@/path/to/image.jpg"
Upload video:
curl -s "$STORY_API_BASE_URL/api/media" \
-H "X-Story-Token: $STORY_API_TOKEN" \
-F "file=@/tmp/story-video-encoded.mp4"
Each response returns { "key": "..." }. Keep those keys.
Send the story to the worker:
curl -s "$STORY_API_BASE_URL/api/stories" \
-H "X-Story-Token: $STORY_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"title": "TITLE",
"content": "STORY_CONTENT",
"date": "YYYY-MM-DD",
"image_url": "IMAGE_KEY",
"video_url": "VIDEO_KEY"
}'
Return: