Install any skill in seconds. Free to start, no credit card required.
Get Started Free →aiskillstore/jwt-auth
Use when implementing JWT authentication in FastAPI or Python projects. Triggers for: token generation, verification middleware, current user extraction, access token creation, token decoding, or role-based auth. NOT for: OAuth2 provider setup, OpenID Connect, or non-Python backends.
Passed 19 of 22 test cases with the skill, and 7 of 22 without it.
and 18 more in the full report
12 fixed7 passed either way3 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 12 test cases the skill fixed. Same model, same prompt, with and without the skill.
We are establishing quality gate criteria for our authentication backend before release. What default expiration timeout range and signing algorithm must be enforced?
| Checked | Without skill | With skill |
|---|---|---|
| Mandates access token expiration duration of 15 to 30 minutes | Missed | Passed |
| Enforces HS256 signature algorithm across all token operations | Missed | Passed |
The instructions your model reads when the skill loads.
Expert implementation of JWT token generation, verification, and user extraction for FastAPI and Python applications.
| Operation | Function | Location |
|---|---|---|
| Generate token | create_access_token(data, expires_delta=None) | auth/jwt.py |
| Verify token | verify_token(token: str) | auth/dependencies.py |
| Get current user | get_current_user(token: str) | auth/dependencies.py |
| User from payload | User.from_payload(payload) | auth/dependencies.py |
from auth.jwt import create_access_token
# Basic token with subject
token = create_access_token(data={"sub": "[email protected]"})
# Token with custom expiry (minutes)
from datetime import timedelta
token = create_access_token(
data={"sub": "[email protected]", "roles": ["admin"]},
expires_delta=timedelta(minutes=15)
)
# Token with roles for RBAC
token = create_access_token(data={"sub": "[email protected]", "roles": ["editor", "viewer"]})
Claims structure:
sub (required): User identifier (email, ID, or username)exp (auto): Expiration timeroles (optional): List of role strings for authorizationtest cases passed, vs 7 / 22 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.