Token导航 LogoToken导航TokenDH.com
开发需要联网github未标认证来源可访问clear审计通过

networking-servers网络服务器

Agent Skill

networking-servers 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

1,053

周安装

43

GitHub Stars

19

下载量

337
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:networking-servers(网络服务器)
来源仓库:https://github.com/pluginagentmarketplace/custom-plugin-game-developer
仓库路径:skills/networking-servers
安装命令:
npx skills add https://github.com/pluginagentmarketplace/custom-plugin-game-developer --skill networking-servers
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/pluginagentmarketplace/custom-plugin-game-developer --skill networking-servers

简介

协助配置和管理服务器间通信所需的网络参数。

  • 涵盖防火墙规则、负载均衡设置及服务发现机制设计。
  • 输出 YAML 或 JSON 格式的配置模板供 CI/CD 流水线使用。
  • 修改生产环境前应在沙箱中充分验证配置兼容性。
  • networking-servers 属于开发类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Networking & Game Servers

Network Architecture

CLIENT-SERVER (AUTHORITATIVE):
┌─────────────────────────────────────────────────────────────┐
│                   DEDICATED SERVER                           │
│  ┌─────────────────────────────────────────────────────┐   │
│  │  • Authoritative game state                          │   │
│  │  • Physics simulation                                │   │
│  │  • Hit validation                                    │   │
│  │  • Anti-cheat checks                                 │   │
│  └─────────────────────────────────────────────────────┘   │
│       ↑↓              ↑↓              ↑↓              ↑↓    │
│   [Client A]    [Client B]    [Client C]    [Client D]     │
│   └─ Prediction  └─ Prediction  └─ Prediction  └─ Prediction│
└─────────────────────────────────────────────────────────────┘

Netcode Implementation

Client Prediction with Reconciliation

// ✅ Production-Ready: Prediction + Reconciliation System
public class NetworkedMovement : NetworkBehaviour
{
    private struct InputPayload
    {
        public uint Tick;
        public uint Sequence;
        public Vector2 MoveInput;
        public bool Jump;
    }

    private Queue<InputPayload> _pendingInputs = new();
    private CircularBuffer<PlayerState> _stateHistory;
    private uint _inputSequence;

    private void Update()
    {
        if (!IsOwner) return;

        // Capture input
        var input = new InputPayload
        {
            Tick = NetworkManager.ServerTime.Tick,
            Sequence = _inputSequence++,
            MoveInput = new Vector2(Input.GetAxis("Horizontal"), Input.GetAxis("Vertical")),
            Jump = Input.GetButtonDown("Jump")
        };

        // Predict locally (immediate response)
        ApplyInput(input);

        // Store for reconciliation
        _pendingInputs.Enqueue(input);
        _stateHistory.Add(GetCurrentState());

        // Send to server
        SendInputServerRpc(input);
    }

    [ClientRpc]
    private void ReconcileClientRpc(uint ackedSequence, PlayerState serverState)
    {
        if (!IsOwner) return;

        // Remove acknowledged inputs
        while (_pendingInputs.Count > 0 && _pendingInputs.Peek().Sequence <= ackedSequence)
            _pendingInputs.Dequeue();

        // Check for prediction error
        var predictedState = _stateHistory.Get(ackedSequence);
        if (Vector3.Distance(predictedState.Position, serverState.Position) > 0.01f)
        {
            // Reconcile: reset to server state, replay pending inputs
            SetState(serverState);
            foreach (var input in _pendingInputs)
                ApplyInput(input);
        }
    }
}

Lag Compensation

// ✅ Production-Ready: Server-Side Rewind
public class LagCompensation : NetworkBehaviour
{
    private const int HISTORY_SIZE = 128;
    private const float MAX_REWIND_MS = 200f;

    private CircularBuffer<PositionSnapshot>[] _playerHistory;

    [ServerRpc]
    public void RequestHitValidationServerRpc(uint shooterClientId,
        Vector3 shootOrigin, Vector3 shootDirection, uint targetClientId)
    {
        // Get shooter's RTT
        float rtt = NetworkManager.ConnectedClients[shooterClientId].RTT;
        float rewindTime = Mathf.Min(rtt / 2f + 50f, MAX_REWIND_MS);

        // Get target's position at that time
        var targetPastPosition = GetPositionAtTime(targetClientId,
            Time.time - (rewindTime / 1000f));

        // Perform hit check at rewound position
        if (Physics.Raycast(shootOrigin, shootDirection, out var hit))
        {
            if (Vector3.Distance(hit.point, targetPastPosition) < 1f)
            {
                // Valid hit - apply damage
                ApplyDamage(targetClientId, 25);
            }
        }
    }
}

