paleo-typescript-style — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited paleo-typescript-style (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Usage comes first, implementation after. Exception: with inheritance — when an interface _extends_ another, write the parent first.
// 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() { ... }const, let, var value 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.MyComponentProps interface used only by MyComponent — must be placed immediately before that declaration, not in the top type block.function being exported 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.throw, return, continue, break), when it fits on one line, write it on one line (e.g., if (!condition) return false; instead of multi-line format)any; take the time to find the proper type. If you fail to find one, always insert a /* FIXME */ after the any. For example: let myVariable: any /* FIXME */;.import { X } from "y.js" instead of require).enum and namespace.const over let.undefined over null.?? over ||.++i and --i over i++ and i--.new Error() over Error().function and class declarative syntax over creating them as constants.interface declarations over type aliases.T, K, etc.undefined value."normal" | "gracefulShutdown" | "backupMode" instead of "normal" | "graceful-shutdown" | "backup-mode").undefined or throw an error if the absence of value indicates a problem.undefined or null.undefined when it is the default value. Use return; instead of return undefined; and let myVariable; instead of let myVariable = undefined;. Explicitly passing undefined is fine when intentionally setting a value.as any or any kind of type assertion. Always make the effort to find the proper type. Exception: when the type is incorrect or truly unknown — justify with an inline comment.import("some-package-or-module").SomeType; prefer direct imports at the top of the file.await import("some-package-or-module"); prefer static imports at the top of the file. Exception: when there is a valid reason — justify with an inline comment.Before adding a dependency or dev-dependency, search the codebase first and reuse the version already in use. If not found, install the latest version using the default install command.
If the code is fine, say so. Otherwise, apply the following principles to keep the code clean, maintainable, and efficient.
Think of it as narrative decomposition: the caller reads like a paragraph that names what happens; each helper expands one sentence of that paragraph.
For example, this code:
export function myFunction() {
// Check something
// ... 20 lines ...
// Do something
// ... 20 lines ...
}… should be refactored in:
export function myFunction() {
checkSomething();
doSomething();
}
function checkSomething() {
// ... 20 lines ...
}
function doSomething() {
// ... 20 lines ...
}Guidelines:
Each time you see duplicated logic, take the time to refactor it into a reusable function.
Do not keep unused code such as variables, functions, implementations, etc.
?? "" and ?? 0 and confirm it is intentional. Otherwise, understand the typing and find an elegant fix.?? "" is when the UI requires an empty string.as SomeType) are often a sign of misunderstood typing.any and find the proper type. When any is truly needed, add a comment explaining why.ReturnType<T> or Parameters<T> if you can import the actual type.SomeType["someMemberName"] if you can import the actual type.The following comment must be removed:
// Create a new task
createANewTask();Other examples of inline comments that are obvious and must be removed:
// Validate that there is a file
if (!file) throw new ApiError(400);
// Validate and parse the request body according to the expected schema
const validated = UploadBodyAT.assert(body);JSDoc comments should only be used when they add meaningful information. Example of a comment that must be entirely removed because everything is obvious:
/**
* This function adds two numbers
* @param a - The first number
* @param b - The second number
* @returns The sum of the two numbers
*/
function addTwoNumbers(a: number, b: number) {
return a + b;
}~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.