ambient-section-particles
できること
このスキルは、ページの一部に、軽く範囲を限った粒子効果を加える作業をAIエージェントに案内します。雪や花びらなどの雰囲気を出しつつ、文字は読みやすく保ちたいデザイナー向けです。
使う場面
- ✓雪、葉、火花のような、穏やかな雰囲気の効果がセクションに必要なとき。
- ✓クリックを妨げずに、マウスに少し反応する粒子が欲しいとき。
- ✓遅い端末や、動きを減らす設定の訪問者には、効果を止める必要があるとき。
スキルのリンク
https://github.com/MengTo/Skills/blob/main/agent-skills/web-design/ambient-section-particles/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“春のセールページのヘッダーに、柔らかい花びらを数枚落としてください。ただし、文字ははっきり読めるようにしてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、単純な描画方法を選び、控えめな数の粒子を設定して、内容の後ろに置きます。見えないときは効果を一時停止し、動きを減らす設定の訪問者には静止版を用意します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Ambient Section Particles
Build particles as a bounded atmosphere layer, not as a page-wide screensaver. Keep the content primary and stop work when the effect cannot be seen.
Choose the renderer
- Use canvas for roughly 40 or more small particles, frequent motion, pointer forces, or simple procedural shapes.
- Use DOM or inline SVG for a small count of branded fragments that need individual styling or semantic labels.
- Use WebGL only for thousands of particles, depth, shaders, or real 3D behavior. Cap device pixel ratio and provide a static fallback.
Start with the least expensive renderer that preserves the desired shape language.
Define one configuration
const particles = {
count: 54,
gravity: 7,
wind: -3,
sway: 16,
speed: [8, 18],
size: [4, 12],
opacity: [0.18, 0.62],
rotation: [-0.8, 0.8],
mode: "recycle",
pointerRadius: 110,
maxDpr: 2
};
Scale density by container area, then clamp it for mobile and low-power devices. Do not derive count from viewport width alone.
Layer the section
- Give the section a positioning context and clip overflow when particles should remain bounded.
- Place the particle surface behind content but above the background.
- Set the layer to
pointer-events: none; listen for pointer movement on the section. - Reserve a quiet content zone or lower density behind long text and controls.
- Keep controls and links in normal DOM stacking with visible focus.
Run the simulation
- Seed particles inside or just above the container bounds.
- Update gravity, wind, phase-based sway, rotation, opacity, and position from elapsed time.
- Clamp large time deltas after background tabs or stalled frames.
- Use one
requestAnimationFrameloop for the whole layer. - Resize with
ResizeObserver; cap canvas backing resolution atmin(devicePixelRatio, maxDpr). - For pointer disturbance, apply a small distance-based force and let particles settle back naturally. Never attach a listener per particle.
Support explicit end modes:
recycle: return particles above the section after exit.exit: remove particles after they leave the bounds.settle: resolve into a shallow visual pile with a strict height cap.static: render a deterministic still composition.
Stop invisible work
Use IntersectionObserver to start only when the section is visible. Cancel animation frames when it exits or document.hidden becomes true. Resume from the current simulation state instead of spawning a second loop.
On teardown, disconnect observers, remove resize and pointer listeners, cancel the frame, and release renderer resources.
Respect the reader
- Under
prefers-reduced-motion: reduce, render a sparse static arrangement or remove the layer. - Keep particles decorative and hidden from assistive technology.
- Control opacity and contrast so motion never crosses the legibility threshold.
- Avoid full-screen pointer repulsion, rapid direction changes, flashes, and large objects crossing form controls.
- Pause decorative motion while a modal or critical task in the section is active when it competes for attention.
Verify
Test entry and exit pausing, background-tab recovery, fast resize, 390/768/1440 widths, device pixel ratio, pointer and touch input, reduced motion, section overflow, content focus, long text, route cleanup, and console errors. Confirm only one animation loop survives repeated mounts.
Use demo/index.html as the working reference and demo/PROMPT.md to recreate or remix it. Keep REFERENCES.md as the links-only implementation source list.
よくある質問
粒子がボタンを遮りませんか?
いいえ。層がポインターのイベントを通すように設定し、長い文章の後ろには静かな領域を置くよう求めています。
粒子はいくつ使われますか?
数は、セクションの面積に応じて決まり、スマートフォンや低電力の端末では上限が設けられます。
自社のブランドの形を使えますか?
はい。アイコンやブランドの断片など、セクションの雰囲気を支える形なら使えます。
詳細
作者による元の説明
Add a restrained particle atmosphere inside one section with configurable shapes, density, gravity, wind, sway, rotation, recycling or settling, pointer disturbance, visibility pausing, responsive limits, and reduced-motion fallbacks. Use for petals, leaves, snow, sparks, confetti, dots, paper, icons, or brand fragments that support a section's mood without obscuring content.
repo: MengTo/Skills
人気
- GitHubのスター
- 7.2k
- ランキング
- #13395
- ライセンス
- MIT
- 更新日
- 2026/11/1
コメント
- …
このリポジトリの他のスキル
3d-cloth-material
7.2kThree.js で、糸の織り、柔らかい光沢、自然な襞、裾、縫い目を持つ、本物の織物らしい布を作るようエージェントを支援します。
3d-falling-leaves
7.2k3D のシーンに、回転し、風に流され、カメラの動きに合わせて再利用される、本物らしい落ち葉を加えるようエージェントを支援します。
3d-four-seasons
7.2k3D のシーンに、春、夏、秋、冬の見た目を加え、シーン全体を作り直さずに、茂み、光、空、雪を変えるようエージェントを支援します。
3d-high-poly-models
7.2k滑らかな形と自然な縁をもつ、詳細な3Dモデルを作り、その後、Web で快適に動く軽いバージョンを準備するようエージェントを支援します。
似ているスキル
angular-developer
280kエージェントがAngularのコードを作成し、プロジェクト構成についてアドバイスできるようにします。新しいプロジェクトの開始、コード部品の作成、パフォーマンスやアクセシビリティの改善に役立ちます。
frontend-a11y
280kエージェントが Web インターフェースを誰にとっても使いやすくするよう支援します。スクリーンリーダーやキーボード操作に対応し、サイトやアプリが適切に動作するようにします。
frontend-patterns
280kエージェントがフロントエンド開発の最新パターンを適用できるようにします。React と Next.js において、パフォーマンスの最適化、状態管理、ベストプラクティスの遵守を行います。