Логотип Rf Restinstance

Rf Restinstance

Сообщество
manykarim
rf-restinstance

Use first, before answering, for RF API tests with RESTinstance: JSON Schema. Not installs: rf-setup.

Обзор

Издательmanykarim
Репозиторийrobotframework-agentskills
Название навыкаrf-restinstance
Звёзды
40
Форки
2
Встроенные файлы
7
ЛицензияApache-2.0
Ссылки
  • Инструкции в формате Markdown

    Файл SKILL.md, который модель загружает по необходимости, поэтому токены расходуются только при подходящем запросе.

  • Работает с любой языковой моделью

    Навыки ИИ — это обычный Markdown, а не код для конкретного поставщика, поэтому они работают с GPT, Claude, Gemini, Grok и локальными моделями.

  • Файлы в комплекте: 7

    Скрипты, шаблоны и справочные материалы, которые модель может читать во время работы. Файлы доступны только для чтения и никогда не выполняются.

  • Открытый исходный код

    Опубликовано на GitHub: manykarim. Перед установкой изучите исходные материалы.

Установка

Установите навык ИИ Rf Restinstance в TypingMind, чтобы использовать его с любой LLM, или добавьте его в другой агент, который умеет читать SKILL.md.

1

Установка в TypingMind

TypingMind устанавливает навык прямо из его папки на GitHub: читает SKILL.md, собирает файлы ресурсов и сохраняет результат локально.

  1. Откройте приложение и перейдите в раздел «Плагины → Навыки».
  2. Выберите «Установить из GitHub».
  3. Вставьте указанную ниже ссылку на папку навыка и подтвердите установку.
    https://github.com/manykarim/robotframework-agentskills/tree/main/plugins/rf-agentskills/skills/rf-restinstance
  4. Включите навык в каждом чате, где хотите его использовать.
Плагины → Навыки → Новый навык → По ссылке GitHub, затем вставьте ссылку на папку и нажмите «Продолжить».
2

Установка в другом агенте

Любой агент с поддержкой формата Agent Skills может использовать этот навык — скопируйте папку в каталог навыков этого агента.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/manykarim/robotframework-agentskills.git /tmp/robotframework-agentskills
mkdir -p .claude/skills
cp -r /tmp/robotframework-agentskills/plugins/rf-agentskills/skills/rf-restinstance .claude/skills/rf-restinstance
После копирования перезапустите Claude Code, чтобы загрузить новый навык.

Использование в TypingMind

Включите навык Rf Restinstance в любом чате TypingMind, и дальше модель всё сделает сама. Его название и описание хранятся в системном промпте, а при появлении подходящего запроса модель сама загружает полные инструкции. Вам не нужно вызывать навык вручную, и до фактического использования он не расходует токены.

Модель сама загружает навык Rf Restinstance, как только появляется подходящий для него запрос.

Работает с любой моделью ИИ

Навыки ИИ — это обычные инструкции в Markdown, а не код для конкретного поставщика, поэтому навык Rf Restinstance не привязан к модели, для которой он был создан. Установите его один раз в TypingMind и используйте с GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama или локальной моделью, которую запускаете самостоятельно, — со своими API-ключами.

  • Загружается только при необходимости

    Системный промпт содержит только название и описание. Инструкции загружаются при первом подходящем запросе, поэтому неиспользуемый навык не расходует токены.

  • Меняйте модели прямо в чате

    Навык состоит из инструкций, а не кода, поэтому смена модели не нарушает его работу: новая модель читает тот же файл SKILL.md.

Инструкции навыка

Это содержимое файла SKILL.md, которое загружает модель. Прочитайте его перед установкой: навык — это инструкции, которым будет следовать ваша модель.

RESTinstance Library Skill

RESTinstance (Library REST) sends JSON requests and asserts the last response with typed, path-based keywords that also build a JSON Schema of it. Prefer it over rf-requests when the contract matters more than single values: schema files, learned schemas, OpenAPI specs, types and constraints. For plain request/response checks, form posts, sessions or file uploads use rf-requests. Verified against RESTinstance 1.8.0, Robot Framework 7.4.

When to use

Load this skill first, before exploring the project or answering from memory, when a Robot Framework API test uses RESTinstance (Library REST):

  • typed assertions on the JSON response (Integer, String, Object, Array);
  • JSON Schema validation, generating a schema from a response, OpenAPI/Swagger spec checks;
  • a test fails on a type mismatch in the response body ("Expected integer, but got string"), or the user mentions RESTinstance or wants schema-driven API tests.

Not this skill: suites that import RequestsLibrary, or generic API tests with no library named, use rf-requests.

