implement-storage-adapter

Implement Ltix.StorageAdapter callbacks for LTI 1.3 tools in Elixir.

2|Updated Mar 6, 2026
One-click install
npx skills add https://github.com/DecoyLex/ltix --skill implement-storage-adapter
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: implement-storage-adapter
Source: https://github.com/DecoyLex/ltix/tree/main/usage-rules/skills/implement-storage-adapter
Command: npx skills add https://github.com/DecoyLex/ltix --skill implement-storage-adapter

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill guides developers through implementing an Ltix.StorageAdapter for LTI 1.3 tools, clarifying how to map your app's storage layer to the Ltix.StorageAdapter callbacks and how to coordinate schema decisions with the library's expectations.

Core Features & Use Cases

  • Four required callbacks: get_registration/2, get_deployment/2, store_nonce/2, validate_nonce/2, with protocol-driven return shapes LTix.Registration and Ltix.Deployment
  • Guidance on building a storage context (e.g., Ltix.Lti) and corresponding Ecto schemas for Registration, Deployment, and Nonce
  • Strategies for upsert vs manual deployment creation, nonce lifecycle handling, and test coverage for storage adapters

Quick Start

Set up your project skeleton for Ltix.StorageAdapter by implementing the four callbacks and wiring them to your app's LTI data layer.

Frequently Asked Questions about implement-storage-adapter

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

FAQPage Schema
How do I implement an Ltix.StorageAdapter for LTI 1.3 in Elixir?

The four required Ltix.StorageAdapter callbacks are get_registration/2, get_deployment/2, store_nonce/2, and validate_nonce/2. They manage LTI 1.3 registrations, deployments, and nonces, returning protocol-driven shapes like LTix.Registration and LTix.Deployment to coordinate your schema with the library.

How do I handle nonce validation atomically in an Elixir LTI adapter?

Nonce validation should be handled atomically within the store_nonce/2 and validate_nonce/2 callbacks to prevent race conditions. The implementation requires an Ecto schema for the Nonce model and careful lifecycle handling to ensure secure LTI 1.3 tool launches.

Do I need Ecto schemas for LTI registrations and deployments when using Ltix?

Yes, you need Ecto schemas for LTI registrations and deployments when using Ltix. You must build a storage context, such as Ltix.Lti, and define corresponding schemas that satisfy the LTix.Registration and LTix.Deployment protocol implementations required by the adapter callbacks.

What's the best way to configure a storage adapter for LTI 1.3 in Elixir config files?

The best way to configure a storage adapter for LTI 1.3 is to enable it in your Elixir config files by pointing the Ltix configuration to your custom adapter module. This involves defining the required schemas, implementing the four callbacks, and wiring the storage context to the application's configuration.

Can I upsert LTI deployments automatically through the storage adapter?

Yes, you can upsert LTI deployments automatically through the storage adapter. The implementation provides strategies for upsert versus manual deployment creation, allowing you to choose how the get_deployment/2 callback manages deployment records based on your specific application needs.