Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

writing-methods

Skill by mtcute

Guides contributors adding or modifying high-level client methods in the mtcute library. It covers signatures, codegen annotations, peer resolution, update handling and pagination for the packages/core methods folder.

  • Score 77
  • 597 stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install writing-methods

Built from the published package, never by AI.

git clone --depth 1 https://github.com/mtcute/mtcute /tmp/mtcute && mkdir -p ~/.claude/skills && cp -r /tmp/mtcute/.claude/skills/writing-methods ~/.claude/skills/writing-methods

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install writing-methods in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

This internal skill is a contributor guide for adding or modifying high-level client methods in the mtcute repository, under packages/core/src/highlevel/methods/. It starts with a lookup step that prints the TL definition, TypeScript type and return type of a given constructor, such as messages.sendMessage. It then sets out the function signature convention, in which the client comes first, primary identifiers are positional and optional values go in a trailing params object.

The guide also covers codegen annotations processed by generate-client.cjs, peer resolution helpers, update handling with handleClientUpdate and shouldDispatch, pagination with ArrayPaginated and iterator wrappers, text normalization, 2FA password handling, and error helpers. It is written for developers working on the mtcute library itself, and it points to the using-mtcute skill for more background.

Written from the project's SKILL.md and checked against it.

What it can do

  • TL schema lookupPrints the TL definition, TypeScript type, union info and return type of a constructor.
  • Function signature conventionSets rules for client first args, positional identifiers and trailing params objects.
  • Codegen annotationsExplains @copy, @exported, @available, @alias, @skip, @internal and @noemit annotations.
  • Peer resolutionShows resolvePeer, resolveUser and resolveChannel and chat versus channel dispatch.
  • Update handlingShows handleClientUpdate, _findMessageInUpdate, createDummyUpdate and the shouldDispatch pattern.
  • PaginationShows ArrayPaginated, ArrayWithTotal and async iterator wrappers over paginated getters.
  • Sending messagesShows the common send flow with _processCommonSendParameters and chain IDs.
  • Error handlingLists type assertion helpers and MtcuteError, MtArgumentError and peer type error classes.

What you need

  • Node.js to run the TL lookup and codegen scripts
  • Access to the mtcute repository

Try asking

  • Add a new high-level method for a TL constructor in packages/core methods
  • Show how to dispatch between chat and channel calls in a method
  • Write a paginated iterator wrapper for a history getter method

Good to know

  • Marked internal in its metadata and aimed at mtcute contributors
  • Paths and scripts are specific to the mtcute repository
  • New or changed methods require running generate-client.cjs

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: .claude/skills/writing-methods/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Alternatives to writing-methods

All alternatives →
openclaw-github-repo-commandersickn33
94

Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.

AAA Skill 50k
gradiogradio-app
94

Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.

AAA Skill 44k
hig-components-menussickn33
94

Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.

AAA Skill 50k
fastapi-templateswshobson
94

Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.

AAA Skill 43k
appfunctionsandroid
94

Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.

AAA Skill 11k
agent-qa-authoringsickn33
94

Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.

AAA Skill 50k

Compare with openclaw-github-repo-commander, gradio or hig-components-menus

writing-methods: common questions

What does the writing-methods skill cover?

It covers function signatures, codegen annotations, peer resolution, update handling, pagination and common patterns for high-level methods in packages/core/src/highlevel/methods/.

Do I need to run anything after adding a method?

Yes. The source says to run node packages/core/scripts/generate-client.cjs after adding or modifying methods.

Who is this skill for?

It is an internal guide for developers writing high-level methods in the mtcute library, and it refers readers to the using-mtcute skill for more information.

How do I install writing-methods?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is writing-methods free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is writing-methods safe to use?

It scores 77 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to writing-methods?

Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.

writing-methods Install

Add to stack

Loading.