implement-api-authentication

implement-api-authentication is a skill for Claude Code, Codex from tarlepp/symfony-flex-backend. It costs 27 tokens per session (555 once invoked), scanned A, original, MIT.

A Symfony workflow for controlling how API callers prove their identity and what they are allowed to access. It follows existing JWT, API-key, role, and voter patterns, where voters are permission checks for particular resources or actions.

In plain words
What is it for?
Use it to change accepted credentials, public or protected endpoints, roles, permissions, or token flows. It also directs related security tests and checks access-control ordering.
Why use it?
Authentication and authorization changes can accidentally expose protected endpoints or weaken access rules. This helps trace the current security setup and preserve firewall, token, route, and role behavior.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to change accepted credentials, public or protected endpoints, roles, permissions, or token flows. It also directs related security tests and checks access-control ordering.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tarlepp/symfony-flex-backend/implement-api-authentication
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add tarlepp/symfony-flex-backend --skill implement-api-authentication
Clone the repo
git clone --depth 1 https://github.com/tarlepp/symfony-flex-backend

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for implement-api-authentication

README.md
[![agentmods](https://agentmods.dev/badge/skills/tarlepp/symfony-flex-backend/implement-api-authentication/github.svg)](https://agentmods.dev/skills/tarlepp/symfony-flex-backend/implement-api-authentication)
Your own site
<a href="https://agentmods.dev/skills/tarlepp/symfony-flex-backend/implement-api-authentication"><img src="https://agentmods.dev/badge/skills/tarlepp/symfony-flex-backend/implement-api-authentication/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for implement-api-authentication

Your own site · 80×15
<a href="https://agentmods.dev/skills/tarlepp/symfony-flex-backend/implement-api-authentication"><img src="https://agentmods.dev/badge/skills/tarlepp/symfony-flex-backend/implement-api-authentication.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 27 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 555 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00027 $0.00555
Opus 5.5 $0.00011 $0.00222
Sonnet 5.5 $0.00005 $0.00111
Haiku 4.5 $0.00003 $0.00056

Measured today against content hash 0cc5b3fcf910, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

implement-api-authentication scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.github/skills/implement-api-authentication/SKILL.md · 49 lines

How it starts

The opening of the file, as written. The whole thing — 49 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Implement API authentication and authorization

Use this skill when changing how API callers authenticate, which credentials are accepted, or which authenticated callers may access an endpoint or resource.

Follow the shared skill guidance in .github/skills/shared-guidance.md.

Workflow

  1. Check composer.json and symfony.lock for the installed Symfony Security and authentication bundles. Inspect config/packages/security.yaml, the relevant routes and controllers, and nearby security classes and tests before changing behavior. Treat the current implementation as the source of truth rather than assuming framework or bundle defaults.
  2. Clarify the intended caller, credentials, public/protected endpoints, and required roles when they are not specified. Ask before making non-trivial changes to authentication methods, role policy, token lifecycle, or access boundaries.
  3. Preserve firewall ordering, stateless API behavior, and existing login or token-issuance flows unless the request explicitly requires changing them. Review access-control ordering carefully: Symfony applies only the first matching access-control rule. Never make a protected route public or weaken an existing guard to make a test pass.
  4. Reuse the existing security building blocks where they fit: ApiKeyAuthenticator, ApiKeyUserProvider, SecurityUserFactory, RolesService, App\Enum\Role, the configured role hierarchy, and existing voters. Use the project's established route/controller authorization patterns, including #[IsGranted] where appropriate. Keep authorization decisions scoped to the right endpoint or voter rather than embedding them in unrelated controller logic.
  5. Handle credentials as secrets. Do not expose tokens, passwords, private JWT keys, or sensitive authentication details in API responses, DTOs, logs, fixtures, or documentation. Follow the existing credential creation, rotation, and revocation workflows; do not invent a new token storage or lifecycle design without explicit requirements.
  6. Follow .github/skills/write-tests/SKILL.md for testing. Cover valid and invalid or missing credentials, status codes, permitted and denied roles, and anonymous access where relevant. Exercise both JWT and API-key authentication when shared firewall or policy behavior changes.
  7. Update OpenAPI security metadata or relevant documentation when the documented authentication requirements or endpoint access contract changes. If the work changes persisted security data, follow .github/skills/add-doctrine-entity/SKILL.md for the entity and migration.

Read the full file on GitHub · 49 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today First seen · 49 lines · 27 tokens per session scan A 0cc5b3fcf910

Subscribe to this mod's changes

implement-api-authentication is a skill published in the GitHub repository tarlepp/symfony-flex-backend (288 stars, last pushed today), licensed MIT. It adds 27 tokens to every session and 555 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-18.