oauth-setup
Fungsinya
Skill ini memandu AI menghubungkan akun yang memakai masuk OAuth, seperti Gmail atau layanan Google lainnya. Skill ini ditujukan untuk orang yang ingin agent mereka memakai akun yang mereka miliki.
Kapan dipakai
- βSaat Anda ingin agent terhubung ke Gmail atau layanan Google lain.
- βSaat Anda ingin menghubungkan akun apa pun yang memakai masuk OAuth.
- βSaat koneksi OAuth gagal karena error redirect atau scope.
Link skill
https://github.com/spinabot/brigade/blob/main/skills/oauth-setup/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
βHubungkan akun Gmail saya agar agent bisa mengirim email untuk saya, dan pandu saya membuat klien Google.β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
AI memulai alur masuk dan memberi Anda tautan untuk menyetujui akses. AI menangkap kode persetujuan lewat pendengar lokal dan menyimpan token masuk dengan aman, sehingga kode tidak perlu disalin secara manual.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
OAuth setup
Use the oauth_authorize tool β NEVER hand-roll an http listener in bash. It opens a one-shot loopback listener on a free port (no EADDRINUSE, no port juggling), captures the code, and seals the tokens into the credential store.
The two mistakes to avoid (they cost a whole session once)
- Use a Desktop-app OAuth client, not a Web client. In Google Cloud Console β Credentials β Create OAuth client ID β Application type: Desktop app. Desktop clients accept ANY
http://127.0.0.1:<port>loopback redirect with no redirect-URI registration. A Web client requires the exact redirect URI pre-registered, which is what causesredirect_uri_mismatch. - Use the real scope. Gmail send is
https://www.googleapis.com/auth/gmail.send(NOThttps://gmail.com/..., which doesn't exist). Addopenid https://www.googleapis.com/auth/userinfo.emailif you want the account address auto-filled.
Flow
- Ask the operator to create a Desktop-app OAuth client (Gmail API enabled, consent screen in Testing with themselves as a test user) and paste the client id + secret.
- Start the flow:
oauth_authorize({ action: "start", provider: "google-gmail", authorizationEndpoint: "https://accounts.google.com/o/oauth2/v2/auth", tokenEndpoint: "https://oauth2.googleapis.com/token", userInfoEndpoint: "https://www.googleapis.com/oauth2/v3/userinfo", clientId: "<id>", clientSecret: "<secret>", scopes: ["https://www.googleapis.com/auth/gmail.send", "openid", "https://www.googleapis.com/auth/userinfo.email"], extraAuthParams: { access_type: "offline", prompt: "consent" } })access_type=offline+prompt=consentare required for a refresh token (otherwise re-auth is needed when the access token expires). - Send the operator the returned
authUrlto click. - Await the redirect β it exchanges the code and seals the tokens:
If it returns statusoauth_authorize({ action: "await", flowId: "<flowId from start>" })pending, the operator hasn't clicked yet β tell them, then callawaitagain.
Using a connected account (sending mail)
The tokens are sealed in the credential store β you can't read them from a file or the DB, and you shouldn't try. To use a connected account:
- Check what's connected:
oauth_authorize({ action: "status" })β lists each account (provider, email, scopes, expiry). No secrets. - Get a usable token:
oauth_authorize({ action: "token", provider: "google-gmail" })β returnsaccessToken. It auto-refreshes from the sealed refresh token when the old one expired, so you always get a live token. (Passprovideronly if more than one account is connected.) - Call the API with it. Gmail send:
POST https://gmail.googleapis.com/gmail/v1/users/me/messages/send, headerAuthorization: Bearer <accessToken>, body{ "raw": "<base64url RFC-822 message>" }.
Never cat the credential store, grep for the token, or hand-roll a refresh β action:"token" is the only retrieval path, and it keeps the refresh token + client secret sealed.
Pertanyaan umum
Jenis klien Google apa yang saya butuhkan?
Skill meminta Anda membuat klien aplikasi Desktop di Google Cloud, yang bekerja dengan pendengar masuk lokalnya.
Izin Gmail apa yang dipakai?
Skill memakai izin kirim Gmail, sehingga agent dapat mengirim surat atas nama Anda.
Apakah saya perlu menempelkan kode?
Tidak. Skill menangkap kode persetujuan secara otomatis lewat pendengar lokal.
Detail
Deskripsi asli dari pembuat
Connect an OAuth 2.0 service (Gmail, Google APIs, etc.) using the built-in oauth_authorize tool β get a click-to-authorize link, auto-capture the code, and seal the tokens. Use whenever the operator asks to connect Gmail / a Google API / any OAuth account.
repo: spinabot/brigade
Popularitas
- Bintang GitHub
- 11k
- Peringkat
- #11730
- Lisensi
- MIT
- Diperbarui
- 2/11/2026
Komentar
- β¦
Skill lain dari repositori ini
1password
11kMengajari agent Anda menyiapkan alat baris perintah 1Password dan masuk dengan aman, lalu membaca atau menyisipkan rahasia yang tersimpan saat dibutuhkan.
apple-reminders
11kMembantu agent Anda melihat, menambah, mengedit, menyelesaikan dan menghapus Apple Reminders dari terminal, termasuk daftar dan filter tanggal.
bluebubbles
11kMembantu agent Anda mengirim dan mengelola iMessage melalui BlueBubbles, termasuk pesan teks, lampiran, reaksi tapback, pengeditan dan pengaturan grup.
camsnap
11kMembantu agent Anda mengambil foto cepat, klip pendek atau memantau gerakan dari kamera keamanan jaringan yang sudah Anda siapkan.
Skill serupa
reverse-engineer-anything
422kMembantu agent Anda memeriksa aplikasi dan paket yang sudah dirilis untuk menjelaskan fitur, membandingkan versi, atau memandu pembangunan ulang dengan alat REA.
1password
394kMembantu agent Anda mengatur CLI 1Password, masuk, serta membaca atau menyisipkan rahasia tanpa menampilkan nilainya di chat.
healthcheck
394kMembantu agent Anda mengaudit komputer atau server OpenClaw dari risiko keamanan seperti SSH, firewall, pembaruan, dan cadangan, lalu menyarankan perbaikan aman.