种子数据与测试数据创建
add-seed-data
创建或更新可信且确定性的原始固定装置(fixture)场景,同时不破坏现有原型。当被要求添加或更改固定装置、种子数据、示例数据、场景或跨记录关系时使用。不适用于 UI 重新设计、实时数据基础设施或无关命令。
- License 许可
- MIT
- 所属仓库
- github/replica
- 最近更新
- 2026-11-15
- Stars
- ★ 273
- Forks
- 35
01 前言 Front Matter
- name
- add-seed-data
- description
- Creates or updates believable deterministic raw fixture scenarios without breaking an existing prototype. Use when asked to add or change fixtures, seed data, sample data, scenarios, or cross-record relationships. Not for UI redesign, live-data infrastructure, or unrelated commands.
02 资源文件 3
- 参考文档references/context.md2.0 KB
- 参考文档references/python.md1.0 KB
- 参考文档references/typescript.md1.6 KB
03 SKILL.md 正文
Add seed data
Resolve the target
Resolve an explicit target first: a fixture, scenario, page or surface. Otherwise use the known current target and consumer-declared entry points. Ask only when the target or requested scenario is consequential and unknown. Preserve the original request and answers. Do not infer a route, duplicate a prototype or scaffold a missing surface. Report an absent target before edits.
Before implementation, read the required context contract and its shared resolution owner. Missing required context or installed companions stops affected work with exact paths. Do not automatically run setup, install skills or activate context.
Update the smallest scenario
- Read the target's canonical fixtures, raw types if present, existing data-to-view assembly and directly affected consumers/tests. Use the consumer-declared locations and formats, not an assumed directory or JSON.
- Identify the smallest believable scenario from product context and the request, including needed records, identities and relationships. Reuse canonical fixtures before adding records. Preserve unaffected data and existing scenario intent, including intentional empty or failure cases.
- Edit authored raw inputs only. Keep stable IDs, unique keys, consistent cross-record references and deterministic values, order and timestamps where relevant. Avoid runtime randomness, current-time drift and environment dependence. Do not overwrite private data or copy secrets/private payloads into fixtures. Use synthetic data or data explicitly authorized for this purpose by the user or a public source, not merely accessible data.
- Keep derived counts, picker options, formatted values, grouping, filtering, sorting and pagination output in the existing assembly layer. Do not write assembled view models back to fixtures or invent missing domain collections in components or loaders. Fixed UI text and enums may stay inline.
- Update raw types and assembly only when required by the requested shape, not as a general refactor. A plain HTML/JS consumer can use its existing simple data-to-view function. No framework, schema system or generator is required. Keep valid empty collections distinct from invalid relationships. Expose actual invalid inputs through existing error behavior and focused checks, never repair them with fabricated records or silent success.
- Remain static/offline compatible. Do not add APIs, capture scripts, network access, credentials or a live-mode migration. For an already dual-source consumer, preserve its single source-independent assembly, source reporting and explicit fallback contracts. Do not turn failures into fake live success or import another platform's runtime or URL protocol.
- Change the UI only if the requested shape actually requires it. Before those edits, read the existing prototype authoring guidance and its required context. Follow applicable UI guidance for the scoped change, not a redesign. Data-only changes skip this read and UI workflows.
Verify and report
Run the narrow consumer-owned checks for raw format/type validity, uniqueness, referential integrity, derived behavior and the requested scenarios. Add focused tests through existing tooling when needed. Include relevant empty, single/multiple and boundary records when applicable, not a mandatory matrix. Check that unaffected canonical records and meaningful failure cases survive.
If rendered output changes, use the consumer-authorized preview behavior and respect its visual approval/validation order. Do not assume a browser is available. Static checks do not prove rendered correctness. Report unavailable checks and unverified behavior explicitly rather than calling them passed.
Follow consumer validation/lifecycle and commit policy. Do not commit unless authorized, publish automatically or treat fixture work as context activation. Return the target, context document paths, scoped changes, checks actually run and results, plus remaining limits. No automatic independent review or infrastructure work.
04 同仓库更多 Skills
create-prototype-from-production
Use when asked to copy, clone, replicate or recreate a live production website or web app as a Replica prototype from its URL, such as "create a prototype from https://example.com" or "replicate this site for a demo". Do not use for building a new design from a brief, or for changing an existing prototype.
页面视觉设计评审
visual-design-review
依据使用方自有的产品与设计系统指南,审查页面层级、分组、密度、操作及状态设计。当用户要求视觉设计评审、页面点评,或询问新页面是否清晰传达其任务时使用。
技能共享源配置与上下文起草
setup-skills
配置共享源,并使用独立的 writer 起草上下文。普通/全新设置会提供用户指定包的安装,并复用内置浏览器能力,仅在确有证据表明必要检查存在缺口时才添加浏览器工具。适用于设置、源修复、编写上下文或刷新草稿。仅配置模式会跳过工具安装和编写;安装和激活需要单独批准。
Hub 反馈设计主题提炼
review-hub-feedback
通过发现、独立判断和综合归纳,审查 Hub 反馈以提炼可复用的设计主题。不进行诊断或优化。
UI 响应式布局审计
responsive-audit
使用使用者上下文和浏览器工具,跨产品定义的视口审查 UI 布局、溢出和导航。当用户要求检查响应式、测试移动端布局或审查断点行为时使用。
Replica 原型控件创建与绑定
prototype-controls
创建并连接 Replica 原型控件。当用户要求添加或修改下拉框、滑块、输入框、切换开关或操作按钮(用于配置变体、场景、可见 UI、应用状态或数据源)时使用,即使未使用画布术语也一样。涵盖声明、类型化绑定、默认值、条件、重置和动作。仅涉及产品 UI 表单字段和筛选器时,应使用 create-prototype。