Api

From Kevin-Liu-01/CoTFly · View interactive version

Api is an AI agent skill from the GitHub repository Kevin-Liu-01/CoTFly. Maintain deployed signaling, ICE credential, and public GitHub-count HTTP entrypoints.

How to use this skill

Skill file

claude-of-tanks / api

Purpose

<!-- agent-docs:fill:purpose -->

Expose the hosted application's small server-side API surface. Keep deployment

adapters thin; room/session policy belongs to server/, not browser code.

Mental model & key files

<!-- agent-docs:fill:model -->

signal.ts configures the shared signaling server and distributed room store.

ice.ts provides validated static, coturn, or Cloudflare TURN configuration.

github-stars.ts proxies the public repository count with bounded upstream

requests and cache headers. Deployment routes are configured in vercel.json.

Patterns to follow / invariants

<!-- agent-docs:fill:patterns -->

do not silently substitute an instance-local room store.

environment variable names only; never commit secret values or log credentials.

so failure paths can be tested without external services.

Common tasks → first action

<!-- agent-docs:fill:tasks -->

server/distributedRoomStore.ts; start with the corresponding server tests.

src/ui/githubStars.ts for the loading/error presentation contract.

Gotchas

<!-- agent-docs:fill:gotchas -->

Importing signal.ts constructs the deployed server and validates its environment.

Do not import it into client bundles or bypass its production checks for tests.

TURN credentials and a public count have different caching requirements.

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.