Kata Studio

A workbench for the Codewars kata trainer: an AI tutor that hints instead of solving, in-place kata translation, real formatters for C, C++, Python, Kotlin and Rust, a trainer laid out for the code rather than the chrome, and a practice history on the dashboard.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

Autor
NihilDigit
Dziennych instalacji
0
Wszystkich instalacji
3
Oceny
0 0 0
Wersja
1.8.0
Utworzono
21-05-2026
Zaktualizowano
28-08-2026
Rozmiar
218 KB
Licencja
MIT
Dotyczy

A workbench for the Codewars kata trainer. Three things it adds, and a lot of small repairs to the page around them.

An AI tutor that hints instead of solving

A collapsible sidebar backed by any OpenAI-compatible endpoint — yours, not mine. It is prompted to work out which layer you are stuck on and answer only that one: misread requirement, missing building block, approach that cannot work, right approach with a bug, or an error message that means nothing to you. It will not hand over a solution, and says so rather than quietly complying.

Context is pointed at rather than configured. Select code in either editor, or text in the description, and an Ask button appears over the selection; it becomes a chip on the composer. The test output carries its own button, so a failing run reaches the conversation without being retyped. The kata description, your current code and the last run's output travel along on every turn, rebuilt each time so the model sees the code as it is now rather than as it was when you started.

Replies stream. Esc stops one mid-flight. Alt+A opens the panel, as does the edge tab or a swipe in from the right.

Kata descriptions translated in place

One press in the panel header rewrites the description into your language; another puts the original back. Code blocks, inline code and identifiers are left alone. Fragments land as they arrive rather than all at the end, and the result is cached per kata.

A Google-style C formatter

Two-space indentation, int* p, attached braces, four-space continuations, case one level in from switch. It runs on Alt+Shift+F, once when you open a kata, and once before test, attempt and submit. One Ctrl+Z undoes a format.

It lexes before it formats, so operators inside strings and comments are left alone.

Deliberate limits, so you know where the edges are:

  • C only. In C++ the angle bracket is comparison, template argument list and right shift at once, and a lexical formatter cannot tell them apart. C++ katas keep CodeMirror's own indentation rather than being reformatted badly.
  • Lines already past 80 columns are left alone. Automatic line breaking damages more code than the column limit is worth.
  • Old-style K&R parameter lists are not handled.

The page around it

The trainer's top strip folds away: the page title names the page you are already on, and the account bar is not something you open mid-kata, so it moves into a menu behind your avatar, which now sits with the VIM / EMACS / fullscreen controls at matching size. Codewars' own nodes are moved rather than rebuilt, so the theme toggle, the notification drawer and the profile links keep working. The reclaimed strip goes to the editor.

The description column sizes to its content, so a short kata no longer leaves a tall empty card under the text while a long one still scrolls.

Also: promotion and house-ad blocks hidden, Maple Mono when you have it installed, line wrapping and tuned editor typography, C autocomplete over your own identifiers and #define names, Tab inserts two spaces, an optional symbol bar for tablets, and small typing sparks you can turn off.

The panel reads Codewars' own CSS variables instead of copying their values, so it follows the site's light and dark themes rather than fighting them.

Setting up the AI

Open settings from the panel header, or from your userscript manager's menu. You need a base URL, a key and a model name:

  • Base URL — any OpenAI-compatible endpoint, up to and including /v1. Tested shapes: https://api.openai.com/v1, https://api.deepseek.com/v1, https://openrouter.ai/api/v1, and a local http://localhost:11434/v1.
  • API key — kept in your userscript manager's own storage and sent only to the endpoint you chose, in the Authorization header.
  • Model — spelled the way your provider spells it.
  • Answer and translation language — what the tutor writes in, and what descriptions are translated into. The interface itself stays English.

Test checks the settings before you close the dialog. No temperature is sent; several current models reject any non-default value.

The script asks for @connect * because the endpoint is yours to choose, not because it talks to anywhere else. Nothing is sent anywhere except the endpoint you configure.

Without a key the tutor and the translation are simply unavailable; the formatter, layout and typography work on their own.

Source

https://github.com/NihilDigit/kata-studio — MIT.