zmk

For detailed project overview, features, and usage instructions, please refer to README.md.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/kot149/zmk-layout-shift/zmk
Clone the repo
git clone --depth 1 https://github.com/kot149/zmk-layout-shift

Made for: Cursor.

Per session 557 This file is loaded in full into every session.
When invoked 557 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00557 $0.00557
Opus 5 $0.00279 $0.00279
Sonnet 5 $0.00111 $0.00111
Haiku 4.5 $0.00056 $0.00056

Measured today against content hash 4f5b28c2009d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

zmk scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/zmk.mdc · 60 lines

How it starts

The opening of the file, as written. The whole thing — 60 lines — stays where its author put it; the contents beside it link to each section on GitHub.

ZMK Project Coding Instructions for AI

Project Overview

For detailed project overview, features, and usage instructions, please refer to README.md.

Critical Prerequisites

MANDATORY: Before making ANY implementation changes, you MUST:

  1. Consult the ZMK Repository Expert: Query the Deepwiki MCP server (repoName: zmkfirmware/zmk) to understand the current implementation and identify potential issues.

  2. Consult the Zephyr Repository Expert: Since ZMK is Zephyr-based, also query the Deepwiki MCP server (repoName: zephyrproject-rtos/zephyr) for Zephyr-specific implementation details when needed.

  3. Share Context: Provide the MCP server with:

    • Current implementation details
    • Identified problems or requirements
    • Your proposed implementation approach
  4. Validate Implementation Strategy: Confirm your implementation plan with the ZMK expert before proceeding.

  5. Update Documentation: After making any changes, always update the README.md with relevant information about new features, usage instructions, or implementation status.

Why This Process is Essential

  • Pre-trained Knowledge Limitations: LLM training data may not reflect the latest ZMK architecture, APIs, or best practices
  • Build Failure Prevention: ZMK has specific conventions and dependencies that may not be obvious from general knowledge
  • Implementation Accuracy: The ZMK codebase has evolved significantly, and outdated approaches will likely fail

Remember

NO ASSUMPTIONS: Always verify current ZMK practices before implementation. What worked in older versions may not work in current releases.

EXPERT FIRST: Consult zmkfirmware/zmk and zephyrproject-rtos/zephyr repository experts before coding, not after encountering build failures.

Build Verification

MANDATORY BUILD CHECK: After any implementation or modification, verify that the build passes by running the following command:

just build roBa_R -S zmk-usb-logging

Read the full file on GitHub · 60 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today First seen · 60 lines · 557 tokens per session scan A 4f5b28c2009d

Subscribe to this mod's changes

zmk is a cursor rule published in the GitHub repository kot149/zmk-layout-shift (17 stars, last pushed yesterday), licensed MIT. It adds 557 tokens to every session, about $0.0028 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-01.