← Back to Skills Marketplace
generaljerel

CopilotKit-Runtime-Patterns

by Jerel · GitHub ↗ · v1.0.1
cross-platform ✓ Security Clean
576
Downloads
0
Stars
1
Active Installs
2
Versions
Install in OpenClaw
/install copilotkit-runtime-patterns
Description
Server-side runtime patterns for CopilotKit. Use when setting up CopilotKit runtime endpoints (Express, Hono, Next.js), configuring remote agent endpoints, a...
README (SKILL.md)

CopilotKit Runtime Patterns

Server-side runtime configuration patterns. Contains 15 rules across 5 categories.

When to Apply

Reference these guidelines when:

  • Setting up CopilotKit runtime endpoints (Express, Hono, Next.js API routes)
  • Configuring CopilotRuntime with service adapters (OpenAIAdapter, etc.)
  • Registering agents via remote endpoints (LangGraph, CrewAI)
  • Adding middleware for logging, auth, or request modification
  • Securing the runtime (CORS, auth, rate limiting)
  • Optimizing runtime performance

Rule Categories by Priority

Priority Category Impact Prefix
1 Endpoint Setup CRITICAL endpoint-
2 Agent Configuration HIGH runner-
3 Middleware MEDIUM middleware-
4 Security HIGH security-
5 Performance MEDIUM perf-

Quick Reference

1. Endpoint Setup (CRITICAL)

  • endpoint-express-setup - Configure Express endpoint with CopilotRuntime and CORS
  • endpoint-hono-setup - Configure Hono endpoint for edge runtimes
  • endpoint-nextjs-route - Set up Next.js API route with copilotRuntimeNextJSAppRouterEndpoint

2. Agent Configuration (HIGH)

  • runner-inmemory-vs-sqlite - Use persistent storage for production thread management
  • runner-agent-registration - Register agents via remoteEndpoints
  • runner-multiple-agents - Configure routing for multi-agent setups

3. Middleware (MEDIUM)

  • middleware-before-request - Use onBeforeRequest for auth, logging, context injection
  • middleware-after-request - Use onAfterRequest for response logging and cleanup
  • middleware-error-handling - Handle errors in middleware without crashing the runtime

4. Security (HIGH)

  • security-cors-config - Configure CORS for your specific frontend origin
  • security-auth-middleware - Authenticate requests before agent execution
  • security-rate-limiting - Rate limit by user or API key

5. Performance (MEDIUM)

  • perf-streaming-response - Ensure streaming is not buffered by proxies

Full Compiled Document

For the complete guide with all rules expanded: AGENTS.md

Usage Guidance
This skill is documentation-only and internally consistent with its stated purpose; it doesn't request secrets or install code. Before using in production, verify provenance (source/homepage missing), compare the advice against the official CopilotKit docs/repo, and review any code snippets you paste into your codebase. Pay attention to the recommended security items (auth middleware, CORS for specific origins, and rate limiting) and ensure remote endpoints (LANGGRAPH_URL, etc.) are trusted and correctly configured.
Capability Analysis
Type: OpenClaw Skill Name: copilotkit-runtime-patterns Version: 1.0.1 The skill bundle provides documentation and code examples for configuring CopilotKit runtimes, explicitly focusing on best practices for endpoint setup, agent configuration, middleware, security, and performance. The `SKILL.md` and `AGENTS.md` files serve as guidelines for AI agents to follow when maintaining or generating code. Notably, the 'Security' section in `AGENTS.md` actively educates on how to prevent critical vulnerabilities like unauthenticated endpoints, wildcard CORS, and lack of rate limiting. There is no evidence of malicious intent, data exfiltration, unauthorized execution, or prompt injection attempts designed to harm the agent or system.
Capability Assessment
Purpose & Capability
The name/description match the included files: this is a rules/guidance document for CopilotKit runtime endpoints, middleware, security, and performance. It does not request credentials, binaries, or config paths. Note: source/homepage are missing in metadata (origin not verifiable), which reduces provenance confidence but does not contradict the stated purpose.
Instruction Scope
SKILL.md and rule files contain guidance and example code snippets that stay within runtime configuration scope (Express/Hono/Next.js, CopilotRuntime, middleware, CORS, auth, rate limiting). Examples reference process.env variables (FRONTEND_URL, LANGGRAPH_URL) as expected for deployment examples and do not instruct reading unrelated local files or exfiltrating data.
Install Mechanism
No install spec and no code files executed by the platform — instruction-only skill (lowest install risk).
Credentials
The skill declares no required environment variables or credentials. Code examples reference common deployment env vars for frontend URL and remote endpoints, which are proportional and expected for the documented tasks.
Persistence & Privilege
Skill is not always-included, is user-invocable, and does not request persistent privileges or modify other skills. Autonomous model invocation is allowed (platform default) but not a unique risk for this skill.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install copilotkit-runtime-patterns
  3. After installation, invoke the skill by name or use /copilotkit-runtime-patterns
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.1
**Major update: Clarifies agent configuration and runtime setup, updates endpoints, and simplifies performance guidelines.** - Updated to reference CopilotRuntime and @copilotkit/runtime throughout. - Expanded guidance for agent registration via remote endpoints (e.g., LangGraph, CrewAI). - Renamed and refocused "Agent Runners" to "Agent Configuration", emphasizing persistent storage and remote agent management. - Updated endpoint setup examples for Express and Next.js to use latest CopilotRuntime patterns. - Middleware hooks renamed (`beforeRequest` → `onBeforeRequest`, etc.) and clarified in usage. - Simplified performance section, focusing on streaming best practices. - Document version bumped from 1.0.0 to 2.0.0.
v1.0.0
Initial release of copilotkit-runtime-patterns, providing server-side runtime patterns for CopilotKit setups. - Contains 15 rules across 5 categories: Endpoint Setup, Agent Runners, Middleware, Security, and Performance. - Offers quick references and best practices for configuring endpoints (Express, Hono, Next.js), agent runners, and runtime security. - Includes guidelines for middleware handling, agent registration, CORS configuration, and performance tuning. - Supports both development and production deployment patterns.
Metadata
Slug copilotkit-runtime-patterns
Version 1.0.1
License
All-time Installs 1
Active Installs 1
Total Versions 2
Frequently Asked Questions

What is CopilotKit-Runtime-Patterns?

Server-side runtime patterns for CopilotKit. Use when setting up CopilotKit runtime endpoints (Express, Hono, Next.js), configuring remote agent endpoints, a... It is an AI Agent Skill for Claude Code / OpenClaw, with 576 downloads so far.

How do I install CopilotKit-Runtime-Patterns?

Run "/install copilotkit-runtime-patterns" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is CopilotKit-Runtime-Patterns free?

Yes, CopilotKit-Runtime-Patterns is completely free (open-source). You can download, install and use it at no cost.

Which platforms does CopilotKit-Runtime-Patterns support?

CopilotKit-Runtime-Patterns is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created CopilotKit-Runtime-Patterns?

It is built and maintained by Jerel (@generaljerel); the current version is v1.0.1.

💬 Comments