Build|Claude Code Mods

ModsCode / Claude Code Mods / Build / Settings (userConfig)

Give a mod settings (userConfig)

Declare settings in the manifest's (.claude-plugin/plugin.json) userConfig, and their values arrive, defaults filled in, as options in register(on, options). Users change them under pluginConfigs in their settings.

plugin.json userConfigregister(on, options)pluginConfigs

The smallest form

hooks/register.js (+ plugin.json)
// .claude-plugin/plugin.json
// {
//   "name": "focus-timer",
//   "userConfig": {
//     "minutes": { "type": "number", "title": "Minutes", "description": "Length of one focus block", "default": 25 }
//   }
// }

export function register(on, options) {
  // options holds the userConfig values, with the defaults filled in
  const minutes = Number(options.minutes ?? 25)

  on('session.start', async ($, e, next) => {
    $.ui.status('focus: ' + minutes + ' min')
    return next(e)
  })
}

Written by ModsCode with the API of the official docs. Free to use.

Real mods' code (6)

Quoted as is from public mods on GitHub, at the commit ModsCode read. The heading leads to the mod's page (what it does, its good points, what its code reaches); the file name leads to the lines on GitHub.

Check the code yourself before you copy or install it. Mods run unsandboxed, with your permissions. ModsCode does not vouch for what the code does.

ruview-live ruvnet · Terminal + desktop · ★ 97,236

RuView live sensing in Claude Code: /ruview opens a pane beside the transcript with three views: an overview of your CSI nodes (ESP32, Realtek) and 60 GHz radar (rates, loss, RSSI, presence, device-reported vitals, alerts), a live CSI ampl…

"userConfig": {
  "udpPort": {
    "type": "number",
    "title": "UDP port",
    "description": "Port your CSI nodes stream to (the sensing server's default is 5005). The pane listens briefly on each refresh; it reports port_in_use when the sensing server holds it.",
    "default": 5005
  },
  "radarHost": {
    "type": "string",
    "title": "Radar kit host",
    "description": "IP or hostname of an ESPHome radar kit (e.g. a Seeed MR60BHA2) on your private network. Empty skips the radar.",
    "default": ""
  },
  "refreshSeconds": {
    "type": "number",
    "title": "Refresh interval (s)",
    "description": "Seconds between refreshes while the pane is open (minimum 5).",
    "default": 15
  },
  "captureSeconds": {
    "type": "number",
    "title": "Capture window (s)",
    "description": "Seconds each refresh listens for node packets and radar states (1-10).",
    "default": 3
  },
  "liveRefreshSeconds": {
    "type": "number",
    "title": "Live view refresh (s)",
    "description": "Seconds between refreshes in the waterfall and radar views (2-60).",
    "default": 4
  }
}

MIT licence. Keep its notice when you copy the code. Its code

Licence text (MIT)
MIT License

Copyright (c) 2024 rUv

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

ruflo-agent ruvnet · Draws nothing · ★ 74,323

Agent runtimes for ruflo — local WASM-sandboxed agents (rvagent: 10 wasm_agent_*/wasm_gallery_* MCP tools, built on @ruvector/rvagent-wasm + @ruvector/ruvllm-wasm per ADR-070) plus Anthropic Claude Managed Agents as a cloud backend (manage…

"userConfig": {
  "guard": {
    "type": "string",
    "title": "Agent guard",
    "description": "Refuse text sent into an agent runtime (wasm_agent_prompt, wasm_agent_tool, wasm_agent_create, wasm_gallery_create, managed_agent_create, managed_agent_prompt) that hold a key, token or password.",
    "required": false,
    "default": "on",
    "options": [
      "on",
      "off"
    ]
  }
}

MIT licence. Keep its notice when you copy the code. Its code

Licence text (MIT)
MIT License

Copyright (c) 2024-2026 ruvnet

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

ruflo-ai-team ruvnet · Draws nothing · ★ 74,323

Give Claude a tenant-isolated AI team that divides work, coordinates progress, recalls approved context, and returns evidence-backed results.

"userConfig": {
  "guard": {
    "type": "string",
    "title": "AI Team guard",
    "description": "Refuse what goes into team memory and task or run records (memory_remember, task_create, task_update, run_create on the ruflo-ai-team server) that hold a key, token or password.",
    "required": false,
    "default": "on",
    "options": [
      "on",
      "off"
    ]
  }
}

MIT licence. Keep its notice when you copy the code. Its code

Licence text (MIT)
MIT License

Copyright (c) 2024-2026 ruvnet

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

ruflo-aidefence ruvnet · Draws nothing · ★ 74,323

AI safety scanning, PII detection, prompt injection defense, and adaptive threat learning

"userConfig": {
  "guard": {
    "type": "string",
    "title": "AIDefence guard",
    "description": "Refuse what aidefence_learn teaches the detector (patterns persist and are shown back later) that hold a key, token or password.",
    "required": false,
    "default": "on",
    "options": [
      "on",
      "off"
    ]
  }
}

MIT licence. Keep its notice when you copy the code. Its code

Licence text (MIT)
MIT License

Copyright (c) 2024-2026 ruvnet

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

ruflo-autopilot ruvnet · Draws nothing · ★ 74,323

Autonomous /loop-driven task completion with learning, prediction, and progress tracking — wraps 10 autopilot_* MCP tools (status/enable/disable/config/reset/log/progress/learn/history/predict)

"userConfig": {
  "guard": {
    "type": "string",
    "title": "Autopilot guard",
    "description": "Refuse the autopilot log and learned patterns (autopilot_log, autopilot_learn) and a runaway loop limit on autopilot_config (maxIterations over the cap) that hold a key, token or password, and a loop limit over the cap.",
    "required": false,
    "default": "on",
    "options": [
      "on",
      "off"
    ]
  },
  "iterationCap": {
    "type": "number",
    "title": "Iteration cap",
    "description": "Refuse an autopilot_config maxIterations above this (10 to 100000).",
    "required": false,
    "default": 1000
  }
}

MIT licence. Keep its notice when you copy the code. Its code

Licence text (MIT)
MIT License

Copyright (c) 2024-2026 ruvnet

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

ruflo-bbs-federation ruvnet · Draws nothing · ★ 74,323

AgentBBS cross-host agent federation for ruflo (ADR-164). Phase 1 exposes room coordination — federation_bbs_register / federation_bbs_publish / federation_bbs_watch / federation_bbs_human_join. Phase 2 (v3.40.0) adds signed cross-host fed…

"userConfig": {
  "guard": {
    "type": "string",
    "title": "Tool guard",
    "description": "Refuse clearly harmful calls to this plugin's tools (tighten-only: it can only deny, never allow).",
    "required": false,
    "default": "on",
    "options": [
      "on",
      "off"
    ]
  },
  "allowWildcardBind": {
    "type": "string",
    "title": "Allow wildcard serve bind",
    "description": "Let federation_bbs_serve listen on every interface (0.0.0.0). Off by default: bind one routable address.",
    "required": false,
    "default": "off",
    "options": [
      "off",
      "on"
    ]
  }
}

MIT licence. Keep its notice when you copy the code. Its code

Licence text (MIT)
MIT License

Copyright (c) 2024-2026 ruvnet

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Start building

Put a .claude-plugin/plugin.json ({"name": "my-mod"}) and a hooks/hooks.json ({"modules": ["register.js"]}) in a folder, save the code above as hooks/register.js, and run claude --plugin-dir . to load it for one session. claude plugin validate . lists the events it hooks and the APIs it calls.

Other patterns