magento-cache

magento-cache is a skill for Claude Code, Codex from furan917/magento-ai-toolkit. It costs 43 tokens per session (3,706 once invoked), scanned A, original, MPL-2.0.

A guide for creating and managing Magento 2 cache types, which store reusable data so pages and operations do not have to rebuild it every time. It covers cache identifiers, tags, invalidation, blocks, and full-page caching.

In plain words
What is it for?
Use it to build custom cache types, connect them to Magento configuration, invalidate related data with cache tags, and control cached block or page output.
Why use it?
It helps prevent stale data and inefficient cache clearing while avoiding common cache bugs. It explains when to cache a component, a page, or a custom data structure.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to build custom cache types, connect them to Magento configuration, invalidate related data with cache tags, and control cached block or page output.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/furan917/magento-ai-toolkit/magento-cache
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add furan917/magento-ai-toolkit --skill magento-cache
Clone the repo
git clone --depth 1 https://github.com/furan917/magento-ai-toolkit

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for magento-cache

README.md
[![agentmods](https://agentmods.dev/badge/skills/furan917/magento-ai-toolkit/magento-cache/github.svg)](https://agentmods.dev/skills/furan917/magento-ai-toolkit/magento-cache)
Your own site
<a href="https://agentmods.dev/skills/furan917/magento-ai-toolkit/magento-cache"><img src="https://agentmods.dev/badge/skills/furan917/magento-ai-toolkit/magento-cache/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for magento-cache

Your own site · 80×15
<a href="https://agentmods.dev/skills/furan917/magento-ai-toolkit/magento-cache"><img src="https://agentmods.dev/badge/skills/furan917/magento-ai-toolkit/magento-cache.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,706 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00043 $0.03706
Opus 5 $0.00022 $0.01853
Sonnet 5 $0.00009 $0.00741
Haiku 4.5 $0.00004 $0.00371

Measured 10d ago against content hash 11157e7392bf, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

magento-cache scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -I https://example.com/ | grep -i "x-magento"
skills/magento-cache/SKILL.md · 470 lines

How it starts

The opening of the file, as written. The whole thing — 470 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Skill: magento-cache

Purpose: Build custom Magento 2 cache types, manage cache invalidation with tags, and control full-page cache behaviour at the block and layout level. Compatible with: Any LLM (Claude, GPT, Gemini, local models) Usage: Paste this file as a system prompt, then describe the data you want to cache or the cache problem you need to solve.


System Prompt

You are a Magento 2 cache specialist. You build custom cache types using TagScope, register them in cache.xml, and implement save/load/invalidation patterns using cache tags. You know when to use block-level caching, when to use FPC with hole-punching, and how to avoid the most common cache-related bugs.


Cache Type Identifiers (Built-in)

Cache Type Identifier Cleared By
Configuration config cache:clean config
Layouts layout cache:clean layout
Blocks HTML output block_html cache:clean block_html
Collections Data collections cache:clean collections
Reflection Data reflection cache:clean reflection
Database DDL operations db_ddl cache:clean db_ddl
Compiled Config compiled_config cache:clean compiled_config
EAV types and attributes eav cache:clean eav
Customer Notification customer_notification cache:clean customer_notification
Config Integration config_integration cache:clean config_integration
Config Webservice config_webservice cache:clean config_webservice
Full-Page Cache full_page cache:clean full_page
Translations translate cache:clean translate
GraphQL Resolver Results graphql_query_resolver_result cache:clean graphql_query_resolver_result

Custom Cache Type

Step 1 — Cache Type Class

<?php
declare(strict_types=1);

namespace Vendor\Module\Model\Cache;

use Magento\Framework\App\Cache\Type\FrontendPool;
use Magento\Framework\Cache\Frontend\Decorator\TagScope;

/**
 * Custom cache type — extends TagScope so all saves are automatically
 * tagged with CACHE_TAG, enabling clean invalidation via cache:clean.
 */
class Type extends TagScope
{
    /**
     * Unique cache type identifier — used in cache.xml and bin/magento cache:status.
     * Must match the 'name' attribute in cache.xml.
     */
    public const TYPE_IDENTIFIER = 'vendor_module';

    /**
     * Cache tag applied to all entries — used for targeted invalidation.
     * Convention: UPPERCASE_VENDOR_MODULE
     */
    public const CACHE_TAG = 'VENDOR_MODULE';

    public function __construct(FrontendPool $cacheFrontendPool)
    {
        parent::__construct(
            $cacheFrontendPool->get(self::TYPE_IDENTIFIER),
            self::CACHE_TAG
        );
    }
}

Read the full file on GitHub · 470 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 470 lines · 43 tokens per session scan A 11157e7392bf

Subscribe to this mod's changes

magento-cache is a skill published in the GitHub repository furan917/magento-ai-toolkit (34 stars, last pushed 4mo ago), licensed MPL-2.0. It adds 43 tokens to every session and 3,706 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

magento2-backend-dev

This skill should be used when the user asks to "create an API endpoint", "build a REST API", "add a GraphQL resolver", "create a CLI command", "add a cron job", "set up a message queue", "implement a web API", "add a SOAP service", or "create a data provider". Covers Magento 2 backend development: REST/SOAP/GraphQL…

ddtcorex/maestro-skills · 114 tokens

magento-module-development

Build custom Magento 2 modules using dependency injection, plugins, observers, and service contracts to extend core functionality cleanly.

finsilabs/awesome-ecommerce-skills · 28 tokens

magento-module-developer

Creates robust, maintainable, and extensible Magento 2 modules following enterprise architecture patterns. Use when developing custom modules, implementing new functionality, creating extensions, or building Magento 2 components. Masters dependency injection, service contracts, repository patterns, and module…

maxnorm/magento2-agent-skills · 58 tokens

magento-cronjob-developer

Implements scheduled tasks and background processing for Magento 2. Use when creating cron jobs, scheduling automated tasks, implementing background processing, or automating system operations. Masters cron configuration, job scheduling, error handling, and performance optimization.

maxnorm/magento2-agent-skills · 54 tokens

magento-api-developer

Designs and implements REST and GraphQL APIs for Magento 2. Use when developing APIs, creating service contracts, building headless commerce solutions, or integrating with external systems. Masters service contracts, data transfer objects, authentication, and enterprise-grade API architecture.

maxnorm/magento2-agent-skills · 57 tokens

magento-feature-developer

Implements business requirements as scalable, maintainable Magento 2 features. Use when developing custom functionality, implementing business logic, creating integrations, or building complex features. Masters service contracts, repository patterns, and enterprise-grade feature implementation.

maxnorm/magento2-agent-skills · 51 tokens