auth-implementation-patterns · sickn33 — скилл для Claude Code: что делает
Скилл auth-implementation-patterns ведёт агента по проектированию и ревью входа в приложение: схема токенов, сессии, точки проверки прав.
MIT ★ 50 109 обновлён 2026-10-29
npx skills add sickn33/agentic-awesome-skills --skill auth-implementation-patterns -a claude-codeЧто делает auth-implementation-patterns
Скилл превращает задачу входа в короткий план. Сначала пользователи, тенанты, сценарии и модель угроз. Потом выбор схемы: сессии, JWT или OIDC, вместе с жизненным циклом токена. Дальше модель авторизации и точки, где проверяются политики, а в конце хранение секретов, ротация, логи и аудит.
Внутри SKILL.md и resources/implementation-playbook.md с разобранными паттернами. Пример в комплекте — Express-приложение, которое сохраняет сессию до входа: после проверки пароля идентификатор перегенерируют, из пользовательских полей оставляют только нужные, а затем проверяют, что старый cookie не открывает /api/profile. Неудачный вход, выход и падение хранилища сессий входят в список проверок.
Готового сервиса идентификации здесь нет. Адаптеры к базе и схемы запросов придётся дать свои, как и версии фреймворка, провайдера идентичности и модель тенантов. Валидация JWT не доказывает, что запись принадлежит пользователю, поэтому проверку владения тенантом и объектом пишут отдельно на чтение и на запись. Cookie-флаги не заменяют CSRF-защиту. В метаданных скилл помечен как risk: critical.
Какие задачи решает
- спроектировать вход в сервис и не забыть про модель угроз
- выбрать между сессией, JWT и OIDC под конкретное приложение
- разложить роли и права по точкам проверки политик
- найти дыру, когда после логина остаётся старая сессия
- проверить, что чужая cookie не открывает
/api/profile
Примеры запросов агенту
- Разбери аутентификацию в моём Express-приложении: какие шаги нужны и что проверить в сессиях?
- Спланируй хранение и ротацию секретов для сервиса входа, чтобы токены не попадали в логи.
- Проверь, что после логина сессия перегенерируется и старый cookie не даёт доступ к
/api/profile.
Как установить auth-implementation-patterns
1Через Skills CLI (Vercel)
npx skills add sickn33/agentic-awesome-skills --skill auth-implementation-patterns -a claude-code2Вручную: положить файлы
~/.claude/skills/auth-implementation-patterns/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/auth-implementation-patterns/
1Через Skills CLI (Vercel)
npx skills add sickn33/agentic-awesome-skills --skill auth-implementation-patterns -a codex2Вручную: положить файлы
.agents/skills/auth-implementation-patterns/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add sickn33/agentic-awesome-skills --skill auth-implementation-patterns -a cursor2Вручную: положить файлы
.cursor/skills/auth-implementation-patterns/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install sickn33/agentic-awesome-skills skills/auth-implementation-patterns2Вручную: положить файлы
.github/skills/auth-implementation-patterns/SKILL.md1Через Skills CLI (Vercel)
npx skills add sickn33/agentic-awesome-skills --skill auth-implementation-patterns -a gemini-cli2Командой платформы
gemini skills install https://github.com/sickn33/agentic-awesome-skills --path skills/auth-implementation-patternsВручную: положить файлы
.devin/skills/auth-implementation-patterns/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add sickn33/agentic-awesome-skills --skill auth-implementation-patterns -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы об auth-implementation-patterns
Как установить auth-implementation-patterns в Claude Code?
Выполните npx skills add sickn33/agentic-awesome-skills --skill auth-implementation-patterns -a claude-code. Файл скилла появится по пути ~/.claude/skills/auth-implementation-patterns/SKILL.md.
Что делает auth-implementation-patterns?
Разбирает аутентификацию и авторизацию по шагам: модель угроз, выбор схемы токенов, точки проверки политик, хранение секретов. Пригодится, когда пишете вход в сервис или проверяете чужой код авторизации.
Что нужно подготовить перед работой со скиллом?
Версии фреймворка и SDK, провайдера идентичности, модель тенантов, хранилище учётных данных и тестовое окружение. Адаптеры к базе и схемы запросов скилл не даёт, их пишут под проект.
Исходный текст
SKILL.md · MIT
--- name: auth-implementation-patterns description: "Implement or review authentication and authorization with explicit token, session and resource-access boundaries." risk: critical source: community date_added: "2026-02-27" --- # Authentication & Authorization Implementation Patterns Build secure, scalable authentication and authorization systems using industry-standard patterns and modern best practices. ## Use this skill when - Implementing user authentication systems - Securing REST or GraphQL APIs - Adding OAuth2/social login or SSO - Designing session management or RBAC - Debugging authentication or authorization issues ## Do not use this skill when - You only need UI copy or login page styling - The task is infrastructure-only without identity concerns - You cannot change auth policies or credential storage ## Instructions - Define users, tenants, flows, and threat model constraints. - Choose auth strategy (session, JWT, OIDC) and token lifecycle. - Design authorization model and policy enforcement points. - Plan secrets storage, rotation, logging, and audit requirements. - If detailed examples are required, open `resources/implementation-playbook.md`. ## Safety - Never log secrets, tokens, or credentials. - Enforce least privilege and secure storage for keys. ## Resources - `resources/implementation-playbook.md` for detailed patterns and examples. ## Worked example Input: an Express application accepts a user's login and keeps the pre-login session ID. Read the bundled playbook, regenerate the session after credential verification, save only required identity fields, and verify that the old cookie cannot access `/api/profile`. Also test failed login, logout and store failure. Expected: successful login changes the session ID; failed login grants no access. ## Inputs and prerequisites Record the installed framework/SDK versions, identity provider, tenant model, credential store and test environment. Supply project-specific database adapters and request schemas; examples are integration sketches, not a runnable identity service. ## Limitations - JWT validation does not establish resource ownership; enforce tenant and object policy on reads and writes. - Refresh rotation requires atomic persistence and concurrency tests; the issuance example alone does not provide it. - Cookie flags do not replace CSRF protection, and secure-cookie behavior needs the actual HTTPS/proxy configuration tested. - Provider integrations and password policies must be checked against current primary documentation and the application's threat model.
© sickn33 · MIT · sickn33/agentic-awesome-skills
Похожие скиллы
Все скиллы по теме «Безопасность» →Сначала — auth-implementation-patterns от других авторов.