rc-persistence

Save, update, and retrieve data with the Rocket.Chat Apps Engine IPersistence accessor.

Updated Mar 14, 2026
One-click install
npx skills add https://github.com/SoroushRF/gemini-cli-rc-apps --skill rc-persistence
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rc-persistence
Source: https://github.com/SoroushRF/gemini-cli-rc-apps/tree/main/skills/rc-persistence
Command: npx skills add https://github.com/SoroushRF/gemini-cli-rc-apps --skill rc-persistence

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill addresses the challenge of maintaining data state within Rocket.Chat applications, ensuring that information is reliably saved, retrieved, and managed across user sessions and application restarts.

Core Features & Use Cases

  • Data Persistence: Securely store and retrieve data associated with users, rooms, or general miscellaneous categories.
  • State Management: Maintain application state, user preferences, and historical data reliably.
  • Use Case: A Rocket.Chat app needs to remember a user's preferred notification settings. This Skill can store these preferences using persistence.updateByAssociations linked to the user, ensuring they are available even after the app or server restarts.

Quick Start

Use the rc-persistence skill to save the value "my-important-data" associated with the current user.

Frequently Asked Questions about rc-persistence

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

FAQPage Schema
How do I persist data across sessions in a Rocket.Chat app?

To persist data across sessions in a Rocket.Chat app, use the IPersistence accessor to save, update, and retrieve information. Data is securely associated with specific users, rooms, or general categories to maintain application state across restarts.

How does state management work with the Rocket.Chat Apps Engine?

State management with the Rocket.Chat Apps Engine works by utilizing the IPersistence accessor to store and retrieve application data. This ensures information like user preferences and historical data is reliably saved and queryable across user sessions and application restarts.

How do I associate stored data with a specific user in Rocket.Chat?

To associate stored data with a specific user in Rocket.Chat, use updateByAssociations linked to the user object. This ensures the saved data is queryable and correctly maintained for that user across different sessions and application restarts.

Do I need asynchronous operations for data storage in Rocket.Chat apps?

Yes, asynchronous operations are required for data storage in Rocket.Chat apps. Adhering to asynchronous patterns when using the IPersistence accessor prevents data loss and ensures data is reliably saved and queried.

What is the best way to save user preferences in a Rocket.Chat application?

The best way to save user preferences in a Rocket.Chat application is using the persistence updateByAssociations method. This links the stored data to the specific user, ensuring preferences remain available even after the server or app restarts.

What happens if I do not use proper association management for Rocket.Chat data persistence?

Without proper association management for Rocket.Chat data persistence, you risk data loss and reduced queryability. Correctly associating stored data with users, rooms, or categories is essential to ensure information is reliably maintained and retrieved.