assembly-definitions
Assembly definition management — when to create asmdefs, reference rules, Editor/Runtime/Test separation, platform filters, compilation speed optimization.
2D platformer architecture — tight controls (coyote time, input buffer, variable jump), level design patterns, collectibles, checkpoints, hazards, boss patterns.
$ npx -y skills add XeldarAlz/everything-claude-unity --skill platformer-2d --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/platformer-2dContext preview
The summary Claude sees to decide when to auto-load this skill.
2D platformer architecture — tight controls (coyote time, input buffer, variable jump), level design patterns, collectibles, checkpoints, hazards, boss patterns.
name: platformer-2d description: "2D platformer architecture — tight controls (coyote time, input buffer, variable jump), level design patterns, collectibles, checkpoints, hazards, boss patterns." globs: ["**/Platform*.cs", "**/Player*.cs", "**/Level*.cs"]
public sealed class PlatformerController : MonoBehaviour
{
[Header("Movement")]
[SerializeField] private float _moveSpeed = 8f;
[SerializeField] private float _acceleration = 50f;
[SerializeField] private float _deceleration = 60f;
[SerializeField] private float _airControlMultiplier = 0.65f;
[Header("Jump")]
[SerializeField] private float _jumpForce = 16f;
[SerializeField] private float _fallMultiplier = 2.5f;
[SerializeField] private float _lowJumpMultiplier = 2f;
[SerializeField] private float _coyoteTime = 0.1f;
[SerializeField] private float _jumpBufferTime = 0.15f;
[SerializeField] private float _apexHangMultiplier = 0.5f;
[SerializeField] private float _apexThreshold = 1.5f;
[Header("Ground Check")]
[SerializeField] private Transform _groundCheck;
[SerializeField] private float _groundCheckRadius = 0.15f;
[SerializeField] private LayerMask _groundLayer;
private Rigidbody2D _rb;
private float _coyoteTimer;
private float _jumpBufferTimer;
private bool _isGrounded;
private bool _jumpHeld;
private void Awake()
{
_rb = GetComponent<Rigidbody2D>();
}
// Input is forwarded from InputView via these methods — never read Input.* here.
public void SetMoveInput(float horizontal) => _horizontalInput = horizontal;
public void OnJumpPressed()
{
_jumpBufferTimer = _jumpBufferTime;
_jumpHeld = true;
}
public void OnJumpReleased() => _jumpHeld = false;
private float _horizontalInput;
private void Update()
{
// Ground check
_isGrounded = Physics2D.OverlapCircle(_groundCheck.position, _groundCheckRadius, _groundLayer);
// Coyote time
if (_isGrounded) _coyoteTimer = _coyoteTime;
else _coyoteTimer -= Time.deltaTime;
_jumpBufferTimer -= Time.deltaTime;
// Trigger jump
if (_jumpBufferTimer > 0f && _coyoteTimer > 0f)
{
_rb.linearVelocity = new Vector2(_rb.linearVelocity.x, _jumpForce);
_jumpBufferTimer = 0f;
_coyoteTimer = 0f;
}
}
private void FixedUpdate()
{
// Horizontal movement with acceleration
float targetSpeed = _horizontalInput * _moveSpeed;
float accel = _isGrounded ? _acceleration : _acceleration * _airControlMultiplier;
float decel = _isGrounded ? _deceleration : _deceleration * _airControlMultiplier;
float rate = Mathf.Abs(targetSpeed) > 0.01f ? accel : decel;
float newSpeedX = Mathf.MoveTowards(_rb.linearVelocity.x, targetSpeed, rate * Time.fixedDeltaTime);
_rb.linearVelocity = new Vector2(newSpeedX, _rb.linearVelocity.y);
// Variable jump height + apex hang
float yVel = _rb.linearVelocity.y;
if (yVel < 0f)
{
// Falling — faster fall
_rb.linearVelocity += Vector2.up * (Physics2D.gravity.y * (_fallMultiplier - 1f) * Time.fixedDeltaTime);
}
else if (yVel > 0f && !_jumpHeld)
{
// Released jump early — cut height
_rb.linearVelocity += Vector2.up * (Physics2D.gravity.y * (_lowJumpMultiplier - 1f) * Time.fixedDeltaTime);
}
// Apex hang — slow gravity near jump apex for more control
if (Mathf.Abs(yVel) < _apexThreshold)
{
_rb.linearVelocity += Vector2.up * (Physics2D.gravity.y * (_apexHangMultiplier - 1f) * Time.fixedDeltaTime);
}
}
}// In Update:
bool isTouchingWall = Physics2D.Raycast(transform.position, facingDirection, 0.5f, _groundLayer);
bool isWallSliding = isTouchingWall && !_isGrounded && _rb.linearVelocity.y < 0f;
if (isWallSliding)
{
// Apply wall slide friction (cap fall speed)
_rb.linearVelocity = new Vector2(_rb.linearVelocity.x,
Mathf.Max(_rb.linearVelocity.y, -_wallSlideSpeed));
}
// Wall jump: jump away from wall
if (_jumpBufferTimer > 0f && isWallSliding)
{
_rb.linearVelocity = new Vector2(-facingDirection.x * _wallJumpForce.x, _wallJumpForce.y);
_jumpBufferTimer = 0f;
}private bool _canDash = true;
private float _dashCooldown = 0.5f;
private IEnumerator Dash(Vector2 direction)
{
_canDash = false;
_rb.gravityScale = 0f;
_rb.linearVelocity = direction.normalized * _dashSpeed;
// I-frames during dash
Physics2D.IgnoreLayerCollision(playerLayer, enemyLayer, true);
yield return _dashDuration; // cached WaitForSeconds
_rb.gravityScale = _defaultGravity;
Physics2D.IgnoreLayerCollision(playerLayer, enemyLayer, false);
yield return new WaitForSeconds(_dashCooldown);
_canDash = true;
}Use `PlatformEffector2D` with `surfaceArc = 180` and `useOneWay = true`.
Drop through: temporarily disable collider or set the effector's `rotationalOffset`.
public sealed class Checkpoint : MonoBehaviour
{
[SerializeField] private VoidEventChannel _onCheckpointReached;
private static Vector3 _lastCheckpointPosition;
private void OnTriggerEnter2D(Collider2D other)
{
if (other.CompareTag("Player"))
{
_lastCheckpointPosition = transform.position;
_onCheckpointReached.Raise();
}
}
public static Vector3 GetRespawnPosition() => _lastChThe ultimate Claude Code toolkit for Unity game development. A production-ready, plug-and-play system that gives Claude Code deep Unity expertise — from writing performant C# to building scenes, profiling performance, and triggering iOS/Android builds — all
Assembly definition management — when to create asmdefs, reference rules, Editor/Runtime/Test separation, platform filters, compilation speed optimization.
Structured commit trailers — adds Constraint, Rejected, Scope-risk, and Not-tested metadata to commit messages. Captures architectural decisions and known gaps…
Ambiguity gating — detects vague feature requests and forces structured requirements gathering with scoring across scope, platform, performance, integration,…
Event system patterns — C# events, UnityEvent, SO event channels, static EventBus. When to use each, zero-allocation patterns, memory leak prevention.
Configures Claude Code's statusline to display Unity workflow state — current phase, active agent, files modified, and session duration.
Post-debugging knowledge extraction — captures non-obvious, codebase-specific learnings that pass quality gates. Invoke after resolving tricky bugs or…