agentleFS
0xOpCode0xOpCode/tele-harness/.agents/skills/keyboard-navigator/SKILL.md

keyboard-navigator

Skill1 starsChanged 50 days agoMITView on GitHub

Architects nested inline keyboard navigation, pagination, back-tracking, and callback data budgeting.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Follow these constraints when engineering button-based menus:

    line 9
  2. Distinctive:

    Avoid dead-end menus. Every child view must provide an exit path.

    line 16
  3. Distinctive:

    If data size exceeds 64 bytes, store the full payload in Redis or database session storage, then pass an integer key in the callback data.

    line 33
  4. Very specific:

    Update menus in place using editMessageText and editMessageReplyMarkup instead of posting new messages.

    line 36

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Inline Keyboard Navigation Protocol

Follow these constraints when engineering button-based menus:

1. Menu Hierarchy & Breadcrumbs

  • Structure menus as a directed tree: Root Menu -> Category -> Item -> Action.
  • Dedicate the bottom keyboard row to navigation controls:
    • « Back: returns to immediate parent state.
    • 🏠 Home: resets navigation to the primary start menu.
  • Avoid dead-end menus. Every child view must provide an exit path.

2. Dynamic Pagination

  • Display page counters in the control row: [◀ Prev] [Page 2/7] [Next ▶].
  • Calculate slice bounds from page number and page size: offset = page * limit.
  • Omit or disable boundary buttons when on the first or final page.
  • Persist active filter and sort parameters in the callback payload during page turns.

3. Grid Geometry

  • Single Column (1 button per row): High-impact actions, checkout confirmations, destructive deletions.
  • Double Column (2 buttons per row): General settings, item selections, form options.
  • Triple or Quad Column (3-4 buttons per row): Date pickers, numeric keypads, currency selectors.
  • Enforce Telegram limits: maximum 8 buttons per row, maximum 100 buttons per message.

4. 64-Byte Callback Data Budget

  • Telegram limits callback_data strings to 64 bytes. Exceeding this limit causes API rejection.
  • Encode data with compact delimiters: action:target_id:page:flags (e.g., v:9821:2:d).
  • If data size exceeds 64 bytes, store the full payload in Redis or database session storage, then pass an integer key in the callback data.

5. UI Lifecycle & Chat Cleanliness

  • Update menus in place using editMessageText and editMessageReplyMarkup instead of posting new messages.
  • Post new messages only when outputting media, reports, or permanent receipts.
  • Acknowledge every callback query with answerCallbackQuery to clear client-side loading indicators. Provide brief toast alerts (show_alert=True) for background errors.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.