agentleFS
ViviBeriViviBeri/webcraft-pro/skills/scrolltrigger-experiences/SKILL.md

scrolltrigger-experiences

Skill11 starsChanged 9 days agoMITView on GitHub

Use when building scroll-linked storytelling, pinned sections, scrubbed timelines, reveal sequences or other GSAP ScrollTrigger interactions.

The file

Show its rules and text

We split this skill into the rules it gives an agent

26 rules. About 0 are common, 25 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈25

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use scroll position to support narrative, orientation or meaningful feedback without taking control away from the visitor or making content …

    line 10
  2. Distinctive:

    Prefer normal document flow for ordinary content and CSS scroll-driven features when they satisfy the requirement and browser support …

    line 16
  3. Distinctive:

    Avoid scroll hijacking, forced pacing and interactions that make reading dependent on precise scroll speed.

    line 17
  4. Distinctive:

    Ensure all content is present and understandable without animation.

    line 19
  5. Distinctive:

    Keep the page usable when JavaScript or the animation library fails.

    line 21
  6. Distinctive:

    Avoid pinning large content regions on small screens without a tested reason.

    line 22
  7. Distinctive:

    Use scrub only when animation should track scroll progress.

    line 26
  8. Distinctive:

    Use function-based start/end values when layout dimensions change.

    line 27
  9. Distinctive:

    Use invalidateOnRefresh when animated values must be recalculated on refresh.

    line 28
  10. Distinctive:

    Use gsap.matchMedia() for viewport and preference conditions.

    line 31
  11. Distinctive:

    Prefer simpler, unpinned behavior on narrow screens or touch-first layouts when pinning harms usability.

    line 32
  12. Distinctive:

    Do not use the deprecated ScrollTrigger.matchMedia() API in new work.

    line 33
  13. Distinctive:

    Keep pinned content from covering navigation, focus targets or important page controls.

    line 37
  14. Distinctive:

    Avoid unnecessary global refresh calls and avoid creating duplicate triggers.

    line 40
  15. Distinctive:

    Test slow, fast, reverse and partial scroll movement.

    line 42
  16. Distinctive:

    Test browser resize, orientation change, direct URL navigation and back/forward navigation.

    line 43
  17. Distinctive:

    Test keyboard access to content inside pinned sections.

    line 44
  18. Distinctive:

    Use subtle reveal effects to reinforce hierarchy, not to delay access to content.

    line 49
  19. Distinctive:

    Use scrubbed sequences only when the progress relationship is understandable.

    line 50
  20. Distinctive:

    Keep pinned sequences short and provide a clear exit into normal document flow.

    line 51
  21. Distinctive:

    Do not require users to scroll a fixed distance to reveal essential instructions or controls.

    line 53
  22. Distinctive:

    Create triggers only after their target elements exist and within the owning page/component lifecycle.

    line 71
  23. Very specific:

    Use function-based start and end values when positions depend on current layout.

    line 73
  24. Distinctive:

    Avoid pinning nested containers or applying multiple competing pin spacers without a tested requirement.

    line 75
  25. Distinctive:

    If a trigger depends on another pinned scene, account for creation order and refresh ordering so downstream start positions remain correct.

    line 76
  26. Distinctive:

    Treat markers as development diagnostics only.

    line 77

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

ScrollTrigger Experiences

Objective

Use scroll position to support narrative, orientation or meaningful feedback without taking control away from the visitor or making content difficult to access.

Workflow

  1. Confirm scroll is the right interaction
    • Identify what information or relationship is clarified by scroll-linked motion.
    • Prefer normal document flow for ordinary content and CSS scroll-driven features when they satisfy the requirement and browser support allows.
    • Avoid scroll hijacking, forced pacing and interactions that make reading dependent on precise scroll speed.
  2. Plan the document first
    • Ensure all content is present and understandable without animation.
    • Establish section heights, reading order, pin duration and fallback layout before pinning.
    • Keep the page usable when JavaScript or the animation library fails.
    • Avoid pinning large content regions on small screens without a tested reason.
  3. Create triggers deliberately
    • Register ScrollTrigger according to the installed GSAP version and project conventions.
    • Choose trigger, start and end values from the intended visual relationship.
    • Use scrub only when animation should track scroll progress; use toggle actions for discrete entrance or exit states.
    • Use function-based start/end values when layout dimensions change.
    • Use invalidateOnRefresh when animated values must be recalculated on refresh.
    • Enable markers during development to inspect trigger positions; remove or disable them in production.
  4. Handle responsive conditions
    • Use gsap.matchMedia() for viewport and preference conditions.
    • Prefer simpler, unpinned behavior on narrow screens or touch-first layouts when pinning harms usability.
    • Do not use the deprecated ScrollTrigger.matchMedia() API in new work.
    • Revert and rebuild responsive setups when media conditions change.
  5. Protect page behavior
    • Preserve native scrolling and browser history behavior.
    • Keep pinned content from covering navigation, focus targets or important page controls.
    • Account for sticky headers, dynamic content, font loading and images when calculating trigger positions.
    • Refresh measurements after meaningful layout changes rather than on every frame.
    • Avoid unnecessary global refresh calls and avoid creating duplicate triggers.
  6. Verify real scrolling
    • Test slow, fast, reverse and partial scroll movement.
    • Test browser resize, orientation change, direct URL navigation and back/forward navigation.
    • Test keyboard access to content inside pinned sections.
    • Confirm content remains reachable when motion is reduced or JavaScript is unavailable.

Interaction patterns

  • Use subtle reveal effects to reinforce hierarchy, not to delay access to content.
  • Use scrubbed sequences only when the progress relationship is understandable.
  • Keep pinned sequences short and provide a clear exit into normal document flow.
  • For horizontal storytelling, preserve a meaningful reading order and provide a usable narrow-screen alternative.
  • Do not require users to scroll a fixed distance to reveal essential instructions or controls.

Common failure modes

  • Pinning long sections that trap visitors in an artificial sequence.
  • Creating horizontal scroll without discoverable cues or touch support.
  • Using fixed pixel offsets that break when text wraps or localization changes.
  • Measuring before fonts, images or dynamic content settle.
  • Hiding all content until ScrollTrigger initializes.
  • Using scrub for an interaction that should respond immediately to user input.

Completion criteria

The story works as ordinary content first, scroll-linked motion improves comprehension, triggers respond correctly across viewports, and visitors can navigate and read without being forced through an animation.

Trigger lifecycle and refresh discipline

  • Create triggers only after their target elements exist and within the owning page/component lifecycle.
  • Revert the owning GSAP context or matchMedia instance on teardown; do not manually kill a shared global trigger collection unless the component owns it.
  • Use function-based start and end values when positions depend on current layout. Use invalidateOnRefresh when tween values must be recalculated during refresh.
  • Refresh after meaningful layout changes such as asynchronously loaded content, image dimensions becoming known or an expanded section changing document flow. Coordinate refresh after the layout settles; never refresh on every scroll or animation frame.
  • Avoid pinning nested containers or applying multiple competing pin spacers without a tested requirement.
  • If a trigger depends on another pinned scene, account for creation order and refresh ordering so downstream start positions remain correct.
  • Treat markers as development diagnostics only; remove them from production configuration.

Scroll behavior acceptance

The document remains normally scrollable, browser history and anchor navigation work, focused content is not covered by pins, and the narrative is understandable when triggers are absent. Test direct load at a mid-page URL and reverse scrolling, not only a top-to-bottom demo.

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.