実際の製品を操作して、利用者が確認できる動作証拠を集め、検証計画に沿った受け入れレポートとして公開するスキルです。
- 変更後の製品動作を実地で検証したいとき
- 画面キャプチャなどの証拠を集めたいとき
- 検証計画とレポートを作成したいとき
コードやテストをどのディレクトリに置き、どう命名するかを整理し、1200行を超えるファイルの分割方針やテスト配置の基準を示します。
Use for where a file lives, how it is named, where its tests go, and how to split a source or test file over 1200 lines (拆分大文件, 目录结构, 文件命名).
実行スコア 未検証
インストール方法を見るコードベース内でのファイル名、配置、テストの置き場所を決めるための規約を示します。Reactコンポーネント、フック、通常のモジュール、パッケージなどの命名形式や、名前付きエクスポートを使う基準を確認できます。単一モジュールのテストは隣に置き、複数モジュールや実インフラを扱うテストは __tests__/ に置くなど、テストの分類も説明します。1200行を超えるファイルは、状態や機能のまとまりを保ってディレクトリに分け、公開インポート経路や動作を維持する方針です。
新しいファイルを追加するとき、テストをどこに置くか迷うとき、肥大化したファイルの分割先や構成を決めたいときに役立ちます。既存のコードを一律に改名するためではなく、新規作成や分割時にコードベースの慣習を揃えるためのガイドです。
ルートディレクトリごとの担当範囲は AGENTS.md と project-overview が定めます。このガイドはその配下の配置や命名を扱います。
この紹介文は、公開されている SKILL.md をもとに AI(OpenAI Codex)が作成しました。正確な仕様は下の原文を確認してください。
SKILL.md の記述から、注意が要る操作と導入の前提を AI が確認しました。点数は実際に動かした結果(実行検証)だけで付けています。
点数には入れていません。 2026年10月26日 時点で AI(OpenAI Codex)が判定しました。目安なので、入れる前に原文も確認してください。
インストールする前に、エージェントに与えられる指示の中身を確認できます。
Top-level ownership (src/features, src/routes, apps/server/src, packages, …) is in AGENTS.md and project-overview. This skill owns placement and naming inside those roots, test placement, and how a large file becomes a directory. The rules record the conventions the codebase already follows; where it was split between two forms, the rule names the one to use for new files. Do not rename existing files only to match.
| What | Form | Example |
|---|---|---|
| React component file / component directory | PascalCase | PlanCard.tsx, ChatInput/ControlBar/ |
| Hook | useXxx.ts(x) | ChatInputNotice/useChatInputNotice.ts |
| Other module | camelCase or one word | originLink.ts, recentDirs.ts |
| Server class module | the class name | services/agentRuntime/StaleOperationReaper.ts |
| Service, router, store, and other non-component dirs | camelCase | services/aiAgent/, store/chat/slices/ |
| Package directory | kebab-case | packages/agent-runtime/ |
| Files inside a package | camelCase | packages/database/src/models/ |
A package whose files are already kebab-case (alint, openapi, builtin-skills) keeps kebab-case internally. Shared per-directory modules are constants.ts, types.ts, style.ts, and utils.ts, not const.ts, type.ts, styles.ts, or helpers.ts. Create one only when two or more modules in that directory use it; a constant or type used by one module stays in that module.
New files use named exports (export const PlanCard = …), even when the neighboring files default-export; do not copy the older default-export habit. The exceptions are modules a framework, tool, or loader imports by their default export: route segments under src/routes (see spa-routes), Next.js special files (page.tsx, layout.tsx, not-found.tsx), *.config.ts files, desktop controllers and services (*Ctr.ts, *Srv.ts, globbed by apps/desktop/src/main/core/App.ts), and locale resource files. Lint does not enforce this: this repository's eslint.config.mjs overrides no-restricted-syntax, which drops the shared @lobehub/lint warning on export default. When moving an existing file, keep its exports unchanged so its callers do not change.
One rule for every app and package:
Foo.ts → Foo.test.ts; a directory entry's test is index.test.ts.__tests__/ holds only tests that do not belong to one module: integration tests that run several modules together or real infrastructure (database, Redis, the tRPC or Hono request stack), such as routers/lambda/__tests__/integration/ and the database model and repository tests in testing, plus their shared setup, fixtures, and fakes.__tests__/. Move an existing unit test beside its module when you split or rewrite that test file; do not migrate tests as a side task.Foo.<scenario>.test.ts(x), keeping the original extension (index.<scenario>.test.ts(x) for a directory entry). Put shared mock factories and fixtures in a testUtils.ts beside them; each test file keeps its own vi.mock calls, because Vitest hoists them per file..test.ts (testing).Source and test files stay at or below 1200 lines. Generated code (*.gen.ts, generated/ directories) and the locales/default/ tables are exempt:
bun run check, the pre-commit hook, and the PR's File Size Gate job fail on both.Foo.ts becomes Foo/index.ts, §4), not into a neighboring file or another slice. Put a new test in a scenario test file under the limit (§2), splitting the old test file first when the test belongs to one of its scenarios. Because hundreds of legacy files are over the limit, these checks report their growth as an advisory (a warning annotation in CI) instead of failing; it is still a required fix.The limit says when to split, not where. Split on a real boundary (state, reuse, render update, sub-domain, pipeline stage), as react requires; never cut a file at an arbitrary line count. When a heavy feature is mounted by several hosts, use compose-atoms instead.
A split keeps the public import path: Foo.tsx becomes Foo/index.tsx, so import Foo from './Foo' keeps working and callers do not change. Commit the move (mkdir -p Foo && git mv Foo.tsx Foo/index.tsx) alone before extracting, so reviewers can read the extraction diff separately and Git keeps the rename while those commits stay intact (a squash merge folds them together). split-large-file has the full procedure.
| Kind | index keeps | Siblings | Precedent |
|---|---|---|---|
| React component | Public API, shared top-level state, composition | Child components (PascalCase), useXxx.ts for state transitions and side effects, pure logic modules with their own tests | Conversation/Messages/GoalTaskCard/ |
| Server service | The class and its orchestration methods | Stage functions taking an explicit deps object (pipeline/<stage>.ts), sub-domain folders | services/aiAgent/, services/comfyui/ |
| tRPC router | The merged router | One sub-router per sub-domain (market/agent.ts exports agentRouter) | routers/lambda/market/ |
| Zustand store | The action class and its public method signatures | Logic modules exporting a function that takes one params object plus get; the class method delegates to it | agentRun/actions/entries/conversationLifecycle/ |
ChatInput/ControlBar/).components/, hooks/, utils/) follow who uses the code:
PlanGrid/usePlanActions.ts).utils.ts for pure functions.Dashboard/utils/, ChatInput/hooks/, ResourceManager/components/).src/utils, src/hooks, src/components, or a packages/* package.helpers/; name the module by its content or use utils.bun run check with the test files passed explicitly: related-test discovery finds only <name>.test.* and <name>.<scenario>.test.* of each changed file, so the entry's tests do not run for an extracted sibling such as usePlanActions.ts.まだレビューはありません。使ってみた感想をお寄せください。
ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。
まだコメントはありません。最初のコメントを書いてみませんか。
実際の製品を操作して、利用者が確認できる動作証拠を集め、検証計画に沿った受け入れレポートとして公開するスキルです。
LobeHubにAIモデルプロバイダーを追加し、実行時連携からモデル表示、設定、ブランド表記、文書化、動作確認まで進めるスキルです。
ユーザー設定の初期値をサーバー側の環境変数で切り替えるため、型定義や設定の組み立て、ユーザーストアへの反映、環境変数の例と説明書きを追加する手順です。
エージェント実行中の各段階をフックで監視し、ツール呼び出しの模擬・制御や人の承認、圧縮、サブエージェント処理に介入する仕組みを扱います。
イベントを起点にエージェントのバックグラウンド処理を組み立て、ソース・シグナル・アクション・ポリシーの役割分担や非同期連携を実装するためのスキルです。
DiscordやSlackなどの実際のチャットアプリでボットにメッセージを送り、応答を画面で確認する受け入れテストを行うスキルです。