typescript
Skill58 starsChanged 2 months agoMITView on GitHub
Repository guidance for writing, reviewing, and maintaining TypeScript code within the hr-skills monorepo. Covers project conventions, compiler settings, module structure, and development workflows.
69 other projects use a version of this.
Adopted by
Most recently taken up by
- Ajustor/claude-skillstheir own version, first seen Nov 16, 2026
- jameswyse/skillstheir own version, first seen Nov 15, 2026
- oberemokis/skillstheir own version, first seen Nov 15, 2026
- lobehub/lobehubtheir own version, first seen Nov 15, 2026
- bbartling/open-fddtheir own version, first seen Nov 9, 2026
- TheLunchTrae/claude-code-configstheir own version, first seen Nov 8, 2026
Used with
Projects with it also use rust, msw and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
MicrosoftSkillrust
Use this guide when working on Rust changes in the FAST monorepo.
Also in 10 projects that use this
thongdn-itSkillmsw
MSW (Mock Service Worker) best practices for API mocking in tests (formerly test-msw). This skill should be used when setting up MSW, writing request handlers, or mocking HTTP APIs. This skill does NOT cover general testing patterns (use test-vitest or test-tdd skills) or test methodology.
Also in 3 projects that use this
SupabaseSkillreact-hook-form
Correct React Hook Form usage anywhere in the monorepo — data flow, subscriptions,
Also in 3 projects that use this
thongdn-itSkilltailwind
Tailwind CSS v4 performance optimization and best practices guidelines (formerly tailwindcss-v4-style). This skill should be used when writing, reviewing, or refactoring Tailwind CSS v4 code to ensure optimal build performance, minimal CSS output, and correct usage of v4 features. Triggers on tasks involving Tailwind configuration, @theme directive, utility classes, responsive design, dark mode, container queries, or CSS generation optimization.
Also in 6 projects that use this
VercelSkillreact
React renderer for json-render that turns JSON specs into React components. Use when working with @json-render/react, building React UIs from JSON, creating component catalogs, or rendering AI-generated specs.
Also in 11 projects that use this
leonaaardobSkilldrizzle
Complete Drizzle ORM documentation in markdown format. Use when working with Drizzle ORM - covers schema definition, queries, migrations, database connections (PostgreSQL, MySQL, SQLite), integrations (Neon, Supabase, PlanetScale, Cloudflare D1, Turso), column types, relations, transactions, and framework usage (Next.js, SvelteKit, Astro).
Also in 3 projects that use this
- +1 more from thongdn-it
Other versions69 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 69
- lobehub/lobe-chat★ 86ksame name
- lobehub/lobehub★ 86ksame name
- recharts/recharts★ 28ksame name
- ccusage/ccusage★ 19ksame name
- ryoppippi/ccusage★ 19ksame name
- scalar/scalar★ 16ksame name
- prowler-cloud/prowler★ 15ksame name
- microsoft/fast★ 9.7ksame name
- epicenter-md/epicenter★ 4.8ksame name
- EpicenterHQ/epicenter★ 4.8ksame name
59 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository19 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- biomeSkill
- bunSkill
- changesetSkill
- clackSkill
- dry-refactoringSkill
- github-awesome-copilot-git-commitSkill
- hr-root-router-maintainingSkill
- hr-skills-maintainingSkill
- humanizerSkill
- jscpdSkill
- markdownSkill
- pdfSkill
- skill-vetterSkill
- turboSkill
- valibotSkill
- hr-skillsSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
29 rules. 0 are common, 27 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 54 edited versions we read keep these.
27
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 31
Prefer strict type safety.
- Distinctive: line 32
Prefer explicit public APIs.
- Distinctive: line 33
Keep modules focused on a single responsibility.
- Distinctive: line 34
Use ECMAScript modules exclusively.
- Distinctive: line 35
Prefer native language features over unnecessary abstractions.
- Distinctive: line 36
Avoid runtime dependencies when the type system is sufficient.
- Distinctive: line 71
Prefer small, focused modules.
- Distinctive: line 75
Keep helper functions private unless reused.
- Distinctive: line 81
Prefer expressive types over assertions.
- Distinctive: line 102
Keep imports grouped and organized.
- Distinctive: line 103
Import only what is required.
- Distinctive: line 104
Use relative imports within a package.
- Very specific: line 105
Use workspace:* dependencies for internal packages.
- Distinctive: line 109
Run TypeScript type checking.
- Distinctive: line 115
Run all repository tests.
- Distinctive: line 147
Prefer tool defaults over explicit configuration.
- Distinctive: line 149
Add package-specific configuration only when the defaults are insufficient.
- Distinctive: line 150
Keep build and compiler configuration easy to understand and maintain.
- Distinctive: line 168
Run repository type checking.
- Distinctive: line 185
Prefer inference when it improves readability.
- Distinctive: line 186
Add explicit types to exported APIs.
- Distinctive: line 187
Keep implementations simpler than their type definitions.
- Very specific: line 188
Use unknown instead of any whenever possible.
- Distinctive: line 190
Keep package-specific TypeScript configuration minimal and rely on shared defaults whenever possible.
- Distinctive: line 203
Keep public APIs stable.
- Distinctive: line 204
Prefer composition over inheritance.
- Distinctive: line 205
Write reusable utility types only when they improve clarity.
- Distinctive: line 206
Use strict compiler settings consistently.
- Distinctive: line 208
Keep TypeScript code easy to understand before optimizing for brevity.
“Common” is measured: kept by at least 6 in 10 of the 54 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
TypeScript
This skill describes how TypeScript is used throughout the hr-skills monorepo. It covers repository conventions, compiler configuration, module organization, type safety, and development workflows.
The repository uses modern TypeScript with strict compiler settings, ECMAScript modules, and Bun as the runtime.
Supported tasks
- Explain TypeScript conventions used by this repository
- Review TypeScript code for correctness and maintainability
- Improve type safety without changing runtime behavior
- Recommend repository-consistent TypeScript patterns
- Organize modules and exports
- Review public APIs
- Validate compiler configuration
- Explain workspace TypeScript structure
- Troubleshoot common TypeScript errors
Repository conventions
This repository follows several core principles.
- Prefer strict type safety.
- Prefer explicit public APIs.
- Keep modules focused on a single responsibility.
- Use ECMAScript modules exclusively.
- Prefer native language features over unnecessary abstractions.
- Avoid runtime dependencies when the type system is sufficient.
Compiler configuration
The repository enables modern TypeScript features including:
strictmoduleResolution: bundlermodule: Preservetarget: ESNextnoEmitisolatedModulesverbatimModuleSyntaxexactOptionalPropertyTypesnoUncheckedIndexedAccessnoImplicitReturnsnoImplicitOverrideuseUnknownInCatchVariables
These settings prioritize correctness, maintainability, and predictable builds.
Project structure
Workspace packages typically organize source code as:
src/
test/
tsconfig.jsonPackages extend the shared repository TypeScript configuration while keeping package-specific configuration minimal.
Code organization
Prefer small, focused modules.
- One responsibility per file.
- Export only public APIs.
- Keep helper functions private unless reused.
- Avoid circular dependencies.
- Group related types with their implementation.
Type design
Prefer expressive types over assertions.
Recommended patterns include:
- discriminated unions
- generic functions
- utility types
- readonly objects
- literal types
as constwhere appropriate
Avoid:
- unnecessary
any - excessive type assertions
- duplicated type definitions
- overly complex conditional types
Imports and exports
- Prefer named exports.
- Keep imports grouped and organized.
- Import only what is required.
- Use relative imports within a package.
- Use
workspace:*dependencies for internal packages.
Common commands
Run TypeScript type checking.
bun run typecheckRun all repository tests.
bun run testBuild every workspace package.
bun run buildKey prompts
Type safety
- "Review this TypeScript code for type safety."
- "Explain this compiler error."
- "Reduce unnecessary type assertions."
- "Improve the inferred types."
Repository conventions
- "Rewrite this file following repository conventions."
- "Review the module organization."
- "Recommend a cleaner public API."
- "Validate this package structure."
Configuration philosophy
Repository configuration should remain as simple as possible.
- Prefer tool defaults over explicit configuration.
- Extend shared repository configuration instead of duplicating settings.
- Add package-specific configuration only when the defaults are insufficient.
- Keep build and compiler configuration easy to understand and maintain.
Refactoring
- "Simplify this TypeScript implementation."
- "Extract reusable utilities."
- "Remove duplicated types."
- "Improve module boundaries."
Development
- "Explain this tsconfig option."
- "Generate a repository-compatible tsconfig."
- "Recommend TypeScript best practices for this package."
- "Review this pull request for TypeScript issues."
Examples
Run repository type checking.
bun run typecheckPackage tsconfig.json files extend the shared repository configuration and include only the package sources.
{
"extends": "../../tsconfig.json",
"include": ["src", "test"]
}Tips
- Prefer inference when it improves readability.
- Add explicit types to exported APIs.
- Keep implementations simpler than their type definitions.
- Use
unknowninstead ofanywhenever possible. - Validate changes with
bun run typecheck. - Keep package-specific TypeScript configuration minimal and rely on shared defaults whenever possible.
Common issues
- Exporting implementation details unnecessarily.
- Using
anywhere stronger types are possible. - Duplicating types across packages.
- Mixing runtime logic with type definitions.
- Ignoring compiler diagnostics.
- Creating modules with multiple unrelated responsibilities.
Best practices
- Keep public APIs stable.
- Prefer composition over inheritance.
- Write reusable utility types only when they improve clarity.
- Use strict compiler settings consistently.
- Review exported types as carefully as runtime code.
- Keep TypeScript code easy to understand before optimizing for brevity.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

