zmk

zmk is a cursor rule for Cursor from kot149/zmk-layout-shift. It costs 557 tokens per session, scanned A, original, MIT.

Coding instructions for ZMK, an open-source firmware project for custom keyboards, built on the Zephyr operating system.

In plain words
What is it for?
Implementing or reviewing ZMK keyboard firmware changes with repository-specific guidance.
Why use it?
It tells an agent to check current project knowledge before changing code and to document changes afterward.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Implementing or reviewing ZMK keyboard firmware changes with repository-specific guidance.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/kot149/zmk-layout-shift/zmk
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.

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

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for zmk

README.md
[![agentmods](https://agentmods.dev/badge/rules/kot149/zmk-layout-shift/zmk/github.svg)](https://agentmods.dev/rules/kot149/zmk-layout-shift/zmk)
Your own site
<a href="https://agentmods.dev/rules/kot149/zmk-layout-shift/zmk"><img src="https://agentmods.dev/badge/rules/kot149/zmk-layout-shift/zmk/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for zmk

Your own site · 80×15
<a href="https://agentmods.dev/rules/kot149/zmk-layout-shift/zmk"><img src="https://agentmods.dev/badge/rules/kot149/zmk-layout-shift/zmk.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00557 $0.00557
Opus 5.5 $0.00223 $0.00223
Sonnet 5.5 $0.00111 $0.00111
Haiku 4.5 $0.00056 $0.00056

Measured 1mo ago against content hash 4f5b28c2009d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo ago.

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. 1mo ago 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 27d ago), licensed MIT. It adds 557 tokens to every session, about $0.0022 per session on Opus 5.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.