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 agentmods add rules/shapediver/appbuildersdk/custom-componentgit clone --depth 1 https://github.com/shapediver/AppBuilderSdkWrote 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/rules/shapediver/appbuildersdk/custom-component)<a href="https://agentmods.dev/rules/shapediver/appbuildersdk/custom-component"><img src="https://agentmods.dev/badge/rules/shapediver/appbuildersdk/custom-component.svg" alt="Measured on agentmods" 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.00000 | $0.02221 |
| Opus 5 | $0.00000 | $0.01111 |
| Sonnet 5 | $0.00000 | $0.00444 |
| Haiku 4.5 | $0.00000 | $0.00222 |
Grade A, and why
custom-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 today.
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 — 318 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Custom Component Props Pattern
Overview
Components use Mantine’s useProps hook to read style-oriented defaults from the centralized application theme. Visual behavior can be adjusted via theme configuration without changing component code.
Pattern structure
1. Inside the component
Every component that follows this pattern should:
import { useProps } from "@mantine/core";
// Define default style props
const defaultStyleProps = {
buttonProps: { variant: 'contained' as const },
downloadTooltipProps: { placement: 'top' as const },
// ... other style props
};
export default function ComponentName(props: ComponentProps) {
// Resolve style props with useProps
const {
buttonProps,
downloadTooltipProps,
downloadButtonProps,
parameterValues,
...rest
} = useProps("ComponentName", defaultStyleProps, props);
// Use the resolved props in JSX
return (
<Tooltip {...downloadTooltipProps}>
<Button {...buttonProps}>
{/* component content */}
</Button>
</Tooltip>
);
}
useProps arguments:
"ComponentName"— exact component id (string identifier).defaultStyleProps— default values for style props.props— incoming component props (override theme values).
2. In useCustomTheme.ts
Register overrides for the component under components in src/shared/shared/ui/theme/useCustomTheme.ts:
export const customTheme: MantineThemeOverride = {
components: {
/**
* ExportButtonComponent
*
* Component for export functionality
*/
ExportButtonComponent: ExportButtonComponentThemeProps({
// buttonProps: {
// variant: "light",
// fullWidth: true,
// },
// downloadTooltipProps: {
// label: "Download file",
// position: "top",
// },
}),
}
};
Rules for custom components
1. Naming convention
- Component:
ComponentName(PascalCase). usePropsid: must match the component name exactly.- Theme props type:
ComponentNameThemePropsorComponentNameThemePropsType. - Theme factory:
ComponentNameThemeProps()registered inuseCustomTheme.ts.
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.
- today First seen · 318 lines · 0 tokens per session scan A cd95ca2b8d1e
custom-component is a cursor rule published in the GitHub repository shapediver/AppBuilderSdk (14 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,221 tokens. 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-04.
Other cursor rules, from other repositories
nextjs-react-tailwind-cursorrules-prompt-file
Cursor rules for Next.js development with React and Tailwind CSS integration.
react-components-creation-cursorrules-prompt-file
Cursor rules for React component creation and development.
react-chakra-ui-cursorrules-prompt-file
Cursor rules for React development with Chakra UI integration.
react-styled-components-cursorrules-prompt-file
Cursor rules for React development with Styled Components integration.
chakra-ui-best-practices
强制执行 Chakra UI 最佳实践以保持一致性并利用框架的功能.
react-chakra-ui---folder-structure
维护 React 和 Chakra UI 项目的定义文件夹结构以确保代码组织有序.