Agent skill

Masm Inline Comments

by 0xMiden in 0xMiden/protocol

Enforce inline commenting conventions for Miden Assembly (.masm) files.

MITAuto-check passedDevelopment

Install Masm Inline Comments

skills CLI
$ npx skills add 0xMiden/protocol --skill masm-inline-comments -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install 0xMiden/protocol masm-inline-comments --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/0xMiden/protocol.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/masm-inline-comments .claude/skills/masm-inline-comments && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
masm-inline-comments
GitHub stars
133
Token cost
~1.4k tokens
SKILL.md length
484 words
Files
1
Skills in repo
34
Repo updated
First seen
Licence
MIT

At a glance

Enforce inline commenting conventions for Miden Assembly (.masm) files.

  • Works in 7 steps: Inline comments start lowercase → Don't over-comment obvious operations → Blank line after # => [...] trackers → …
  • Creating .masm files
  • SKILL.md covers Rules and Examples
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Masm Inline Comments is an agent skill from 0xMiden/protocol. Enforce inline commenting conventions for Miden Assembly (.masm) files. Use when editing, reviewing, or creating .masm files.

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development, covering Technical documentation. The repository describes itself as: Core components of the Miden protocol. The licence is MIT.

When your agent uses it

  • Creating .masm files
  • Tasks that involve Technical documentation

Example prompts

  • “/masm-inline-comments”

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. Inline comments start lowercase
  2. Don't over-comment obvious operations
  3. Blank line after # => [...] trackers
  4. Match the doc block
  5. Reuse existing terminology
  6. Comment the code, not the change or the design
  7. Accessing a word's individual elements

What it can do on your machine

Read from SKILL.md and the folder at commit 3a8215e. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are masm).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Masm Inline Comments loads about 1.4k tokens when it runs. Until then it costs about 37 tokens; SKILL.md has 484 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~37
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from 0xMiden/protocol at commit 3a8215e, republished under its MIT licence (© 0xMiden). 484 words, ~1,365 tokens.

