Community程式設計與開發github.com

Anmolop97/Agent-Skills

掌握 JWT、OAuth2、工作階段管理及 RBAC 等身分驗證與授權模式,建構安全且可擴充的存取控制系統。適用於實作驗證系統、保護 API 或除錯安全性問題時使用。

Agent-Skills 是什麼?

此技能旨在協助開發者或 AI 代理程式,實作符合業界標準且安全可靠的「身分驗證與授權」機制。它涵蓋 JWT(JSON Web Token)、OAuth2、精簡版身分識別協定(OIDC)、工作階段管理以及基於角色的存取控制(RBAC)等核心模式,讓您能夠設計出可擴充的存取控制系統。此技能特別適用於保護 REST 或 GraphQL API、加入社交登入或單一登入(SSO)功能,以及進行驗證或授權問題的除錯。其主要支援平台為 Claude Code、Cursor、Codex 等 AI 代理工具,透過遵循一系列操作指南(如定義使用者、租戶、流程及威脅模型)來確保安全實作。此外,技能強調安全最佳實務,包括絕不記錄機密資料(如令牌或憑證)、強制最小權限原則,以及規劃金鑰儲存與輪換機制。若需更詳細的實作範例,技能會引導使用者開啟 `resources/implementation-playbook.md` 資源檔案。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Anmolop97/Agent-Skills/tree/HEAD/skills/auth-implementation-patterns

Installed? Explore more 程式設計與開發 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

身分驗證與授權實作模式

運用業界標準模式與現代最佳實務,建構安全且可擴充的身分驗證與授權系統。

使用此技能的時機

  • 實作使用者驗證系統時
  • 保護 REST 或 GraphQL API 時
  • 加入 OAuth2/社交登入或單一登入(SSO)時
  • 設計工作階段管理或 RBAC 時
  • 除錯身分驗證或授權問題時

不應使用此技能的時機

  • 只需 UI 文案或登入頁面樣式
  • 任務僅涉及基礎架構而無身分管理需求
  • 無法變更驗證政策或憑證儲存方式

操作指南

  • 定義使用者、租戶、流程及威脅模型限制。
  • 選擇驗證策略(工作階段、JWT、OIDC)及令牌生命週期。
  • 設計授權模型與政策執行點。
  • 規劃機密儲存、輪換、記錄及稽核需求。
  • 若需詳細範例,請開啟 resources/implementation-playbook.md。

安全注意事項

  • 絕不記錄機密、令牌或憑證。
  • 強制最小權限原則並確保金鑰的儲存安全。

資源

  • resources/implementation-playbook.md:提供詳細模式與範例。

Individual skills in this repo

This repo contains 4 individual skills — each has its own dedicated page.

Anmolop97/Agent-Skills

Searches, installs, updates, and lists skills from the Antigravity Skill Vault. Use when choosing or managing workspace or global skills through the npm CLI.

Anmolop97/Agent-Skills

Master REST and GraphQL API design principles to build intuitive, scalable, and maintainable APIs that delight developers. Use when designing new APIs, reviewing API specifications, or establishing API design standards.

Anmolop97/Agent-Skills

Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER — read BEFORE opening the target file; don't skip because it "looks like a one-liner" — whenever: the prompt names Claude/Anthropic in any form (Claude, Anthropic, Fable, Opus, Sonnet, Haiku, `anthropic`, `@anthropic-ai`, `claude-*`, `us.anthropic.*`, `[1m]`); the user asks about an LLM (pricing/model choice/limits/caching) — never answer from memory; OR the task is LLM-shaped with provider unstated (agent/MCP/tool-definition/multi-agent/RAG/LLM-judge/computer-use; generate/summarize/extract/classify/rewrite/converse over NL; debugging refusals/cutoffs/streaming/tool-calls/tokens). SKIP only when another provider is being worked on (overrides all triggers): OpenAI/GPT/Gemini/Llama/Mistral/Cohere/Ollama named in the query; OR `grep -rE 'openai|langchain_openai|google.generativeai|genai|mistralai|cohere|ollama'` over the project hits (run this grep FIR...

Anmolop97/Agent-Skills

Searches, installs, updates, and lists skills from the Antigravity Skill Vault. Use when choosing or managing workspace or global skills through the npm CLI.

相關技能