[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6EJNGDC8M3P2CHRH98AAFW2":3,"skill-same:01M6EJNGDC8M3P2CHRH98AAFW2":72},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":34,"linkOnly":35,"markdownContent":36,"markdownBody":37,"frontMatter":38,"refName":43,"commitSha":44,"skillDirectory":45,"forksCount":46,"repositoryHtmlUrl":47,"repositoryHomepageUrl":48,"ownerHtmlUrl":49,"ownerBlogUrl":6,"ownerDescription":50,"updatedAt":51,"install":52,"resources":65},"01M6EJNGDC8M3P2CHRH98AAFW2","frontend-api-client-with-jwt",null,"A conceptual skill for building an API client in Next.js that handles JWT tokens","ComeOnOliver\u002Fskillshub","ComeOnOliver","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F43215937?v=4","01M6E5JNFECJAAVFE0W7SMWWD2","Haoran Shu","01M6E5JNNDQS7AJZDYFQ8TPZCK",67,"MIT","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fabdul-haseeb360\u002Ffrontend-api-client-with-jwt\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33],"frontend","jwt","api","api client","client","frontend api client with jwt","authentication","integration","nextjs","Next.js","js","api integration","next","tokens","api-client","2026-11-10 10:12:30",false,"---\nname: frontend-api-client-with-jwt\ncategory: API Integration\nauthor: Claude\nversion: 1.0.0\ntags: [nextjs, api-client, jwt, authentication, frontend]\ndescription: A conceptual skill for building an API client in Next.js that handles JWT tokens\n---\n\n# Frontend API Client with JWT Skill\n\n## When to Use This Skill\n\nUse this conceptual skill when you need to implement a robust API client in Next.js that properly handles JWT tokens for authentication. This skill is appropriate for:\n\n- Creating centralized API communication layer in Next.js applications\n- Managing JWT-based authentication across multiple API endpoints\n- Handling token expiration and refresh scenarios\n- Standardizing error response parsing and handling\n- Implementing secure API communication patterns\n\nThis skill should NOT be used for:\n- Applications without JWT-based authentication\n- Static sites without API communication needs\n- Applications using alternative authentication methods (API keys, OAuth 2.0 client credentials, etc.)\n- Simple applications with minimal API interaction\n\n## Prerequisites\n\n- Next.js application (either App Router or Pages Router)\n- Understanding of JWT (JSON Web Token) concepts\n- Knowledge of HTTP headers and authorization mechanisms\n- Basic understanding of asynchronous JavaScript operations\n- Awareness of client-side vs server-side execution contexts\n\n## Conceptual Implementation Framework\n\n### Authorization Header Attachment Capability\n- Automatically attach JWT tokens to API requests as Authorization headers\n- Determine when to include tokens based on request type and endpoint\n- Handle token attachment for both client-side and server-side requests\n- Manage token inclusion in cross-origin requests appropriately\n- Ensure proper header formatting (\"Bearer \u003Ctoken>\")\n\n### Token Expiry Handling Capability\n- Detect JWT token expiration before making API requests\n- Implement automatic token refresh mechanisms\n- Handle token refresh failures gracefully\n- Maintain session continuity during token refresh\n- Coordinate token refresh across multiple concurrent requests\n- Store updated tokens securely after refresh\n\n### Error Response Parsing Capability\n- Parse structured error responses from API endpoints\n- Identify authentication-related errors (401, 403) for special handling\n- Extract meaningful error messages for user feedback\n- Handle different error response formats consistently\n- Distinguish between client errors, server errors, and network issues\n- Provide appropriate user feedback based on error types\n\n### API Call Centralization Capability\n- Create a unified interface for all API communications\n- Standardize request and response handling across the application\n- Implement consistent error handling and logging\n- Manage request\u002Fresponse interceptors for cross-cutting concerns\n- Provide type-safe API call patterns (when using TypeScript)\n- Enable request caching and deduplication where appropriate\n\n## Expected Input\u002FOutput\n\n### Input Requirements:\n\n1. **JWT Token Management**:\n   - Valid JWT token for authorization\n   - Token refresh endpoint configuration\n   - Token storage mechanism (localStorage, cookies, etc.)\n   - Token expiration time and refresh timing\n\n2. **API Configuration**:\n   - Base API URL for requests\n   - Request timeout settings\n   - Custom headers and request options\n   - Endpoint-specific configurations\n\n3. **Request Parameters**:\n   - HTTP method (GET, POST, PUT, DELETE, etc.)\n   - Request URL or endpoint identifier\n   - Request body for POST\u002FPUT operations\n   - Query parameters and path variables\n\n### Output Formats:\n\n1. **Successful API Response**:\n   - HTTP 200-299 status codes\n   - Parsed response data matching expected format\n   - Updated token information when applicable\n   - Consistent response structure across all endpoints\n\n2. **Authentication Error Response**:\n   - HTTP 401 Unauthorized for expired\u002Finvalid tokens\n   - Automatic token refresh attempt\n   - Redirect to login page after refresh failure\n   - Clear error messaging for authentication issues\n\n3. **Authorization Error Response**:\n   - HTTP 403 Forbidden for insufficient permissions\n   - Appropriate error handling based on permission level\n   - User feedback for access restriction\n\n4. **General Error Response**:\n   - Structured error object with message and code\n   - Appropriate HTTP status code\n   - Detailed error information for debugging\n   - User-friendly error messages for UI display\n\n## Integration Patterns\n\n### Client-Side Integration\n- Handle API calls from client components and client-side rendering\n- Manage token storage and retrieval in browser context\n- Implement request interceptors for header attachment\n- Coordinate with authentication state management\n\n### Server-Side Integration (when applicable)\n- Handle API calls from server components\n- Manage token transmission securely between server and client\n- Implement server-side token validation\n- Handle server-side error responses appropriately\n\n### React Component Integration\n- Provide hooks for API communication in functional components\n- Enable context-based API client access\n- Support both functional and class component patterns\n- Implement proper cleanup and cancellation mechanisms\n\n## Security Considerations\n\n1. **Token Storage**: Secure JWT token storage to prevent XSS attacks\n2. **Header Transmission**: Use HTTPS for all API communications\n3. **Token Refresh**: Implement secure token refresh mechanisms\n4. **Error Information**: Avoid exposing sensitive information in error messages\n5. **Request Validation**: Validate request parameters before sending\n6. **Response Validation**: Verify response integrity and format\n7. **Cross-Site Requests**: Implement proper CORS handling\n\n## Performance Implications\n\n- Optimize token retrieval and attachment for minimal overhead\n- Implement efficient token refresh to avoid blocking requests\n- Consider request caching strategies for improved performance\n- Minimize redundant API calls through proper state management\n- Implement request batching where appropriate\n- Monitor and optimize network request timing\n\n## Error Handling and Validation\n\n- Validate JWT token format and expiration before requests\n- Handle network connectivity issues gracefully\n- Implement retry mechanisms for transient failures\n- Provide fallback behaviors for critical API failures\n- Log errors appropriately for debugging without exposing sensitive information\n- Implement circuit breaker patterns for service resilience\n\n## Testing Considerations\n\n- Test token attachment functionality with valid\u002Finvalid tokens\n- Verify token refresh mechanisms work correctly\n- Validate error response parsing across different error types\n- Test API client behavior in both client and server contexts\n- Verify proper cleanup and cancellation of requests\n- Test concurrent request handling and token refresh coordination","# Frontend API Client with JWT Skill\n\n## When to Use This Skill\n\nUse this conceptual skill when you need to implement a robust API client in Next.js that properly handles JWT tokens for authentication. This skill is appropriate for:\n\n- Creating centralized API communication layer in Next.js applications\n- Managing JWT-based authentication across multiple API endpoints\n- Handling token expiration and refresh scenarios\n- Standardizing error response parsing and handling\n- Implementing secure API communication patterns\n\nThis skill should NOT be used for:\n- Applications without JWT-based authentication\n- Static sites without API communication needs\n- Applications using alternative authentication methods (API keys, OAuth 2.0 client credentials, etc.)\n- Simple applications with minimal API interaction\n\n## Prerequisites\n\n- Next.js application (either App Router or Pages Router)\n- Understanding of JWT (JSON Web Token) concepts\n- Knowledge of HTTP headers and authorization mechanisms\n- Basic understanding of asynchronous JavaScript operations\n- Awareness of client-side vs server-side execution contexts\n\n## Conceptual Implementation Framework\n\n### Authorization Header Attachment Capability\n- Automatically attach JWT tokens to API requests as Authorization headers\n- Determine when to include tokens based on request type and endpoint\n- Handle token attachment for both client-side and server-side requests\n- Manage token inclusion in cross-origin requests appropriately\n- Ensure proper header formatting (\"Bearer \u003Ctoken>\")\n\n### Token Expiry Handling Capability\n- Detect JWT token expiration before making API requests\n- Implement automatic token refresh mechanisms\n- Handle token refresh failures gracefully\n- Maintain session continuity during token refresh\n- Coordinate token refresh across multiple concurrent requests\n- Store updated tokens securely after refresh\n\n### Error Response Parsing Capability\n- Parse structured error responses from API endpoints\n- Identify authentication-related errors (401, 403) for special handling\n- Extract meaningful error messages for user feedback\n- Handle different error response formats consistently\n- Distinguish between client errors, server errors, and network issues\n- Provide appropriate user feedback based on error types\n\n### API Call Centralization Capability\n- Create a unified interface for all API communications\n- Standardize request and response handling across the application\n- Implement consistent error handling and logging\n- Manage request\u002Fresponse interceptors for cross-cutting concerns\n- Provide type-safe API call patterns (when using TypeScript)\n- Enable request caching and deduplication where appropriate\n\n## Expected Input\u002FOutput\n\n### Input Requirements:\n\n1. **JWT Token Management**:\n   - Valid JWT token for authorization\n   - Token refresh endpoint configuration\n   - Token storage mechanism (localStorage, cookies, etc.)\n   - Token expiration time and refresh timing\n\n2. **API Configuration**:\n   - Base API URL for requests\n   - Request timeout settings\n   - Custom headers and request options\n   - Endpoint-specific configurations\n\n3. **Request Parameters**:\n   - HTTP method (GET, POST, PUT, DELETE, etc.)\n   - Request URL or endpoint identifier\n   - Request body for POST\u002FPUT operations\n   - Query parameters and path variables\n\n### Output Formats:\n\n1. **Successful API Response**:\n   - HTTP 200-299 status codes\n   - Parsed response data matching expected format\n   - Updated token information when applicable\n   - Consistent response structure across all endpoints\n\n2. **Authentication Error Response**:\n   - HTTP 401 Unauthorized for expired\u002Finvalid tokens\n   - Automatic token refresh attempt\n   - Redirect to login page after refresh failure\n   - Clear error messaging for authentication issues\n\n3. **Authorization Error Response**:\n   - HTTP 403 Forbidden for insufficient permissions\n   - Appropriate error handling based on permission level\n   - User feedback for access restriction\n\n4. **General Error Response**:\n   - Structured error object with message and code\n   - Appropriate HTTP status code\n   - Detailed error information for debugging\n   - User-friendly error messages for UI display\n\n## Integration Patterns\n\n### Client-Side Integration\n- Handle API calls from client components and client-side rendering\n- Manage token storage and retrieval in browser context\n- Implement request interceptors for header attachment\n- Coordinate with authentication state management\n\n### Server-Side Integration (when applicable)\n- Handle API calls from server components\n- Manage token transmission securely between server and client\n- Implement server-side token validation\n- Handle server-side error responses appropriately\n\n### React Component Integration\n- Provide hooks for API communication in functional components\n- Enable context-based API client access\n- Support both functional and class component patterns\n- Implement proper cleanup and cancellation mechanisms\n\n## Security Considerations\n\n1. **Token Storage**: Secure JWT token storage to prevent XSS attacks\n2. **Header Transmission**: Use HTTPS for all API communications\n3. **Token Refresh**: Implement secure token refresh mechanisms\n4. **Error Information**: Avoid exposing sensitive information in error messages\n5. **Request Validation**: Validate request parameters before sending\n6. **Response Validation**: Verify response integrity and format\n7. **Cross-Site Requests**: Implement proper CORS handling\n\n## Performance Implications\n\n- Optimize token retrieval and attachment for minimal overhead\n- Implement efficient token refresh to avoid blocking requests\n- Consider request caching strategies for improved performance\n- Minimize redundant API calls through proper state management\n- Implement request batching where appropriate\n- Monitor and optimize network request timing\n\n## Error Handling and Validation\n\n- Validate JWT token format and expiration before requests\n- Handle network connectivity issues gracefully\n- Implement retry mechanisms for transient failures\n- Provide fallback behaviors for critical API failures\n- Log errors appropriately for debugging without exposing sensitive information\n- Implement circuit breaker patterns for service resilience\n\n## Testing Considerations\n\n- Test token attachment functionality with valid\u002Finvalid tokens\n- Verify token refresh mechanisms work correctly\n- Validate error response parsing across different error types\n- Test API client behavior in both client and server contexts\n- Verify proper cleanup and cancellation of requests\n- Test concurrent request handling and token refresh coordination",{"name":5,"tags":39,"author":40,"version":41,"category":42,"description":7},[27,33,20,25,19],"Claude","1.0.0","API Integration","main","def8531e65114c0fca8fb8551c1871ee0eed705c","skills\u002Faiskillstore\u002Fmarketplace\u002Fabdul-haseeb360\u002Ffrontend-api-client-with-jwt",24,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub","https:\u002F\u002Fskillshub.wtf","https:\u002F\u002Fgithub.com\u002FComeOnOliver","AI & Blockchain Engineer\r\n","2026-06-24 22:07:19",{"source":8,"skillName":5,"commands":53,"prompt":63,"zipAvailable":64},[54,57,60],{"tool":55,"command":56},"npx","npx skills add ComeOnOliver\u002Fskillshub --skill frontend-api-client-with-jwt",{"tool":58,"command":59},"bunx","bunx skills add ComeOnOliver\u002Fskillshub --skill frontend-api-client-with-jwt",{"tool":61,"command":62},"pnpm","pnpm dlx skills add ComeOnOliver\u002Fskillshub --skill frontend-api-client-with-jwt","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fabdul-haseeb360\u002Ffrontend-api-client-with-jwt\u002FSKILL.md",true,[66],{"path":67,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":70,"sourceHtmlUrl":71},"skill-report.json","REFERENCE","参考文档",9129,"https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Faiskillstore\u002Fmarketplace\u002Fabdul-haseeb360\u002Ffrontend-api-client-with-jwt\u002Fskill-report.json",[73,82,91,100,106,112],{"skillNo":74,"name":75,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":34},"01M6FKJN13GMG4KY57J3QD8GY5","model-hierarchy-skill","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzscole\u002Fmodel-hierarchy-skill\u002Fmodel-hierarchy-skill\u002FSKILL.md",[],[79,80,81],"model","model hierarchy","model hierarchy skill",{"skillNo":83,"name":84,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":87,"publishedAt":34},"01M6FKJJJ6GCAMR4PPPRD12M5X","zoom-mcp","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-mcp\u002FSKILL.md",[],[88,89,90],"MCP","zoom","zoom mcp",{"skillNo":92,"name":93,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":34},"01M6FKJE3KYT3KPEZMEEHYKA6K","zoom-apps-sdk","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fzoom-apps-sdk\u002FSKILL.md",[],[97,98,99,89],"sdk","zoom apps sdk","apps",{"skillNo":101,"name":102,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":34},"01M6FKJ9EDH9Q5VWDF8HAJRSP0","windows","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwindows\u002FSKILL.md",[],[102],{"skillNo":107,"name":108,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":34},"01M6FKJ666BEEFC3AE9GJ72Q93","whiteboard","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwhiteboard\u002FSKILL.md",[],[108],{"skillNo":113,"name":114,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":115,"categories":116,"keywords":117,"publishedAt":34},"01M6FKJ21WFCDGTJQ2Q91T9DVW","websockets","https:\u002F\u002Fgithub.com\u002FComeOnOliver\u002Fskillshub\u002Fblob\u002Fmain\u002Fskills\u002Fzoom\u002Fskills\u002Fwebsockets\u002FSKILL.md",[],[114]]