create-modus-wrapper-component

create-modus-wrapper-component is a skill for Claude Code, Codex, Cursor from julianoczkowski/create-trimble-app. It costs 28 tokens per session (1,667 once invoked), scanned A, original, MIT.

A scaffold for a React wrapper around a Modus web component, including typed properties, browser-event handling, and cleanup when the component is removed.

In plain words
What is it for?
Use it when adding a Modus component that does not yet have a React wrapper, especially when it needs events and TypeScript types.
Why use it?
It reduces the repeated setup and integration mistakes involved in connecting web components to a React codebase.

Skill for Claude CodeCodexCursor

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.

agentmods
npx agentmods add skills/julianoczkowski/create-trimble-app/create-modus-wrapper-component
Any agent
npx skills add julianoczkowski/create-trimble-app --skill create-modus-wrapper-component
Clone the repo
git clone --depth 1 https://github.com/julianoczkowski/create-trimble-app

Made for: Claude Code, Codex, 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 create-modus-wrapper-component

README.md
[![agentmods](https://agentmods.dev/badge/skills/julianoczkowski/create-trimble-app/create-modus-wrapper-component.svg)](https://agentmods.dev/skills/julianoczkowski/create-trimble-app/create-modus-wrapper-component)
Your own site
<a href="https://agentmods.dev/skills/julianoczkowski/create-trimble-app/create-modus-wrapper-component"><img src="https://agentmods.dev/badge/skills/julianoczkowski/create-trimble-app/create-modus-wrapper-component.svg" alt="Measured on agentmods" height="20"></a>
Per session 28 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,667 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00028 $0.01667
Opus 5 $0.00014 $0.00834
Sonnet 5 $0.00006 $0.00333
Haiku 4.5 $0.00003 $0.00167

Measured yesterday against content hash db347311d007, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

create-modus-wrapper-component 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 yesterday.

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.

templates/react/.cursor/skills/create-modus-wrapper-component/SKILL.md · 253 lines

How it starts

The opening of the file, as written. The whole thing — 253 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Create Modus Wrapper Component

Scaffold a new Modus wrapper component following established patterns from the codebase.

When to Use

Use this skill when:

  • Creating a new wrapper component for a Modus web component
  • You need to integrate a Modus component that doesn't have a wrapper yet
  • You want to ensure proper event handling and TypeScript types

Pattern Overview

All Modus wrapper components follow this structure:

  1. Import the web component from @trimble-oss/moduswebcomponents-react
  2. Define TypeScript props interface with JSDoc comments
  3. Use useRef for component reference
  4. Use useEffect for event listeners with proper cleanup
  5. Forward props to the web component with conditional spreading
  6. Handle events via event listeners, not React props

Reference Examples

  • Simple wrapper: src/components/ModusButton.tsx - No event listeners needed
  • With event listeners: src/components/ModusCheckbox.tsx - Shows event handling pattern
  • With dropdown: src/components/ModusDropdownMenu.tsx - Shows menu event handling

Implementation Template

import { useEffect, useRef } from "react";
import { ModusWc[ComponentName] } from "@trimble-oss/moduswebcomponents-react";
import type { ReactNode } from "react";

/**
 * Props for the Modus[ComponentName] component.
 */
export interface Modus[ComponentName]Props {
  /** Description of prop */
  propName?: string;
  
  /** A callback function to handle events. */
  onEventName?: (event: CustomEvent<EventDetailType>) => void;
  
  /** A custom CSS class to apply to the component. */
  customClass?: string;
  
  /** The ARIA label for accessibility. */
  "aria-label"?: string;
}

/**
 * Renders a Modus [component name] component.
 *
 * @example
 * // Basic usage
 * <Modus[ComponentName] propName="value" />
 *
 * @example
 * // With event handler
 * <Modus[ComponentName]
 *   propName="value"
 *   onEventName={(event) => console.log(event.detail)}
 * />
 *
 * @param {Modus[ComponentName]Props} props - The component props.
 * @returns {JSX.Element} The rendered component.
 * @see {@link https://modus.trimble.com/components/[component]} - Modus documentation
 */
export default function Modus[ComponentName]({
  propName,
  onEventName,
  customClass,
  "aria-label": ariaLabel,
}: Modus[ComponentName]Props) {
  const componentRef = useRef<HTMLModusWc[ComponentName]Element>(null);

  // Set up event listeners if needed
  useEffect(() => {
    const component = componentRef.current;
    if (!component) return;

    const handleEventName = (event: Event) => {
      onEventName?.(event as CustomEvent<EventDetailType>);
    };

    if (onEventName) {
      component.addEventListener("eventName", handleEventName);
    }

    return () => {
      if (onEventName) {
        component.removeEventListener("eventName", handleEventName);
      }
    };
  }, [onEventName]);

  return (
    <ModusWc[ComponentName]
      ref={componentRef}
      prop-name={propName}
      custom-class={customClass}
      aria-label={ariaLabel}
    />
  );
}

Read the full file on GitHub · 253 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. yesterday First seen · 253 lines · 28 tokens per session scan A db347311d007

Subscribe to this mod's changes

create-modus-wrapper-component is a skill published in the GitHub repository julianoczkowski/create-trimble-app (3 stars, last pushed 2mo ago), licensed MIT. It adds 28 tokens to every session and 1,667 once invoked, about $0.0001 per session on Opus 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-03.

Related

Other skills, from other repositories

frontend-conventions

Coding conventions, architecture patterns, and testing rules for the SkillHub React frontend. Ensures agents follow Feature-Sliced Design and use the generated OpenAPI types.

iflytek/skillhub · 36 tokens

frontend-dev-guidelines

Frontend development guidelines for React/TypeScript applications. Modern patterns including Suspense, lazy loading, useSuspenseQuery, file organization with features directory, MUI v7 styling, TanStack Router, performance optimization, and TypeScript best practices. Use when creating components, pages, features…

diet103/claude-code-infrastructure-showcase · 76 tokens

fast-typescript-check

Keep www-sacred's TypeScript fast to type-check and fast to run. Use when touching the ASCII/canvas animation components (the only real per-frame code here), tightening type-check wall-clock, or auditing a change for runtime or compiler regressions. Scoped to this repo — a React 19 / Next.js 16 component library plus…

internet-development/www-sacred · 84 tokens

typescript-react

Apply, review, and explain React conventions from the TypeScript Style Guide. Use automatically for TypeScript and TSX tasks involving prop-derived state, prop typing, component responsibilities, data flow, compound components, or client and server state.

mkosir/typescript-style-guide · 50 tokens

typescript-rules

React/TypeScript frontend development rules including type safety, component design, state management, and error handling. Use when implementing React components, TypeScript code, or frontend features.

shinpr/claude-code-workflows · 39 tokens

weapp-vite-react-best-practices

面向使用 weapp-vite 与 @weapp-vite/react 开发 React 19 微信小程序的实践手册。适用于配置 weapp.react、编写 JSX/TSX 页面、选择 static/dynamic render mode、接入可选 React Compiler、管理 createReactMiniProgramRoot 生命周期,以及通过 createNativeComponent / Slot 与原生或 Wevu 组件互操作。.

weapp-vite/weapp-vite · 103 tokens