typescript-types
- Repo stars 0
- Author updated Live
- Author repo skills-registry
- Domain
- Engineering
- Compatible agents
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- Trust score
- 88 / 100 · community maintained
- Author / version / license
- @tomevault-io · no license declared
- Token usage
- Lean
- Setup complexity
- Plug-and-play
- External API key
- Not required
- Operating systems
- Unspecified (assume cross-platform)
- Runtime requirements
- No special requirements
- Permissions
-
- Read-only
- Write / modify
- Network behavior
- Local-only
- Install commands
- 26 variants
Profile is derived at build time from SKILL.md and install vectors. Subject to drift from author intent.
Heads up: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: typescript-types
description: Use to generate and organize production-ready TypeScript types, interfaces, enums, DTOs, and sha…
category: engineering
runtime: no special runtime
---
# typescript-types output preview
## PART A: Task fit
- Use case: Use to generate and organize production-ready TypeScript types, interfaces, enums, DTOs, and shared utility types using strict feature-based type folders and centralized exports. Trigger when users ask to add/create/define types, interfaces, enums, DTOs, payload types, request/response types, or ask whether to use type vs interface vs enum in Node.js/Express/Prisma/Supabase/Next.js TypeScript projects. Use when this capability is needed..
- Inputs: target material, constraints, expected output, and acceptance criteria.
- Evidence boundary: follow “Goal / Required Folder Convention / Generation Workflow” and do not present inference as author intent.
## PART B: Execution result
- **01** The card summarizes the use case; runtime output centers on “Use to generate and organize production-ready TypeScript types, interfaces, enums, DTOs, and shared utility types using strict feature-based type folders and centralized exports. Trigger when users ask to add/create/define types, interfaces, enums, DTOs, payload types, request/response types, or ask whether to use type vs interface vs enum in Node.js/Express/Prisma/Supabase/Next.js TypeScript projects. Use when this capability is needed.”.
- **02** When the source has headings, the agent prioritizes “Goal / Required Folder Convention / Generation Workflow” so the result follows the author’s structure.
- **03** Typical output includes task judgment, concrete steps, required commands or file edits, validation, and follow-up options.
- **04** Risk context follows the fingerprint: read files, write/modify files; mostly runs locally; usually needs no extra API key.
## Running Rules
- read files, write/modify files; mostly runs locally; usually needs no extra API key.
- Validate with a small sample before expanding scope.
- Return the result, validation criteria, and next iteration options. The source does not require a stable slash command. After installation, invoke the skill by name and describe the task.
Name target files or source material, expected output, forbidden changes, and whether network or shell access is allowed. Permission fingerprint: read files, write/modify files.
Start with a small task and check whether the result follows “Goal / Required Folder Convention / Generation Workflow”. Inspect diffs, logs, previews, or tests before expanding scope.
Confirm the final output includes a concrete result, evidence, and next action. If it stays generic, tighten inputs, boundaries, and acceptance criteria.
---
name: typescript-types
description: Use to generate and organize production-ready TypeScript types, interfaces, enums, DTOs, and sha…
category: engineering
source: tomevault-io/skills-registry
---
# typescript-types
## When to use
- Use to generate and organize production-ready TypeScript types, interfaces, enums, DTOs, and shared utility types usin…
- Use it when the task has clear inputs, repeatable steps, and validation criteria.
## What to provide
- Target material, scope, expected result, and forbidden changes.
- Whether network, commands, file writes, or external services are allowed.
## Execution rules
- Organize steps around “Goal / Required Folder Convention / Generation Workflow” and keep inference separate from source facts.
- read files, write/modify files; mostly runs locally; usually needs no extra API key.
- Validate with a small sample before expanding the task.
## Output requirements
- Return the deliverable, key evidence, validation method, and next action.
- Mark missing information as unknown; do not invent commands, platforms, or dependencies. The author source anchors workflow facts; repository files anchor sources and commands; Fluxly only adds fit, limitations, and quality judgment.
skill "typescript-types" {
input -> user goal + target files + boundaries + acceptance criteria
context -> Goal / Required Folder Convention / Generation Workflow
rules -> SKILL.md triggers / order / output contract
runtime -> no special runtime | read files, write/modify files | mostly runs locally
guardrails -> usually needs no extra API key + small-sample validation + diff/log review
output -> copyable result + checklist + next iteration
} Typescript Types
Goal
Generate complete TypeScript type code and file updates, not concept-only guidance.
Required Folder Convention
Always follow this structure:
src/
types/
auth/
types.ts
users/
types.ts
posts/
types.ts
common/
types.ts
index.ts
Rules:
- One feature per folder under
src/types/<feature>. - One
types.tsfile per feature folder. - Do not mix multiple features in one types file.
- Shared definitions go only in
src/types/common/types.ts. - Re-export all feature/common types from
src/types/index.ts.
Generation Workflow
When asked to add or create types for a feature:
- Create or update
src/types/<feature>/types.ts. - Organize definitions in section order:
- Enums
- Core interfaces
- DTO interfaces
- Response interfaces
- Utility types
- Update
src/types/index.tsexports. - If request touches shared contracts, update
src/types/common/types.ts. - If request extends
req.user, updatesrc/types/express.d.ts(not feature file).
Interface vs Type Rules
Use interface for object shapes by default:
- Entities
- DTO objects
- API response object shapes
- Class contracts
- Objects likely to be extended
Use type for:
- Unions
- Intersections
- Primitive aliases
- Tuples
- Conditional and mapped utility types
- Closed definitions that should not be declaration-merged
Do not replace object interfaces with type aliases when interface is sufficient.
Enum Rules
Use string enum or const enum only:
- Feature-specific enums in feature
types.ts. - Shared enums in
src/types/common/types.ts.
Prefer union type over enum only for tiny, local-only literal sets.
Never generate numeric enums.
Naming Rules
- Interface names: PascalCase
- Type aliases: PascalCase
- Enum names: PascalCase
- Enum members: SCREAMING_SNAKE_CASE
- Folders: lowercase singular
- File names: lowercase, use
types.ts
Integration Rules
- Controllers consume DTO interfaces for request typing.
- Services return typed entities/response interfaces.
- Middlewares use enums for role/status checks.
- Prisma model contracts should map 1:1 with entity interfaces.
- Derive public response types from entities using
Omit/Pick(for example strippasswordHash). - Express request extension belongs in
src/types/express.d.tsonly.
Use standardized API success/error shapes in common types for cross-feature consistency.
Required Outputs Per Task
If user asks for feature types, generate:
src/types/<feature>/types.tswith complete definitions.src/types/index.tsexport update.
If user asks for shared types, generate:
src/types/common/types.tsupdates.src/types/index.tsexport update.
If user asks interface/type/enum design question:
- Provide decision with examples.
- If project files are present, also generate concrete type code in correct files.
References To Load
Read these references when generating:
references/decision-guide.mdreferences/feature-templates.mdreferences/utility-types.md
Output Style For This Skill
When triggered:
- Prefer file creation/edits with complete imports/exports.
- Produce ready-to-use interfaces/types/enums with no placeholders.
- Keep exports clean and centralized via
src/types/index.ts.
Source: CharvitZalavadiya/GitChat — distributed by TomeVault.
Decide Fit First
Design Intent
How To Use It
Boundaries And Review