Logo vun Rf Restinstance

Rf Restinstance

Communautéit
manykarim
rf-restinstance

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

Iwwersiicht

Editeurmanykarim
Repositoryrobotframework-agentskills
Skill-Nummrf-restinstance
Stären
40
Forks
2
Matgeliwwert Fichieren
7
LizenzApache-2.0
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 7 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    Vum manykarim op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Rf Restinstance an TypingMind, fir e mat all LLM ze benotzen, oder füügt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vun GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier hei drënner an a bestätegt.
    https://github.com/manykarim/robotframework-agentskills/tree/main/plugins/rf-agentskills/skills/rf-restinstance
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill afügen → Vu GitHub-URL, pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an de Skill-Verzeechnes vun deem KI-Agent.

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
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Rf Restinstance an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Rf Restinstance automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Rf Restinstance net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Keys.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

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.

Matgeliwwert Fichieren

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Rf Restinstance?

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

Firwat Rf Restinstance op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Rf Restinstance besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt amplaz vun engem Abonnement pro Benotzerplaz. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Rf Restinstance an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/manykarim/robotframework-agentskills/tree/main/plugins/rf-agentskills/skills/rf-restinstance an. TypingMind liest d'Datei SKILL.md, bündelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Rf Restinstance benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Rf Restinstance benotzen?

Esou vill Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Rf Restinstance domat benotzen – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama a méi – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Rf Restinstance gratis?

Jo. De Skill gëtt vum manykarim ënner der Lizenz Apache-2.0 op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbaart Pak vun Instruktiounen, dat engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt en nokënnt a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a keng Lafzäitëmfeld a funktionéiere mat all Modell.

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