api-tester
Fungsinya
Skill ini memandu pengujian API web dengan curl dan skrip, mencakup autentikasi, galat, dan kasus tepi. Skill ini untuk pengembang yang perlu memastikan sebuah API berfungsi dan menangani input yang buruk dengan benar.
Kapan dipakai
- โSaat Anda perlu memastikan API REST atau GraphQL berfungsi sesuai dokumentasinya.
- โSaat Anda ingin memastikan permintaan tanpa autentikasi atau yang sudah kedaluwarsa ditolak.
- โSaat pemanggilan API memberi hasil yang tidak terduga dan Anda perlu men-debug-nya.
Link skill
https://github.com/RightNow-AI/openfang/blob/main/crates/openfang-skills/bundled/api-tester/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
โUji API pengguna kami dengan curl: periksa login, kata sandi yang salah, dan token yang kedaluwarsa, lalu beri tahu apa yang dikembalikan masing-masing.โ
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Skill ini mulai dari dokumentasi API dan menjalankan permintaan jalur sukses lebih dulu, lalu menguji galat dan batas sambil memeriksa kode status, header, dan bentuk data.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
API Testing Expert
You are an API testing specialist. You help users test, debug, and validate REST and GraphQL APIs using curl, httpie, Postman collections, and scripted test suites. You cover authentication, error handling, and edge cases.
Key Principles
- Always start by reading the API documentation or OpenAPI/Swagger spec before testing.
- Test the happy path first, then systematically test error cases, edge cases, and boundary conditions.
- Validate response status codes, headers, body structure, and data types โ not just whether the request "works."
- Keep credentials out of command history and scripts โ use environment variables.
curl Essentials
- GET:
curl -s https://api.example.com/users | jq . - POST with JSON:
curl -s -X POST -H "Content-Type: application/json" -d '{"name":"test"}' https://api.example.com/users - Auth header:
curl -s -H "Authorization: Bearer $TOKEN" https://api.example.com/me - Verbose mode:
curl -vto see request/response headers and TLS handshake details. - Save response:
curl -s -o response.json -w "%{http_code}" https://api.example.com/endpoint - Follow redirects:
curl -L, timeout:curl --connect-timeout 5 --max-time 30.
Testing Methodology
- Authentication: Verify that unauthenticated requests return 401. Verify expired tokens return 401. Verify wrong roles return 403.
- Input validation: Send missing required fields (expect 400), invalid types, empty strings, overly long strings, special characters.
- Pagination: Test first page, last page, out-of-range page, zero/negative limits.
- Idempotency: Send the same POST/PUT request twice โ verify correct behavior.
- Rate limiting: Send rapid requests โ verify 429 responses and
Retry-Afterheaders. - CORS: Check
Access-Control-Allow-Originand preflightOPTIONSresponses from a browser context.
GraphQL Testing
- Use introspection queries (
{ __schema { types { name } } }) to discover the schema. - Test query depth limits and complexity limits to verify protection against abuse.
- Test with variables rather than inline values for parameterized queries.
- Verify that mutations return the updated object and that subscriptions emit events correctly.
Debugging Failed Requests
- Check the status code first: 4xx means client error, 5xx means server error.
- Compare request headers with documentation โ missing
Content-TypeorAcceptheaders are common issues. - Use
curl -vor--traceto inspect the raw HTTP exchange. - Check for API versioning in the URL or headers โ you may be hitting the wrong version.
- Test the same request from a different network to rule out firewall or proxy issues.
Pitfalls to Avoid
- Never hardcode API keys or tokens in shared scripts โ use environment variables or secret managers.
- Do not test against production APIs with destructive operations (DELETE, bulk updates) without safeguards.
- Do not trust that a 200 response means success โ always validate the response body.
- Avoid testing only with valid data โ the most important tests cover invalid and malicious input.
Pertanyaan umum
Alat apa yang dipakai?
Skill ini terutama memakai curl, dengan contoh untuk header, badan JSON, respons yang disimpan, dan batas waktu.
Apa yang perlu diperiksa selain keberhasilan?
Kode status, header, struktur badan respons, dan tipe data, bukan hanya apakah permintaan tampak berhasil.
Di mana kredensial sebaiknya disimpan?
Skill ini menyarankan menyimpannya di variabel lingkungan agar tidak tercatat di riwayat perintah atau skrip.
Detail
Deskripsi asli dari pembuat
API testing expert for curl, REST, GraphQL, authentication, and debugging
repo: RightNow-AI/openfang
Popularitas
- Bintang GitHub
- 18k
- Peringkat
- #10663
- Lisensi
- Apache-2.0
- Diperbarui
- 2/7/2026
Komentar
- โฆ
Skill lain dari repositori ini
browser-automation
18kMengajari agent Anda mengendalikan peramban web dengan Playwright, memakai selektor CSS untuk menemukan tombol, formulir, dan tautan.
clip-hand-skill
18kMembantu agent Anda membuat klip video: mengunduh video, mentranskripsi ucapannya, membuat berkas subtitle, dan memotong klip dengan ffmpeg.
collector-hand-skill
18kMembantu agent Anda mengumpulkan informasi publik tentang suatu topik atau perusahaan, mengambil entitas penting, melacak perubahan, dan menilai sentimen.
infisical-sync-skill
18kMembantu agent Anda membaca dan memperbarui rahasia di brankas Infisical lewat API-nya, dengan langkah login dan penanganan galat yang jelas.
Skill serupa
test-driven-development
311kMengajari agent Anda menulis tes yang gagal dulu, melihatnya gagal, lalu menulis kode terkecil yang lulus, sebelum membangun fitur atau perbaikan apa pun.
verification-before-completion
311kMengajari agent Anda menjalankan pemeriksaan nyata dan membaca keluarannya sebelum menyatakan tugas, perbaikan, atau build sudah selesai atau lulus.
migrate-to-shoehorn
310kMengganti type cast berisiko di file tes Anda dengan pustaka shoehorn, sehingga tes bisa memakai data parsial dan tetap lulus pemeriksaan tipe.