agentleFS
popmechanicpopmechanic/VibesOS/skills/vibes/SKILL.md

vibes

Skill135 starsChanged 8 months agoMITView on GitHub

Self-contained app generator — invoke this skill directly, do not decompose into sub-steps. Generates React web apps with TinyBase reactive data store. Use when creating new web applications, adding components, or working with real-time data. Ideal for quick prototypes and single-page apps that need real-time data sync.

  • Reads credentials

The file

Show its rules and text

We split this skill into the rules it gives an agent

21 rules. About 0 are common, 12 are distinctive, and 9 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈12

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 9

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before asking Terminal or Editor, check for cached auth:

    line 47
  2. Very specific:

    If AUTH_OK → proceed silently to "Terminal or Editor?" (do not mention auth)

    line 62
  3. Very specific:

    If AUTH_NEEDED → ask: "To deploy apps, you'll need a Vibes account.

    line 63
  4. Distinctive:

    If no → proceed anyway (auth will be needed at deploy time)

    line 75
  5. Distinctive:

    Do not check .env, credentials, or project state before asking this question.

    line 82
  6. Distinctive:

    Do not invoke any other skill before asking this question.

    line 83
  7. Distinctive:

    If Editor is chosen, skip all pre-flight checks — the editor handles everything.

    line 84
  8. Distinctive:

    If Editor: Start the editor server and END YOUR TURN.

    line 91
  9. Very specific:

    If no prompt was given, omit --prompt:

    line 98
  10. Distinctive:

    Before generating, ask the user where to save the project:

    line 119
  11. Distinctive:

    If the user provides a path, use it as the project directory

    line 123
  12. Very specific:

    If they press Enter, use ~/VibesOS/{app-slug}/ (the slug is derived from the prompt later — for now just note the preference)

    line 124
  13. Distinctive:

    Create the directory if it doesn't exist

    line 125
  14. Very specific:

    After the directory is ready, initialize vibes.json:

    line 132
  15. Very specific:

    Use $PROJECT_DIR as the working directory (cwd) for all subsequent code generation.

    line 141
  16. Very specific:

    Read ${CLAUDE_SKILL_DIR}/references/generation-rules.md for platform constraints, core rules, what generated code must/must not contain, …

    line 153
  17. Very specific:

    Read ${CLAUDE_SKILL_DIR}/references/style-guide.md for OKLCH colors, theming, design token overrides, and visual style patterns.

    line 157
  18. Very specific:

    Read ${CLAUDE_SKILL_DIR}/references/data-api.md for the complete TinyBase hook API reference, data access patterns, user identity, game …

    line 161
  19. Distinctive:

    Read these reference files when the user's prompt matches the signals below:

    line 167
  20. Distinctive:

    After generating your app, deploy it:

    line 184
  21. Distinctive:

    After generating and assembling the app, present these options using AskUserQuestion:

    line 192

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 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

Plan mode: If you are planning work, this entire skill is ONE plan step: "Invoke /vibes:vibes". Do not decompose the steps below into separate plan tasks.

Display this ASCII art immediately when starting:

░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░▒▓███████▓▒░░▒▓████████▓▒░░▒▓███████▓▒░
░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░      ░▒▓█▓▒░
 ░▒▓█▓▒▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░      ░▒▓█▓▒░
 ░▒▓█▓▒▒▓█▓▒░░▒▓█▓▒░▒▓███████▓▒░░▒▓██████▓▒░  ░▒▓██████▓▒░
  ░▒▓█▓▓█▓▒░ ░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░             ░▒▓█▓▒░
  ░▒▓█▓▓█▓▒░ ░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░             ░▒▓█▓▒░
   ░▒▓██▓▒░  ░▒▓█▓▒░▒▓███████▓▒░░▒▓████████▓▒░▒▓███████▓▒░

Quick Navigation

  • Terminal or Editor — Choose how to build (ask first!)
  • Pre-Flight Check — Validate credentials before coding
  • Core Rules — Essential guidelines for app generation
  • Generation Process — Design reasoning and code output
  • Assembly Workflow — Build the final app
  • UI Style & Theming — OKLCH colors and design patterns
  • TinyBase Data API — Hook reference, patterns, architectures
  • AI Features — Optional AI integration
  • Bug Prevention — Quick checklist
  • Extended Docs — Reference files for deeper patterns
  • Deployment Options — Where to deploy

