Skip to content

aiskillstore/marketplace / skills/abdulsamad94/authentication-logic

authentication-logic

Verified

Guide to using Better Auth for client and server-side authentication.

FileKindSize
SKILL.mdskill md1.2 KB
skill-report.jsonconfig15.4 KB

skill-report.json

View on GitHub
{
  "schema_version": "2.0",
  "meta": {
    "generated_at": "2026-07-18T09:38:16.402Z",
    "slug": "abdulsamad94-authentication-logic",
    "source_url": "https://github.com/AbdulSamad94/Hackhaton-SpecsKitPlus/tree/master/.claude/skills/auth",
    "source_ref": "master",
    "model": "claude",
    "analysis_version": "3.0.0",
    "source_type": "community",
    "content_hash": "ac21517a3a598032230796ff5b6de069f61e97952d83ec5ede564d99afc37690",
    "tree_hash": "acf62e2d2ce925e184f8bc9e06001d6de44ec789dc9d580655e6dfca89bfa5b2",
    "provenance": {
      "model_effective": "claude",
      "fallback_chain": [
        {
          "agent": "codex",
          "outcome": "failed",
          "error": "2026-07-18T09:38:16.536333Z ERROR codex_models_manager::manager: failed to refresh available models: Missing environment variable: `HELM_API_KEY`.\n2026-07-18T09:38:16.557129Z ERROR codex_models_manage…"
        },
        {
          "agent": "claude",
          "outcome": "success"
        }
      ],
      "analysis_version": "3.0.0"
    }
  },
  "skill": {
    "name": "Authentication Logic",
    "description": "Use Better Auth to implement client and server authentication in a Next.js application.",
    "summary": "Better Auth patterns for sign-in, sign-out, session checks, and an authentication status component.",
    "icon": "📦",
    "author": "AbdulSamad94",
    "license": "MIT",
    "category": "security",
    "tags": [
      "better-auth",
      "nextjs",
      "authentication",
      "session-management",
      "typescript"
    ],
    "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 ten static findings are false positives caused by Markdown inline-code markers and fenced TypeScript examples. The skill contains no shell commands, dynamic command execution, prompt injection, or other net-new malicious intent.",
    "remediation": [],
    "risk_factor_evidence": [
      {
        "factor": "external_commands",
        "evidence": [
          {
            "file": "SKILL.md",
            "line_start": 9,
            "line_end": 9
          },
          {
            "file": "SKILL.md",
            "line_start": 12,
            "line_end": 12
          },
          {
            "file": "SKILL.md",
            "line_start": 13,
            "line_end": 13
          },
          {
            "file": "SKILL.md",
            "line_start": 16,
            "line_end": 16
          },
          {
            "file": "SKILL.md",
            "line_start": 18,
            "line_end": 35
          },
          {
            "file": "SKILL.md",
            "line_start": 35,
            "line_end": 38
          },
          {
            "file": "SKILL.md",
            "line_start": 38,
            "line_end": 40
          },
          {
            "file": "SKILL.md",
            "line_start": 40,
            "line_end": 51
          },
          {
            "file": "SKILL.md",
            "line_start": 51,
            "line_end": 54
          },
          {
            "file": "SKILL.md",
            "line_start": 54,
            "line_end": 56
          }
        ]
      }
    ],
    "static_findings": [
      {
        "id": "external_commands:SKILL.md:9:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 9,
        "line_end": 9,
        "snippet": "We use **Better Auth** (`better-auth`) for identifying users."
      },
      {
        "id": "external_commands:SKILL.md:12:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 12,
        "line_end": 12,
        "snippet": "- **Client**: `lib/auth-client.ts` exports `authClient`."
      },
      {
        "id": "external_commands:SKILL.md:13:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 13,
        "line_end": 13,
        "snippet": "- **Server**: `lib/auth.ts` exports `auth`."
      },
      {
        "id": "external_commands:SKILL.md:16:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 16,
        "line_end": 16,
        "snippet": "Use `authClient` for signing in, signing out, and checking session state in Client Components."
      },
      {
        "id": "external_commands:SKILL.md:18:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 18,
        "line_end": 35,
        "snippet": "```tsx"
      },
      {
        "id": "external_commands:SKILL.md:35:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 35,
        "line_end": 38,
        "snippet": "```"
      },
      {
        "id": "external_commands:SKILL.md:38:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 38,
        "line_end": 40,
        "snippet": "Use `auth.api.getSession` for protecting API routes or Server Actions."
      },
      {
        "id": "external_commands:SKILL.md:40:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 40,
        "line_end": 51,
        "snippet": "```ts"
      },
      {
        "id": "external_commands:SKILL.md:51:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 51,
        "line_end": 54,
        "snippet": "```"
      },
      {
        "id": "external_commands:SKILL.md:54:ruby-shell-backtick-execution",
        "category": "external_commands",
        "severity": "medium",
        "pattern": "Ruby/shell backtick execution",
        "file": "SKILL.md",
        "line_start": 54,
        "line_end": 56,
        "snippet": "- Located at `textbook/src/components/AuthBar/index.tsx`."
      }
    ],
    "finding_verdicts": [
      {
        "id": "external_commands:SKILL.md:9:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.99,
        "reason": "The backticks delimit the Better Auth package name in Markdown prose. This line contains no executable shell syntax or command invocation."
      },
      {
        "id": "external_commands:SKILL.md:12:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.99,
        "reason": "The backticks format a TypeScript file path and exported identifier in Markdown. No command is run or constructed."
      },
      {
        "id": "external_commands:SKILL.md:13:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.99,
        "reason": "The line documents a TypeScript file path and export using Markdown inline code. It has no shell execution behavior."
      },
      {
        "id": "external_commands:SKILL.md:16:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.99,
        "reason": "The backticks label an API client in explanatory prose. The text does not execute or instruct execution of a shell command."
      },
      {
        "id": "external_commands:SKILL.md:18:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.99,
        "reason": "This is the opening fence for a TypeScript code example, followed by Better Auth API calls. A Markdown fence is not shell backtick execution."
      },
      {
        "id": "external_commands:SKILL.md:35:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.99,
        "reason": "This is a closing Markdown code fence. It does not invoke a command or process external input."
      },
      {
        "id": "external_commands:SKILL.md:38:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.99,
        "reason": "The backticks format the documented server API name in prose. There is no shell syntax or command-execution mechanism."
      },
      {
        "id": "external_commands:SKILL.md:40:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.99,
        "reason": "This is an opening Markdown fence for a TypeScript session-check example. The example uses application APIs, not external commands."
      },
      {
        "id": "external_commands:SKILL.md:51:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.99,
        "reason": "This is a closing Markdown code fence only. It cannot execute a shell command."
      },
      {
        "id": "external_commands:SKILL.md:54:ruby-shell-backtick-execution",
        "verdict": "false_positive",
        "confidence": 0.99,
        "reason": "The backticks format a component path in Markdown documentation. The line has no executable behavior."
      }
    ],
    "semantic_findings": [],
    "critical_findings": [],
    "high_findings": [],
    "medium_findings": [],
    "low_findings": [],
    "dangerous_patterns": [],
    "files_scanned": 1,
    "total_lines": 57,
    "audit_model": "claude",
    "audited_at": "2026-07-18T09:38:16.402Z",
    "agent_auto_install_policy": "allowed",
    "manual_install_policy": "allowed"
  },
  "content": {
    "user_title": "Implement Better Auth Session Checks",
    "value_statement": "Authentication flows can become inconsistent between client components and server routes. This skill provides focused Better Auth patterns for sign-in, sign-out, and session protection.",
    "seo_keywords": [
      "Claude",
      "Codex",
      "Claude Code",
      "Better Auth",
      "Next.js authentication",
      "session management",
      "TypeScript authentication",
      "client server auth",
      "API route protection"
    ],
    "actual_capabilities": [
      "Shows email and social sign-in calls through authClient.",
      "Shows how to sign out from a client component.",
      "Shows how to read a Better Auth session on the server.",
      "Shows a 401 response pattern for missing sessions.",
      "Identifies the client and server authentication module locations.",
      "Describes the AuthBar component role and session endpoint."
    ],
    "limitations": [
      "It does not configure Better Auth providers, databases, or secrets.",
      "It does not define authorization roles, permissions, or access policies.",
      "It assumes the referenced authentication modules already exist.",
      "It does not replace security testing of an application deployment."
    ],
    "use_cases": [
      {
        "title": "Add client sign-in actions",
        "description": "Use the email, social sign-in, and sign-out examples in a Next.js client component.",
        "target_user": "Frontend developers"
      },
      {
        "title": "Protect server endpoints",
        "description": "Check the session before returning protected data from an API route or Server Action.",
        "target_user": "Backend developers"
      },
      {
        "title": "Review authentication integration",
        "description": "Confirm that client, server, and authentication status components use the documented Better Auth responsibilities.",
        "target_user": "Technical leads"
      }
    ],
    "prompt_templates": [
      {
        "title": "Add email sign-in",
        "scenario": "Beginner",
        "prompt": "Use this skill to show how to add an email sign-in action with authClient in my Next.js client component."
      },
      {
        "title": "Read a server session",
        "scenario": "Intermediate",
        "prompt": "Use this skill to show how to read the current Better Auth session in a Next.js route handler."
      },
      {
        "title": "Protect a Server Action",
        "scenario": "Advanced",
        "prompt": "Use this skill to add a session check and a clear unauthorized response before my Server Action performs protected work."
      },
      {
        "title": "Review authentication boundaries",
        "scenario": "Advanced",
        "prompt": "Use this skill to review my client and server authentication flow. Identify where sign-in, session checks, and AuthBar status belong."
      }
    ],
    "output_examples": [
      {
        "input": "How do I check whether a user is signed in on the server?",
        "output": "A concise session-check flow using the server auth API and request headers, followed by a 401 response when no session exists."
      },
      {
        "input": "How do I add Google sign-in to a client component?",
        "output": "A client-side social sign-in call that selects Google and sends the user to the onboarding path after authentication."
      },
      {
        "input": "What should my AuthBar display?",
        "output": "Guidance to show the authenticated user avatar when a session exists and a login button otherwise."
      }
    ],
    "best_practices": [
      "Perform session checks on the server before protected work begins.",
      "Keep client sign-in actions separate from server authorization checks.",
      "Return a clear unauthorized response when no valid session exists."
    ],
    "anti_patterns": [
      "Do not rely only on client-side session state to protect server data.",
      "Do not perform protected actions before checking the server session.",
      "Do not expose authentication secrets in client-side components."
    ],
    "faq": [
      {
        "question": "Which authentication library does this skill use?",
        "answer": "It documents Better Auth through the better-auth package."
      },
      {
        "question": "Can I use this skill for client-side sign-in?",
        "answer": "Yes. It includes email, social sign-in, sign-out, and session-state guidance for client components."
      },
      {
        "question": "Can I protect API routes with this skill?",
        "answer": "Yes. It shows a server session check and a 401 response for unauthenticated requests."
      },
      {
        "question": "Does it configure a database or OAuth provider?",
        "answer": "No. It assumes Better Auth and its providers are already configured."
      },
      {
        "question": "Does it implement roles and permissions?",
        "answer": "No. It focuses on authentication and session presence, not authorization policy design."
      },
      {
        "question": "Where is the authentication status component described?",
        "answer": "The skill identifies the AuthBar component path and its avatar or login-button behavior."
      }
    ]
  },
  "file_structure": [
    {
      "name": "SKILL.md",
      "type": "file",
      "path": "SKILL.md",
      "lines": 57
    }
  ]
}
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall