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.02488 |
| Opus 5.5 | $0.00021 | $0.00995 |
| Sonnet 5.5 | $0.00011 | $0.00498 |
| Haiku 4.5 | $0.00005 | $0.00249 |
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 28d 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 — 230 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.
- 28d ago Changed · +1 lines 8f5b7d891e9a
- 3mo 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 (91 stars, last pushed 3d ago), licensed CC0-1.0. It adds 53 tokens to every session and 2,488 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.
top-down-typescript compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| top-down-typescriptpaleo/alignfirst | Skill | 91 | 3d ago | CC0-1.0 | A | 53 | Claude Code, Codex |
| typescript-best-practicesYeachan-Heo/oh-my-claudecode | Skill | 41k | yesterday | MIT | A | 42 | Claude Code |
| loom-typescriptcosmix/loom | Skill | 66 | 4d ago | MIT | A | 16 | Claude Code, Codex |
| typescript-expertRightNow-AI/openfang | Skill | 18k | 5mo ago | Apache-2.0 | A | 21 | Claude Code, Codex |
| effect-developmentThreadlines/threadlines | Skill | 54 | today | MIT | A | 29 | Claude Code, Codex |
| ai-provider-anthropic-sdkagents-inc/skills | Skill | 28 | 1mo ago | MIT | A | 48 | Claude Code, Codex |
| ai-provider-cohere-sdkagents-inc/skills | Skill | 28 | 1mo ago | MIT | A | 40 | Claude Code, Codex |