Download SKILL.mdSave it as .claude/skills/masm-inline-comments/SKILL.md (or your agent's skills folder).
name
masm-inline-comments
description
Enforce inline commenting conventions for Miden Assembly (.masm) files. Use when editing, reviewing, or creating .masm files.

MASM Inline Commenting Conventions

Rules

1. Inline comments start lowercase

Inline comments (single #) should begin with a lowercase letter.

masm
# good: lowercase start
exec.native_account::remove_asset
# => [FINAL_ASSET_VALUE, note_idx, pad(11)]

# Bad: uppercase start (avoid)
# Remove the asset from the account
2. Don't over-comment obvious operations

Only add comments that provide value. Skip comments for self-explanatory operations. Only apply this rule to new code you write. Do not remove comments that are present in the code.

Skip comments for:

  • Simple arithmetic: add, sub, mul, div
  • Basic stack ops when context is clear: drop, swap, dup
  • Standard control flow: if.true, while.true, end

Do comment:

  • Stack state after complex operations: # => [ptr, ASSET_ID, ASSET_VALUE, end_ptr]
  • Purpose of a code block: # compute the pointer at which we should stop iterating
  • Non-obvious logic or business rules
  • TODO items and references to external specs
3. Blank line after # => [...] trackers

Insert a blank line after a # => [...] stack-state tracker, except when the next non-blank line is one of:

  • end (proc / while.true / if.true / repeat.N closing).
  • A control-flow keyword such as else, else.true, or else.false.
  • Another # => line that continues the same multi-line stack state.
  • A # continuation comment that explains the tracker.

This pairs each stack state visually with the operation that produced it and lets the eye skim from one labeled state to the next.

Good:

masm
# => [ASSET_ID, ASSET_VALUE, note_idx, pad(7)]

dupw.1 dupw.1
# => [ASSET_ID, ASSET_VALUE, ASSET_ID, ASSET_VALUE, note_idx, pad(7)]

exec.native_account::remove_asset
# => [FINAL_ASSET_VALUE, ASSET_ID, ASSET_VALUE, note_idx, pad(7)]

dropw
# => [ASSET_ID, ASSET_VALUE, note_idx, pad(7)]

Also OK (no blank line before end or control flow):

masm
# => [pad(16)]
end
4. Match the doc block

An inline # => [...] tracker uses the same item names, capitalization, and (N) span notation as the #! doc block for the enclosing procedure (see masm-doc-comments skill):

  • Single-felt names stay lowercase: note_idx, final_nonce.
  • Word names stay UPPERCASE: ASSET_ID, ASSET_VALUE, RECIPIENT.
  • (N) spans stay lowercase: pad(12), foreign_procedure_inputs(15).

Composite names like account_id_{suffix,prefix} are a doc-block shorthand for a group of felts. In inline trackers they decompose into their individual felts since each felt occupies one stack slot:

masm
#! Inputs:  [account_id_{suffix,prefix}, amount]
pub proc transfer
    # => [account_id_suffix, account_id_prefix, amount]
    ...
end
Show full SKILL.md (203 more words)Show less
5. Reuse existing terminology

Use the vocabulary already established in the surrounding code and doc comments. Do not coin new terms or colloquialisms for a concept that already has a name — a value written to a local is "stored", not "stashed". This applies to inline comments and to constant-header comments.

6. Comment the code, not the change or the design

Inline comments explain what the code does for a future reader, not why a particular PR made a change. Avoid PR narrative and framing such as "this is the X that prevents Y"; describe the operation and its purpose as the code stands.

An inline comment states, in one line, what the next instruction block does or which invariant it relies on. It does not:

  • explain why the design is the way it is, or which alternatives were rejected
  • restate reasoning from a PR review or from the procedure's #! doc comment
  • justify the ordering of steps with rationale; that belongs in the doc comment (see masm-doc-comments skill)

Avoid (implementation detail and rationale in an inline comment):

masm
# one slot beyond the approvers, for the guardian signature. It is unconditional because the
# rotation path verifies no guardian signature but scans every account procedure instead, which
# the slot also covers.
add.1

# settle the sponsorship obligation first, in pay_fee's order; the bound below guards the
# host-supplied rate, which the sponsorship amounts do not depend on
exec.fees::create_network_note_sponsorships drop

Good:

masm
# one slot beyond the approvers, for the guardian signature
add.1

# settle the sponsorship obligation
exec.fees::create_network_note_sponsorships drop
7. Accessing a word's individual elements

When accessing individual elements of a word, show the word destructured into elements, grouped with brackets, e.g.:

# => [ASSET_ID, ASSET_VALUE]
# => [[asset_class_suffix, asset_class_prefix, faucet_id_suffix_and_metadata, faucet_id_prefix], ASSET_VALUE]

dup
# => [asset_class_suffix, ASSET_ID, ASSET_VALUE]

Examples

Good:

masm
# preserve the asset before removing it from the account
dupw.1 dupw.1
# => [ASSET_ID, ASSET_VALUE, ASSET_ID, ASSET_VALUE, note_idx, pad(7)]

exec.native_account::remove_asset
# => [FINAL_ASSET_VALUE, ASSET_ID, ASSET_VALUE, note_idx, pad(7)]

dropw
# => [ASSET_ID, ASSET_VALUE, note_idx, pad(7)]

exec.output_note::add_asset
# => [pad(16)]

Avoid:

masm
# Swap the top two elements
swap  # swap

# Drop the word
dropw  # drops 4 elements

© 0xMiden, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/masm-inline-comments of 0xMiden/protocol.

Open the folder on GitHubat commit 3a8215e

Compare with similar skills

Masm Inline Comments next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Masm Inline Comments compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Masm Inline Comments this skill0xMiden/protocol133—~1.4kAutomated safety check: PassMIT
Diagram Designcathrynlavery/diagram-design44k1 repos~7.5kAutomated safety check: PassMIT
Simple Englishmoeru-ai/airi50k2 repos~4.6kAutomated safety check: PassMIT
Get API Docs with chubandrewyng/context-hub14k2 repos~775Automated safety check: PassMIT
Doc SyncJetBrains/ideavim10k2 repos~2.6kAutomated safety check: PassMIT
Mailspring App ScreenshotsFoundry376/Mailspring18k—~1.4kAutomated safety check: PassGPL-3.0

Similar skills

  • Diagram Design

    cathrynlavery/diagram-design

    Creates branded diagrams, from architecture, flowchart and sequence to charts and maps, as self-contained HTML with inline SVG, with import from draw.io, Mermaid and Excalidraw.

    44k GitHub starsUsed in 1 repo~7.5k tokens
    DevelopmentAuto-check passed
  • Simple English

    moeru-ai/airi

    Write or rewrite technical text with the rules of ASD-STE100 Simplified Technical English so it is clear, unambiguous, and free of AI slop.

    50k GitHub starsUsed in 2 repos~4.6k tokens
    DevelopmentAuto-check passed
  • Get API Docs with chub

    andrewyng/context-hub

    Fetches current documentation for third-party APIs and SDKs with the chub CLI before the agent writes code against them, instead of relying on remembered API shapes.

    14k GitHub starsUsed in 2 repos~775 tokens
    DevelopmentAuto-check passed
  • Doc Sync

    JetBrains/ideavim

    Official

    Keeps IdeaVim documentation in sync with code changes. An agent skill from JetBrains/ideavim.

    10k GitHub starsUsed in 2 repos~2.6k tokens
    DevelopmentAuto-check passed
  • Mailspring App Screenshots

    Foundry376/Mailspring

    Captures screenshots of the running Mailspring dev app for docs, PRs or visual checks by launching it with a debugging port, driving the UI and clipping to an element.

    18k GitHub stars~1.4k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Draw.io Diagram Studio

    Agents365-ai/drawio-skill

    Creates and edits editable draw.io diagrams from descriptions, code, infrastructure files, SQL and API schemas, with sync, review, test and export tools.

    10k GitHub stars~2.4k tokensUpdated 5 days ago
    DevelopmentAuto-check: notes

More from 0xMiden/protocol

All 34 skills in this repo
  • Advice Provider Hygiene

    0xMiden/protocol

    A skill your agent uses when writing kernel, account, or note MASM code that reads from or writes to the advice provider (advice stack / advice map) — validate advice data.

    133 GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed
  • Cheap Masm Equivalents

    0xMiden/protocol

    A skill your agent uses when writing or reviewing MASM hot paths or loops — prefer the cheaper equivalent: loop counters and pointers on the operand stack instead of procedure locals, neq.0 over…

    133 GitHub stars~804 tokensUpdated yesterday
    Auto-check passed
  • Keep CHANGELOG.md entries to a single concise sentence. An agent skill from 0xMiden/protocol.

    133 GitHub stars~805 tokensUpdated yesterday
    Auto-check passed
  • Keep PR and issue descriptions short and decision-focused. An agent skill from 0xMiden/protocol.

    133 GitHub stars~1.8k tokensUpdated yesterday
    Auto-check passed
  • Conversion Method Naming

    0xMiden/protocol

    A skill your agent uses when naming a conversion or accessor method in Rust — follow the Rust API naming conventions for the method's cost and ownership.

    133 GitHub stars~450 tokensUpdated yesterday
    Auto-check passed
  • A skill your agent uses when writing a generic MASM utility that accesses a caller-selected account storage slot — receive the slot as a parameter so the utility is portable across storage layouts.

    133 GitHub stars~529 tokensUpdated yesterday
    Auto-check passed

Categories

Questions about Masm Inline Comments

What does Masm Inline Comments do?

Enforce inline commenting conventions for Miden Assembly (.masm) files. Masm Inline Comments is an agent skill from 0xMiden/protocol.masm) files.

When should I use Masm Inline Comments?

Masm Inline Comments fits situations like: creating .masm files; tasks that involve Technical documentation.

How do I install Masm Inline Comments in Claude Code?

Run `npx skills add 0xMiden/protocol --skill masm-inline-comments -a claude-code`. Or copy the skill folder (.claude/skills/masm-inline-comments in 0xMiden/protocol) into .claude/skills/masm-inline-comments in your project. Claude Code loads it when a task matches its description.

How do I install Masm Inline Comments in Codex?

Run `npx skills add 0xMiden/protocol --skill masm-inline-comments -a codex`. Or copy the skill folder (.claude/skills/masm-inline-comments in 0xMiden/protocol) into .agents/skills/masm-inline-comments in your project. Codex loads it when a task matches its description.

Can I use Masm Inline Comments in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add 0xMiden/protocol --skill masm-inline-comments -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/masm-inline-comments, .gemini/skills/masm-inline-comments, .github/skills/masm-inline-comments and .opencode/skills/masm-inline-comments in your project.

What does Masm Inline Comments need to run?

SKILL.md names no scripts, command-line tools or credentials: Masm Inline Comments is instructions for the agent only.

Does Masm Inline Comments access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Masm Inline Comments safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Masm Inline Comments use?

Masm Inline Comments is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Masm Inline Comments use?

About 1.4k tokens (SKILL.md is roughly 5.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Masm Inline Comments?

Skills that share tags, products or a category with Masm Inline Comments: Diagram Design (cathrynlavery/diagram-design, 44k stars), Simple English (moeru-ai/airi, 50k stars), Get API Docs with chub (andrewyng/context-hub, 14k stars) and Doc Sync (JetBrains/ideavim, 10k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Masm Inline Comments?

0xMiden (a GitHub organization) maintains it in 0xMiden/protocol, which has 133 GitHub stars. The repository holds 34 skills in this directory. The repository was last updated on October 6, 2026.

Source: 0xMiden/protocol on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.