wave5-collision-filter-layer-masking

wave5-collision-filter-layer-masking is a skill for Claude Code from dyCuong03/unity-agent-team. It costs 38 tokens per session (946 once invoked), scanned A, original, MIT.

A Unity physics setup that uses bit masks to assign bodies to collision layers and control which layers can interact or be found by spatial searches.

In plain words
What is it for?
Use it to make enemies pass through one another, let bullets ignore allies, or restrict raycasts and other spatial queries to selected layers.
Why use it?
It prevents unwanted collisions and query results, and can reduce physics work in crowded scenes.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Good fit Use it to make enemies pass through one another, let bullets ignore allies, or restrict raycasts and other spatial queries to selected layers.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/dycuong03/unity-agent-team/wave5-collision-filter-layer-masking
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add dyCuong03/unity-agent-team --skill wave5-collision-filter-layer-masking
Clone the repo
git clone --depth 1 https://github.com/dyCuong03/unity-agent-team

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for wave5-collision-filter-layer-masking

README.md
[![agentmods](https://agentmods.dev/badge/skills/dycuong03/unity-agent-team/wave5-collision-filter-layer-masking/github.svg)](https://agentmods.dev/skills/dycuong03/unity-agent-team/wave5-collision-filter-layer-masking)
Your own site
<a href="https://agentmods.dev/skills/dycuong03/unity-agent-team/wave5-collision-filter-layer-masking"><img src="https://agentmods.dev/badge/skills/dycuong03/unity-agent-team/wave5-collision-filter-layer-masking/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for wave5-collision-filter-layer-masking

Your own site · 80×15
<a href="https://agentmods.dev/skills/dycuong03/unity-agent-team/wave5-collision-filter-layer-masking"><img src="https://agentmods.dev/badge/skills/dycuong03/unity-agent-team/wave5-collision-filter-layer-masking.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 946 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00038 $0.00946
Opus 5.5 $0.00015 $0.00378
Sonnet 5.5 $0.00008 $0.00189
Haiku 4.5 $0.00004 $0.00095

Measured 11d ago against content hash db0d6a4a06bf, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

wave5-collision-filter-layer-masking scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/unity-dots/wave5-collision-filter-layer-masking/SKILL.md · 94 lines

How it starts

The opening of the file, as written. The whole thing — 94 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Collision Filter Layer Masking

Intent

Control which physics bodies interact with each other and with spatial queries using CollisionFilter bitmask layer assignment, reducing broadphase pairs and query false positives.

Use When

  • Physics simulation should exclude certain body pairs (enemies don't collide with each other, bullets pass through allies)
  • Spatial queries should hit only specific layers
  • Performance optimization in dense scenes by reducing broadphase pairs

Avoid When

  • Only 2-3 bodies need selective collision — trigger-only colliders or kinematic bodies may be simpler
  • More than 32 distinct layer categories needed — CollisionFilter has exactly 32 bits

Senior Pattern

// Define layer constants in one shared location:
public static class PhysicsLayer
{
    public const uint Ground     = 1u << 0;
    public const uint Player     = 1u << 1;
    public const uint Enemy      = 1u << 2;
    public const uint Projectile = 1u << 3;
    public const uint Trigger    = 1u << 4;
}

// Interaction rule: A and B interact iff:
//   (A.BelongsTo & B.CollidesWith) != 0  AND  (B.BelongsTo & A.CollidesWith) != 0

// Query-time filter — projectile only hits ground and enemies:
var input = new RaycastInput
{
    Start = origin,
    End   = origin + direction * 100f,
    Filter = new CollisionFilter
    {
        BelongsTo    = PhysicsLayer.Projectile,
        CollidesWith = PhysicsLayer.Ground | PhysicsLayer.Enemy,
        GroupIndex   = 0
    }
};
physicsWorld.CollisionWorld.CastRay(input, out RaycastHit hit);

// Authoring-time — set on PhysicsCollider via Baker:
public override void Bake(ProjectileAuthoring authoring)
{
    var entity = GetEntity(TransformUsageFlags.Dynamic);
    AddComponent(entity, new PhysicsCollider
    {
        Value = Unity.Physics.BoxCollider.Create(
            geometry,
            new CollisionFilter
            {
                BelongsTo    = PhysicsLayer.Projectile,
                CollidesWith = PhysicsLayer.Ground | PhysicsLayer.Enemy,
                GroupIndex   = 0
            })
    });
}

Read the full file on GitHub · 94 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 94 lines · 38 tokens per session scan A db0d6a4a06bf

Subscribe to this mod's changes

wave5-collision-filter-layer-masking is a skill published in the GitHub repository dyCuong03/unity-agent-team (7 stars, last pushed 2mo ago), licensed MIT. It adds 38 tokens to every session and 946 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-02.

Related

Other skills, from other repositories

gamedev-physics

Use when working with a game engine's physics — rigid bodies, colliders, collision layers and masks, character controllers, joints, forces versus impulses, raycasts and shapecasts, or when a simulation is unstable (tunnelling, jitter, missed overlaps). Covers the Godot, Unity and Unreal equivalents. NOT rendering or…

ericrisco/rsc-harness · 102 tokens

2d-games-v2

2D Game Development workflow skill. Use this skill when the user needs 2D game development principles. Sprites, tilemaps, physics, camera and the operator should preserve the upstream workflow, copied support files, and provenance before merging or handing off.

diegosouzapw/awesome-omni-skills · 57 tokens

3d-games-v2

3D Game Development workflow skill. Use this skill when the user needs 3D game development principles. Rendering, shaders, physics, cameras and the operator should preserve the upstream workflow, copied support files, and provenance before merging or handing off.

diegosouzapw/awesome-omni-skills · 55 tokens

game-development

Game development patterns, architectures, and best practices.

miles990/claude-software-skills · 12 tokens

2d-games-v3

2D Game Development workflow skill. Use this skill when the user needs 2D game development principles. Sprites, tilemaps, physics, camera and the operator should preserve the upstream workflow, copied support files, and provenance before merging or handing off.

diegosouzapw/awesome-omni-skills · 57 tokens

2d-games

2D Game Development workflow skill. Use this skill when the user needs 2D game development principles. Sprites, tilemaps, physics, camera and the operator should preserve the upstream workflow, copied support files, and provenance before merging or handing off.

diegosouzapw/awesome-omni-skills · 55 tokens