[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M79DWVPHH4B25DDJS327XB7W":3,"skill-same:01M79DWVPHH4B25DDJS327XB7W":48},{"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":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M79DWVPHH4B25DDJS327XB7W","redis-caching-and-pubsub",null,"Architecting high-performance caching strategies, Cache-Aside\u002FWrite-Through\u002FWrite-Behind patterns, Redis Pub\u002FSub, Streams, eviction policies, distributed locking (Redlock), and memory optimization. Use when implementing Redis caching, real-time messaging, rate limiting, or session management.","hamzabellouch\u002Fagent-skills","hamzabellouch","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F237856042?v=4","01M79BRYW7XAMK3YDWQEMTWGWS","Hamza Bellouch","01M79BRYWXQV3JK2TGVTX8GN2A",8,"MIT","https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FProgramming\u002FBackend\u002FDatabases_and_Caching\u002Fredis-caching-and-pubsub\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: redis-caching-and-pubsub\ndescription: Architecting high-performance caching strategies, Cache-Aside\u002FWrite-Through\u002FWrite-Behind patterns, Redis Pub\u002FSub, Streams, eviction policies, distributed locking (Redlock), and memory optimization. Use when implementing Redis caching, real-time messaging, rate limiting, or session management.\n---\n\n# Redis Caching & Pub\u002FSub Architecture Guide\n\nProduction-grade guide for designing, implementing, and scaling Redis as a high-performance cache, session store, real-time pub\u002Fsub message broker, and distributed coordinator.\n\n---\n\n## 1. Caching Strategies & Design Patterns\n\n### 1.1 Cache-Aside (Lazy Loading)\nThe application reads from the cache first. On a cache miss, it reads from the primary database, updates the cache, and returns the result.\n\n```\n+-------------+      1. Read Key      +-------+\n| Application | --------------------> | Cache |\n|             | \u003C-------------------- |       |\n+-------------+     2. Cache Hit      +-------+\n       |\n       | 3. Cache Miss\n       v\n+---------------+\n| Primary DB    |\n+---------------+\n```\n\n* **Best For**: Read-heavy workloads with unpredictable access patterns.\n* **Trade-off**: Stale data risk if DB writes don't invalidate\u002Fupdate cache; higher latency on cache miss.\n\n### 1.2 Write-Through Caching\nThe application writes data directly to the cache, and the cache synchronously writes to the database.\n\n* **Best For**: Mission-critical reads where cache staleness cannot be tolerated.\n* **Trade-off**: Higher write latency; potential cache pollution with infrequently read data.\n\n### 1.3 Write-Behind (Write-Back) Caching\nThe application writes to the cache immediately, and an asynchronous process flushes cache updates to the underlying DB in batches.\n\n* **Best For**: Write-heavy systems (e.g., analytics, metrics aggregators, counter updates).\n* **Trade-off**: Risk of data loss if Redis crashes before flushing to primary DB.\n\n### 1.4 Cache Stampede (Thundering Herd) Mitigation\nWhen a popular cache key expires, thousands of concurrent requests hit the backend database simultaneously.\n\n#### Solution A: Distributed Mutex \u002F Lock\nAcquire a lock to recompute the cache value; force other concurrent requests to wait or return stale data.\n\n#### Solution B: Probabilistic Early Expiration (XFetch Algorithm)\nAs a key nears expiration, probabilistically refresh it in the background before it expires.\n\n$$\\Delta - \\beta \\cdot \\ln(\\text{rand}()) > \\text{TTL}$$\n\n---\n\n## 2. Redis Data Structures & Scalable Usage Patterns\n\n| Data Structure | Primary Use Cases | Recommended Max Size \u002F Rule |\n| :--- | :--- | :--- |\n| **Strings** | Simple key-value, HTML fragments, JSON payloads, counters (`INCRBY`) | Limit single string value to $\u003C 100\\text{ KB}$ |\n| **Hashes** | User objects, entity fields, session attributes | Use fields instead of JSON strings for partial updates |\n| **Sets** | Unique tags, IP blacklists, mutual friends, deduplication | Max set size $\u003C 10,000$ members for fast bulk operations |\n| **Sorted Sets (ZSET)** | Leaderboards, rate limit sliding windows, priority queues | High efficiency ($O(\\log N)$ inserts\u002Fsearches) |\n| **HyperLogLog** | Unique visitor counting (Cardinality estimation) | Constant $12\\text{ KB}$ footprint with $0.81\\%$ standard error |\n| **Bitmaps** | User daily active status, feature toggles | $512\\text{ MB}$ max space = $4.29$ billion flags |\n| **Streams** | Append-only event logs, persistent pub\u002Fsub, message processing queues | Use `XADD` with explicit trimming (`MAXLEN ~ 10000`) |\n\n---\n\n## 3. Real-Time Messaging: Pub\u002FSub vs. Streams\n\n### Pub\u002FSub (At-Most-Once)\n* **Behavior**: Fire-and-forget message delivery. Messages are not persisted. If a subscriber is disconnected during publication, the message is lost.\n* **Use Cases**: Live UI updates, websocket notifications, ephemeral chat messages.\n\n### Redis Streams (At-Least-Once)\n* **Behavior**: Append-only log with Consumer Groups, message ACK, pending entry lists (PEL), and replay capability.\n* **Use Cases**: Async task processing, distributed event sourcing, reliable messaging workflows.\n\n```typescript\n\u002F\u002F Redis Streams Consumer Group Pattern (TypeScript Example)\nimport Redis from 'ioredis';\n\nconst redis = new Redis(process.env.REDIS_URL!);\nconst STREAM_KEY = 'events:orders';\nconst GROUP_NAME = 'order-processing-group';\nconst CONSUMER_NAME = `worker-${process.pid}`;\n\nasync function initializeStreamGroup() {\n  try {\n    await redis.xgroup('CREATE', STREAM_KEY, GROUP_NAME, '$', 'MKSTREAM');\n  } catch (err: any) {\n    if (!err.message.includes('BUSYGROUP')) throw err;\n  }\n}\n\nasync function processOrderEvents() {\n  await initializeStreamGroup();\n\n  while (true) {\n    \u002F\u002F Read up to 10 new unconsumed messages for this group\n    const results = await redis.xreadgroup(\n      'GROUP', GROUP_NAME, CONSUMER_NAME,\n      'BLOCK', 2000,\n      'COUNT', 10,\n      'STREAMS', STREAM_KEY, '>'\n    ) as any;\n\n    if (!results) continue;\n\n    for (const [stream, messages] of results) {\n      for (const [id, fields] of messages) {\n        try {\n          const payload = JSON.parse(fields[1]);\n          await handleOrderEvent(payload);\n          \u002F\u002F Acknowledge successful processing\n          await redis.xack(STREAM_KEY, GROUP_NAME, id);\n        } catch (error) {\n          console.error(`Failed to process message ${id}:`, error);\n          \u002F\u002F Failed messages remain in PEL for retry\u002Fdead-letter inspection\n        }\n      }\n    }\n  }\n}\n```\n\n---\n\n## 4. Distributed Locking (Redlock & Atomic Lua)\n\n### Single Instance Atomic Locking with Renewal & Release\n\nTo safely acquire and release locks, use a cryptographically random token and release via Lua script to avoid releasing another client's lock.\n\n```typescript\nimport Redis from 'ioredis';\nimport { randomBytes } from 'crypto';\n\nexport class RedisDistributedLock {\n  private redis: Redis;\n\n  constructor(redisClient: Redis) {\n    this.redis = redisClient;\n  }\n\n  \u002F**\n   * Acquire a distributed lock.\n   *\u002F\n  async acquire(key: string, ttlMs: number): Promise\u003Cstring | null> {\n    const lockToken = randomBytes(16).toString('hex');\n    const acquired = await this.redis.set(\n      `lock:${key}`,\n      lockToken,\n      'PX',\n      ttlMs,\n      'NX'\n    );\n    return acquired === 'OK' ? lockToken : null;\n  }\n\n  \u002F**\n   * Release lock safely using an atomic Lua script.\n   *\u002F\n  async release(key: string, lockToken: string): Promise\u003Cboolean> {\n    const luaScript = `\n      if redis.call(\"get\", KEYS[1]) == ARGV[1] then\n        return redis.call(\"del\", KEYS[1])\n      else\n        return 0\n      end\n    `;\n    const result = await this.redis.eval(luaScript, 1, `lock:${key}`, lockToken);\n    return result === 1;\n  }\n}\n```\n\n---\n\n## 5. Eviction Policies & Memory Tuning\n\n### Redis Eviction Policies (`maxmemory-policy`)\n\n1. **`volatile-lru`**: Evict keys with an explicit expiration using Least Recently Used algorithm.\n2. **`allkeys-lru`**: Recommended for general caching. Evicts any key based on LRU regardless of TTL.\n3. **`volatile-lfu` \u002F `allkeys-lfu`**: Evicts based on Least Frequently Used frequency counters.\n4. **`noeviction`**: Returns Out-Of-Memory errors on writes when limit is reached. Required when Redis acts as a primary database.\n\n### Memory Optimization Rules\n* Set `maxmemory` explicitly (e.g., $75\\%$ of total instance RAM) to leave overhead for replication buffers and BGSAVE copy-on-write fork allocation.\n* Enable **Listpack \u002F Ziplist** encoding for small Hashes and Sets:\n  ```ini\n  hash-max-listpack-entries 512\n  hash-max-listpack-value 64\n  ```\n\n---\n\n## 6. Anti-Patterns & Production Pitfalls\n\n* ❌ **Running `KEYS *` in Production**: Blocks single-threaded Redis execution loop. **Use `SCAN`** with cursor iteration instead.\n* ❌ **Hot Key Bottlenecks**: Single key accessed by thousands of app instances concurrently causing network NIC saturation. *Fix: Implement local in-memory L1 cache (e.g., LRU cache) alongside Redis L2.*\n* ❌ **Big Keys ($> 10\\text{ MB}$ collections\u002Fstrings)**: Unlinking\u002Fdeleting large collections causes latency spikes. **Use `UNLINK`** instead of `DEL` for async garbage collection.\n* ❌ **Missing Key Namespaces**: Keys without structured prefixes leads to collisions and unsafe bulk flush actions. *Pattern: `app:domain:entity:id` (e.g., `shop:user:profile:10948`).*\n* ❌ **Unbounded Collection Growth**: Sets, Lists, or Hashes left to grow indefinitely without TTLs or trimming logic.\n","# Redis Caching & Pub\u002FSub Architecture Guide\n\nProduction-grade guide for designing, implementing, and scaling Redis as a high-performance cache, session store, real-time pub\u002Fsub message broker, and distributed coordinator.\n\n---\n\n## 1. Caching Strategies & Design Patterns\n\n### 1.1 Cache-Aside (Lazy Loading)\nThe application reads from the cache first. On a cache miss, it reads from the primary database, updates the cache, and returns the result.\n\n```\n+-------------+      1. Read Key      +-------+\n| Application | --------------------> | Cache |\n|             | \u003C-------------------- |       |\n+-------------+     2. Cache Hit      +-------+\n       |\n       | 3. Cache Miss\n       v\n+---------------+\n| Primary DB    |\n+---------------+\n```\n\n* **Best For**: Read-heavy workloads with unpredictable access patterns.\n* **Trade-off**: Stale data risk if DB writes don't invalidate\u002Fupdate cache; higher latency on cache miss.\n\n### 1.2 Write-Through Caching\nThe application writes data directly to the cache, and the cache synchronously writes to the database.\n\n* **Best For**: Mission-critical reads where cache staleness cannot be tolerated.\n* **Trade-off**: Higher write latency; potential cache pollution with infrequently read data.\n\n### 1.3 Write-Behind (Write-Back) Caching\nThe application writes to the cache immediately, and an asynchronous process flushes cache updates to the underlying DB in batches.\n\n* **Best For**: Write-heavy systems (e.g., analytics, metrics aggregators, counter updates).\n* **Trade-off**: Risk of data loss if Redis crashes before flushing to primary DB.\n\n### 1.4 Cache Stampede (Thundering Herd) Mitigation\nWhen a popular cache key expires, thousands of concurrent requests hit the backend database simultaneously.\n\n#### Solution A: Distributed Mutex \u002F Lock\nAcquire a lock to recompute the cache value; force other concurrent requests to wait or return stale data.\n\n#### Solution B: Probabilistic Early Expiration (XFetch Algorithm)\nAs a key nears expiration, probabilistically refresh it in the background before it expires.\n\n$$\\Delta - \\beta \\cdot \\ln(\\text{rand}()) > \\text{TTL}$$\n\n---\n\n## 2. Redis Data Structures & Scalable Usage Patterns\n\n| Data Structure | Primary Use Cases | Recommended Max Size \u002F Rule |\n| :--- | :--- | :--- |\n| **Strings** | Simple key-value, HTML fragments, JSON payloads, counters (`INCRBY`) | Limit single string value to $\u003C 100\\text{ KB}$ |\n| **Hashes** | User objects, entity fields, session attributes | Use fields instead of JSON strings for partial updates |\n| **Sets** | Unique tags, IP blacklists, mutual friends, deduplication | Max set size $\u003C 10,000$ members for fast bulk operations |\n| **Sorted Sets (ZSET)** | Leaderboards, rate limit sliding windows, priority queues | High efficiency ($O(\\log N)$ inserts\u002Fsearches) |\n| **HyperLogLog** | Unique visitor counting (Cardinality estimation) | Constant $12\\text{ KB}$ footprint with $0.81\\%$ standard error |\n| **Bitmaps** | User daily active status, feature toggles | $512\\text{ MB}$ max space = $4.29$ billion flags |\n| **Streams** | Append-only event logs, persistent pub\u002Fsub, message processing queues | Use `XADD` with explicit trimming (`MAXLEN ~ 10000`) |\n\n---\n\n## 3. Real-Time Messaging: Pub\u002FSub vs. Streams\n\n### Pub\u002FSub (At-Most-Once)\n* **Behavior**: Fire-and-forget message delivery. Messages are not persisted. If a subscriber is disconnected during publication, the message is lost.\n* **Use Cases**: Live UI updates, websocket notifications, ephemeral chat messages.\n\n### Redis Streams (At-Least-Once)\n* **Behavior**: Append-only log with Consumer Groups, message ACK, pending entry lists (PEL), and replay capability.\n* **Use Cases**: Async task processing, distributed event sourcing, reliable messaging workflows.\n\n```typescript\n\u002F\u002F Redis Streams Consumer Group Pattern (TypeScript Example)\nimport Redis from 'ioredis';\n\nconst redis = new Redis(process.env.REDIS_URL!);\nconst STREAM_KEY = 'events:orders';\nconst GROUP_NAME = 'order-processing-group';\nconst CONSUMER_NAME = `worker-${process.pid}`;\n\nasync function initializeStreamGroup() {\n  try {\n    await redis.xgroup('CREATE', STREAM_KEY, GROUP_NAME, '$', 'MKSTREAM');\n  } catch (err: any) {\n    if (!err.message.includes('BUSYGROUP')) throw err;\n  }\n}\n\nasync function processOrderEvents() {\n  await initializeStreamGroup();\n\n  while (true) {\n    \u002F\u002F Read up to 10 new unconsumed messages for this group\n    const results = await redis.xreadgroup(\n      'GROUP', GROUP_NAME, CONSUMER_NAME,\n      'BLOCK', 2000,\n      'COUNT', 10,\n      'STREAMS', STREAM_KEY, '>'\n    ) as any;\n\n    if (!results) continue;\n\n    for (const [stream, messages] of results) {\n      for (const [id, fields] of messages) {\n        try {\n          const payload = JSON.parse(fields[1]);\n          await handleOrderEvent(payload);\n          \u002F\u002F Acknowledge successful processing\n          await redis.xack(STREAM_KEY, GROUP_NAME, id);\n        } catch (error) {\n          console.error(`Failed to process message ${id}:`, error);\n          \u002F\u002F Failed messages remain in PEL for retry\u002Fdead-letter inspection\n        }\n      }\n    }\n  }\n}\n```\n\n---\n\n## 4. Distributed Locking (Redlock & Atomic Lua)\n\n### Single Instance Atomic Locking with Renewal & Release\n\nTo safely acquire and release locks, use a cryptographically random token and release via Lua script to avoid releasing another client's lock.\n\n```typescript\nimport Redis from 'ioredis';\nimport { randomBytes } from 'crypto';\n\nexport class RedisDistributedLock {\n  private redis: Redis;\n\n  constructor(redisClient: Redis) {\n    this.redis = redisClient;\n  }\n\n  \u002F**\n   * Acquire a distributed lock.\n   *\u002F\n  async acquire(key: string, ttlMs: number): Promise\u003Cstring | null> {\n    const lockToken = randomBytes(16).toString('hex');\n    const acquired = await this.redis.set(\n      `lock:${key}`,\n      lockToken,\n      'PX',\n      ttlMs,\n      'NX'\n    );\n    return acquired === 'OK' ? lockToken : null;\n  }\n\n  \u002F**\n   * Release lock safely using an atomic Lua script.\n   *\u002F\n  async release(key: string, lockToken: string): Promise\u003Cboolean> {\n    const luaScript = `\n      if redis.call(\"get\", KEYS[1]) == ARGV[1] then\n        return redis.call(\"del\", KEYS[1])\n      else\n        return 0\n      end\n    `;\n    const result = await this.redis.eval(luaScript, 1, `lock:${key}`, lockToken);\n    return result === 1;\n  }\n}\n```\n\n---\n\n## 5. Eviction Policies & Memory Tuning\n\n### Redis Eviction Policies (`maxmemory-policy`)\n\n1. **`volatile-lru`**: Evict keys with an explicit expiration using Least Recently Used algorithm.\n2. **`allkeys-lru`**: Recommended for general caching. Evicts any key based on LRU regardless of TTL.\n3. **`volatile-lfu` \u002F `allkeys-lfu`**: Evicts based on Least Frequently Used frequency counters.\n4. **`noeviction`**: Returns Out-Of-Memory errors on writes when limit is reached. Required when Redis acts as a primary database.\n\n### Memory Optimization Rules\n* Set `maxmemory` explicitly (e.g., $75\\%$ of total instance RAM) to leave overhead for replication buffers and BGSAVE copy-on-write fork allocation.\n* Enable **Listpack \u002F Ziplist** encoding for small Hashes and Sets:\n  ```ini\n  hash-max-listpack-entries 512\n  hash-max-listpack-value 64\n  ```\n\n---\n\n## 6. Anti-Patterns & Production Pitfalls\n\n* ❌ **Running `KEYS *` in Production**: Blocks single-threaded Redis execution loop. **Use `SCAN`** with cursor iteration instead.\n* ❌ **Hot Key Bottlenecks**: Single key accessed by thousands of app instances concurrently causing network NIC saturation. *Fix: Implement local in-memory L1 cache (e.g., LRU cache) alongside Redis L2.*\n* ❌ **Big Keys ($> 10\\text{ MB}$ collections\u002Fstrings)**: Unlinking\u002Fdeleting large collections causes latency spikes. **Use `UNLINK`** instead of `DEL` for async garbage collection.\n* ❌ **Missing Key Namespaces**: Keys without structured prefixes leads to collisions and unsafe bulk flush actions. *Pattern: `app:domain:entity:id` (e.g., `shop:user:profile:10948`).*\n* ❌ **Unbounded Collection Growth**: Sets, Lists, or Hashes left to grow indefinitely without TTLs or trimming logic.\n",{"name":5,"description":7},"main","e905af21e5f1e1c3ca605e9656c3a7930360a84e","Programming\u002FBackend\u002FDatabases_and_Caching\u002Fredis-caching-and-pubsub",1,"https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills","https:\u002F\u002Fhamzabellouch.github.io\u002F","https:\u002F\u002Fgithub.com\u002Fhamzabellouch","hamzabellouch.github.io","CEO & Founder of @tknoglobal | Researcher in Technology & Applied Sciences.","2026-10-17 03:20:19",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add hamzabellouch\u002Fagent-skills --skill redis-caching-and-pubsub",{"tool":40,"command":41},"bunx","bunx skills add hamzabellouch\u002Fagent-skills --skill redis-caching-and-pubsub",{"tool":43,"command":44},"pnpm","pnpm dlx skills add hamzabellouch\u002Fagent-skills --skill redis-caching-and-pubsub","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FProgramming\u002FBackend\u002FDatabases_and_Caching\u002Fredis-caching-and-pubsub\u002FSKILL.md",true,[],[49,56,63,70,77,84],{"skillNo":50,"name":51,"nameZh":6,"description":52,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":53,"categories":54,"keywords":55,"publishedAt":19},"01M79FHH2H815A9TAP6WNKH4Q8","security-audit","Comprehensive security guidance, source code audit, vulnerability assessment, and penetration test review for codebases, APIs, microservices, CLI tools, libraries, and LLM-backed applications. Triggers on requests to audit a codebase, conduct security reviews, find vulnerabilities or flaws, pen-test source code, or when the user asks in Arabic (فحص أمني، تدقيق الكود أمنياً، مراجعة الثغرات، فحص أمان المشروع). Supports Guidance mode (focused review) and Full Audit mode (deterministic 6-phase harness).","https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FSecurity\u002FSecurity_Audit_and_Code_Review\u002Fsecurity-audit\u002FSKILL.md",[],[],{"skillNo":57,"name":58,"nameZh":6,"description":59,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M79FHBGXVBY6VQ1X7ETAZMF1","malware-analysis-reversing","Production malware analysis workflows, reverse engineering methodologies, isolated sandbox triage, static\u002Fdynamic binary analysis, memory forensics, and YARA detection rule authoring.","https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FSecurity\u002FOffensive_Security_and_Pentesting\u002Fmalware-analysis-reversing\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M79FH6EACDR801TZCE4R8SAC","application-security-pentesting","Production Application Security (AppSec) standards, OWASP Top 10 vulnerability remediation, SAST\u002FDAST pipeline integration, secure code review, threat modeling, and defensive security posture.","https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FSecurity\u002FOffensive_Security_and_Pentesting\u002Fapplication-security-pentesting\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M79FH0VKVT44FK923K520ZQA","oauth2-oidc-security-flows","Implement enterprise OAuth 2.1 and OpenID Connect (OIDC) authorization code flow with Proof Key for Code Exchange (PKCE), state and nonce verification, refresh token rotation, token revocation, and centralized IdP federation (Keycloak, Auth0, Okta). Trigger when building secure authentication, single sign-on (SSO), or third-party delegated authorization.","https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FSecurity\u002FIdentity_and_Access_Management_IAM\u002Foauth2-oidc-security-flows\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M79FGVVB3R4T88XXD8FRSV5B","jwt-session-management-hardening","Harden JWT-based authentication and session lifecycles using asymmetric signing (RS256\u002FEdDSA), JWKS rotation, strict claims validation, Redis-backed sliding window sessions, revocation lists, and secure HttpOnly cookie storage. Trigger when implementing token validation, session revocation, or hardening API authentication.","https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FSecurity\u002FIdentity_and_Access_Management_IAM\u002Fjwt-session-management-hardening\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M79FGNCPZ85CVEY0B3NE4H3B","soc2-compliance-automation","Best practices for implementing SOC 2 Type II compliance controls, continuous evidence collection, infrastructure policy-as-code, and automated security monitoring. Use when automating Trust Services Criteria (Security, Availability, Confidentiality, Processing Integrity, Privacy), audit logging, IAM least privilege, or CI\u002FCD security gates.","https:\u002F\u002Fgithub.com\u002Fhamzabellouch\u002Fagent-skills\u002Fblob\u002Fmain\u002FSecurity\u002FGovernance_Compliance_and_Legal_Tech\u002Fsoc2-compliance-automation\u002FSKILL.md",[],[]]