Shared system init shape parity

From ychampion/cskill-agents · View interactive version

Shared system init shape parity is an AI agent skill from the GitHub repository ychampion/cskill-agents. Centralize system init or capability payload construction in one builder so multiple transports emit identical schemas and only vary inputs or delivery.

How to use this skill

Skill file

SKILL: Shared System Init Shape Parity

Domain: transport-architecture

Trigger: Use when the same system init or capability-announcement payload is emitted from multiple entrypoints or transports and downstream clients depend on one stable schema.

Source Pattern: Distilled from reviewed remote-control, bridge transport, and capability-advertising implementations.

Core Method

Define one canonical builder for the init payload and make every entrypoint call it. Put field names, defaults, derived state, feature-gated fields, and final key shaping inside that builder, not in the callers. Each transport path should do only path-local work: gather inputs, prefilter or redact collections when policy requires it, and choose when to send the message. This keeps the wire schema identical across stream, bridge, headless, or future transports so clients and tests do not drift between supposedly equivalent init events.

Key Rules

Example Application

A CLI has a normal query stream and a reconnecting remote bridge. The query engine emits the first init event by calling the shared init-payload builder. On bridge connect, the bridge path filters unsafe commands, redacts local integration inventories, and calls that same builder before sending its own init event. Both consumers receive the same key set and layout even though the collection contents differ.

Anti-Patterns (What NOT to do)

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.