ts
The best code style guide is the one your team already follows. This tool discovers it.
Install / Use
npx skills add zenbase-ai/context42Installs into whichever agent you are using.
Cursor Rules
Cursor IDE rules (v2)
Quality Score
Category
Development & EngineeringSupported Platforms
Our assessment of ts
ts scores 57/100 on our quality scale, 4173rd of 4,617 Development & Engineering skills we index.
Its Cursor Rules is 49 KB long, well organised into 12 sections and no code examples: long enough that it reads more like full documentation than a focused instruction file, which agents can find harder to follow.
It has no GitHub stars yet, so there is no community track record; judge it on its content.
Maintenance, license and trust
- The repository was last updated about 9 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
- Our last check on 2026-10-19 found the source still online.
- No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
- Its trust signals score 74/100, with 3 cautions from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.
AI review by kimi-k2.7-code on 2026-09-25. Automated pattern scan on 2026-09-24. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
ts compared with similar skills
All 4 of these similar skills score higher than ts; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| ts (this skill)by zenbase-ai | 57 | 0 | 9mo ago | Cursor Rules |
| taste-skillby Leonxlnx | 100 | 110.6k | today | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 78.9k | today | CLAUDE.md |
| ai-job-searchby ai-job-search-dev | 100 | 69.8k | today | CLAUDE.md |
| claude-howtoby luongnv89 | 100 | 46.6k | 2d ago | CLAUDE.md |
Frequently asked questions
- How do I install ts?
- Run
npx skills add zenbase-ai/context42. The install tabs above show the steps for each supported agent. - Which AI agents does ts work with?
- It is written for Cursor, as a Cursor Rules file. Other agents that read the same format can often use it too.
- Is ts safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It declares no license and scores 74/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is ts still maintained?
- The repository was last updated about 9 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
Skill content
View source on GitHubdescription: ts Style Guide globs: "**/*.ts" alwaysApply: false
TypeScript Style Guide: Decoding the Developer's DNA
This guide captures the unique coding DNA of the developer, enabling AI agents to produce contributions indistinguishable from the original author. It focuses on the "how" and "why" behind the code, not just the "what."
1. CORE PHILOSOPHY
The developer prioritizes clarity, testability, modularity, reusability, and performance. Code is designed to be easily understood, independently verifiable, and composed of well-defined, single-responsibility units. There's a strong emphasis on predictable state management, robust error handling, and efficient resource management to ensure application stability and performance. Performance is a first-class citizen, particularly for I/O-bound tasks, but not at the expense of code readability or maintainability.
Rationale: This approach leads to a codebase that is resilient, maintainable, scalable, and performant, reducing cognitive load, preventing common pitfalls, and ensuring reliable resource utilization.
Examples:
-
Clarity & Modularity (across
src/libandtest):// src/lib/cleanup-registry.ts class CleanupRegistry { /* ... */ } export const cleanupRegistry = new CleanupRegistry()// test/cleanup-registry.test.ts import { cleanupRegistry, createFileCleanupHandler } from "../src/lib/cleanup-registry.js" describe("CleanupRegistry", () => { /* ... */ })- NOT: A single large utility file containing all cleanup, database, and file exploration logic.
- Rationale: Separates concerns into distinct modules, making each easier to understand, test, and maintain. This clear separation enhances maintainability and allows for easier independent development and testing of different application layers.
-
Testability & Predictable Behavior (evident in
testfiles):// test/database.test.ts beforeEach(() => { testDb = new DB(":memory:") // In-memory DB for isolated tests testDb.init() }) afterEach(() => { testDb.close() // Ensures clean state after each test })- NOT: Relying on a persistent database or shared global state that could lead to test interference.
- Rationale: Guarantees that each test runs in a clean, isolated environment, preventing flaky tests and making failures easier to diagnose.
-
Robust Error Handling (across
src/libandtest):// src/lib/cleanup-registry.ts unlink(file).catch(error => { if (error.code !== "ENOENT") { console.error(`Failed to clean up ${file}:`, error.message) } })// test/cleanup-registry.test.ts test("createFileCleanupHandler logs non-ENOENT errors", async () => { // ... mock unlink to throw ... const consoleSpy = vi.spyOn(console, "error").mockImplementation(() => {}) const files = new Set(["/some/file.md"]) const handler = createFileCleanupHandler(files) await handler() expect(consoleSpy).toHaveBeenCalledWith( "Failed to clean up /some/file.md:", "Permission denied" ) consoleSpy.mockRestore() })- NOT: Ignoring potential errors or letting exceptions crash the application without specific handling or logging.
- Rationale: Ensures that the application remains stable even when unexpected issues (like permission errors) occur, providing clear feedback for debugging.
2. NAMING PATTERNS
The developer employs a consistent and descriptive naming strategy, prioritizing clarity and context across both application and test code.
-
Camel Case for Variables, Functions, and Instances:
- Pattern:
camelCasefor local variables, function names, and instances of classes. - Rationale: Standard JavaScript/TypeScript convention, enhances readability.
- Examples:
// src/lib/processor.ts const [progress, setProgress] = useState(0) const run = useCallback(async () => { /* ... */ })// test/cleanup-registry.test.ts let called = false const handler = () => { /* ... */ } - Anti-Example:
Progress_Value,RUN_PROCESSOR,test_db.
- Pattern:
-
Pascal Case for Classes, Types, and Interfaces:
- Pattern:
PascalCasefor class definitions, interfaces, and custom types. - Rationale: Clear distinction between types/interfaces and runtime values, aligning with common TypeScript practices.
- Examples:
// src/lib/types.ts export type FileGroup = { /* ... */ } export class DB { /* ... */ }// test/database.test.ts let testDb: DB - Anti-Example:
use_processor_options,worker.
- Pattern:
-
Boolean Variables: Prefixed with
isorhas.- Example:
// src/hooks/use-processor.ts const [isRunning, setIsRunning] = useState(false) - Anti-Example:
processorRunning. - Rationale: Improves readability by immediately indicating a boolean type.
- Example:
-
File Naming:
- React Hooks:
kebab-caseprefixed withuse-.- Example:
use-processor.ts - Rationale: Consistent with React hook conventions, clearly identifies the file's purpose.
- Example:
- Library/Utility Files:
kebab-case.- Example:
cleanup-registry.ts,database.ts,explorer.ts - Rationale: Maintains consistency with file naming conventions across the project, promoting readability and discoverability.
- Example:
- React Hooks:
-
Descriptive Prefixes/Suffixes for Test-Related Entities:
- Pattern:
testprefix for test-specific variables (e.g.,testDb,testDir,testPath).Spysuffix for mocked console/function spies. - Rationale: Clearly indicates the purpose and scope of variables within a testing context, improving test readability.
- Examples:
// test/database.test.ts let testDb: DB// test/cleanup-registry.test.ts const consoleSpy = vi.spyOn(console, "error").mockImplementation(() => {}) - Anti-Example: Generic names like
db,directory,spythat lack context.
- Pattern:
-
Clear and Concise Function/Method Names:
- Pattern: Verbs or verb phrases that clearly describe the action performed (e.g.,
saveResponse,getChildStyleGuides,createFileCleanupHandler,generateStyleGuide,createStyleGuideProcessor). - Rationale: Improves code readability and makes the intent of the function immediately obvious.
- Examples:
// src/lib/database.ts this.database.prepare("INSERT INTO responses (run_id, result, created_at) VALUES (?, ?, ?)")// test/cleanup-registry.test.ts const handler = createFileCleanupHandler(files) - Anti-Example: Ambiguous names like
processData,handleStuff, ordoWork.
- Pattern: Verbs or verb phrases that clearly describe the action performed (e.g.,
3. CODE ORGANIZATION
The codebase exhibits a strong commitment to modularity, clear separation of concerns, and a logical file structure, consistently applied across both application and test code.
-
Feature-Based Module Organization:
- Pattern: Core functionalities are encapsulated within distinct modules (e.g.,
cleanup-registry,database,explorer,generator,processor) under asrc/libdirectory. Each module focuses on a single, well-defined responsibility. UI-specific logic (React hooks) resides in ahooksdirectory. - Rationale: Promotes high cohesion and low coupling, making modules easier to develop, test, and maintain independently. It also facilitates understanding the system's architecture at a glance.
- Examples:
// Project structure implies: src/ ├── hooks/ │ └── use-processor.ts └── lib/ ├── cleanup-registry.ts ├── database.ts └── explorer.ts test/ ├── cleanup-registry.test.ts ├── database.test.ts └── explorer.test.ts - Anti-Example: A monolithic
utils.tsfile containing unrelated functions, or scattering related logic across many unrelated files.
- Pattern: Core functionalities are encapsulated within distinct modules (e.g.,
-
Dedicated Test Files per Module:
- Pattern: Each source module (
.tsinsrc/liborsrc/hooks) has a corresponding test file (.test.ts) in thetest/directory. - Rationale: Ensures comprehensive testing for each functional unit and makes it easy to locate tests for a specific piece of code.
- Examples:
// test/cleanup-registry.test.ts tests ../src/lib/cleanup-registry.ts import { cleanupRegistry, createFileCleanupHandler } from "../src/lib/cleanup-registry.js"// test/database.test.ts tests ../src/lib/database.ts import { DB } from "../src/lib/database" - Anti-Example: A single
all.test.tsfile for all tests, or tests embedded directly within source files.
- Pattern: Each source module (
-
Consistent Import Ordering:
- Pattern: Imports are grouped logically: Node.js built-in modules, then external libraries, then local relative imports, and finally type-only imports. Each group is typically separated by a blank line. Within groups, imports are generally ordered alphabetically.
- Rationale: Provides a predictable and clean structure for dependencies, making it easy to scan and understand what external resources a file relies on.
- Examples:
// src/cli.ts import { homedir } from "node:os" // Node.js built-in import { cancel, intro, isCancel, multiselect, outro, spinner, text } from "@clack/prompts" // External libraries import { cleanupRegistry } from "./lib/cleanup-registry.js" // Local relative import type { FileGroup, Language } from "./lib/types.js" // Type-only// test/cleanup-registry.test.ts import { existsSync } from "node:fs" // Node.js built-in import { describe, test, expect, beforeEach, afterEach, vi } from "vitest" // External libraries import { cleanupRegistry, createFileCleanupHandler } from "../src/lib/cleanup-registry.js" // Local relative - Anti-Example: Random import order, or mixing different types of imports without clear separation.
-
Code Spacing and Indentation:
- Indentation: 2 spaces.
- Spacing: Consistent spacing around operators, after commas, and within object literals.
- Example:
// src/hooks/use-processor.ts const { model, concurrency, inputDir, onWorkerUpdate, fileGroups, outputDir } = options const [progress, setProgress] = useState(0) - Anti-Example:
const {model,concurrency,inputDir}=options,const [ progress,setProgress ] = useState ( 0 ). - Rationale: Enhances visual clarity and readability, contributing to a consistent codebase appearance.
-
Bracket Placement:
- Opening Brace: On the same line as the declaration (K&R style).
- Example:
// src/hooks/use-processor.ts export const useProcessor = (options: UseProcessorOptions): UseProcessorResult => { // ... } - Anti-Example: Opening brace on a new line.
- Rationale: Common JavaScript/TypeScript convention, compacts code vertically.
-
**Logical Grouping within Files (especially
Truncated for display — read the full file on GitHub.
Related Skills
taste-skill
110.6kAgent skills that give coding agents taste: art direction, reference images and a browser check instead of generic AI pages
headroom
78.9kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
ai-job-search
69.8kThe job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.
claude-howto
46.6kA visual, example-driven guide to Claude Code — from basic concepts to advanced agents, with copy-paste templates that bring immediate value.
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