Server Architecture

SCALABLE SERVER ARCHITECTURE:
┌─────────────────────────────────────────────────────────────┐
│  LOAD BALANCER (Global)                                      │
│         ↓                                                    │
│  ┌─────────────────────────────────────────────────────┐   │
│  │  MATCHMAKING SERVICE                                  │   │
│  │  • Player queuing                                     │   │
│  │  • Skill-based matching                               │   │
│  │  • Session creation                                   │   │
│  └─────────────────────────────────────────────────────┘   │
│         ↓                                                    │
│  ┌─────────────────────────────────────────────────────┐   │
│  │  GAME SERVERS (Auto-scaled)                          │   │
│  │  [US-East] [US-West] [EU] [Asia]                     │   │
│  │  Each region: 10-1000 instances                       │   │
│  └─────────────────────────────────────────────────────┘   │
│         ↓                                                    │
│  ┌─────────────────────────────────────────────────────┐   │
│  │  DATABASE CLUSTER                                     │   │
│  │  • Player profiles                                    │   │
│  │  • Match history                                      │   │
│  │  • Leaderboards                                       │   │
│  └─────────────────────────────────────────────────────┘   │
└─────────────────────────────────────────────────────────────┘

Bandwidth Optimization

TechniqueSavingsImplementation
Delta Compression60-80%Only send changed values
Quantization50-70%Float → fixed-point
Bit Packing30-50%Custom serialization
Interest Management70-90%Only send relevant data
Priority QueueVariableLess important = less often

Anti-Cheat Strategies

ANTI-CHEAT LAYERS:
┌─────────────────────────────────────────────────────────────┐
│  LAYER 1: Server Authority                                   │
│  → All game state validated on server                       │
│  → Never trust client                                       │
├─────────────────────────────────────────────────────────────┤
│  LAYER 2: Sanity Checks                                      │
│  → Movement speed limits                                    │
│  → Action rate limits                                       │
│  → Position validation                                      │
├─────────────────────────────────────────────────────────────┤
│  LAYER 3: Statistical Detection                              │
│  → Inhuman accuracy patterns                                │
│  → Impossible reaction times                                │
│  → Abnormal session metrics                                 │
├─────────────────────────────────────────────────────────────┤
│  LAYER 4: Client-Side (Optional)                             │
│  → Memory scanning (EAC, BattlEye)                          │
│  → Process monitoring                                       │
└─────────────────────────────────────────────────────────────┘

🔧 Troubleshooting

┌─────────────────────────────────────────────────────────────┐
│ PROBLEM: Players rubber-banding / teleporting               │
├─────────────────────────────────────────────────────────────┤
│ SOLUTIONS:                                                   │
│ → Increase interpolation buffer                             │
│ → Add jitter buffer for packets                             │
│ → Smooth corrections (lerp, not snap)                       │
│ → Check prediction code determinism                         │
└─────────────────────────────────────────────────────────────┘

┌─────────────────────────────────────────────────────────────┐
│ PROBLEM: Desyncs between clients                            │
├─────────────────────────────────────────────────────────────┤
│ SOLUTIONS:                                                   │
│ → Use fixed-point math                                      │
│ → Sync random seeds                                         │
│ → Periodic full-state resync                                │
│ → State hash comparison                                     │
└─────────────────────────────────────────────────────────────┘

┌─────────────────────────────────────────────────────────────┐
│ PROBLEM: High bandwidth usage                               │
├─────────────────────────────────────────────────────────────┤
│ SOLUTIONS:                                                   │
│ → Implement delta compression                               │
│ → Reduce tick rate for non-critical data                    │
│ → Use interest management                                   │
│ → Quantize position/rotation values                         │
└─────────────────────────────────────────────────────────────┘

Framework Comparison

FrameworkBest ForMax PlayersLearning Curve
PhotonQuick start16-32Easy
MirrorOpen source100+Medium
Netcode for GOUnity official100+Medium
FishNetPerformance200+Medium
CustomFull controlUnlimitedHard

Use this skill: When building multiplayer, designing servers, or implementing anti-cheat.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

30.24%
按下载量换算102

Antigravity

21.39%
按下载量换算72

OpenCode

17.6%
按下载量换算59

Gemini CLI

12.9%
按下载量换算43

Codex

7.24%
按下载量换算24

windsurf

3.54%
按下载量换算12

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills