TypeScript Models for Appwrite

VerifiedSafe

Defines standard TypeScript interfaces for Appwrite Collections. Use when creating models for Tours, Users, or Bookings to ensure full type safety with standard Appwrite fields and enums.

Sby Skills Guide Bot
DevelopmentBeginner
3/3/2026
Claude CodeCursorWindsurfCopilotCodex
#typescript#appwrite#type-safety#interfaces#data-modeling

Recommended for

Automated summary

Produces typed TypeScript interfaces for Appwrite collections by extending Models.Document and keeping models centralized in a types/ directory.

Strengths

  • Always includes standard Appwrite fields ($id, $createdAt, $updatedAt, $permissions)
  • Suggests union types for fixed-value fields such as BookingStatus
  • Demonstrates generic usage with the Appwrite SDK (databases.listDocuments<Tour>)
  • Reminds to mark non-mutable frontend fields as readonly

Limitations

  • Tightly scoped to Appwrite and to a sample domain (Tours, Bookings) that needs adapting
  • Does not address runtime validation or automatic type generation from the Appwrite schema
  • Complex permissions and relationship fields are not covered in depth
When to use it

Use it whenever you add or type an Appwrite collection to eliminate any and keep models consistent.

When not to use it

Skip it for projects not built on Appwrite or that already generate types automatically from the schema.

Security analysis

Safe
Quality score85/100

The skill only provides TypeScript interface definitions and guidance for modeling Appwrite collections. It declares no tools and contains no executable commands, network calls, credential handling, or destructive actions.

No concerns found

How this analysis is made

Examples

New collection model
Create a TypeScript interface for a new Appwrite 'Review' collection with rating, comment, userId and tourId, extending Models.Document and putting it in types/.
Typed SDK query
Show me how to fetch tours with full type safety using databases.listDocuments with my Tour interface.
Fixed-value status field
Add a status field with fixed values to my Booking interface using a TypeScript union type instead of a plain string.

name: defining-typescript-models description: Defines standard TypeScript interfaces for Appwrite Collections. Use when creating new models for Tours, Users, or Bookings to ensure full type safety.

TypeScript Models and Interfaces

When to use this skill

  • When defining the data structure for a new Appwrite collection.
  • When creating props for components that data-fetch.
  • To avoid using any across the codebase.

Workflow

  • [ ] Export interfaces from a central types/ directory.
  • [ ] Include standard Appwrite fields ($id, $createdAt, $updatedAt, $permissions).
  • [ ] Use Enums for fields with fixed values (e.g., BookingStatus).

Example Template

import { Models } from 'appwrite';

export interface Tour extends Models.Document {
    title: string;
    description: string;
    price: number;
    location: string;
    images: string[];
    rating: number;
    availableDates: string[]; // ISO Strings
}

export type BookingStatus = 'pending' | 'confirmed' | 'cancelled';

export interface Booking extends Models.Document {
    userId: string;
    tourId: string;
    status: BookingStatus;
    totalPrice: number;
}

Instructions

  • Generics: Use these interfaces with Appwrite SDK methods: databases.listDocuments<Tour>(...).
  • Readonly: Mark fields as readonly if they shouldn't be mutated by the frontend.

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/typescript-models-for-appwrite-mma3jsf5/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/typescript-models-for-appwrite-mma3jsf5' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/typescript-models-for-appwrite-mma3jsf5/download' --output '.skill-downloads/typescript-models-for-appwrite-mma3jsf5/SKILL.md.part' && mv '.skill-downloads/typescript-models-for-appwrite-mma3jsf5/SKILL.md.part' '.skill-downloads/typescript-models-for-appwrite-mma3jsf5/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/typescript-models-for-appwrite-mma3jsf5/SKILL.md' && test -s '.skill-downloads/typescript-models-for-appwrite-mma3jsf5/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/defining-typescript-models' && cp -R '.skill-downloads/typescript-models-for-appwrite-mma3jsf5' '.claude/skills/defining-typescript-models'

Cursor
test -f '.skill-downloads/typescript-models-for-appwrite-mma3jsf5/SKILL.md' && test -s '.skill-downloads/typescript-models-for-appwrite-mma3jsf5/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/defining-typescript-models' && cp -R '.skill-downloads/typescript-models-for-appwrite-mma3jsf5' '.cursor/skills/defining-typescript-models'

Codex
test -f '.skill-downloads/typescript-models-for-appwrite-mma3jsf5/SKILL.md' && test -s '.skill-downloads/typescript-models-for-appwrite-mma3jsf5/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/defining-typescript-models' && cp -R '.skill-downloads/typescript-models-for-appwrite-mma3jsf5' '.agents/skills/defining-typescript-models'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/typescript-models-for-appwrite-mma3jsf5'

openskills read 'typescript-models-for-appwrite-mma3jsf5'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/typescript-models-for-appwrite-mma3jsf5/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills