update-layer

Fetch Telegram API schemas, resolve conflicts, and generate code for mtcute.

541|61|Updated Apr 8, 2021
One-click install
npx skills add https://github.com/mtcute/mtcute --skill update-layer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: update-layer
Source: https://github.com/mtcute/mtcute/tree/main/.claude/skills/update-layer
Command: npx skills add https://github.com/mtcute/mtcute --skill update-layer

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill automates the process of updating the Telegram TL schema, ensuring that the library stays current with the latest API definitions and handles new or changed data structures.

Core Features & Use Cases

  • Fetch API Schemas: Downloads the latest Telegram API schemas from various sources.
  • Conflict Resolution: Provides tools to manually resolve conflicts in schema definitions.
  • Code Generation: Generates necessary code and type definitions based on the updated schema.
  • Use Case: When a new Telegram API feature is released, this Skill can be used to update the library's understanding of the API, enabling support for that feature.

Quick Start

Run a dry run of the TL schema update process by executing cd packages/tl && pnpm tsx scripts/fetch-api.ts --dry-run.

Frequently Asked Questions about update-layer

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

FAQPage Schema
How do I update the Telegram TL schema layer for my library?

It downloads the latest Telegram API schemas from multiple sources, resolves any conflicts in definitions, and generates code to keep the mtcute library updated with new API features.

What is the process for resolving conflicts in Telegram MTProto schema definitions?

The schema update process includes fetching definitions from multiple sources, identifying discrepancies, and providing tools to manually resolve schema conflicts before generating the updated code.

Can I run a dry run of the Telegram schema update process before applying changes?

Yes, you can execute `cd packages/tl && pnpm tsx scripts/fetch-api.ts --dry-run` to fetch new API schemas and preview the update process without applying any actual changes to your library.

Do I need tsx to generate code from the updated Telegram API schemas?

Yes, tsx is required as a dependency to execute the scripts that fetch schemas, check int53 overrides, and generate code from the updated Telegram TL schema layer.

Why does my generated code have issues with new Telegram MTProto data structures?

Generated code issues with new Telegram MTProto data structures often occur when schema conflicts are left unresolved or int53 overrides are not properly checked during the schema update process.

When do I need to update the Telegram TL schema layer?

You need to update the Telegram TL schema layer when a new Telegram API feature is released, ensuring the library understands new API definitions and handles changed data structures.