agentleFS
ifer47ifer47/markeron/.cursor/skills/tauri-config-ipc/SKILL.md

tauri-config-ipc

Skill1.2k starsChanged 5 months agoMITView on GitHub

Extend MarkerOn settings, persisted config, or Tauri IPC commands. Use when adding config fields, new invoke commands, settings UI toggles, or changing config.json shape.

Trending

Quiet since July.thin dataabout the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 2 mentionsAug 2026: 0 mentionsSep 2026: 0 mentionsOct 2026: 0 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the ifer47/markeron repository that our weekly crawl found: only 2 in all, so this is a hint, not a trend. There is no adoption data for this file yet.

Who's talking about ifer47/markeron

The biggest 2 of 2 mentions linking to the repository that our crawl found. Each line is their own headline.

The file

We split this skill into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Always add #[serde(default)] (or default = "fn") on new fields so old config.json files deserialize.

    line 31
  2. Very specific:

    If the overlay must react live, ensure save_general emits config-changed (already does).

    line 75
  3. Very specific:

    Call from Vue: invoke('your_fn', { arg: value }) — args use camelCase in JS, match command param names

    line 86
  4. Distinctive:

    Never break backward compatibility: new fields need serde defaults.

    line 116
  5. Very specific:

    Keep TS AppConfig in sync with Rust AppConfig / nested structs.

    line 117
  6. Very specific:

    Do not add invoke commands without registering in generate_handler!

    line 118
  7. Very specific:

    Prefer extending save_general over one-command-per-toggle unless logic is distinct (like save_locale).

    line 119

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 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

Tauri Config & IPC (MarkerOn)

Architecture

config.json (disk, camelCase JSON)
    ↔ config.rs (Rust structs, serde rename)
    ↔ commands.rs (#[tauri::command])
    ↔ lib.rs (generate_handler! registration)
    ↔ src/types/app.d.ts (TypeScript types)
    ↔ Vue (invoke get_config / save_*)

Config path: app config dir → config.json (config::config_path), or {exe_dir}/data/config.json when a markeron.portable marker file is next to the executable.

Naming convention

LayerConventionExample
JSON / TS / VuecamelCaseenableDragging, toggleDrawing
Rust fieldsnake_case + #[serde(rename = "...")]enable_dragging ↔ enableDragging

Always add #[serde(default)] (or default = "fn") on new fields so old config.json files deserialize.

Checklist: add a general setting

Example: new boolean fooBar in settings.

1. Rust — src-tauri/src/config.rs

// In GeneralConfig:
#[serde(default, rename = "fooBar")]
pub foo_bar: bool,

// In Default for GeneralConfig:
foo_bar: false,

// In normalized() if value needs clamping/validation

2. TypeScript — src/types/app.d.ts

general: {
  // ...
  fooBar: boolean
}

3. Command — usually no change

General settings use existing save_general (commands.rs). It saves GeneralConfig, emits config-changed, persists to disk.

New top-level config section → new struct + new save_* command.

4. Frontend UI

  • Settings window: GeneralTab.vue or SettingsView.vue
  • Pattern: optimistic emit('update:…') → get_config → mutate cfg.general → invoke('save_general', { general: cfg.general })
  • Overlay runtime: DrawingOverlay.vue loads config on mount and listens:
await listen<AppConfig>('config-changed', (event) => { /* apply */ })

If the overlay must react live, ensure save_general emits config-changed (already does).

5. Tests

  • Rust: add/update tests in config.rs #[cfg(test)] module (defaults, normalization, serde round-trip).
  • Frontend: only if new behavior in composables.

Checklist: add a new IPC command

  1. Implement in src-tauri/src/commands.rs (or clipboard.rs etc.) with #[tauri::command]
  2. Register in lib.rs → generate_handler![..., commands::your_fn]
  3. Call from Vue: invoke('your_fn', { arg: value }) — args use camelCase in JS, match command param names
  4. Return AppResult<T> for errors surfaced to UI

Existing commands:

CommandPurpose
get_configRead full AppConfig
save_shortcutsGlobal hotkeys; rolls back on invalid/register failure
save_generalGeneral settings + config-changed event
save_localePersist locale + Rust i18n + tray + window title
exit_drawingLeave annotation mode
open_urlAllowed URLs only (GitHub, Microsoft Store)
copy_screen / copy_whiteboardClipboard

Checklist: add / change shortcuts

Shortcuts are not in GeneralConfig — they live in Shortcuts struct.

Touch:

  • config.rs — Shortcuts, default_shortcuts() (macOS uses Command+, others Ctrl+)
  • commands.rs — save_shortcuts validation
  • shortcuts.rs — register handlers + unit tests
  • SettingsView.vue — capture UI
  • src/types/app.d.ts — shortcuts keys
  • README.md + README_zh.md — shortcut tables

Agent rules

  • Never break backward compatibility: new fields need serde defaults.
  • Keep TS AppConfig in sync with Rust AppConfig / nested structs.
  • Do not add invoke commands without registering in generate_handler!.
  • Prefer extending save_general over one-command-per-toggle unless logic is distinct (like save_locale).

Related

  • Locale strings: .cursor/rules/i18n.mdc
  • Platform window behavior: src-tauri/src/lib.rs, macos.rs, win32.rs

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.