Skip to content

aiskillstore/marketplace / skills/abdul-haseeb360/api-jwt-authenticator

api-jwt-authenticator

Verified

A conceptual skill for securing FastAPI REST APIs with JWT authentication

FileKindSize
SKILL.mdskill md5.3 KB
skill-report.jsonconfig14.5 KB

skill-report.json

View on GitHub
{
  "schema_version": "2.0",
  "meta": {
    "generated_at": "2026-07-18T09:32:27.150Z",
    "slug": "abdul-haseeb360-api-jwt-authenticator",
    "source_url": "https://github.com/Abdul-Haseeb360/Hackathon-II-AI-Native-Systems/tree/main/.claude/skills/api-jwt-authenticator",
    "source_ref": "main",
    "model": "claude",
    "analysis_version": "3.0.0",
    "source_type": "community",
    "content_hash": "11f93dbe6a616b145cb3ff127ac2f3c7098ba39e22d66aba0275bcdf7556fbdf",
    "tree_hash": "295db5d9a04b4298de6106b8411870088592e8698d363521c67aa235c6f5ef8d",
    "provenance": {
      "model_effective": "claude",
      "fallback_chain": [
        {
          "agent": "codex",
          "outcome": "failed",
          "error": "2026-07-18T09:32:27.293512Z ERROR codex_models_manager::manager: failed to refresh available models: Missing environment variable: `HELM_API_KEY`.\n2026-07-18T09:32:27.313591Z ERROR codex_models_manage…"
        },
        {
          "agent": "claude",
          "outcome": "success"
        }
      ],
      "analysis_version": "3.0.0"
    }
  },
  "skill": {
    "name": "API JWT Authenticator",
    "description": "Guides secure JWT authentication patterns for FastAPI REST APIs, including token validation, access control, and safe error handling.",
    "summary": "Plan JWT authentication and authorization for FastAPI APIs.",
    "icon": "📦",
    "version": "1.0.0",
    "author": "Claude",
    "license": "MIT",
    "category": "security",
    "tags": [
      "fastapi",
      "jwt",
      "api-security",
      "authentication",
      "rbac"
    ],
    "supported_tools": [
      "claude",
      "codex",
      "claude-code"
    ],
    "risk_factors": [
      "external_commands"
    ]
  },
  "security_audit": {
    "risk_level": "safe",
    "is_blocked": false,
    "safe_to_publish": true,
    "analysis_status": "ok",
    "summary": "All nine static detections are false positives. Markdown inline-code delimiters around JWT terms were misidentified as shell backticks, and the remaining detections describe defensive authentication behavior rather than reconnaissance. No prompt injection, exfiltration intent, or executable commands were found in SKILL.md.",
    "remediation": [],
    "risk_factor_evidence": [
      {
        "factor": "external_commands",
        "evidence": [
          {
            "file": "SKILL.md",
            "line_start": 64,
            "line_end": 64
          },
          {
            "file": "SKILL.md",
            "line_start": 69,
            "line_end": 69
          },
          {
            "file": "SKILL.md",
            "line_start": 70,
            "line_end": 70
          },
          {
            "file": "SKILL.md",
            "line_start": 71,
            "line_end": 71
          },
          {
            "file": "SKILL.md",
            "line_start": 72,
            "line_end": 72
          }
        ]
      }
    ],
    "static_findings": [
      {
        "id": "external_commands:SKILL.md:64:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 64,
        "line_end": 64,
        "snippet": "- Token must be in the `Authorization` header as `Bearer <token>`"
      },
      {
        "id": "external_commands:SKILL.md:69:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 69,
        "line_end": 69,
        "snippet": "- `sub` (subject): User identifier"
      },
      {
        "id": "external_commands:SKILL.md:70:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 70,
        "line_end": 70,
        "snippet": "- `exp` (expiration): Token expiration timestamp"
      },
      {
        "id": "external_commands:SKILL.md:71:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 71,
        "line_end": 71,
        "snippet": "- `user_id` (optional): Unique user identifier for access control"
      },
      {
        "id": "external_commands:SKILL.md:72:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 72,
        "line_end": 72,
        "snippet": "- `role` (optional): User role for role-based access control"
      },
      {
        "id": "blocker:SKILL.md:54:system-reconnaissance",
        "category": "blocker",
        "severity": "low",
        "pattern": "System reconnaissance",
        "file": "SKILL.md",
        "line_start": 54,
        "line_end": 54,
        "snippet": "- Generate appropriate HTTP 401 Unauthorized responses for invalid tokens"
      },
      {
        "id": "blocker:SKILL.md:65:system-reconnaissance",
        "category": "blocker",
        "severity": "low",
        "pattern": "System reconnaissance",
        "file": "SKILL.md",
        "line_start": 65,
        "line_end": 65,
        "snippet": "- Token must contain valid JWT structure with required claims"
      },
      {
        "id": "blocker:SKILL.md:102:system-reconnaissance",
        "category": "blocker",
        "severity": "low",
        "pattern": "System reconnaissance",
        "file": "SKILL.md",
        "line_start": 102,
        "line_end": 102,
        "snippet": "5. **Information Disclosure**: Avoid exposing sensitive information in error messages"
      },
      {
        "id": "blocker:SKILL.md:125:system-reconnaissance",
        "category": "blocker",
        "severity": "low",
        "pattern": "System reconnaissance",
        "file": "SKILL.md",
        "line_start": 125,
        "line_end": 125,
        "snippet": "- Test authentication failure scenarios (invalid tokens, expired tokens)"
      }
    ],
    "finding_verdicts": [
      {
        "id": "external_commands:SKILL.md:64:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.99,
        "reason": "The backticks are Markdown formatting around HTTP header names and a token placeholder. This documentation contains no command execution."
      },
      {
        "id": "external_commands:SKILL.md:69:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.99,
        "reason": "The backticks format the JWT claim name sub in documentation. There is no executable syntax or shell invocation."
      },
      {
        "id": "external_commands:SKILL.md:70:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.99,
        "reason": "The backticks format the JWT expiration claim name. The line is descriptive text and cannot execute commands."
      },
      {
        "id": "external_commands:SKILL.md:71:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.99,
        "reason": "The backticks format an optional JWT claim name in Markdown. No command, script, or user-controlled execution is present."
      },
      {
        "id": "external_commands:SKILL.md:72:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.99,
        "reason": "The backticks format an optional role claim name in Markdown. This is inert documentation, not shell execution."
      },
      {
        "id": "blocker:SKILL.md:54:system-reconnaissance",
        "verdict": "false_positive",
        "confidence": 0.98,
        "reason": "The line recommends standard HTTP 401 responses for rejected credentials. It does not inspect systems or collect information."
      },
      {
        "id": "blocker:SKILL.md:65:system-reconnaissance",
        "verdict": "false_positive",
        "confidence": 0.98,
        "reason": "The line requires validation of JWT structure and claims as a defensive control. It does not perform reconnaissance."
      },
      {
        "id": "blocker:SKILL.md:102:system-reconnaissance",
        "verdict": "false_positive",
        "confidence": 0.99,
        "reason": "The line directs users to avoid sensitive error disclosures. This is defensive guidance, not an instruction to gather system information."
      },
      {
        "id": "blocker:SKILL.md:125:system-reconnaissance",
        "verdict": "false_positive",
        "confidence": 0.98,
        "reason": "The line recommends testing invalid and expired-token failure paths. It is ordinary authentication testing with no reconnaissance behavior."
      }
    ],
    "semantic_findings": [],
    "critical_findings": [],
    "high_findings": [],
    "medium_findings": [],
    "low_findings": [],
    "dangerous_patterns": [],
    "files_scanned": 1,
    "total_lines": 136,
    "audit_model": "claude",
    "audited_at": "2026-07-18T09:32:27.150Z",
    "agent_auto_install_policy": "allowed",
    "manual_install_policy": "allowed"
  },
  "content": {
    "user_title": "Secure FastAPI APIs with JWT Authentication",
    "value_statement": "FastAPI APIs need consistent token validation and authorization controls to protect private resources. This skill provides a practical framework for JWT handling, access checks, and safe authentication responses.",
    "seo_keywords": [
      "Claude",
      "Codex",
      "Claude Code",
      "FastAPI JWT authentication",
      "JWT validation",
      "API authorization",
      "Bearer token",
      "role-based access control",
      "REST API security"
    ],
    "actual_capabilities": [
      "Defines Bearer token extraction requirements for FastAPI endpoints.",
      "Lists JWT signature, expiration, issuer, and audience validation checks.",
      "Describes user-specific resource authorization checks.",
      "Explains HTTP 401 and 403 responses for authentication failures.",
      "Outlines role-based access control using token claims.",
      "Provides security and testing considerations for JWT-protected APIs."
    ],
    "limitations": [
      "This is conceptual guidance and does not provide runnable FastAPI code.",
      "It does not configure an identity provider, database, or secret vault.",
      "It does not replace a threat model or security review for a production API.",
      "Token refresh, revocation, and key rotation need project-specific design."
    ],
    "use_cases": [
      {
        "title": "Protect a FastAPI service",
        "description": "Plan authentication dependencies and token validation for private REST endpoints.",
        "target_user": "Backend developer"
      },
      {
        "title": "Add resource authorization",
        "description": "Define checks that prevent users from accessing another user's records.",
        "target_user": "API engineer"
      },
      {
        "title": "Review JWT controls",
        "description": "Use the checklist to assess claims validation, error handling, and authentication tests.",
        "target_user": "Security reviewer"
      }
    ],
    "prompt_templates": [
      {
        "title": "Start JWT protection",
        "prompt": "Help me plan JWT authentication for a FastAPI endpoint that returns a user's profile.",
        "scenario": "Beginner"
      },
      {
        "title": "Validate access tokens",
        "prompt": "List the JWT checks my FastAPI API should perform before accepting an access token.",
        "scenario": "Intermediate"
      },
      {
        "title": "Enforce resource ownership",
        "prompt": "Design authorization rules for a FastAPI endpoint so users can only read their own orders.",
        "scenario": "Intermediate"
      },
      {
        "title": "Review an authentication design",
        "prompt": "Review this FastAPI JWT authentication design for signature validation, claim validation, roles, error handling, and logging gaps: [describe design].",
        "scenario": "Advanced"
      }
    ],
    "output_examples": [
      {
        "input": "What must I validate in a JWT?",
        "output": [
          "Verify the token signature before trusting claims.",
          "Reject expired tokens and validate issuer and audience when used.",
          "Require a stable subject claim for the authenticated user."
        ]
      },
      {
        "input": "How should a protected endpoint handle an invalid token?",
        "output": [
          "Return HTTP 401 Unauthorized.",
          "Use a generic credential error message.",
          "Do not reveal token contents, signing details, or internal authorization logic."
        ]
      },
      {
        "input": "How do I limit users to their own resources?",
        "output": "Compare the authenticated user identity from the token with the resource owner before serving or changing the resource."
      }
    ],
    "best_practices": [
      "Use HTTPS and keep signing keys in a secure secret-management system.",
      "Validate signatures and required claims before using token data.",
      "Log authentication events without recording raw tokens or sensitive claims."
    ],
    "anti_patterns": [
      "Do not accept unsigned tokens or skip signature verification.",
      "Do not use token roles without validating the token first.",
      "Do not expose detailed validation failures in API error messages."
    ],
    "faq": [
      {
        "question": "Does this skill include runnable code?",
        "answer": "No. It provides conceptual FastAPI JWT authentication guidance."
      },
      {
        "question": "Which token format does it cover?",
        "answer": "It covers JWT access tokens sent in an Authorization Bearer header."
      },
      {
        "question": "Should I validate token expiration?",
        "answer": "Yes. Reject expired tokens before authorizing a request."
      },
      {
        "question": "Does it support role-based access control?",
        "answer": "Yes. It describes using validated role claims to protect endpoints."
      },
      {
        "question": "Can users access any resource after authentication?",
        "answer": "No. Your API should compare the authenticated identity with the resource owner where required."
      },
      {
        "question": "How should API errors handle invalid tokens?",
        "answer": "Return an appropriate 401 response with a generic message and no sensitive implementation details."
      }
    ]
  },
  "file_structure": [
    {
      "name": "SKILL.md",
      "type": "file",
      "path": "SKILL.md",
      "lines": 136
    }
  ]
}
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall