Agent skill

Code Review

by RobertoMachorro in RobertoMachorro/Moped

Review guidance for Moped, a sandboxed macOS SwiftUI text editor with a homegrown TextKit 1 editor core in the local MopedEditor package.

GPL-3.0Auto-check passedMobile

Install Code Review

skills CLI
$ npx skills add RobertoMachorro/Moped --skill code-review -a claude-code

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

GitHub CLI
$ gh skill install RobertoMachorro/Moped code-review --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/RobertoMachorro/Moped.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/code-review .claude/skills/code-review && 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
code-review
GitHub stars
115
Token cost
~2.1k tokens
SKILL.md length
1,129 words
Files
1
Skills in repo
1
Repo updated
First seen
Licence
GPL-3.0

At a glance

Review guidance for Moped, a sandboxed macOS SwiftUI text editor with a homegrown TextKit 1 editor core in the local MopedEditor package.

  • Works in 4 steps: ./scripts/check_localized_strings.sh → swiftlint --strict over the whole project → swift test --package-path MopedEditor → …
  • Reviewing pull requests in this repository — it carries the invariants that a generic Swift review misses
  • SKILL.md covers The four gates, Localization, Adding a preference: three… and The editor core, plus 3 more sections
  • Calls swift

What it does

Code Review is an agent skill from RobertoMachorro/Moped. Review guidance for Moped, a sandboxed macOS SwiftUI text editor with a homegrown TextKit 1 editor core in the local MopedEditor package. Use when reviewing pull requests in this repository — it carries the invariants that a generic Swift review misses, and the suggestions this project does not want.

Its SKILL.md is about 2.1k 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 Mobile, covering iOS development and Pull requests. It works with macOS and SwiftUI. The repository describes itself as: A general purpose text editor, small and light. The licence is GPL-3.0.

When your agent uses it

  • Reviewing pull requests in this repository — it carries the invariants that a generic Swift review misses
  • The suggestions this project does not want

Example prompts

  • “/code-review”

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. ./scripts/check_localized_strings.sh
  2. swiftlint --strict over the whole project
  3. swift test --package-path MopedEditor
  4. the Xcode build

What it can do on your machine

Read from SKILL.md and the folder at commit 059fb08. 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

    Shell commands in SKILL.md call:

    • swift

    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

Code Review loads about 2.1k tokens when it runs. Until then it costs about 78 tokens; SKILL.md has 1,129 words of instructions outside code blocks.

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

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 RobertoMachorro/Moped at commit 059fb08, republished under its GPL-3.0 licence (© RobertoMachorro). 1,129 words, ~2,130 tokens.

Download SKILL.mdSave it as .claude/skills/code-review/SKILL.md (or your agent's skills folder).
name
code-review
description
Review guidance for Moped, a sandboxed macOS SwiftUI text editor with a homegrown TextKit 1 editor core in the local MopedEditor package. Use when reviewing pull requests in this repository — it carries the invariants that a generic Swift review misses, and the suggestions this project does not want.

Reviewing Moped

Moped is a document-based macOS app: SwiftUI shell, AppKit editor. The editor is MopedEditor, a local Swift package with zero external dependencies — 3.0.0 deliberately replaced Highlightr and STTextView/Neon with in-house code. Adding a third-party dependency is a design change, not a cleanup; flag any PR that introduces one unless the PR is explicitly about that.

Bias the review toward invariants that are load-bearing but invisible — the ones below have each already caused a real bug here. Ordinary style nits are handled by swiftlint --strict; do not spend the review on them.

The four gates

CI (.github/workflows/build.yaml) runs all of these on every PR, in this order:

  1. ./scripts/check_localized_strings.sh
  2. swiftlint --strict over the whole project
  3. swift test --package-path MopedEditor
  4. the Xcode build

A change is not done until all pass. If a PR touches behavior covered by the package tests and adds none, say so.

Localization

Every user-facing string needs a key in Moped/Localizable.xcstrings. The catalog is at 100% coverage across 13 locales (de, en, es, fi, fr, he, hi, it, ja, nl, pt, pt-BR, uk) — a new key with only English in it silently breaks that, and the check script will not catch it.

Key naming: pref.<setting>.title, pref.section.<section>, option.<group>.<value>, menu.*, alert.*, window.*, status.*, error.*, about.*, default_editor.*. The script's allowlist (scripts/check_localized_strings.sh) rejects anything else.

Where the script is blind, and you should look by hand:

  • A string reaching the UI through a variable rather than a literal at the call site.
  • A literal passed to a helper rather than to Toggle/Button/Text directly — PreferencesView.checkbox("pref.…", …) is the standing example. The script's patterns never see it, so a missing catalog key ships as a raw key on screen.

Adding a preference: three legs, and the one that gets forgotten

Preferences (Moped/Preferences.swift) is @unchecked Sendable because it holds no mutable stored state — every property reads and writes UserDefaults. A stored property added to it invalidates that annotation. Flag one.

Booleans are stored as the strings "Yes" / "No" with a do…-prefixed Bool reader. This is deliberate and long-standing; do not suggest converting them to Bool or @AppStorage.

A new editor-affecting preference must be wired in all of:

  1. Preferences — the @objc dynamic var plus its do… reader.
  2. EditorState.makeEditor(model:delegate:) — the initial build.
  3. EditorState.applyPreferences() — the .preferencesChanged observer.
  4. PreferencesView — the row, with a catalog key.

Legs 2 and 3 are separate call sites with no shared helper. Missing #3 means the setting only takes effect when some other preference is later written; missing #2 means it only takes effect on an already-open window. Check for both explicitly — this is the single most likely defect in a settings PR.

The editor core

MopedTextView is an NSTextView on an explicit TextKit 1 stack. Temporary attributes and the NSRulerView gutter both depend on NSLayoutManager; "why not TextKit 2" is not a useful review comment.

  • Never write rendering state into NSTextStorage. Token colors live as layout-manager temporary attributes precisely so they cannot enter the text, land on the undo stack, or mark the document dirty. A PR that adds an attribute to the storage for display purposes is a bug, however well it renders.
  • SyntaxHighlighter owns two exclusive resources: textStorage.delegate (one slot only) and the .foregroundColor temporary attribute, which it clears and rewrites over the whole edited range on every pass. Anything else writing that attribute will be silently wiped.
  • allowsNonContiguousLayout is on. Any self-computed visible range must call ensureLayout(forBoundingRect:in:) first, or the glyph range comes back short for a region scrolled into for the first time — the gutter shipped that bug once.
  • But never force layout from inside a draw, and never mutate rendering state inside NSTextStorage.processEditing. Both re-enter TextKit underneath code that has already captured geometry. The established fix is to defer to the next runloop turn (LineNumberRulerView.updateThickness, SyntaxHighlighter.schedulePass).
  • Prefer partial invalidation. setNeedsDisplay(rect) over needsDisplay = true where a bounded region is knowable — a full redraw on every caret move made cursor movement scale with document size. A whole-view invalidation needs a reason in a comment.
  • Drawing order matters. The layout manager paints selection and find-bar highlights in drawBackground(forGlyphRange:at:), before glyphs. Decorations that must survive a selection belong after super.drawGlyphs, not in a background override.
Show full SKILL.md (438 more words)Show less

Themes

MopedTheme is Sendable only because every color it carries is a plain sRGB component color. A theme built from NSColor.controlAccentColor or any catalog/dynamic system color reintroduces deferred appearance resolution and breaks the guarantee. Flag it.

Adding a color to MopedTheme is not a small change: it touches the struct, renamed(_:), paired(withDark:), all seven files in Themes/, the System theme, the .mopedtheme read/write maps and fileFormatVersion in EditorTheme+File.swift, plus ThemeFileTests. If a PR can derive its color from an existing one instead (the gutter separator and the whitespace markers both use the palette's own foreground at 30% alpha), prefer that and say so.

Painted colors are pushed out from MopedTextView.applyTheme(), which is the single funnel reached by both a theme change and viewDidChangeEffectiveAppearance(). A new painted color set anywhere else will not survive a light/dark flip.

Conventions

  • Tabs for indentation, in Swift and in tests. line_length is disabled but long lines are still unwelcome.
  • Doc comments explain why, not what. The house style names the bug or constraint that forced the code to be the way it is. A comment restating the signature adds nothing; a non-obvious decision with no comment is worth flagging.
  • Tests name the bug they pin down, and assertion messages are full sentences explaining the failure. Logic that would otherwise only run inside a graphics context is split into a testable non-drawing method — LineNumberRulerView.visibleLineNumbers(for:) and WhitespaceLayoutManager.whitespaceMarkers(forGlyphRange:) are the precedents.
  • Strict concurrency is complete in the app target, and the package mirrors it via .enableExperimentalFeature("StrictConcurrency") so swift test checks the same rules.
  • User-visible changes update the docs: DOCUMENTATION.md (including its settings tables), CHANGELOG.md, and manual-checklist.md for anything only a human can verify. A feature PR that touches none of them is probably incomplete.
  • The Settings window has a fixed, measured .frame(width: 590, height: 246), sized against the widest locale. The comment above it is a measurement log — a PR that changes the frame without extending that comment, or that adds a pane row without saying whether it still fits, deserves a question.
  • Printing (SourcePrintView) is a separate CTFramesetter path that does not share the editor's layout manager. New editor rendering does not print automatically; if a PR implies otherwise, check.

Do not raise these

They are settled decisions, and re-litigating them costs the maintainer time:

  • Tabs instead of spaces; the "Yes"/"No" preference encoding; @unchecked Sendable on Preferences; TextKit 1 instead of TextKit 2.
  • "Consider extracting this into a protocol/abstraction" for single-use code. This project wants the minimum code that solves the problem — no speculative abstraction.
  • Line length, given line_length is disabled in .swiftlint.yml.
  • Suggesting a third-party library for something the package already does by hand.

© RobertoMachorro, GPL-3.0. 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 .github/skills/code-review of RobertoMachorro/Moped.

Open the folder on GitHubat commit 059fb08

Compare with similar skills

Code Review 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.

Code Review compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Code Review this skillRobertoMachorro/Moped115—~2.1kAutomated safety check: PassGPL-3.0
Prepare PRchattymin/PokeTokenBar505—~1.8kAutomated safety check: PassMIT
Capture Usage4claude Screenshotsf-is-h/Usage4Claude400—~3kAutomated safety check: PassMIT
macOS DevelopmentKartikLabhshetwar/better-shot2.4k2 repos~735Automated safety check: PassCustom licence
Protect Knowledge BoundaryShiinaLabs/wifi-lens118—~1.6kAutomated safety check: PassApache-2.0
Anishelf Releasesamuelhe52/AniShelf140—~2kAutomated safety check: PassApache-2.0

Similar skills

  • Prepare PR

    chattymin/PokeTokenBar

    Prepare, create, or update a PokeTokenBar pull request with an English Conventional Commits title, the repository PR template, and mandatory images for visible UI changes.

    505 GitHub stars~1.8k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Produce every Usage4Claude interface image used by the READMEs and docs.

    400 GitHub stars~3k tokensUpdated 9 days ago
    MobileAuto-check passed
  • macOS Development

    KartikLabhshetwar/better-shot

    Comprehensive macOS development guidance including Swift 6+, SwiftUI, SwiftData, architecture patterns, AppKit bridging, and macOS 26 Tahoe APIs.

    2.4k GitHub starsUsed in 2 repos~735 tokens
    MobileAuto-check passed
  • Protect Knowledge Boundary

    ShiinaLabs/wifi-lens

    Invoke only when the user explicitly requests a WiFi Lens knowledge-boundary audit or the active task names that audit as a required deliverable.

    118 GitHub stars~1.6k tokensUpdated yesterday
    MobileAuto-check passed
  • Anishelf Release

    samuelhe52/AniShelf

    Prepare and publish AniShelf source-control releases through validation, release commits, annotated tags, and the main-to-release pull request.

    140 GitHub stars~2k tokensUpdated today
    MobileAuto-check passed
  • Swiftui Debugging

    st0012/cctop

    A skill your agent uses when debugging SwiftUI issues in this macOS app — views not updating, layout problems, unnecessary re-renders, state ownership bugs, Preview crashes, or NSHostingView/NSPanel…

    154 GitHub stars~2k tokensUpdated 7 days ago
    MobileAuto-check passed

Works with

Questions about Code Review

What does Code Review do?

Review guidance for Moped, a sandboxed macOS SwiftUI text editor with a homegrown TextKit 1 editor core in the local MopedEditor package. Code Review is an agent skill from RobertoMachorro/Moped. Review guidance for Moped, a sandboxed macOS SwiftUI text editor with a homegrown TextKit 1 editor core in the local MopedEditor package.

When should I use Code Review?

Code Review fits situations like: reviewing pull requests in this repository — it carries the invariants that a generic Swift review misses; the suggestions this project does not want.

How do I install Code Review in Claude Code?

Run `npx skills add RobertoMachorro/Moped --skill code-review -a claude-code`. Or copy the skill folder (.github/skills/code-review in RobertoMachorro/Moped) into .claude/skills/code-review in your project. Claude Code loads it when a task matches its description.

How do I install Code Review in Codex?

Run `npx skills add RobertoMachorro/Moped --skill code-review -a codex`. Or copy the skill folder (.github/skills/code-review in RobertoMachorro/Moped) into .agents/skills/code-review in your project. Codex loads it when a task matches its description.

Can I use Code Review 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 RobertoMachorro/Moped --skill code-review -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/code-review, .gemini/skills/code-review, .github/skills/code-review and .opencode/skills/code-review in your project.

What does Code Review need to run?

Going by SKILL.md and its folder, Code Review needs the command-line tools its instructions call (swift).

Does Code Review 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 Code Review 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 Code Review use?

Code Review is published under the GPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Code Review use?

About 2.1k tokens (SKILL.md is roughly 8.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 Code Review?

Skills that share tags, products or a category with Code Review: Prepare PR (chattymin/PokeTokenBar, 505 stars), Capture Usage4claude Screenshots (f-is-h/Usage4Claude, 400 stars), macOS Development (KartikLabhshetwar/better-shot, 2.4k stars) and Protect Knowledge Boundary (ShiinaLabs/wifi-lens, 118 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Code Review?

RobertoMachorro (a GitHub user) maintains it in RobertoMachorro/Moped, which has 115 GitHub stars. The repository was last updated on October 4, 2026.

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