Guides the generation, reading, and updating of agentmap.md files. This skill ensures a consistent and up-to-date codebase map for AI Agents.
日本語の概要は準備中です。原文の説明を表示しています。
Guides React component implementation, performance optimization, and state management thresholds. Triggered when handling components, pages, or UI logic.
インストールする前に、エージェントに与えられる指示の中身を確認できます。
This skill provides a comprehensive guide for building React components in the project, focusing on performance, state management thresholds, and modular organization.
Every component should follow the standard export pattern to ensure responsiveness (MobX) and performance (Memoization).
import { observer } from 'mobx-react-lite'
const Index = (props: IProps) => {
const { data } = props
return (
<div className='flex flex-col p-4'>
{/* Content */}
</div>
)
}
// ✅ Mandatory: For components needing state responsiveness or performance optimization, use $app.handle wrapper
export default new $app.handle(Index).by(observer).by($app.memo).get()
// ✅ Optional: For simple presentational components, directly use $app.memo
export default $app.memo(Index)
Large modules must be split according to fractal patterns to maintain high maintainability and clear scope.
components/ folder within the module directory. Component names should be concise (e.g., Item.tsx, Header.tsx)..map()) must be extracted to separate component files to optimize diff rendering performance.module/
├── index.tsx # Entry and layout
├── types.ts # Local type definitions
├── components/ # Local sub-components
│ ├── List.tsx
│ ├── Item.tsx # Loop item component extraction
│ └── index.ts # Internal unified export
├── models/ # (Optional) Local MobX models
│ └── Local.ts
└── styles/ # (Optional) CSS Modules
└── index.module.css
To maintain component cleanliness and reference stability, follow these patterns for declaring and passing Props:
useMemo.props_* prefix as the naming convention for internal props objects.To prevent unnecessary re-renders of child components, all functions (event handlers, callbacks) must have stable references.
import { useMemoizedFn } from 'ahooks'
// ✅ Mandatory: wrap all component-internal functions with useMemoizedFn
const handleClick = useMemoizedFn(() => {
// Logic handling
})
// ✅ Pass stable references to child components
<Child onClick={handleClick} />
$app.memo performs deep comparison. To cooperate with its work and avoid unnecessary checks on heavy objects:
$copy(value) to pass value-based copies.$copy ensures that even if the parent component re-renders and creates new object references, as long as the data content hasn't changed, the child component won't re-render.// ✅ Mandatory: pass non-primitive data types through $copy
<LargeComponent
config={$copy(config_object)}
items={$copy(data_array)}
/>
Use the global $cx (classix) utility for efficient, readable conditional CSS class merging.
<div
className={$cx(
'base-class',
isActive && 'active-class',
isError ? 'text-red' : 'text-gray'
)}
/>
GlobalModel), injected via tsyringe, obtained using useGlobal.useState, useMemo).Local models also use tsyringe dependency injection.
// module/models/Local.ts
import { makeAutoObservable } from 'mobx'
import { injectable } from 'tsyringe'
@injectable()
export class LocalModel {
v1 = ''
v2 = 0
v3 = []
v4 = false
v5 = {} // 5th variable, triggers mandatory Model usage rule
constructor() {
makeAutoObservable(this, {}, { autoBind: true })
}
action() { /* ... */ }
}
// module/index.tsx
const Index = () => {
const [local] = useState(() => container.resolve(LocalModel))
return <div onClick={local.action}>{local.v1}</div>
}
$app.handle or $app.memo?useMemoizedFn?$copy?まだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Guides the generation, reading, and updating of agentmap.md files. This skill ensures a consistent and up-to-date codebase map for AI Agents.
日本語の概要は準備中です。原文の説明を表示しています。
Maintain package-level `agentmap.md` files as outline-level maps of the real file tree and core responsibilities. Use when package structure or responsibility boundaries change and the corresponding `agentmap.md` must be created or updated.
日本語の概要は準備中です。原文の説明を表示しています。
Interacts with local browser via Chrome DevTools Protocol (only triggered after user explicitly requests to inspect, debug, or interact with pages open in Chrome)
日本語の概要は準備中です。原文の説明を表示しています。
Guides styling implementation using TailwindCSS + CSS Modules. Triggered when handling component styles, layout design, or CSS patterns.
日本語の概要は準備中です。原文の説明を表示しています。
Specialized for translating document files and their content into English. Triggered when localization, translation, or converting Chinese documents to English is requested.
日本語の概要は準備中です。原文の説明を表示しています。
Guides using eRPC (electron-tRPC) for inter-process communication (IPC) between Electron main and renderer processes. Triggered when handling Electron IPC or tRPC-based systems.
日本語の概要は準備中です。原文の説明を表示しています。