heymegabyte/agent-skills / 06-build-and-slice-loop
build-and-slice-loop
VerifiedUse when implementing features or streaming OnePrompt site builds. Complete vertical slices with real content, strict TypeScript and Zod. Parallel section/data work, deterministic assembly, granular patches and immediate valid previews.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 7.2 KB |
| admin-dashboard.md | markdown | 5.5 KB |
| ai-chat-widget.md | markdown | 6.0 KB |
| blog-and-content-engine.md | markdown | 6.2 KB |
| build-breaking-rules.md | markdown | 7.4 KB |
| chat-native-dashboard.md | markdown | 3.6 KB |
| contact-forms-and-endpoints.md | markdown | 6.7 KB |
| copilot-and-ai-features.md | markdown | 7.4 KB |
| custom-error-pages.md | markdown | 4.5 KB |
| data-tables.md | markdown | 7.7 KB |
| domain-provisioning.md | markdown | 4.6 KB |
| easter-eggs.md | markdown | 4.7 KB |
| empty-states-and-loading.md | markdown | 5.7 KB |
| file-uploads-and-storage.md | markdown | 6.7 KB |
| internationalization.md | markdown | 4.3 KB |
| keyboard-shortcuts-and-command-palette.md | markdown | 6.7 KB |
| microcopy-library.md | markdown | 8.0 KB |
| notification-center.md | markdown | 8.4 KB |
| onboarding-and-first-run.md | markdown | 5.0 KB |
| pre-digested-builds.md | markdown | 3.6 KB |
| pwa-kit.md | markdown | 6.8 KB |
| realtime-and-websockets.md | markdown | 7.2 KB |
| rich-text-editor.md | markdown | 7.4 KB |
| site-search.md | markdown | 4.0 KB |
| stripe-first-donations.md | markdown | 10.7 KB |
| web-manifest-system.md | markdown | 11.9 KB |
| webhook-system.md | markdown | 9.5 KB |
pre-digested-builds.md
View on GitHub---
name: "pre-digested-builds"
description: "Research→profile→build architecture — pre-digest ALL context before expensive AI builder runs"
updated: "2026-04-24"
---
# Pre-Digested Build Architecture
AI builders (Claude Code, Cursor, bolt.diy) are expensive ($5-15/run) and slow (20-40min). Every minute spent researching inside the builder is wasted. Pre-digest ALL context using cheap, fast workers before the builder starts.
## Architecture: 4 Pre-Build Phases
### Phase 1: Research (~30s, parallel)
- Profile the business via LLM (o3-mini, $0.01) + Google Places API ($0.003)
- Returns structured JSON — type, services, hours, contact, reviews, geo
- Run both in parallel — profile doesn't depend on Places
### Phase 2: Enrich (~45s, 5 parallel)
- Brand identity (colors, fonts, personality)
- Selling points (3 USPs, hero slogans)
- Social presence
- Website scrape (homepage + 5 key pages)
- Logo discovery (Logo.dev, Brandfetch)
Each runs independently with profile as input.
### Phase 3: Media (~60s, 5 parallel)
- Discover images (5 APIs — Pexels, Pixabay, Google CSE, Foursquare, Yelp)
- Generate logo (GPT Image 2 if none found)
- Generate section images
- Discover videos (YouTube, Pexels)
- Move user uploads
Store all media in object storage, return metadata only.
### Phase 4: Profile Images (~90s)
- Workers AI Llama Vision profiles all images (FREE) — description, quality score, relevance score, suggested placement, alt text, dominant colors
- GPT Image 2 vision `detail:low` ONLY for top 5 hero candidates (~$0.02)
- Pre-selects top picks for hero/about/services/gallery
- See `image-profiling` skill for tiered architecture
## Context Files (what builder receives)
- `_research.json` — confidence-weighted business data (~50KB)
- `_image_profiles.json` — every image profiled with scores + placements (~100KB)
- `_scraped_content.json` — original website pages: text, headings, images (~200KB)
- `_videos.json` — YouTube/Pexels embed URLs (~5KB)
- `_places.json` — Google Places hours, reviews, photos, rating (~20KB)
- `_assets.json` — all object storage URLs for media assets (~10KB)
**Total** — ~400KB. Builder reads structured data, never calls APIs.
## Builder Prompt Philosophy
- **Old** — "Research everything, find images, build the site" (builder wastes 15min on research)
- **New** — "Everything is researched. Every image is profiled. Just build." (builder spends 100% on quality)
Builder instructions:
> "Read `_research.json` for ALL business data. Read `_image_profiles.json` — use EVERY top-pick in its suggested placement. All alt text is pre-written. ALL original content is in `_scraped_content.json` — use it ALL. Brand colors/fonts in `_research.json.brand`."
## Quality Impact
Pre-digested builds produce dramatically better first-time results because:
1. Builder has 100% context from minute 1
2. Image placement is data-driven not guessed
3. Original website content is preserved completely
4. Brand colors are extracted from real assets not hallucinated
## Cost Savings
- Pre-container phases — ~$0.15-0.50 (LLM calls + API queries + Workers AI profiling + GPT Image 2 vision hero pick)
- Container time saved — ~15min ($3-5 of compute)
- **Net savings** — $3-5/build + dramatically higher quality
## Logic Distribution
- Generic methodology (this skill, image-profiling, heartbeat-polling) → public skills repo
- Business-specific prompts (image profiling system prompt, builder instructions, CLAUDE.md template) → private project `prompts/`
- Implementation code (workflow orchestration, API wiring) → private project `src/`
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirements | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |