SkillsReviewed · secondsky

API Authentication

API Authentication is an assistant skill for developers building API access controls, but its examples require application integration and security hardening before production use. It covers Node.js JWT handling and Flask examples for role checks, Google sign-in and hashed API keys.

Researched 16 Nov 2026

In short.

API Authentication is an assistant skill for developers implementing API authentication, but its incomplete examples include Flask development-secret fallbacks that need correction before production use. It combines security guidance with Node.js JWT helpers and Flask examples for role-based access, refresh tokens, Google sign-in and API keys. No code was executed; runtime compatibility, authentication correctness and production security remain unassessed.

Researched and written by an AI model and checked by a second AI model. How it works

Coverage comprises plugins/api-authentication/skills/api-authentication/SKILL.md and plugins/api-authentication/skills/api-authentication/references/python-flask.md at revision 88378361314f558fb719aec0af9fd898ab36f0b2, plus the repository-level LICENSE as a related notice outside that folder. Other repository resources, external dependency documentation and applications built from these examples are outside the covered scope. No code, assistant session or deployment was run; runtime compatibility, production security and performance remain unassessed.

The overview

Identity

API Authentication is the api-authentication skill in secondsky/claude-skills. Its SKILL.md supplies task-specific guidance and JavaScript examples, while references/python-flask.md supplies Python examples. It is an assistant instruction resource, rather than a standalone authentication service or complete application.

The original resource folder is [https://github.com/secondsky/claude-skills/tree/main/plugins/api-authentication/skills/api-authentication]. Host-specific installation and loading behavior are not documented in the supplied files.

Assessment

The resource is useful as a compact reference for drafting authentication code and identifying implementation tasks. It provides concrete token handling, role checks and API-key lookup logic, rather than only describing authentication concepts.

The examples leave substantial integration work to the developer. Database models, application wiring and several security controls are missing, and the Flask configurations accept known development secrets when environment variables are absent. The files do not establish that an application built from them is secure or operational.

Users

The stated audience includes developers implementing authentication systems, third-party integrations and service-to-service communication, or investigating token and authentication-flow errors.

Beginners can use the examples to understand how credentials, tokens and roles connect, but will need help completing the application and reviewing security decisions. Experienced Node.js and Flask developers can more readily adapt the fragments, provided they check library compatibility and fill the omitted lifecycle controls.

Capabilities

The Node.js example creates signed access and refresh tokens and verifies access tokens received in a Bearer authorization header. It checks the header format and returns authentication errors for missing or invalid tokens.

The Flask reference shows password-hash checking, access and refresh token creation, role-based route protection, Google sign-in through Authlib, and API keys stored as SHA-256 hashes. API-key lookup requires an active record and records its last-use time.

The main file also recommends HTTPS, HttpOnly token cookies, password hashing, authentication rate limits, secret rotation and security headers. These recommendations are broader than the controls actually implemented in the snippets.

Using it

Requirements

The JavaScript example requires Node.js, jsonwebtoken and a web framework exposing the shown request, response and middleware interfaces. It reads JWT_SECRET and REFRESH_SECRET from the environment.

The Python examples use Flask, Flask-JWT-Extended, Werkzeug and Authlib, alongside Python standard-library modules. They also require application-specific User and ApiKey models and a database object named db, whose definitions are absent.

Google sign-in requires GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET and a registered callback URL. No dependency versions, supported runtime versions, installation manifest or assistant-host compatibility requirements are supplied.

Mechanism

A JSON Web Token, or JWT, carries signed claims about a user. The Node.js example places the user ID and role in a 15-minute access token and creates a separate seven-day refresh token using another secret. Its middleware verifies the access token and attaches the decoded claims to the request.

The Flask role decorator verifies a JWT and checks its role claim. The refresh route looks up the user again before issuing an access token with the current role. Google sign-in maps the returned subject identifier to a local user, while API-key authentication hashes the submitted X-API-Key value before querying stored records.

Setup

Keep SKILL.md and references/python-flask.md in their original relative layout so the reference link remains usable. The supplied files contain no assistant-specific installation command, so successful automatic loading is unknown.

Application setup requires choosing the relevant examples, supplying database models and shared imports, and configuring the authentication libraries on the actual application. Set the required secrets explicitly and replace the Flask development-secret fallbacks with configuration that rejects missing production secrets.

For Google sign-in, configure the client credentials and register the callback URL. The Google block creates a separate Flask application and relies on JWT functions and response helpers that are not imported or configured within that block, so it requires deliberate integration.

Example

The Flask reference illustrates an administrator-only endpoint. Its /login handler accepts email and password, checks the stored password hash and creates an access token containing the user's role. The /admin endpoint applies role_required(['admin']), whose code returns 403 when the role is not allowed.

The separate /refresh handler requires a refresh token and retrieves the user's current role before creating another access token. This describes the supplied code, not an observed request sequence; database definitions and application integration are still required.

Assessment & evidence

Limitations

The Flask JWT and session configurations fall back to publicly visible development-secret strings if their environment variables are missing. Comments warn against production use, but the assignments do not enforce that restriction.

The checklist recommends HttpOnly cookies, bcrypt with a cost factor of at least 12, rate limiting and secret rotation. The examples return tokens as JSON and do not implement browser token storage, cookie-related CSRF protection, password creation, rate limiting or refresh-token rotation and revocation. The Flask password check alone does not establish the hashing scheme used when passwords were stored.

The login handler assumes parsed JSON supports .get without first checking that it is an object. The refresh handler accesses user.role without handling a missing user. The Google fragment and database-dependent examples are not self-contained applications.

No test suite, dependency constraints, security evaluation or performance measurements are included in the supplied scope. The authentication-method table's broad security ratings do not establish the security of a particular implementation.

Reasoning

The strongest supported use is as an assistant reference for drafting and inspecting authentication code. Concrete examples explain the main components, while the checklist identifies controls developers should consider.

The missing application components, development-secret fallbacks and absent token-lifecycle controls support treating the snippets as starting points requiring independent security review. There is no evidence that loading this skill improves generated-code correctness or produces a complete authentication system.

Alternatives

Within this resource, developers can compare JWT-based application access, Google sign-in for third-party identity and API keys for service clients. Sessions are listed for traditional web applications, but no complete session-authentication implementation is supplied.

The Node.js and Flask examples provide different implementation paths. No competing assistant skills, complete authentication frameworks or managed identity services are evaluated, so comparative security, completeness, maintenance and cost are unknown.

Evidence

The source material comprises the skill's SKILL.md, its linked references/python-flask.md and the repository-level LICENSE. Findings concern the contents of those documents; nothing was executed, and assistant behavior, dependency installation and deployed authentication flows were not assessed.

The original captured skill file is [https://raw.githubusercontent.com/secondsky/claude-skills/88378361314f558fb719aec0af9fd898ab36f0b2/plugins/api-authentication/skills/api-authentication/SKILL.md].

Its captured Flask reference is [https://raw.githubusercontent.com/secondsky/claude-skills/88378361314f558fb719aec0af9fd898ab36f0b2/plugins/api-authentication/skills/api-authentication/references/python-flask.md].

Access & freshness

Costs

The MIT licence grants permission to use and redistribute the material free of charge. The supplied files give no prices for an assistant subscription, model access, hosting, database operation or identity-provider services. Any resulting operating cost is unknown.

Rights

SKILL.md declares MIT licensing. The repository LICENSE names Claude Skills Maintainers with a 2025 copyright and permits use, modification, distribution, sublicensing and sale, provided the copyright and permission notices accompany copies or substantial portions.

The licence disclaims warranties and liability. Retain the full supplied notice when redistributing the captured documents. Licences for separately installed dependencies are not established by these files.

The captured licence is available at [https://raw.githubusercontent.com/secondsky/claude-skills/88378361314f558fb719aec0af9fd898ab36f0b2/LICENSE].

Freshness

The supplied snapshot identifies source revision 88378361314f558fb719aec0af9fd898ab36f0b2 and capture time 2026-11-16T06:18:06.114Z. That timestamp records acquisition, not the date of the latest code maintenance.

The documents specify no dependency versions or compatibility matrix. Later repository changes, current library compatibility and compatibility with a particular assistant host are unknown.

Actions

Obtain both skill documents from the original links and retain the MIT notice. Confirm how the intended assistant host loads a skill before relying on automatic activation.

Before using the examples in an application, remove development-secret fallbacks, supply the missing models and application configuration, decide token-storage and refresh-token policies, and implement the checklist controls relevant to the application.

Validate request-body types and missing-user handling. Then verify invalid and expired tokens, denied roles, inactive API keys, refresh behavior and the Google callback using the chosen library versions. These are recommended next steps; no such verification results are available here.

Evidence for this report

LICENSEnotice · checked 2026-11-16