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.
npx skills add julianoczkowski/create-trimble-app --skill implement-modus-modal-with-refsgit clone --depth 1 https://github.com/julianoczkowski/create-trimble-appWrote 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.
[](https://agentmods.dev/skills/julianoczkowski/create-trimble-app/implement-modus-modal-with-refs)<a href="https://agentmods.dev/skills/julianoczkowski/create-trimble-app/implement-modus-modal-with-refs"><img src="https://agentmods.dev/badge/skills/julianoczkowski/create-trimble-app/implement-modus-modal-with-refs/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/julianoczkowski/create-trimble-app/implement-modus-modal-with-refs"><img src="https://agentmods.dev/badge/skills/julianoczkowski/create-trimble-app/implement-modus-modal-with-refs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00027 | $0.02214 |
| Opus 5 | $0.00014 | $0.01107 |
| Sonnet 5 | $0.00005 | $0.00443 |
| Haiku 4.5 | $0.00003 | $0.00221 |
Grade A, and why
implement-modus-modal-with-refs 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 5d ago.
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.
How it starts
The opening of the file, as written. The whole thing — 387 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Implement Modus Modal with Refs
Create Modus modal components using the forwardRef + useImperativeHandle pattern for programmatic control.
When to Use
Use this skill when:
- Creating modal dialogs that need to be opened/closed programmatically
- You need to control modal state from parent components
- Building modals with custom triggers (not just button clicks)
Pattern Overview
Modus modals require:
forwardRefto expose methods to parent componentsuseImperativeHandleto define the API (openModal,closeModal)querySelector("dialog")to access the native dialog element- Event listeners for dialog close events
Reference Implementation
See src/components/ModusModal.tsx for the complete implementation.
Complete Template
import { ModusWcModal } from "@trimble-oss/moduswebcomponents-react";
import type { ReactNode } from "react";
import { useRef, useEffect, forwardRef, useImperativeHandle } from "react";
/**
* Props for the ModusModal component.
*/
interface ModusModalProps {
/** A unique identifier for the modal. */
modalId: string;
/** The ARIA label for the modal. */
ariaLabel?: string;
/** The type of backdrop for the modal. */
backdrop?: 'default' | 'static';
/** The position of the modal. */
position?: 'top' | 'center' | 'bottom';
/** Whether the modal should be fullscreen. */
fullscreen?: boolean;
/** Whether to show the fullscreen toggle button. */
showFullscreenToggle?: boolean;
/** Whether to show the close button. */
showClose?: boolean;
/** A custom CSS class to apply to the modal. */
customClass?: string;
/** The header content of the modal. */
header?: ReactNode;
/** The main content of the modal. */
children: ReactNode;
/** The footer content of the modal. */
footer?: ReactNode;
/** A callback function to handle the close event. */
onClose?: () => void;
}
/**
* A ref object for the ModusModal component.
*/
export interface ModusModalRef {
/** Opens the modal. */
openModal: () => void;
/** Closes the modal. */
closeModal: () => void;
}
/**
* Renders a Modus modal component.
* @param {ModusModalProps} props - The component props.
* @param {React.Ref<ModusModalRef>} ref - The ref object for the modal.
* @returns {JSX.Element} The rendered modal component.
*/
const ModusModal = forwardRef<ModusModalRef, ModusModalProps>(
(
{
modalId,
ariaLabel,
backdrop = 'default',
position = 'center',
fullscreen = false,
showFullscreenToggle = false,
showClose = true,
customClass,
header,
children,
footer,
onClose,
},
ref
) => {
const modalRef = useRef<HTMLModusWcModalElement>(null);
const openModal = () => {
if (modalRef.current) {
const dialog = modalRef.current.querySelector(
"dialog"
) as HTMLDialogElement;
if (dialog) {
dialog.showModal();
}
}
};
const closeModal = () => {
if (modalRef.current) {
const dialog = modalRef.current.querySelector(
"dialog"
) as HTMLDialogElement;
if (dialog) {
dialog.close();
}
}
};
useImperativeHandle(ref, () => ({
openModal,
closeModal,
}));
// Handle modal events
useEffect(() => {
const modal = modalRef.current;
if (modal) {
const handleClose = () => {
onClose?.();
};
const dialogElement = modal.querySelector("dialog");
if (dialogElement) {
dialogElement.addEventListener("close", handleClose);
return () => {
dialogElement.removeEventListener("close", handleClose);
};
}
}
}, [onClose]);
return (
<ModusWcModal
ref={modalRef}
modal-id={modalId}
aria-label={ariaLabel}
backdrop={backdrop}
position={position}
fullscreen={fullscreen}
show-fullscreen-toggle={showFullscreenToggle}
show-close={showClose}
custom-class={customClass}
>
{header && <div slot="header">{header}</div>}
<div slot="content">{children}</div>
{footer && <div slot="footer">{footer}</div>}
</ModusWcModal>
);
}
);
ModusModal.displayName = "ModusModal";
export default ModusModal;
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.
- 5d ago First seen · 387 lines · 27 tokens per session scan A aca5fd0c07e9
implement-modus-modal-with-refs is a skill published in the GitHub repository julianoczkowski/create-trimble-app (3 stars, last pushed 2mo ago), licensed MIT. It adds 27 tokens to every session and 2,214 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.
Other skills, from other repositories
skillshare-ui-website-style
Skillshare frontend design system for the React dashboard (ui/) and Docusaurus website (website/). Use this skill whenever you: build or modify a dashboard page or component in ui/src/, style or layout website pages or custom CSS in website/, create new React components for the dashboard, add pages to the dashboard…
antd
Use when the user's task involves Ant Design (antd) — writing antd components, debugging antd issues, querying antd APIs/props/tokens/demos, migrating between antd versions, or analyzing antd usage in a project. Triggers on antd-related code, imports from 'antd', or explicit antd questions.
igniteui-wc-choose-components
Identify and select the right Ignite UI Web Components for your app UI, then navigate to official docs, usage examples, and API references.
igniteui-blazor-generate-from-image-design
Implement Blazor application views from design images using Ignite UI Blazor components. Uses MCP servers (igniteui-cli, igniteui-theming) to discover components, generate themes, and follow best practices. Triggers when the user provides a design image (screenshot, mockup, wireframe) and wants it built as a working…
igniteui-wc-customize-component-theme
Customize Ignite UI Web Components styling using CSS custom properties, optional Sass, and the igniteui-theming MCP server for AI-assisted theming.
igniteui-wc-generate-from-image-design
Implement application views from design images using Ignite UI Web Components. Uses MCP servers (igniteui-cli, igniteui-theming) to discover components, generate themes, and follow best practices. Triggers when the user provides a design image (screenshot, mockup, wireframe) and wants it built as a working view with…