sbox

Guides writing idiomatic s&box C# components, Razor UI, and networking code using schema-verified API references.

46|5|Updated Apr 14, 2026
One-click install
npx skills add https://github.com/gavogavogavo/claude-sbox --skill sbox-gavogavogavo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sbox
Source: https://github.com/gavogavogavo/claude-sbox
Command: npx skills add https://github.com/gavogavogavo/claude-sbox --skill sbox-gavogavogavo

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? When writing code for s&box (Facepunch's Source 2 game engine with a C# scripting layer), AI assistants frequently hallucinate Unity patterns like void Start(), GetComponent<T>() call sites, Physics.Raycast, and [SerializeField] — none of which exist in s&box. This skill redirects code generation to the correct s&box APIs, with every signature verified against the engine's exported schema. ## Core Features & Use Cases - Router-based reference system: SKILL.md routes tasks to nine curated reference files covering core concepts, 144 built-in components, Razor UI, networking, input/physics, and full API schemas for ~790 types. - Unity-to-s&box translation table: Over 40 explicit mappings from wrong Unity patterns to correct s&box equivalents, plus ten mandatory rules (e.g., [Property] for serialization, [Sync] for networked state, Scene.Trace for raycasts). - Runnable examples: Ten complete schema-verified examples including a first-person controller, hitscan weapon, networked player with RPCs, Razor HUD, and NavMeshAgent AI. - Use Case: Ask how to write a networked player controller in s&box, and the skill loads the networking and patterns references to produce correct owner-authoritative code with [Sync] properties and IsProxy guards instead of Unity-style networking. ## Quick Start Ask the assistant to write an s&box component, such as a networked player controller or a Razor HUD panel, and it will consult the appropriate reference file before generating code.

Frequently Asked Questions about sbox

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write a networked player controller in s&box?

Extend Component, mark replicated state with [Sync], guard input and movement logic with if (IsProxy) return, and use [Rpc.Broadcast], [Rpc.Host], or [Rpc.Owner] attributes for remote calls. The skill's networking.md reference covers ownership, lobbies, and the full pattern.

What is the s&box equivalent of Unity's MonoBehaviour and Start()?

s&box gameplay classes extend Sandbox.Component and use protected override lifecycle methods like OnAwake(), OnStart(), OnUpdate(), and OnFixedUpdate(). MonoBehaviour, void Start(), and void Update() do not exist in s&box.

How do I raycast in s&box instead of Physics.Raycast?

Use the Scene.Trace builder API: Scene.Trace.Ray(from, to).Run() returns a SceneTraceResult. It supports sphere, box, and capsule traces plus tag filters like WithoutTags(new[]{"player"}) and UseHitboxes(true).

Does s&box support Unity coroutines and IEnumerator?

No, s&box has no coroutines. Use async Task methods with await Task.DelaySeconds(n) or await Task.Frame(), fired as _ = MyTask(). The Component.Task property scopes cancellation to the GameObject lifetime.

Why does Claude write Unity code when I ask about s&box?

Stock models default to Unity muscle memory because s&box's API differs entirely from Unity despite superficial similarities. This skill loads schema-verified references on s&box triggers, forcing lookups in reference files before any code is written.

What .NET APIs are blocked in s&box scripting?

System.IO.File, raw sockets, Console, Thread, Process, and HttpClient are blocked in the s&box sandbox. Use FileSystem.Data, Log, async/await, and the built-in Http static class instead.