Agent skill
clean-typescript
Write clean, practical TypeScript focused on correctness over ceremony
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/clean-typescript-ddoman90-claude-code-intro
SKILL.md
Clean TypeScript Style Guide
Use TypeScript as a correctness and clarity tool, not as ceremony. Prioritize readable types that genuinely reduce bugs.
Type Declaration
- PREFER
typealiases for most situations - USE
interfacefor public, extensible object shapes - Keep types small and composable
Function Design
- PREFER explicit return types for public functions
- Use function overloads sparingly, only when they meaningfully enhance the API
Nullability
- Handle
nullandundefinedexplicitly through control flow and guards - AVOID non-null assertions (
!) as regular practice
Avoid Anti-patterns
- AVOID
enum- use union types oras constobjects instead - AVOID
any- useunknownas the safer alternative
Error Handling
- Type errors explicitly
- Consider result objects or typed errors over broad exception throwing
Philosophy
If a type is hard to understand, it's probably wrong. Prioritize maintainability and clear intent over theoretical type system completeness.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?