agentleFS
marketcallsmarketcalls/story-telling/.claude/skills/story-setup/SKILL.md

story-setup

Skill4 starsChanged 3 months agoMITView on GitHub

Set up the story-telling environment. Checks Node, installs dependencies, creates .env from the template, verifies the Sarvam, fal and OpenAI keys, and confirms all Remotion packages are on one version.

  • Reads credentials
  • Installs packages
  • Sends data out

5 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use story-deslop, story-long-write and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • XiaoyangySkill

    story-deslop

    网文去AI味。检测并清除文本中的AI写作痕迹,让文字回归自然、非模板化。触发方式:/story-deslop、/去AI味、「去AI味」「这篇太AI了」「网文去AI味」。

    Also in 5 projects that use this

  • XiaoyangySkill

    story-long-write

    长篇网文写作方法论与 novel-studio pipeline 适配器。用于把长篇开书、大纲、日更、续写、重写等需求整理为 pipeline 输入;在 novel-studio 内禁止直接生成正文。触发方式:/story-long-write、/写长篇、「帮我开书」「写大纲」「日更」「续写」「继续写」「修改第X章」「回炉」「重写第X章」。

    Also in 5 projects that use this

  • worldwondererSkill

    story-cover

    小说封面生成与提示词设计。根据书名、作者名和题材构建封面提示词;用户只要提示词时不生图,要求封面图时调用 GPT-Image-2,Codex CLI 优先使用内置 ImageGen。触发方式:/story-cover、/封面、「帮我做个封面」「生成封面图」「封面提示词」「封面设计」。

    Also in 4 projects that use this

  • worldwondererSkill

    story-import

    逆向导入已有小说。将已写好的小说(半成品或完本)反向解析为标准项目目录结构,兼容 story-long-write / story-short-write 后续写作流程;内部复用 story-long-analyze / story-short-analyze 的拆解管道,按篇幅自动分流。触发方式:/story-import、「导入小说」「反向解析」「导入」「把我的书导进来」。

    Also in 4 projects that use this

  • badgidsSkill

    story-review

    Diagnose existing prose at a chosen editorial level, from whole-story and developmental problems through scene, line, copy, and proof passes, without rewriting until the diagnosis is accepted.

    Also in 5 projects that use this

  • linuxhsjSkill

    browser-cdp

    Control a browser via Chrome DevTools Protocol (CDP) proxy. Use when: (1) navigating to URLs and reading page content, (2) taking screenshots, (3) executing JavaScript in the browser, (4) clicking elements or filling forms, (5) searching and installing Chrome Web Store extensions, (6) interacting with web APIs that require a real browser. NOT for: simple HTTP requests (use curl), local file operations, or when no CDP proxy is available.

    Also in 4 projects that use this

  • +2 more from Xiaoyangy
  • +3 more from worldwonderer

The file

We split this skill into the rules it gives an agent

7 rules. About 0 are common, 4 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If it is missing, look one level down as well, in case it was fetched before:

    line 29
  2. Distinctive:

    If the current directory is already the project, skip all of this.

    line 49
  3. Very specific:

    If .env does not exist, copy the template and tell the user which keys to fill in:

    line 69
  4. Very specific:

    Never write a real key into .env.example, into a skill file, or into .claude/settings.local.json.

    line 76
  5. Distinctive:

    Do this before any long run: a bad key discovered after twelve images is an expensive way to find out.

    line 95
  6. Distinctive:

    Never print a key value back to the user or into a log.

    line 115
  7. Very specific:

    Every @remotion/* package must report the same version, with the matching mediabunny.

    line 123

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Prepare the project so story-new and story-render can run without surprises.

Arguments

  • $0 = project directory (optional, default: current directory)

Steps

Step 0: Bootstrap the project if it is not here

The skills carry the craft: the rules, the schema and the story templates. The pipeline they drive, cli/ and src/, lives in the project repo. When someone installs only the skills with npx skills add, that pipeline is missing and has to be fetched once.

Detect it:

test -f cli/generate.ts && test -f src/Root.tsx && echo "project present" || echo "project missing"

If it is missing, look one level down as well, in case it was fetched before:

test -f story-telling/cli/generate.ts && echo "project in ./story-telling"

Still missing, fetch it. Tell the user what is about to be downloaded and where, then run one of these from the directory they want it in:

# Preferred: no git history, small download
npx --yes degit marketcalls/story-telling story-telling

# Fallback if degit is unavailable
git clone --depth 1 https://github.com/marketcalls/story-telling story-telling

Then cd story-telling and continue with Step 1. Everything after this point runs from the project root, the directory holding package.json.

If the current directory is already the project, skip all of this.

Step 1: Check Node

node --version
npm --version

Node 20 or newer is required. Neither bun nor ffmpeg is needed: the CLI runs through npx tsx, and durations are measured with @remotion/media-parser.

Step 2: Install dependencies

npm install

Step 3: Create .env

If .env does not exist, copy the template and tell the user which keys to fill in:

cp .env.example .env

Never write a real key into .env.example, into a skill file, or into .claude/settings.local.json. If an existing key is found in any tracked file, stop and tell the user to rotate it.

Required:

  • SARVAM_API_KEY from sarvam.ai, for narration
  • FAL_KEY from fal.ai, for images

Optional:

  • OPENAI_API_KEY, only for npm run draft. Writing story.json by hand skips it entirely.

cli/env.ts also reads a .env in the parent folder, so a shared key file one level up works. SARVAM_KEY is accepted as an alias for SARVAM_API_KEY.

Step 4: Verify the keys

Do this before any long run: a bad key discovered after twelve images is an expensive way to find out.

set -a && . ./.env && set +a

# OpenAI, expect 200
curl -s -o /dev/null -w "openai %{http_code}\n" https://api.openai.com/v1/models \
  -H "Authorization: Bearer $OPENAI_API_KEY"

# Sarvam, expect 200
curl -s -o /dev/null -w "sarvam %{http_code}\n" -X POST https://api.sarvam.ai/text-to-speech \
  -H "api-subscription-key: $SARVAM_API_KEY" -H "Content-Type: application/json" \
  -d '{"text":"key test","language_code":"en-IN","speaker":"shubh","model":"bulbul:v3"}'

# fal, expect IN_QUEUE then a validation error on the missing prompt, which costs nothing
curl -s -X POST https://queue.fal.run/fal-ai/flux-2-pro \
  -H "Authorization: Key $FAL_KEY" -H "Content-Type: application/json" -d '{}' | head -c 120

Never print a key value back to the user or into a log.

Step 5: Check the Remotion install

npx remotion versions

Every @remotion/* package must report the same version, with the matching mediabunny. A mixed install fails at bundling with export 'Logging' was not found in 'mediabunny'. Fix with:

npx remotion upgrade
npm install <the exact list it prints>

Step 6: Typecheck and smoke test

npm run typecheck
npx remotion compositions

compositions should list one composition per story folder under public/. The shipped example prints Jhunjhunwala 30 1920x1080 1760 (58.67 sec), though its media files are gitignored, so a fresh clone shows the story with no assets until it is regenerated.

Step 7: Report

Tell the user:

  • Node and npm versions found
  • Whether .env was created or already existed, and which keys are missing
  • Result of each key check, as a status code, never the key
  • Whether Remotion versions are aligned
  • The exact next command, for example npm run story -- --slug my-story --context ./article.md --seconds 60

Example usage

/story-setup /story-setup ./story-telling

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.