Install any skill in seconds. Free to start, no credit card required.
Get Started Free →rohitg00/redis-patterns
Redis patterns including caching strategies, pub/sub, streams for event processing, Lua scripts, and data structures
Passed 20 of 22 test cases with the skill, and 15 of 22 without it.
and 5 more in the full report
5 fixed15 passed either way2 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 5 test cases the skill fixed. Same model, same prompt, with and without the skill.
Write a TypeScript function to invalidate cached user data for a given user ID. We store user profile data and their order history under separate keys in Redis.
| Checked | Without skill | With skill |
|---|---|---|
| The function deletes the key user:${userId}. | Missed | Passed |
| The function deletes the key user:${userId}:orders. | Passed | Passed |
The instructions your model reads when the skill loads.
async function getUser(userId: string): Promise<User> {
const cacheKey = `user:${userId}`;
const cached = await redis.get(cacheKey);
if (cached) {
return JSON.parse(cached);
}
const user = await db.user.findUnique({ where: { id: userId } });
if (user) {
await redis.set(cacheKey, JSON.stringify(user), "EX", 3600);
}
return user;
}
async function invalidateUser(userId: string): Promise<void> {
await redis.del(`user:${userId}`);
await redis.del(`user:${userId}:orders`);
}
async function cacheAside<T>(
key: string,
ttlSeconds: number,
fetcher: () => Promise<T>
): Promise<T> {
const cached = await redis.get(key);
if (cached) return JSON.parse(cached);
const value = await fetcher();
await redis.set(key, JSON.stringify(value), "EX", ttlSeconds);
return value;
}
test cases passed, vs 15 / 22 without
Published skills whose descriptions closely match this one, with their headline benchmark lift.
More skills from the same source and nearby in the registry, with their headline benchmark lift.