drupal-config-storage

Manage Drupal configuration, state, and temporary data via Config, State, and TempStore APIs.

1|Updated Mar 11, 2026
One-click install
npx skills add https://github.com/proofoftom/drupal-skills --skill drupal-config-storage
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: drupal-config-storage
Source: https://github.com/proofoftom/drupal-skills/tree/main/skills/drupal-config-storage
Command: npx skills add https://github.com/proofoftom/drupal-skills --skill drupal-config-storage

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill ensures you correctly store and manage Drupal configuration, runtime state, and temporary user data, preventing common errors that lead to broken exports, lost settings, or database bloat.

Core Features & Use Cases

  • Config API: For persistent, exportable admin settings and module configurations.
  • State API: For environment-specific runtime flags and markers.
  • TempStore: For temporary, per-user or shared data across requests.
  • Use Case: When building a custom module, you need to store API keys, user preferences, and temporary form progress. This Skill guides you to use Config API for API keys, State API for a cron run timestamp, and TempStore for multi-step form data.

Quick Start

Use the drupal-config-storage skill to create a config schema for a new module's settings.

Frequently Asked Questions about drupal-config-storage

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What is the difference between Drupal Config API, State API, and TempStore?

Use Drupal Config API for persistent, exportable module settings, State API for environment-specific runtime flags, and TempStore for temporary per-user data across requests. Each API addresses different persistence, exportability, and scope requirements.

How do I store API keys and module settings in Drupal 11?

To store API keys and module settings in Drupal, use the Config API to create a configuration schema. This ensures your persistent admin settings are properly stored and exportable without breaking configuration exports.

When should I use Drupal State API instead of Config API?

Use Drupal State API instead of Config API when you need to store environment-specific runtime flags and markers, such as a cron run timestamp. State API handles non-exportable runtime data, preventing database bloat and broken configuration exports.

How do I manage temporary form progress for multi-step forms in Drupal?

Manage temporary form progress in Drupal using TempStore, which handles temporary per-user or shared data across requests. This prevents lost settings and database bloat by isolating transient multi-step form data from persistent configuration.

Does this approach to Drupal configuration storage work for Drupal 10?

Yes, this Drupal configuration storage approach supports both Drupal 10 and Drupal 11. It differentiates between Config API, State API, and TempStore based on data persistence, exportability, and scope requirements across both versions.