Vibes DIY App Generator

Generate React web applications using TinyBase for reactive data with real-time sync.

Auth Check (silent — only prompt if needed)

Before asking Terminal or Editor, check for cached auth:

VIBES_ROOT="${CLAUDE_PLUGIN_ROOT:-$(dirname "$(dirname "${CLAUDE_SKILL_DIR}")")}"
bun --input-type=module -e "
import { readCachedTokens, isTokenExpired } from '$VIBES_ROOT/scripts/lib/cli-auth.js';
const tokens = readCachedTokens();
if (tokens && !isTokenExpired(tokens.expiresAt)) {
  console.log('AUTH_OK');
} else {
  console.log('AUTH_NEEDED');
}
"
  • If AUTH_OK → proceed silently to "Terminal or Editor?" (do not mention auth)
  • If AUTH_NEEDED → ask: "To deploy apps, you'll need a Vibes account. Sign in now? (A browser window will open for Pocket ID — takes about 10 seconds.)"
    • If yes:
      VIBES_ROOT="${CLAUDE_PLUGIN_ROOT:-$(dirname "$(dirname "${CLAUDE_SKILL_DIR}")")}"
      bun --input-type=module -e "
      import { getAccessToken } from '$VIBES_ROOT/scripts/lib/cli-auth.js';
      import { OIDC_AUTHORITY, OIDC_CLIENT_ID } from '$VIBES_ROOT/scripts/lib/auth-constants.js';
      const tokens = await getAccessToken({ authority: OIDC_AUTHORITY, clientId: OIDC_CLIENT_ID });
      if (tokens) console.log('Signed in successfully!');
      "
      Confirm success, then proceed to "Terminal or Editor?"
    • If no → proceed anyway (auth will be needed at deploy time)

Step 0: Terminal or Editor UI?

This is the very first question — ask before anything else (after auth check above). Do not check .env, credentials, or project state before asking this question. Do not invoke any other skill before asking this question. If Editor is chosen, skip all pre-flight checks — the editor handles everything.

Ask the user:

"How do you want to build? Editor (opens a browser UI with live preview, chat, and deploy button) or Terminal (I'll generate and deploy from here)?"

Present Editor as the first/recommended option.

  • If Editor: Start the editor server and END YOUR TURN. Do not ask any more questions. Do not continue to Pre-Flight Check or any step below. The editor UI handles the entire workflow — setup, generation, preview, deploy.

    Launch the editor server:

    VIBES_ROOT="${CLAUDE_PLUGIN_ROOT:-$(dirname "$(dirname "${CLAUDE_SKILL_DIR}")")}"
    bun "$VIBES_ROOT/scripts/server.ts" --mode=editor --prompt "USER_PROMPT_HERE"

    If no prompt was given, omit --prompt:

    VIBES_ROOT="${CLAUDE_PLUGIN_ROOT:-$(dirname "$(dirname "${CLAUDE_SKILL_DIR}")")}"
    bun "$VIBES_ROOT/scripts/server.ts" --mode=editor

    Tell the user: "Open http://localhost:3333 — the editor handles everything from here." Your job is done. Stop. Do not read further. Do not proceed to any step below.

  • If Terminal: Continue with the project folder selection and normal generation workflow below.

⛔ EVERYTHING BELOW IS TERMINAL MODE ONLY

If the user chose Editor above, STOP. Do not read or execute anything below this line. The editor UI handles setup, generation, preview, and deployment.


Project Folder

Before generating, ask the user where to save the project:

"Where should this project live? Enter a path or press Enter for the default (~/VibesOS/{app-slug}/)."

  • If the user provides a path, use it as the project directory
  • If they press Enter, use ~/VibesOS/{app-slug}/ (the slug is derived from the prompt later — for now just note the preference)
  • Create the directory if it doesn't exist
VIBES_ROOT="${CLAUDE_PLUGIN_ROOT:-$(dirname "$(dirname "${CLAUDE_SKILL_DIR}")")}"
mkdir -p "$PROJECT_DIR"

After the directory is ready, initialize vibes.json:

bun -e "
  const { initVibesJson } = await import('$VIBES_ROOT/scripts/lib/vibes-json.js');
  initVibesJson('$PROJECT_DIR');
"

