secure-invite-and-access
Skill2 starsChanged 11 days agoMITView on GitHub
Implement access control, authentication, and authorization patterns. Use this skill when building auth endpoints, managing permissions, implementing session/token logic, or generating signed URLs — even if they just say "add auth" or "secure this endpoint". Generic template adaptable to any project's auth needs. Not for security-code-auditor, api-design-first.
In this repository63 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .agents/skills/avoid-ai-writing/AGENTS.mdAGENTS.md
- .agents/skills/do-web-doc-resolver/AGENTS.mdAGENTS.md
- .agents/skills/skill-evaluator/AGENTS.mdAGENTS.md
- scripts/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- llms-full.txtllms.txt
- llms.txtllms.txt
- accessibility-auditorSkill
- agent-browserSkill
- agentic-abstentionSkill
- agents-mdSkill
- api-design-firstSkill
- architecture-diagramSkill
- avoid-ai-writingSkill
- cicd-pipelineSkill
- cloudflare-worker-apiSkill
- codacySkill
- codeberg-apiSkill
- code-review-assistantSkill
- css-render-performanceSkill
- database-devopsSkill
- debuggerSkill
- delegateSkill
- dependency-upgradesSkill
- dist-channel-selectionSkill
- docs-hookSkill
- document-rendering-and-locatorsSkill
- dogfoodSkill
- dora-reportSkill
- do-web-doc-resolverSkill
- durable-objectsSkill
- eu-ai-act-complianceSkill
- git-github-workflowSkill
- goap-agentSkill
- implementerSkill
- intent-classifierSkill
- iterative-refinementSkill
- jules-delegatorSkill
- learnSkill
- lifecycle-managementSkill
- local-context-sanitizationSkill
- memory-contextSkill
- migration-refactoringSkill
- nested-build-isolationSkill
- privacy-firstSkill
- progressive-deliverySkill
- pwa-offline-syncSkill
- reader-ui-uxSkill
- readme-best-practicesSkill
- secrets-managementSkill
- security-code-auditorSkill
- shell-script-qualitySkill
- skill-creatorSkill
- skill-evaluatorSkill
- static-analysisSkill
- testing-strategySkill
- test-runnerSkill
- triz-solverSkill
- turso-dbSkill
- The first 60 shown.
The file
Files
Secure Invite and Access
Implement access-control rules (authentication, authorization, sessions, audit logging) for any web application.
When to Use
- Working on authentication, authorization, or session management.
- Implementing role-based access control (RBAC) or permission grants.
- Updating signed URL issuance/verification or audit logging.
- Investigating auth-related bugs or observability gaps.
Workflow
- Define auth requirements -- confirm auth model (sessions, JWT, OAuth), password hashing, TTL expectations.
- Threat model -- identify enumeration risks, replay attacks, session leakage vectors.
- Implement -- secure password hashing (Argon2id/bcrypt), session issuing/refresh/revoke, signed URLs with TTL, trace ID logging.
- Audit -- log auth events with actor + trace ID. Return generic access-denied errors; never leak whether accounts exist.
- Tests -- add coverage for password validation, session expiry, signature validation, revocation flows.
Checklist
- All auth endpoints validate payloads with schema validation + capability checks.
- Sessions + signed tokens include expiry metadata and trace IDs.
- Logout/refresh revoke existing tokens.
- Audit rows created for create/update/revoke/grant usage.
- Rate limiting or abuse guard documented (even if stubbed).
- Never expose whether an email/username exists in error messages.
See Also
security-code-auditor— Security auditsprivacy-first— Email/personal data prevention
Rationalizations
| Rationalization | Reality |
| "Auth is straightforward, I don't need a dedicated skill" | Authentication bugs are among the most critical security vulnerabilities; systematic patterns prevent common mistakes. |
| "I'll add rate limiting later" | Rate limiting is a core auth control, not an afterthought; abuse vectors are most effective before protections exist. |
| "Generic error messages are用户体验bad" | leaking account existence is a security vulnerability; generic errors are an industry-standard requirement. |
Red Flags
- Hardcoding secrets or tokens in source code instead of using environment variables.
- Skipping session revocation on logout or password change.
- Returning specific error messages like "account not found" instead of generic access-denied responses.
- Implementing custom cryptography instead of using established libraries like Argon2id or bcrypt.
References
references/auth-patterns.md- Common authentication patternsreferences/threat-model.md- Auth threat modeling guide
Voice & Context
- Default:
professional+blog - Reference:
voice-profilesskill for definitions and auto-detection.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

