lunora-functions

Provides authoring rules for Lunora backend development with TypeScript and Cloudflare Workers.

214|7|Updated May 29, 2026
One-click install
npx skills add https://github.com/anolilab/lunora --skill lunora-functions
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lunora-functions
Source: https://github.com/anolilab/lunora/tree/main/packages/cli/skills/lunora-functions
Command: npx skills add https://github.com/anolilab/lunora --skill lunora-functions

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides the essential architectural rules and best practices for developing type-safe backend code in Lunora, ensuring your schema, queries, and mutations are performant and idiomatic.

Core Features & Use Cases

  • Schema Definition: Guidance on using defineSchema and defineTable with proper indexing for Cloudflare-backed storage.
  • Function Logic: Rules for distinguishing between queries, mutations, and actions to maintain reactivity and transactional integrity.
  • Use Case: Use this Skill when you are designing a new data model or refactoring existing database access patterns to ensure you are using the correct ctx.db methods and avoiding common performance pitfalls like unindexed filters.

Quick Start

Use the lunora-functions skill to review my current schema definition in lunora/schema.ts for potential indexing improvements.

Frequently Asked Questions about lunora-functions

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

FAQPage Schema
How do I define a type-safe database schema for Cloudflare Workers in TypeScript?

Use defineSchema and defineTable to establish type-safe database schemas for Cloudflare-backed storage, ensuring proper indexing is applied for performant queries and reactive state management.

What is the best way to structure backend functions for real-time state management?

The best way to structure backend functions is to distinguish between queries, mutations, and actions to maintain reactivity and transactional integrity within your TypeScript backend application.

Why does my database query performance drop when filtering unindexed fields in TypeScript?

Filtering unindexed fields causes performance drops because the system scans the entire dataset. Define proper indexes in your schema to avoid performance pitfalls and ensure efficient data access.

How do I maintain transactional integrity when executing mutations in a Cloudflare Workers backend?

Maintain transactional integrity by correctly categorizing function logic as mutations and using the appropriate ctx.db methods for transactional data modifications within your TypeScript project.

Can I use reactive queries with Cloudflare-backed storage in a TypeScript project?

Yes, you can use reactive queries with Cloudflare-backed storage by following standardized authoring rules that ensure correct implementation of reactive queries for real-time state and data management.