api-integration
/api-integration
Wykonuje zdefiniowane przez użytkownika wywołania API podczas testów z katalogu integration/ projektu: weryfikacja efektu akcji UI, sprawdzanie odpowiedzi endpointu i zasilanie danych testowych.
- Autor
- mhmdelgazzar ↗
- Repozytorium
- agentex ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 26.10.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 5
- Skrypty
- 2
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 1
Brak sygnałów. Repozytorium zmienione 26.10.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
- 2 skrypty w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.
Skrypty: scripts/run_api.js, scripts/run_api.test.js
Co robi i kiedy
Wykonuje zdefiniowane przez użytkownika wywołania API podczas testów z katalogu integration/ projektu: weryfikacja efektu akcji UI, sprawdzanie odpowiedzi endpointu i zasilanie danych testowych.
Wyzwalacze z opisu
Oryginalny opis (EN)
Execute user-defined API calls during test runs, from the project's integration/ catalog. Use whenever a test step needs an HTTP call: verify via API that a UI action persisted, check an endpoint's response, or seed test data through a service. Triggers on spec steps starting with "api:", or requests like "verify via API", "call the endpoint", "check the response". The agent executes ONLY requests the user has defined in a *_api.json catalog (searched recursively under integration/) — it never composes its own HTTP requests.
Jak działa
- Role
- The catalog — the ONLY requests you may execute
- Step syntax in test specs
- Where the target comes from
- Safety rules (also enforced by the runner)
- Evidence
- Preflight
Podgląd SKILL.md
---
name: api-integration
description: >
Execute user-defined API calls during test runs, from the project's integration/ catalog.
Use whenever a test step needs an HTTP call: verify via API that a UI action persisted,
check an endpoint's response, or seed test data through a service. Triggers on spec steps
starting with "api:", or requests like "verify via API", "call the endpoint", "check the
response". The agent executes ONLY requests the user has defined in a *_api.json catalog
(searched recursively under integration/) — it never composes its own HTTP requests.
---
# API Integration — cataloged API steps
## Role
You execute the API call a test step asks for, strictly from the project's `integration/*_api.json`
catalog. You never compose your own HTTP request or call an endpoint outside the catalog.
Lets test scenarios call APIs **by name**, from definitions the user wrote. Execution is done
by the bundled runner script (deterministic, enforces the safety rules in code):
```
node ${CLAUDE_PLUGIN_ROOT}/skills/api-integration/scripts/run_api.js \
--entry <file-name>.<request-name> --param key=value [--param ...] \
[--expect-status 200] [--expect-field <dot.path>] [--expect-equals <dot.path>=<value>] \
[--env <environment-name>] --log <SESSION_DIR>/logs/<scenario>-<entry>.log
```
It loads the catalog, validates params, resolves env vars, performs the request, writes the
evidence log, checks expectations, and prints one JSON line:
`{"result":"PASS|FAIL|BLOCKED", ...}` (exit 0/1/2). Read
**`${CLAUDE_PLUGIN_ROOT}/skills/api-integration/references/api-requests.md`** for the catalog
format, curl fallback (if node/script fails), and assertion details — including
`--no-auth`, `--expect-contains`, `--omit`, typed `$param` body nodes and `auth.tokenStore`
(a token captured by the suite wizard).
## The catalog — the ONLY requests you may execute
Definitions live in the **consumer project** under **`./integration/`** (`<service>_api.json`),
searched recursively — hand-written catalogs typically sit flat at `integration/`, while
catalogs generated by `swagger-import` are co-located with their suite under
`integration/api_test_suites/<service>/`. Either location works; `run_api.js` finds the file
by matching the catalog's internal `"name"`, not by path. `node_modules/` and dot-directories
are not searched. Two files declaring the same `"name"` is **BLOCKED** (both files are listed)
— catalog names must be unique across `integration/`.
- If the folder/file is missing when a step needs it, scaffold from
`${CLAUDE_PLUGIN_ROOT}/skills/api-integration/templates/sample_api.json` (never overwrite),
then ask the user to define their entries.
- **Hard rule:** a step naming a request not defined in the catalog is **BLOCKED** — report
which definition is missing. Never improvise a request.
## Step syntax in test specs
```
api: <file-name>.<request-name>(param=value, ...) → <expectation>
```
Example: `api: sample-api.get-todo(id=1) → expect HTTP 200 and title present`
## Where the target comes from
A catalog's optional top-level `"target"` decides (full rules in the reference):
- **`"catalog"`** — only the catalog's own `baseUrl` refs and `auth`; the environment's `api`
block is ignored for it, base URL and token both. Every `swagger-import`ed catalog carries
it. An unset ref is BLOCKED; it never falls back to the environment's host.
- **`"environment"`** — the **`environments/<env>.json` `api` block** of the active
environment (`--env <name>`, omitted = the project's `defaultEnvironment`):
`{ "baseUrl": "https://…", "token": { "envSecret": "API_TOKEN" } }`. The token reference is
resolved from `.env` — never a value in JSON. Set it on a hand-written catalog whose
`baseUrl` uses another variable but should still follow `--env`.
- **No `target`** — the environment's `api` block applies **only** when the catalog's
`baseUrl` is absent/empty or exactly `"${API_BASE_URL}"` (the project default); any other
`baseUrl` (e.g. `"${PETSTORE_BASE_URL}"`) keeps its own `baseUrl` and `auth`, and the
environment token is never sent to it.
- Any other value → BLOCKED, naming the catalog and the allowed values.
When the environment has no `api` block, the catalog's own `baseUrl` refs and `auth` are used
(legacy fallback) — old projects keep working untouched. An unknown `--env` is BLOCKED
whatever the target.
## Safety rules (also enforced by the runner)
- Writes (POST/PUT/DELETE) run if cataloged — the catalog is the authorization.
- Secrets stay in env — catalog files hold env-var *names* (`tokenEnv`); never print values.
- Missing param/env → BLOCKED (sequential: ask the user instead).
## Evidence
Runner writes status + headers + body to the `--log` path (under the session's `logs/`).
Expectation mismatch = **FAIL** defect with that log as evidence, reported in the standard
defect format.
## Preflight
The runner needs only Node (already required by the plugin). For the curl fallback, preflight
per the reference.
Pliki w paczce (5)
- SKILL.md 5 KB
- references/api-requests.md 10 KB
- scripts/run_api.js 20 KB
- scripts/run_api.test.js 41 KB
- templates/sample_api.json 1 KB
Wersje
| Repozytorium | Wynik | Licencja |
|---|---|---|
| Ta strona · mhmdelgazzar/agentex | 100 | MIT |
| facebook/agentic-tools | 100 | MIT |
| AutumnsGrove/Lattice | 100 | AGPL-3.0 |
| srstomp/pokayokay | 100 | MIT |
| ajyadav013/claude-kit | 100 | MIT |
| ajyadav013/claude-kit | 100 | MIT |
| seb1n/awesome-ai-agent-skills | 100 | MIT |
| shurikentrade/shuriken-skills | 100 | MIT |
| LambdaTest/agent-skills | 95 | MIT |
Migawka bazy z 13.11.2026 · wersja paczki 61e54ac738af (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100db-integration
Wykonuje zdefiniowane przez użytkownika zapytania do bazy SQL Server podczas testów z katalogu integration/: weryfikacja utworzonych wierszy, wartości kolumn i dane testowe. - 100api-response-cacher
Prawdopodobnie konfiguruje cache'owanie odpowiedzi API i uruchamia się automatycznie na frazy związane z cache'em odpowiedzi w kategorii integracji API. - 90add-api-endpoint
Dodaje lub rozszerza endpoint HTTP lub API: nową trasę, handler albo metodę RPC z walidacją żądania i zdefiniowaną odpowiedzią. - 100swagger-import
Generuje katalog API i zestaw testów z dokumentu Swagger 2.0 lub OpenAPI 3.x, po zebraniu danych testowych i zatwierdzeniu. - 100api-endpoint
Podpowiada reguły przy dodawaniu lub zmianie endpointu HTTP, zwłaszcza logowania i endpointów czytających lub zmieniających dane innych osób. - 100integration-test-generator
Generuje testy integracyjne w ramach integracji API, przy pisaniu lub uruchamianiu testów.