Add Typescript Best Practices
/install add-typescript-best-practices
Setup TypeScript Best Practices
Create or update CLAUDE.md in with following content, \x3Ccritical>write it strictly as it is\x3Ccritical>, do not summaraise or introduce and new additional information:
## Code Style Rules
### General Principles
- **TypeScript**: All code must be strictly typed, leverage TypeScript's type safety features
### Code style rules
- Interfaces over types - use interfaces for object types
- Use enum for constant values, prefer them over string literals
- Export all types by default
- Use type guards instead of type assertions
### Best Practices
#### Library-First Approach
- Common areas where libraries should be preferred:
- Date/time manipulation → date-fns, dayjs
- Form validation → joi, yup, zod
- HTTP requests → axios, got
- State management → Redux, MobX, Zustand
- Utility functions → lodash, ramda
#### Code Quality
- Use destructuring of objects where possible:
- Instead of `const name = user.name` use `const { name } = user`
- Instead of `const result = await getUser(userId)` use `const { data: user } = await getUser(userId)`
- Instead of `const parseData = (data) => data.name` use `const parseData = ({ name }) => name`
- Use `ms` package for time related configuration and environment variables, instead of multiplying numbers by 1000
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install add-typescript-best-practices - After installation, invoke the skill by name or use
/add-typescript-best-practices - Provide required inputs per the skill's parameter spec and get structured output
What is Add Typescript Best Practices?
Setup TypeScript best practices and code style rules in CLAUDE.md. It is an AI Agent Skill for Claude Code / OpenClaw, with 67 downloads so far.
How do I install Add Typescript Best Practices?
Run "/install add-typescript-best-practices" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Add Typescript Best Practices free?
Yes, Add Typescript Best Practices is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Add Typescript Best Practices support?
Add Typescript Best Practices is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Add Typescript Best Practices?
It is built and maintained by hahamumu08 (@hahamumu08); the current version is v1.0.0.