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.
npx skills add paleo/alignfirst --skill top-down-typescriptgit clone --depth 1 https://github.com/paleo/alignfirstWrote 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.
[](https://agentmods.dev/skills/paleo/alignfirst/top-down-typescript)<a href="https://agentmods.dev/skills/paleo/alignfirst/top-down-typescript"><img src="https://agentmods.dev/badge/skills/paleo/alignfirst/top-down-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.
<a href="https://agentmods.dev/skills/paleo/alignfirst/top-down-typescript"><img src="https://agentmods.dev/badge/skills/paleo/alignfirst/top-down-typescript.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00053 | $0.02464 |
| Opus 5.5 | $0.00021 | $0.00986 |
| Sonnet 5.5 | $0.00011 | $0.00493 |
| Haiku 4.5 | $0.00005 | $0.00246 |
Grade A, and why
top-down-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 1mo 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.
How it starts
The opening of the file, as written. The whole thing — 229 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Top-Down TypeScript Coding Style
General Rules
- Dead (unused) code SHOULD NOT be kept (YAGNI principle).
- Do not write multiple consecutive blank lines.
- Changes to linter rules MUST be discussed before being implemented.
- Code SHOULD NOT contain commented-out code, unless a comment explains why.
Code Organization
Usage comes first, implementation after. Exception: with inheritance — when an interface extends another, write the parent first.
-
Order code top-down: each file reads as a story, from entry point to leaves. The reader meets the highest-level thing first, then drills down into its dependencies:
// 1. Imports import { ... } from "..."; // 2. Module-level constants and variables (exported first, then internal) export const PUBLIC_CONST = ...; const INTERNAL_CONST = ...; // 3. Shared types — main type first, then types it references export interface MainType { detail: DetailType; } export interface DetailType { ... } // 4. Entry-point (exported) function export function doThing() { stepOne(); stepTwo(); } // 5. Internal functions called by the entry point, in call order function stepOne() { stepOneHelper(); } function stepOneHelper() { ... } function stepTwo() { ... } -
Module-level constants and variables (
const,let,varvalue declarations at the top of the file — both exported and internal) MUST be placed immediately after imports, before any type definitions, functions, or classes. The reader sees them first and treats them as the file's configuration surface. -
Functions: write the caller first, then the functions it calls, recursively. A helper appears just below its caller, not grouped at the bottom of the file. If a helper is called by several siblings, place it after its first caller.
-
Types: write the main (top-level) type first, then the types it references, recursively. Same top-down rule as functions.
-
Types attached to a single function (or class, or other declaration) — i.e. used only in that one signature, like a
MyComponentPropsinterface used only byMyComponent— must be placed immediately before that declaration, not in the top type block. -
Exports are not a sorting criterion on their own: a
functionbeingexported does not pull it to the top — its position is determined by who calls it. The entry points of a file are usually exported, which is why they tend to appear first, but that is a consequence of the top-down rule, not the rule itself.
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.
- 1mo ago First seen · 229 lines · 53 tokens per session scan A 0c7fb229567d
top-down-typescript is a skill published in the GitHub repository paleo/alignfirst (85 stars, last pushed today), licensed CC0-1.0. It adds 53 tokens to every session and 2,464 once invoked, about $0.0002 per session on Opus 5.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.
Other skills, from other repositories
typescript-expert
TypeScript expert for type system, generics, utility types, and strict mode patterns.
loom-typescript
TypeScript language expertise for type-safe, production-quality code.
ai-infrastructure-ollama
Local LLM inference with the Ollama JavaScript client -- chat, streaming, tool calling, vision, embeddings, structured output, model management, and OpenAI-compatible endpoint.
ai-infrastructure-replicate
Replicate SDK patterns for TypeScript/Node.js -- client setup, predictions, streaming, webhooks, file handling, model versioning, deployments, and training.
ai-infrastructure-together-ai
Together AI SDK patterns for TypeScript — client setup, chat completions, streaming, structured output, function calling, embeddings, image generation, fine-tuning, and OpenAI-compatible endpoints.
ai-orchestration-llamaindex
LlamaIndex.TS data framework for RAG, indexing, retrieval, query engines, chat engines, and agentic workflows in TypeScript.