Installation

Install into the project environment (see rf-setup for uv/venv/Poetry, CI and troubleshooting; follow the project's existing tool):

bash
uv add RESTinstance

Requires Python ≥ 3.11; the SyntaxWarning lines printed on import (from flex) are harmless.

Import and defaults

Import with the base URL, send paths, and assert the status first on every request:

robotframework
*** Settings ***
Library    REST    ${API_URL}

*** Test Cases ***
Get User
    GET        /users/1
    Integer    response status    200
    Object     response body    required=["id", "name"]
    String     response body name    Alice
    Integer    response body id    minimum=1

${API_URL} has to exist when the library is imported (*** Variables *** or --variable). A URL without scheme gets http://. Escape hatch: when the base URL is only known at run time (a Suite Setup starts the server), import REST without a URL and send full URLs (GET ${API_URL}/users/1). Schema files and OpenAPI specs: see references/schema-validation.md.

Which keyword for which situation

SituationUseDetails
Send a requestGET / POST /users {"name": "Bo"} / PUT / PATCH / DELETEreferences/json-handling.md
Query string, per-request headers, timeoutGET /users query={"page": "2"} headers={...} timeout=5—
Assert statusInteger response status 200 (several values = any of them)—
Assert a field's type, value or constraintString response body email format=email, Integer $[*].id minimum=1references/json-handling.md
Assert a field is absent or nullMissing response body error, Null response body deleted_at—
Read a value for the next request${id}= Output response body id also_console=falsereferences/json-handling.md
Validate against a schema fileExpect Response Body ${CURDIR}/schemas/user.json before the requestreferences/schema-validation.md
Learn a schema from a real responseOutput Schema response body file_path=...references/schema-validation.md
Stop schema validationClear Expectations, or validate=false on one requestreferences/schema-validation.md
Headers for all later requestsSet Headers {"Authorization": "Bearer ${TOKEN}"}references/authentication.md
Basic/digest auth, client certificateSet Client Authentication, Set Client Certreferences/authentication.md
Self-signed TLS in a test environmentSet SSL Verify falsereferences/troubleshooting.md
See what the response looks likeOutput response body, Output Schema—
Dump every request and response of the suiteREST Instances ${OUTPUT DIR}/instances.jsonreferences/troubleshooting.md

Paths start at the last instance: response status, response body user name, response body items 0 id, response headers Content-Type, or JSONPath rooted at the body ($.items[*].id).

Agent workflow

  1. Look up each keyword before you use it: robotcode doc keyword REST "<Keyword>"; find names with robotcode doc keywords REST "<text>". Copy names and arguments exactly as robotcode shows them.
  2. Write the test with the defaults above and the decision table.
  3. Check the changed files statically: robotcode analyze code <changed files> (through the project environment, e.g. uv run robotcode …). Fix every error it reports.
  4. Run them by longname: robotcode robot -bl "<Suite.Sub.Test>" (longnames from robotcode discover tests), or pass a whole directory. Don't pass a single .robot file: it skips the parent __init__.robot.
  5. Read the results: robotcode results show --failed, then robotcode results log -bl "<longname>". Don't parse output.xml by hand.
  6. Fix the cause and go back to step 3 (static check). Stop when the tests pass or the failure is shown to be in the system under test, and say which.

Gotchas

  • Error statuses pass silently — GET returns normally on 404 or 500, because RESTinstance only records the response as a new instance. Assert Integer response status 200 (or the expected error status) after every request.
  • Values after the path are exact allowed values, not patterns — String response body name Ali* fails on Alice, and /regex/ is compared literally, because extra arguments become the schema's enum. Write String response body name pattern=^Ali, or list every allowed value (Integer response status 200 201).
  • String arguments are decoded as JSON — values and validation arguments get quotes added and go through json.loads, so pattern=^\\d+ fails with Input not is valid JSON, and a single-quoted body ({'a': 1}) is sent as one JSON string. Write pattern=^\\\\d+ (or [0-9]) and bodies as double-quoted JSON or a &{dict}.
  • A JSON Schema passed as a value is an enum too — Object response body {"type": "object"} compares the body with that dict and fails. Use validation arguments (Object response body required=["id"]) or Expect Response Body with a schema.
  • Expectations leak into later tests — Expect Response Body, Expect Response and Expect Request change the library instance, which lives for the whole suite (ROBOT_LIBRARY_SCOPE = "TEST SUITE"), so every later request in the suite is validated against them and fails the HTTP keyword itself. Set them in the test that needs them and end it with Clear Expectations (or use them on purpose in Suite Setup).
  • Headers and auth persist for the suite — Set Headers and Set Client Authentication update the instance's request defaults, so a token set in one test is sent by all later tests. Use headers= on a single request, or reset with Set Client Authentication ${NONE}.
  • Type keywords return a list — ${id}= Integer response body id stores [1], because the keyword returns every match of the path. Use ${id}= Output response body id also_console=false for a single value (or ${id}[0]).
  • Output and Output Schema print to the console — also_console=True by default, which floods CI logs. Pass also_console=false once the paths are known.

When to read the references

ReadWhen
references/json-handling.mdWriting field paths, JSONPath, validation arguments, or chaining values between requests
references/schema-validation.mdUsing schema files, learning schemas with Output Schema, expectations, or an OpenAPI spec=
references/authentication.mdAdding tokens, API keys, basic/digest auth or client certificates
references/troubleshooting.mdA request or assertion fails with an error you don't understand

Examples in assets/examples/: basic-rest.robot (requests, paths, chaining, negative status), schema-validation.robot (learned schema, schema file, expectations).

Companion Skills

NeedSkill
API tests with RequestsLibraryrf-requests
Install Robot Framework or a library, fix the environmentrf-setup
Write tests, suites, user keywords, resources and variables in Robot Framework syntaxrf-language

For running, discovering, keyword documentation, result analysis and debugging with the robotcode CLI, use the robotcode skill of the robotcode plugin (robotcode@robotframework-agent-plugins); the commands above work without it.

Встроенные файлы

Модель читает эти файлы по мере необходимости, пока навык загружен. Они доступны только для чтения и никогда не выполняются.

Часто задаваемые вопросы

Что делает навык ИИ Rf Restinstance?

Use first, before answering, for RF API tests with RESTinstance: JSON Schema. Not installs: rf-setup.

Зачем использовать Rf Restinstance в TypingMind?

Потому что вы устанавливаете навык один раз и используете его с любой моделью. Rf Restinstance — это обычный текст в формате Markdown, а не код для конкретного поставщика, поэтому один и тот же навык работает с GPT-5, Claude, Gemini, Grok или локальной моделью. Вы можете менять модель прямо во время чата, и навык продолжит работать. TypingMind использует ваши собственные ключи API, поэтому вы платите поставщикам напрямую, а не оформляете подписку с оплатой за каждое место. Ваши навыки и чаты остаются в вашем собственном хранилище.

Как установить Rf Restinstance в TypingMind?

В TypingMind откройте «Плагины → Навыки → Установить из GitHub» и вставьте https://github.com/manykarim/robotframework-agentskills/tree/main/plugins/rf-agentskills/skills/rf-restinstance. TypingMind прочитает файл SKILL.md, включит сопутствующие файлы в пакет и установит навык, который можно включать отдельно для каждого чата.

Какие модели ИИ могут использовать Rf Restinstance?

Любая модель, которую вы подключите в TypingMind. Навыки ИИ — это обычные инструкции в формате Markdown, а не код для конкретного поставщика, поэтому GPT, Claude, Gemini, Grok и локальные модели могут загружать этот навык, когда запрос ему соответствует.

Со сколькими моделями ИИ можно использовать Rf Restinstance?

С любым количеством. Если модель поддерживает навыки, вы можете использовать с ней Rf Restinstance: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama и другие — всё в TypingMind с вашими собственными ключами API.

Бесплатен ли навык ИИ Rf Restinstance?

Да. Навык опубликован на GitHub автором manykarim по лицензии Apache-2.0. Вы платите только своему поставщику ИИ за использованные токены.

Что такое навыки ИИ?

Навык ИИ — это многоразовый набор инструкций, который объясняет модели ИИ, как выполнять конкретную задачу. Он соответствует открытому формату Agent Skills: файл SKILL.md с названием и описанием, а также любые скрипты, шаблоны или справочные файлы, которые могут понадобиться модели. Модель читает инструкции, только когда ваш запрос соответствует навыку, поэтому установленный навык ничего не стоит, пока не используется.

Чем навыки ИИ отличаются от плагинов и серверов MCP?

Плагин или сервер MCP даёт модели новые инструменты для вызова — код, который где-то выполняется и возвращает результат. Навык ИИ вместо этого даёт модели знания и порядок действий: как подойти к задаче, какие шаги выполнить и каким должен быть хороший результат. Навыки — это обычный текст в формате Markdown, поэтому им не нужны сервер, ключ API или среда выполнения, и они работают с любой моделью.

Все

Создайте свою рабочую ИИ-среду сейчас

Подпишитесь на нашу рассылку, чтобы узнавать о новых функциях и предстоящих розыгрышах 👇