Skip to content

bakaphp/graphql-docs-llm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

graphql-docs-llm

Auto-generated GraphQL schema documentation for the Kanvas Ecosystem API, structured for consumption by LLMs and AI coding agents.


For LLMs and AI Agents

This repository contains a complete, flat representation of the Kanvas GraphQL schema. Each type, query, mutation, input, and enum is a standalone Markdown file. There is no nesting, no code to execute — just structured text you can fetch directly.

Directory structure

dev_docs/    Schema from the development branch (latest, may include unreleased features)
prod_docs/   Schema from the latest production release (stable)

Both directories share the same internal structure:

Core indexes (start here):

File Purpose
_LIBRARY_MAP.md Master index. Start here.
_INDEX_QUERIES.md All available Queries (read operations)
_INDEX_MUTATIONS.md All available Mutations (write operations)
_INDEX_ENTITIES.md Core object types (API response shapes)
_INDEX_INPUTS.md Core input types (mutation arguments)
_INDEX_CONSTANTS.md Core enums (business logic values)

Auto-generated sub-indexes (only if needed):

File Purpose
_INDEX_INPUTS_FILTERS.md Auto-generated query filter types (WHERE/OrderBy)
_INDEX_CONSTANTS_COLUMNS.md Auto-generated column name enums
_INDEX_ENTITIES_PAGINATORS.md Paginator wrapper types
<TypeName>.md Full definition of a single type

How to navigate

Always follow this order to minimize unnecessary fetches:

  1. Fetch _LIBRARY_MAP.md to understand the overall context.
  2. Fetch the relevant core index depending on what the user needs.
  3. Fetch the specific <TypeName>.md file to verify exact field names, argument types, nullability, and enum values.
  4. Only fetch auto-generated sub-indexes when you need filter/column/paginator details. Filter type names follow predictable patterns — you can often construct the filename directly.

Never guess field names, argument types, or enum values. Always verify from the docs before generating any GraphQL.

Base URLs

Development (default):

https://raw.githubusercontent.com/bakaphp/graphql-docs-llm/refs/heads/main/dev_docs/

Production:

https://raw.githubusercontent.com/bakaphp/graphql-docs-llm/refs/heads/main/prod_docs/

Example fetch

To get the full definition of the User type from the dev schema:

GET https://raw.githubusercontent.com/bakaphp/graphql-docs-llm/refs/heads/main/dev_docs/User.md

For Humans — Installing the Claude Code Skill

The SKILL.md file in this repository defines a Claude Code skill called kanvas-api-wizard. When installed, it teaches Claude how to navigate this documentation automatically whenever you work on Kanvas GraphQL integrations.

Prerequisites

  • Claude Code installed and authenticated
  • Access to the bakaphp/graphql-docs-llm repository (public)

Installation

1. Locate your Claude skills directory

Claude Code loads skills from ~/.claude/skills/. Create the directory if it does not exist:

mkdir -p ~/.claude/skills

2. Copy the skill file

curl -o ~/.claude/skills/kanvas-api-wizard.md \
  https://raw.githubusercontent.com/bakaphp/graphql-docs-llm/refs/heads/main/SKILL.md

Or copy it manually if you have the repository cloned:

cp /path/to/graphql-docs-llm/SKILL.md ~/.claude/skills/kanvas-api-wizard.md

3. Verify

Restart Claude Code and run:

/skills

You should see kanvas-api-wizard listed.

Using the skill

Once installed, Claude will automatically invoke the skill when you ask questions related to the Kanvas API, for example:

  • "How do I create a company in Kanvas?"
  • "What fields does the User type have?"
  • "Write a mutation to update company settings"
  • "Which enum values are valid for the notification channel field?"

Claude will fetch the live documentation from this repository, verify all types and arguments, and include documentation references in every answer.

Choosing between dev and prod schema

By default the skill reads from dev_docs. If you need to work against the production schema, tell Claude explicitly:

"Use the production schema"

Claude will switch the base URL to prod_docs for that session.


Keeping the documentation up to date

Documentation is regenerated automatically via GitHub Actions:

  • Any push to the development branch of kanvas-ecosystem-api triggers a regeneration of dev_docs.
  • Any published release on kanvas-ecosystem-api triggers a regeneration of prod_docs.

The generation script (app.ts) runs a GraphQL introspection query against the live API and writes one Markdown file per type. It requires Deno to run locally:

deno run --allow-net --allow-write --allow-read app.ts \
  --url https://your-graphql-endpoint/graphql \
  --output ./dev_docs

Repository layout

.
├── app.ts                          Deno script that generates the docs
├── SKILL.md                        Claude Code skill definition
├── dev_docs/                       Generated docs for the development schema
│   ├── _LIBRARY_MAP.md             Master navigation index
│   ├── _INDEX_QUERIES.md           Core: queries
│   ├── _INDEX_MUTATIONS.md         Core: mutations
│   ├── _INDEX_ENTITIES.md          Core: object types
│   ├── _INDEX_INPUTS.md            Core: input types
│   ├── _INDEX_CONSTANTS.md         Core: enums
│   ├── _INDEX_INPUTS_FILTERS.md    Auto-gen: query filter types
│   ├── _INDEX_CONSTANTS_COLUMNS.md Auto-gen: column enums
│   ├── _INDEX_ENTITIES_PAGINATORS.md Auto-gen: paginators
│   └── <TypeName>.md  (one per type)
├── prod_docs/                      Generated docs for the production schema
│   └── ...
└── .github/workflows/
    └── update-docs.yml             CI that regenerates docs on demand

About

This is a directory with all the definitions of query, mutations, and other information that can be used as documentation for LLM.

Resources

Stars

Watchers

Forks

Contributors