code-design

A set of TypeScript rules for naming, file organization, design structure, package management, and code quality. TypeScript is JavaScript with optional type checking; the guidance targets modern ES2024 code and common linting tools.

In plain words
What is it for?
Use it when implementing, refactoring, or reviewing TypeScript code, especially code using pnpm, the Pi SDK, Biome, or ESLint.
Why use it?
It gives implementation and review work a consistent way to judge readable names, dependencies, module boundaries, and conflicting formatting or lint rules. This reduces design decisions that would otherwise be made ad hoc.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/gotgenes/pi-anthropic-auth/code-design
Any agent
npx skills add gotgenes/pi-anthropic-auth --skill code-design
Clone the repo
git clone --depth 1 https://github.com/gotgenes/pi-anthropic-auth

Made for: Claude Code, Codex.

Per session 72 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,590 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00072 $0.03590
Opus 5 $0.00036 $0.01795
Sonnet 5 $0.00014 $0.00718
Haiku 4.5 $0.00007 $0.00359

Measured 3d ago against content hash cf330850d6b5, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

code-design 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 3d 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.

.pi/skills/code-design/SKILL.md · 252 lines

How it starts

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

Code Design

Load this skill when implementing, refactoring, or reviewing TypeScript code.

Self-Documenting Code

Code should be its own primary documentation. Prefer names that reveal intent — for functions, methods, classes, variables, and modules.

Names over comments

If a comment is needed to explain what code does, extract a well-named function or rename the symbol. Comments should explain why — the reasoning or non-obvious context behind a decision. Do not leave tombstone comments that narrate removed code or the absence of a guard, test, or branch — the type system and the diff already document it.

Scope-appropriate naming

Name length should correspond to scope. Short names (i, x, fn) are fine for small scopes (loop counters, short lambdas). Exported functions, module-level variables, and class names warrant longer, descriptive names.

Doc comments

Add JSDoc/docstrings where the ecosystem expects them — typically on public/exported APIs. Do not add doc comments when the name and signature already convey usage.

Code Organization

Source files should read like a newspaper article: high-level intent at the top, progressively deeper detail as you read down.

Public API first

Exported functions, classes, and interfaces appear near the top so readers can scan the module's surface without wading through implementation details.

Stepdown rule

Each function should be followed by the helpers it calls, at the next level of abstraction — caller first, then the helpers it depends on. Related functions that collaborate on the same data should be grouped together. When extracting a helper during a refactor, place it below the function that calls it, not above — function declarations hoist, so "define before use" is unnecessary and inverts the stepdown order.

Helpers stay in the file

Private helper functions remain in the same file as the code that uses them. When private helpers accumulate to the point where they warrant their own tests, extract them into a new module with its own public API.

Read the full file on GitHub · 252 lines

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. 3d ago First seen · 252 lines · 72 tokens per session scan A cf330850d6b5

Subscribe to this mod's changes

code-design is a skill published in the GitHub repository gotgenes/pi-anthropic-auth (227 stars, last pushed 16d ago), licensed MIT. It adds 72 tokens to every session and 3,590 once invoked, about $0.0004 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-08-30.

Related

Other skills, from other repositories

zapier-sdk

Zapier SDK for TypeScript. Programmatic access to 9,000+ apps on a user's behalf via Zapier's OAuth and audit layer. Use when writing code that needs to run actions in third-party apps (send an email, upsert a CRM record, look up a spreadsheet row, post to a chat) without managing per-app OAuth or vendor SDKs.…

zapier/sdk · 151 tokens

fastify

Fastify usage for QAuth — plugin authoring (encapsulation, decorators, lifecycle), route schemas with the Zod type provider, production/reverse-proxy setup, and the Fastify version/CVE requirement. Use when adding or modifying @qauth-labs/fastify-plugin- libraries, auth-server routes, or deployment config.

qauth-labs/qauth · 71 tokens

effect-http-api

Build typed HTTP APIs with Effect's HttpApi — endpoints with schemas, handlers, security middleware, OpenAPI docs, derived clients, and handler unit tests. Use when building HTTP servers, REST APIs, or typed HTTP clients with Effect v4.

mpsuesser/pi-effect-harness · 53 tokens

effect-error-handling

Implement typed error handling in Effect v4 using Schema.TaggedErrorClass, catchTag/catchTags, catchReason/catchReasons, Cause, ErrorReporter, and recovery patterns. Use this skill when working with Effect error channels, handling expected failures, or designing error recovery strategies.

mpsuesser/pi-effect-harness · 61 tokens

effect-http-server

Build HTTP servers with effect/unstable/http — HttpRouter routes and middleware, HttpServerRequest schema decoding, HttpServerResponse constructors, multipart uploads, websocket upgrades, static files, NodeHttpServer/BunHttpServer layers, and in-memory web handlers. Use when serving raw HTTP routes, reading request…

mpsuesser/pi-effect-harness · 84 tokens

effect-fiber

Fork, supervise, and interrupt Effect fibers with Effect.forkChild/forkScoped/forkIn/forkDetach, Fiber join/await/interrupt, uninterruptible regions, and the FiberHandle/FiberMap/FiberSet supervision collections. Use when running background work, cancelling or restarting tasks, implementing latest-wins or keyed…

mpsuesser/pi-effect-harness · 85 tokens