Agent SkillsInsForge/InsForge › shared-schemas

shared-schemas

GitHub

用于维护 InsForge 共享 Zod 契约、导出类型及 API 负载定义。确保跨包数据一致性,同步前后端及外部工具依赖,防止类型重复并管理变更影响。

.agents/skills/insforge-dev/shared-schemas/SKILL.md InsForge/InsForge

Trigger Scenarios

修改共享 Zod 模式或类型定义 更新跨包 API 负载结构 同步前端与后端的数据契约

Install

npx skills add InsForge/InsForge --skill shared-schemas -g -y
More Options

Non-standard path

npx skills add https://github.com/InsForge/InsForge/tree/main/.agents/skills/insforge-dev/shared-schemas -g -y

Use without installing

npx skills use InsForge/InsForge@shared-schemas

指定 Agent (Claude Code)

npx skills add InsForge/InsForge --skill shared-schemas -a claude-code -g -y

安装 repo 全部 skill

npx skills add InsForge/InsForge --all -g -y

预览 repo 内 skill

npx skills add InsForge/InsForge --list

SKILL.md

Frontmatter
{
    "name": "shared-schemas",
    "description": "Use this skill when contributing to InsForge's shared schema package. This is for maintainers editing published Zod contracts, exported types, and shared API payload definitions consumed by InsForge packages in this repo and other InsForge tooling."
}

InsForge Dev Shared Schemas

Use this skill for packages/shared-schemas/ work in the InsForge repository.

Scope

  • packages/shared-schemas/src/**
  • any code in this repo that consumes the changed contracts
  • downstream InsForge tooling that depends on the published @insforge/shared-schemas package, including consumers not present in this repository

Working Rules

  1. Treat packages/shared-schemas/ as the source of truth for cross-package payloads.

    • If a request, response, or domain shape is shared across InsForge surfaces, define it here.
    • Do not duplicate the same contract in package-local files.
    • Remember that this package is not only for the repo's backend and dashboard packages. It is also consumed by other InsForge tooling, including MCP and SDK code that may live outside this repository.
  2. Keep schemas organized by domain.

    • Follow the existing *.schema.ts and *-api.schema.ts split when it fits the current package pattern.
    • Keep packages/shared-schemas/src/index.ts aligned with the intended public API.
    • Treat exported names and schema shapes as a public contract surface, not just an internal refactor target.
  3. Use schema changes as a synchronization trigger.

    • Update backend validation and response usage.
    • Update shared dashboard services, hooks, and UI assumptions in packages/dashboard/.
    • Check for import sites across packages/*, frontend/, and backend/ before finishing.
    • Call out likely downstream impact on MCP, SDK, or other external InsForge consumers when a change alters exported names, schema semantics, or payload shape.
    • Be conservative with breaking changes. If a breaking contract change is necessary, make it explicit in the handoff.
    • Never use the TypeScript any type. Shared contracts should stay explicit and trustworthy across package boundaries.

Validation

  • cd packages/shared-schemas && npm run build
  • cd backend && npx tsc --noEmit
  • cd packages/dashboard && npm run typecheck

Run package-specific tests as needed where behavior changed. If external consumers such as MCP or SDK cannot be validated from this repo, say that clearly instead of implying they were covered.

Version History

  • 4bf10d7 Current 2026-08-20 09:26

Same Skill Collection

.agents/skills/insforge-dev/backend/SKILL.md
.agents/skills/insforge-dev/dashboard/SKILL.md
.agents/skills/insforge-dev/docs/SKILL.md
.agents/skills/insforge-dev/e2e-testing/SKILL.md
.agents/skills/insforge-dev/SKILL.md
.agents/skills/insforge-dev/ui/SKILL.md
.claude/skills/doc-author/SKILL.md
.claude/skills/insforge-dev/backend/SKILL.md
.claude/skills/insforge-dev/dashboard/SKILL.md
.claude/skills/insforge-dev/docs/SKILL.md
.claude/skills/insforge-dev/e2e-testing/SKILL.md
.claude/skills/insforge-dev/shared-schemas/SKILL.md
.claude/skills/insforge-dev/SKILL.md
.claude/skills/insforge-dev/ui/SKILL.md
.codex/skills/insforge-dev/backend/SKILL.md
.codex/skills/insforge-dev/dashboard/SKILL.md
.codex/skills/insforge-dev/docs/SKILL.md
.codex/skills/insforge-dev/e2e-testing/SKILL.md
.codex/skills/insforge-dev/shared-schemas/SKILL.md
.codex/skills/insforge-dev/SKILL.md
.codex/skills/insforge-dev/ui/SKILL.md

Metadata

Files
0
Version
4bf10d7
Hash
7614c637
Indexed
2026-08-20 09:26

- 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-25 00:35
浙ICP备14020137号-1 $방문자$