SkillAgentSearch skills...

ts

The best code style guide is the one your team already follows. This tool discovers it.

Install / Use

npx skills add zenbase-ai/context42

Installs into whichever agent you are using.

About this skill
📐

Cursor Rules

Cursor IDE rules (v2)

Quality Score

57/100

Supported Platforms

Cursor

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.

Substance
21/30
Structure
13/20
Description
12/15
Adoption
0/20
Freshness
11/15

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 found

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.

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.

SkillScoreStarsUpdatedFormat
ts (this skill)by zenbase-ai5709mo agoCursor Rules
taste-skillby Leonxlnx100110.6ktodayCLAUDE.md
headroomby headroomlabs-ai10078.9ktodayCLAUDE.md
ai-job-searchby ai-job-search-dev10069.8ktodayCLAUDE.md
claude-howtoby luongnv8910046.6k2d agoCLAUDE.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.

description: 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/lib and test):

    // 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 test files):

    // 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/lib and test):

    // 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: camelCase for 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.
  • Pascal Case for Classes, Types, and Interfaces:

    • Pattern: PascalCase for 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.
  • Boolean Variables: Prefixed with is or has.

    • Example:
      // src/hooks/use-processor.ts
      const [isRunning, setIsRunning] = useState(false)
      
    • Anti-Example: processorRunning.
    • Rationale: Improves readability by immediately indicating a boolean type.
  • File Naming:

    • React Hooks: kebab-case prefixed with use-.
      • Example: use-processor.ts
      • Rationale: Consistent with React hook conventions, clearly identifies the file's purpose.
    • 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.
  • Descriptive Prefixes/Suffixes for Test-Related Entities:

    • Pattern: test prefix for test-specific variables (e.g., testDb, testDir, testPath). Spy suffix 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, spy that lack context.
  • 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, or doWork.

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 a src/lib directory. Each module focuses on a single, well-defined responsibility. UI-specific logic (React hooks) resides in a hooks directory.
    • 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.ts file containing unrelated functions, or scattering related logic across many unrelated files.
  • Dedicated Test Files per Module:

    • Pattern: Each source module (.ts in src/lib or src/hooks) has a corresponding test file (.test.ts) in the test/ 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.ts file for all tests, or tests embedded directly within source files.
  • 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

View on GitHub
GitHub Stars0
CategoryDevelopment
Updated8mo ago
Forks0

Trust signals

74/100

From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.

1 medium2 low