writing-typescript

writing-typescript is a skill for Claude Code from julianobarbosa/claude-code-skills. It costs 45 tokens per session (751 once invoked), scanned A, original, MIT.

A guide to managing the PATH variable in zsh, the shell commonly used on macOS and Unix systems.

In plain words
What is it for?
It helps add tools such as Bun, Node.js, Python, Rust, and Go to PATH, find broken entries, and configure version managers.
Why use it?
It helps diagnose why installed commands cannot be found and keeps shell startup configuration organized.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit It helps add tools such as Bun, Node.js, Python, Rust, and Go to PATH, find broken entries, and configure version managers.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/julianobarbosa/claude-code-skills/writing-typescript
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add julianobarbosa/claude-code-skills --skill writing-typescript
Clone the repo
git clone --depth 1 https://github.com/julianobarbosa/claude-code-skills

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for writing-typescript

README.md
[![agentmods](https://agentmods.dev/badge/skills/julianobarbosa/claude-code-skills/writing-typescript/github.svg)](https://agentmods.dev/skills/julianobarbosa/claude-code-skills/writing-typescript)
Your own site
<a href="https://agentmods.dev/skills/julianobarbosa/claude-code-skills/writing-typescript"><img src="https://agentmods.dev/badge/skills/julianobarbosa/claude-code-skills/writing-typescript/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for writing-typescript

Your own site · 80×15
<a href="https://agentmods.dev/skills/julianobarbosa/claude-code-skills/writing-typescript"><img src="https://agentmods.dev/badge/skills/julianobarbosa/claude-code-skills/writing-typescript.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 751 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00045 $0.00751
Opus 5 $0.00023 $0.00376
Sonnet 5 $0.00009 $0.00150
Haiku 4.5 $0.00005 $0.00075

Measured 8d ago against content hash 576be5edf1bd, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

writing-typescript scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/writing-typescript/SKILL.md · 99 lines

How it starts

The opening of the file, as written. The whole thing — 99 lines — stays where its author put it; the contents beside it link to each section on GitHub.

TypeScript Development (2025)

Core Principles

  • Strict typing: Enable all strict checks
  • Parse, don't validate: Transform untrusted data at boundaries
  • Composition over inheritance: Small, focused functions
  • Explicit over implicit: No any, prefer unknown

Toolchain

bun          # Runtime + package manager (fast)
vite         # Frontend bundling
vitest       # Testing
eslint       # Linting
prettier     # Formatting

Quick Patterns

Type Guards

function isUser(value: unknown): value is User {
  return typeof value === "object" && value !== null && "id" in value;
}

Discriminated Unions

type Result<T, E = Error> = { ok: true; value: T } | { ok: false; error: E };

function processResult<T>(result: Result<T>): T {
  if (result.ok) return result.value;
  throw result.error;
}

Utility Types

type UserUpdate = Partial<User>;
type UserSummary = Pick<User, "id" | "name">;
type UserWithoutPassword = Omit<User, "password">;
type ReadonlyUser = Readonly<User>;

tsconfig.json Essentials

{
  "compilerOptions": {
    "target": "ES2022",
    "module": "ESNext",
    "moduleResolution": "bundler",
    "strict": true,
    "noUncheckedIndexedAccess": true,
    "exactOptionalPropertyTypes": true,
    "noImplicitReturns": true,
    "isolatedModules": true
  }
}

References

Commands

bun install              # Install deps
bun run build            # Build
bun test                 # Test
bun run lint             # Lint
bun run format           # Format

Gotchas

  • import type with verbatimModuleSyntax and named exports: type-only import of a value triggers errors. Fix: import { type Foo } from "mod" (inline marker).
  • as const on object: readonly AND literal-narrowed — different from as Foo (asserts type) or satisfies Foo (validates without widening).
  • satisfies validates without widening; as widens — using as where you wanted satisfies loses literal types silently.
  • Array<T>.includes(x) requires x to be of type T — narrowing-from-union doesn't work; the standard fix is a type-predicate helper.
  • strictNullChecks: false makes T mean T | null | undefined for ALL types — partial migrations leave types that lie about nullability.
  • tsconfig.json extends doesn't recursively merge compilerOptions.paths — child paths REPLACE parent paths, not merge.

Read the full file on GitHub · 99 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 99 lines · 45 tokens per session scan A 576be5edf1bd

Subscribe to this mod's changes

writing-typescript is a skill published in the GitHub repository julianobarbosa/claude-code-skills (10 stars, last pushed 16d ago), licensed MIT. It adds 45 tokens to every session and 751 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.