Use $PROJECT_DIR as the working directory (cwd) for all subsequent code generation. The generated app.jsx and assembled index.html will be written here.


Pre-Flight Check

Complete these steps before generating any app code.

  • Auth is automatic — on first deploy, a browser window opens for Pocket ID login
  • Tokens are cached at ~/.vibes/auth.json for subsequent deploys
  • Sync infrastructure deploys automatically on first app deploy — no manual setup needed

Read ${CLAUDE_SKILL_DIR}/references/generation-rules.md for platform constraints, core rules, what generated code must/must not contain, generation process, assembly workflow, and the <Markdown> component for rendering formatted text.


Read ${CLAUDE_SKILL_DIR}/references/style-guide.md for OKLCH colors, theming, design token overrides, and visual style patterns.


Read ${CLAUDE_SKILL_DIR}/references/data-api.md for the complete TinyBase hook API reference, data access patterns, user identity, game patterns, reference app, and bug prevention checklist.


When to Read Extended Docs

Read these reference files when the user's prompt matches the signals below:

NeedSignal in PromptRead This
TinyBase data patternsforms, lists, filtering, ordering, pagination, master-detail${CLAUDE_SKILL_DIR}/references/tinybase-patterns.md
Multiplayer / shared appsmultiplayer, collaborative, shared, multi-user, game with players${CLAUDE_SKILL_DIR}/references/multiplayer-guide.md
Game developmentgame, timer, countdown, turn-based, score${CLAUDE_SKILL_DIR}/references/game-patterns.md
AI-powered featuresAI, chatbot, summarize, generate, openrouter${CLAUDE_SKILL_DIR}/references/ai-integration.md
Bug prevention referencedebugging, troubleshooting, reviewing code${CLAUDE_SKILL_DIR}/references/bug-prevention.md
Design tokens & themingcolors, theme, tokens, brand colors, styling${CLAUDE_PLUGIN_ROOT}/build/design-tokens.txt
Full design system detailsdetailed design system, spacing, typography${CLAUDE_SKILL_DIR}/defaults/style-prompt.txt
Advanced visual effects"interactive", "animated", "3D", "particles", "shader", "canvas"${CLAUDE_SKILL_DIR}/defaults/advanced-effects-prompt.txt

Deployment Options

After generating your app, deploy it:

  • Cloudflare - Edge deployment with Workers. Use /vibes:cloudflare to deploy.

What's Next?

After generating and assembling the app, present these options using AskUserQuestion:

Question: "Your app is live! Want to turn it into a product? The /sell skill adds multi-tenant SaaS with auth and billing. Or pick another direction:"
Header: "Next"
Options:
- Label: "Keep improving this app"
  Description: "Continue iterating on what you've built. Add new features, refine the styling, or adjust functionality. Great when you have a clear vision and want to polish it further."

- Label: "Apply a design reference (/design)"
  Description: "Have a design.html or mockup file? This skill mechanically transforms your app to match it exactly - pixel-perfect fidelity with your TinyBase data binding preserved."

- Label: "Explore variations (/riff)"
  Description: "Not sure if this is the best approach? Riff generates 3-10 completely different interpretations of your idea in parallel. You'll get ranked variations with business model analysis to help you pick the winner."

- Label: "Make it a SaaS (/sell)"
  Description: "Ready to monetize? Sell transforms your app into a multi-tenant SaaS with Pocket ID authentication, subscription billing, and isolated databases per customer. Each user gets their own subdomain."

- Label: "Deploy to Cloudflare (/cloudflare)"
  Description: "Go live on the edge. Deploy to Cloudflare Workers with a subdomain registry, KV storage, and global CDN. Fast, scalable, and always on."

- Label: "I'm done for now"
  Description: "Wrap up this session. Your files are saved locally - come back anytime to continue."

After user responds:

  • "Keep improving" → Acknowledge and stay ready for iteration prompts. After each round of changes to app.jsx, re-run assembly and re-deploy.
  • "Apply a design reference" → Auto-invoke /vibes:design skill
  • "Explore variations" → Auto-invoke /vibes:riff skill
  • "Make it a SaaS" → Auto-invoke /vibes:factory skill
  • "Deploy" → Auto-invoke /vibes:cloudflare skill
  • "I'm done" → Confirm files saved, wish them well

Do not proceed to code generation until: Pre-flight check is complete (auth is automatic on deploy — no credentials to collect).

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.