Skip to content

refactor(claude-design-skill): template-first rewrite with bug fixes#467

Merged
ukimsanov merged 2 commits intomainfrom
feat/claude-design-skill-template-first
Apr 24, 2026
Merged

refactor(claude-design-skill): template-first rewrite with bug fixes#467
ukimsanov merged 2 commits intomainfrom
feat/claude-design-skill-template-first

Conversation

@ukimsanov
Copy link
Copy Markdown
Collaborator

@ukimsanov ukimsanov commented Apr 24, 2026

What

Replaces the rule-heavy Claude Design skill with a template-first approach. Instead of 863 lines of prose rules and building from scratch, provides pre-valid HTML skeletons where structural rules are embedded. Claude Design fills in palette, content, and animations.

Why

Testing across 12 compositions (demov4-1 through demov4-6, demov5-1 through demov5-5) revealed systematic bugs:

  1. First shader anchor invisible — HyperShader browser mode never auto-shows scenes[0]. Every composition had this.
  2. Non-anchor scenes invisible — HyperShader's blanket querySelectorAll(".scene").forEach(s => s.style.opacity = "0") poisons all scenes. visibility toggles alone can't override opacity:0.
  3. Shaders broken on verticalwebgl.ts hardcodes canvas to 1920×1080. Vertical (1080×1920) compositions get distorted transitions.
  4. Every cut is a shader — professional video uses ~95% hard cuts. Shader on every boundary flattens impact.
  5. Claude Design builds from scratch poorly — it skips rules, forgets .scene-content wrappers, misses timeline registration. Templates eliminate these structural failures.

How

  • Pre-valid HTML skeletons for 4 video types (social reel, launch teaser, product explainer, cinematic title)
  • autoAlpha toggles (sets both opacity AND visibility) for non-anchor scenes instead of visibility alone
  • Explicit tl.set("#sN", { opacity: 1 }, startTime) for first anchor in each shader group
  • No shaders on vertical skeleton (Skeleton A) — hard cuts only
  • Mixed transitions on landscape: 2-3 shaders at hero/CTA moments, hard cuts elsewhere
  • 7 inline animation patterns for Claude Design to copy-paste
  • Claude Design → Claude Code handoff workflow in README template
  • Skill description disambiguated from hyperframes skill per Jake's review on docs: add Claude Design HyperFrames entry point #353

Test plan

  • 12 compositions audited for invisible scenes — root causes identified and fixes verified
  • HyperShader non-adjacent anchor behavior verified via source code review
  • Vertical shader limitation confirmed in packages/shader-transitions/src/webgl.ts:3-4
  • bunx oxlint — passes
  • bunx oxfmt --check — passes
  • End-to-end: attach skill to Claude Design, generate compositions with test prompts, verify all scenes visible
  • Documentation updated (if applicable)

🤖 Generated with Claude Code

Replace the rule-heavy Claude Design skill with a template-first
approach. Instead of teaching all rules from scratch (863 lines),
provide pre-valid skeletons where structural rules are embedded.
Claude Design fills in palette, content, and animations.

Key changes:
- Pre-valid HTML skeletons for social reel (vertical), launch teaser,
  product explainer, and cinematic title
- Mixed transitions: 2-3 shader transitions at key moments, rest
  hard cuts (matches professional video practice)
- autoAlpha toggles for non-anchor scenes (fixes invisible middle
  scenes caused by HyperShader's blanket opacity reset)
- Explicit first-anchor opacity fix (HyperShader browser mode never
  auto-shows the first anchor scene)
- No shaders on vertical (1080x1920) — WebGL canvas is hardcoded
  to 1920x1080 in webgl.ts
- Inline animation patterns (counter, stroke draw, stagger, float,
  bar chart, orbit, highlight sweep, safe CSS grain)
- Claude Design → Claude Code handoff workflow documented in
  README template and delivery step
- Troubleshooting table for black preview, invisible scenes, seeking
- Self-review checklist split: structural validity, brand accuracy,
  animation baseline
- Skill description updated per review feedback on PR #353 to
  disambiguate from the hyperframes skill on cross-surface routing

Bugs fixed by this rewrite (confirmed across demov4-1 through
demov4-6 and demov5-1 through demov5-5):
- First shader anchor invisible in every composition
- Non-anchor scenes killed by blanket querySelectorAll(".scene")
  opacity reset
- visibility toggles insufficient (opacity:0 persists after reset)
- Shaders on vertical compositions produce distorted transitions
@ukimsanov ukimsanov requested a review from Copilot April 24, 2026 00:14
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Update docs, quickstart, prompting guide, and README to reflect:
- Template-first approach (attach file, not paste URL)
- Claude Design produces drafts, refine in any AI coding agent
- Known limitations (vertical shaders, seeking, no linting)
- Practical example prompts (feature announcement, founder pitch)
- Removed outdated references (invisible bridges, fetch-the-skills-tree)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ukimsanov ukimsanov merged commit 95cc264 into main Apr 24, 2026
25 checks passed
@ukimsanov ukimsanov deleted the feat/claude-design-skill-template-first branch April 24, 2026 00:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants