by cortex-docs
Generate typed SDKs from OpenAPI, AsyncAPI, GraphQL, gRPC, and OpenRPC—plus interactive docs and MCP servers enriched with custom Markdown.
# Add to your Claude Code skills
git clone https://github.com/cortex-docs/cortexcortex is an open-source code generation skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by cortex-docs. Generate typed SDKs from OpenAPI, AsyncAPI, GraphQL, gRPC, and OpenRPC—plus interactive docs and MCP servers enriched with custom Markdown. It has 52 GitHub stars.
cortex's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/cortex-docs/cortex" and add it to your Claude Code skills directory (see the Installation section above).
cortex is primarily written in TypeScript. It is open-source under cortex-docs on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other Code Generation skills you can browse and compare side by side. Open the Code Generation category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh cortex against similar tools.
No comments yet. Be the first to share your thoughts!
Top skills in this category by stars
Unlocks once the catalog security scan passes (runs nightly).
⚠️ Third-Party Software Notice
This skill is third-party open-source software developed and hosted independently on GitHub. SkillsLLM is an informational directory and does not control or maintain the underlying repository.
Any security checks, ratings, or warnings displayed by SkillsLLM are automated and limited in scope. They do not constitute a security certification or guarantee that the software is safe, error-free, or free from malicious code, vulnerabilities, compromised dependencies, or prompt-injection risks.
Review the source code, permissions, dependencies, and configuration before installing or running any third-party skill. Use is at your own risk. To the maximum extent permitted by applicable law, SkillsLLM is not liable for losses arising from third-party software.
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
Cortex combines OpenAPI, AsyncAPI, GraphQL, Protocol Buffer, OpenRPC, and Markdown sources. Developers get interactive documentation, applications get typed SDKs, and AI agents get an MCP server with project context.
If Cortex helps your team, star this repository to support its development.
Create a sample project and inspect the generation plan:
mkdir petstore
cd petstore
npm install --global @cortex-docs/cli
cortex init petstore
cortex validate
cortex generate --dry-run
Cortex validates each source and shows every planned output:
✓ Config is valid
✓ Parsed AsyncAPI: WebSocket API
✓ Parsed GraphQL: GraphQL
✓ Parsed OpenRPC: OpenRPC
✓ Parsed OpenAPI: REST API V1
Languages: typescript, python, go, java, kotlin, ruby, php, csharp, rust, cpp, c
typescript [REST + WS + GraphQL + OpenRPC] → generated/typescript/petstore-typescript-client-sdk
python [REST + WS + GraphQL + OpenRPC] → generated/python/petstore-python-sdk
...
mcp-server → generated/mcp-server
The generated MCP server gives AI agents typed tools, specifications, SDK guides, and project documentation.
Generate the files. Then start the documentation server:
cortex generate
cortex docs serve
Open http://localhost:3012. Press Ctrl+C to stop the server.
Generate interactive docs for exploration, typed SDKs for integration, and MCP servers for AI agents.
| Task | Split toolchain | Cortex Docs |
|---|---|---|
| Configuration | Configure SDK, documentation, and MCP generators | Declare all API sources in one project configuration |
| Generation | Coordinate separate commands and output directories | Generate all configured outputs with one command |
| Customization | Maintain templates for each generator | Override only the required Eta templates |
| Publishing | Maintain a release process for each package | Review one publish plan for registries and GitHub |
| Developer interface | Keep guides separate from API references | Combine Markdown, API references, and SDK guides |
| Agent interface | Maintain MCP servers and context separately | Generate MCP servers with specifications, SDK guides, and project documentation |
Some generated SDKs require the normal compiler or package manager for their target language.
cortex init creates cortex.config.yml. Relative paths start from the directory that contains this file.
project: my-api
title: My API Docs
logo: ./assets/logo.svg
theme: system
custom_head_html: |-
<meta name="theme-color" content="#ffffff">
<link rel="stylesheet" href="/assets/custom.css">
sources:
- title: REST API
type: openapi-spec
spec: ./specs/openapi.yaml
intro: ./docs/rest.md
languages:
- language: typescript
package_name: '@my-org/my-api'
- language: python
package_name: my-api
- title: Realtime API
type: asyncapi-spec
spec: ./specs/asyncapi.yaml
languages:
- language: typescript
package_name: '@my-org/my-api'
- title: GraphQL API
type: graphql-spec
spec: ./specs/schema.graphql
endpoint: https://api.example.com/graphql
languages:
- language: typescript
package_name: '@my-org/my-api'
output:
base_dir: ./generated
docs:
- section: Get started
sources:
- title: Quickstart
document: ./docs/quickstart.md
mcp:
package_name: '@my-org/my-api-mcp'
custom_head_html adds trusted HTML to every documentation page. This field supports metadata, stylesheets, and analytics scripts.
Store local head resources in the project assets directory. Cortex serves these files from /assets/*.
Cortex does not sanitize this value. Add only HTML that you trust.
Add ?appearance=dark or ?appearance=light to any documentation URL to select its initial appearance. The parameter takes priority over the project theme and the visitor's stored preference.
For example, /docs/quickstart?appearance=dark opens the quickstart in dark mode. The theme button can change the appearance after the page loads.
Sources that use the same language and package_name are merged into one SDK. Cortex rejects duplicate operation and type names that would make a merge ambiguous.
See the configuration reference for all fields.
| Command | Result |
|---|---|
cortex init <name> |
Create a project and sample files. |
cortex validate |
Validate the config and every API source. |
cortex generate |
Generate configured SDKs and the MCP server. |
cortex generate --language typescript |
Generate one configured language. |
cortex generate --dry-run |
Show planned output without writing files. |
cortex docs serve |
Start the development server and watch project files. |
cortex docs build --output .cortex/docs |
Create a production Node.js documentation build. |
cortex docs start --output .cortex/docs |
Start a production documentation build. |
cortex mcp generate |
Generate only the MCP server. |
cortex publish --dry-run |
Check package publication without uploading. |
cortex publish |
Publish enabled generated packages. |
| Source | Generated SDK | Documentation | Generated MCP server |
|---|---|---|---|
| OpenAPI | REST clients | Interactive API reference | Callable tools and embedded specs |
| AsyncAPI | WebSocket clients | Channel and message reference | Payload-preparation tools and specs |
| GraphQL SDL | Query, mutation, and subscription clients | Operation and type reference | Callable tools and embedded schema |
| Protocol Buffer | Unary and streaming gRPC clients | Service and message reference | Embedded .proto resources |
| OpenRPC | JSON-RPC clients | Method and schema reference | Callable tools and embedded specs |
The generated MCP server does not call gRPC methods. It exposes Protocol Buffer files as MCP resources so an agent can inspect the service contract.
The build command creates a self-contained Next.js server. It is not a static HTML export.
cortex docs build --output .cortex/docs
NODE_ENV=production cortex docs start --output .cortex/docs -