Logotipo de Rf Restinstance

Rf Restinstance

Comunidad
manykarim
rf-restinstance

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

Descripción general

Editormanykarim
Repositoriorobotframework-agentskills
Nombre de la habilidadrf-restinstance
Estrellas
40
Forks
2
Archivos incluidos
7
LicenciaApache-2.0
Enlaces
  • Instrucciones en Markdown

    Un archivo SKILL.md que el modelo carga cuando lo necesita, de modo que solo consume tokens cuando una petición es realmente relevante.

  • Funciona con cualquier LLM

    Las habilidades de IA están en Markdown, no en código específico de un proveedor, por lo que funcionan con GPT, Claude, Gemini, Grok o un modelo local.

  • 7 archivos incluidos

    Scripts, plantillas y referencias que el modelo puede leer mientras trabaja. Los archivos son de solo lectura y nunca se ejecutan.

  • Código abierto

    Publicada por manykarim en GitHub. Revisa el contenido original antes de instalarla.

Instalación

Instala la habilidad de IA Rf Restinstance en TypingMind para usarla con cualquier LLM, o añádela a otro agente que lea SKILL.md.

1

Instalar en TypingMind

TypingMind instala una habilidad directamente desde su carpeta de GitHub: lee SKILL.md, empaqueta los archivos de recursos y guarda el resultado localmente.

  1. Abre la aplicación y ve a Plugins → Habilidades.
  2. Elige «Instalar desde GitHub».
  3. Pega la URL de la carpeta de la habilidad que se muestra a continuación y confirma.
    https://github.com/manykarim/robotframework-agentskills/tree/main/plugins/rf-agentskills/skills/rf-restinstance
  4. Activa la habilidad en cada chat en el que quieras tenerla disponible.
Plugins → Habilidades → Añadir habilidad → Desde URL de GitHub; después, pega la URL de la carpeta y pulsa Continuar.
2

Instalar en otro agente

Cualquier agente que lea el formato Agent Skills puede usar esta habilidad: copia la carpeta en el directorio de habilidades de ese agente.

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
Reinicia Claude Code después de copiarla para que detecte la nueva habilidad.

Úsala en TypingMind

Activa Rf Restinstance en cualquier chat de TypingMind y el modelo se encargará del resto. Su nombre y descripción se incluyen en el prompt del sistema y, en cuanto una petición es relevante, el modelo carga las instrucciones completas por sí solo. No tienes que invocarla manualmente y no consume tokens hasta que se utiliza.

El modelo carga Rf Restinstance automáticamente en cuanto una petición es relevante para esa habilidad.

Funciona con cualquier modelo de IA

Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que Rf Restinstance no está vinculada al modelo para el que se creó. Instálala una sola vez en TypingMind y úsala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modelo local que ejecutes tú, todo con tus propias claves API.

  • Se carga solo cuando se necesita

    El prompt del sistema solo incluye el nombre y la descripción. Las instrucciones se cargan con la primera petición relevante, por lo que una habilidad que no se usa no supone ningún coste.

  • Cambia de modelo durante el chat

    Como la habilidad contiene instrucciones y no código, cambiar de modelo no impide que funcione: el nuevo modelo lee el mismo archivo SKILL.md.

Instrucciones de la habilidad

Este es el contenido de SKILL.md que carga el modelo. Léelo antes de instalar la habilidad: contiene instrucciones que tu modelo seguirá.

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.

Archivos incluidos

El modelo los lee según los necesita mientras la habilidad está cargada. Se ofrecen como archivos de lectura y nunca se ejecutan.

Preguntas frecuentes

¿Qué hace la habilidad de IA Rf Restinstance?

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

¿Por qué usar Rf Restinstance en TypingMind?

Porque la instalas una vez y la usas con cualquier modelo. Rf Restinstance está escrita en Markdown, no en código específico de un proveedor, por lo que la misma habilidad funciona con GPT-5, Claude, Gemini, Grok o un modelo local, y puedes cambiar de modelo en mitad del chat sin que deje de funcionar. TypingMind utiliza tus propias claves API, de modo que pagas directamente a los proveedores en lugar de pagar una suscripción por puesto, y tus habilidades y chats permanecen en tu propio almacenamiento.

¿Cómo instalo Rf Restinstance en TypingMind?

Abre Plugins → Habilidades → Instalar desde GitHub en TypingMind y pega https://github.com/manykarim/robotframework-agentskills/tree/main/plugins/rf-agentskills/skills/rf-restinstance. TypingMind lee su archivo SKILL.md, empaqueta sus archivos y la instala como una habilidad que puedes activar en cada chat.

¿Qué modelos de IA pueden usar Rf Restinstance?

Cualquier modelo que conectes en TypingMind. Las habilidades de IA son instrucciones en Markdown, no código específico de un proveedor, por lo que GPT, Claude, Gemini, Grok y los modelos locales pueden cargar esta habilidad cuando una solicitud se corresponda con ella.

¿Con cuántos modelos de IA puedo usar Rf Restinstance?

Con tantos como quieras. Siempre que un modelo admita habilidades, puedes usar Rf Restinstance con él: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama y muchos más, todos en TypingMind con tus propias claves API.

¿Es gratuita la habilidad de IA Rf Restinstance?

Sí. manykarim la ha publicado en GitHub bajo la licencia Apache-2.0. Solo pagas a tu proveedor de IA por los tokens que utilizas.

¿Qué son las habilidades de IA?

Una habilidad de IA es un conjunto de instrucciones reutilizables que enseña a un modelo de IA a realizar una tarea concreta. Sigue el formato abierto Agent Skills: un archivo SKILL.md con un nombre y una descripción, además de los scripts, plantillas o archivos de referencia que pueda necesitar el modelo. El modelo solo lee las instrucciones cuando tu solicitud se corresponde con la habilidad, por lo que una habilidad instalada no supone ningún coste hasta que se utiliza.

¿En qué se diferencian las habilidades de IA de los plugins o los servidores MCP?

Un plugin o un servidor MCP proporciona al modelo nuevas herramientas que puede invocar: código que se ejecuta en algún lugar y devuelve un resultado. En cambio, una habilidad de IA aporta conocimientos y procedimientos al modelo: cómo abordar una tarea, qué pasos seguir y qué se considera un buen resultado. Las habilidades son instrucciones en Markdown, por lo que no necesitan servidor, clave API ni entorno de ejecución, y funcionan con cualquier modelo.

Ver todos

Crea ya tu propio espacio de trabajo IA

Suscríbete a nuestro boletín para recibir avisos sobre nuevas funciones y próximos sorteos 👇