paralleldrive/aidd/aidd-namespace

Claude Code and agent skill by paralleldrive/aidd

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Ensures types and related functions are authored and consumed in a modular, discoverable, tree-shakeable pattern. Use when creating types, refactoring type folders, defining schemas, importing types, or when the user mentions type namespaces, constants, or Schema.ToType.

Install

npx vskill@latest install paralleldrive/aidd/aidd-namespace

SKILL.md

Type namespace pattern

Single import surface per type: <type-name>/<type-name>.ts. Each constant or function lives in <exported-name>.ts; namespace re-export from public.js. Types live in the types/ layer per structure.

Precedence: This skill defines the canonical pattern. Existing files may not yet follow it; all new work and changes must conform. Do not copy legacy structure when adding or editing code.

File naming (utilities and constants)

Inside a type folder, name each file after the single export it provides. The folder already identifies the type, so no type prefix in the filename.

sudolang
NamespaceFileNaming {
typeEntry: "<type-name>.ts — type alias and namespace re-export"
utilityOrConstant: "<exported-name>.ts — one file per exported function or constant; filename = export name"
}
Constraints {
Do not use <type-name>-<exported-name>.ts for children; <exported-name>.ts is sufficient
}

Example: under types/point/, files length.ts, add.ts, and normalize.ts each export the like-named function.

Constant types

sudolang
ConstantVisibility {
private: "Single-file only, not exported"
exported: "Sole export from eponymous file"
public: "Re-exported from public.ts"
internal: "Exported, not in public.ts"
}

Constraints

sudolang
Constraints {
"<type-name>/<type-name>.ts" is the only public import surface
Export a single type alias: "export type <type-name> = <type>"
Export namespace: "export * as <type-name> from \"./public.js\""
In public.ts re-export every public constant file
Child files: <exported-name>.ts (one export per file; filename matches export)
}

Consumers

sudolang
Consumers {
never: [
"Import from public.js outside the type namespace folder",
"Import from any child file (e.g. schema.js, length.js) outside the type namespace folder"
]
do: [
"import from <type-name>.ts only; e.g. Volume from \"../../types/volume/volume.js\"",
"Access constants via the namespace: TypeName.length, etc."
]
}

Extending external types

When authoring helper functions for external types (e.g. String), use StringX as the discoverable extension namespace name.

Type derived from schema

Only for types whose source of truth is a schema. Most types do not; use a normal type alias. When the type is schema-backed, either derive it from the schema or keep a hand-written alias (e.g. for better JSDoc) and assert it matches the schema at compile time.

Option A — derive from schema:

src/types/player-mark/schema.ts

ts
export const schema = { enum: ["X", "O"] } as const;

src/types/player-mark/public.ts

ts
export { schema } from "./schema.js";

src/types/player-mark/player-mark.ts

ts
import { Schema } from "@adobe/data/schema";
import { schema } from "./schema.js";
export type PlayerMark = Schema.ToType<typeof schema>;
export * as PlayerMark from "./public.js";

Option B — hand-written object type with compile-time assertion: Use when you want property-level JSDoc. From @adobe/data/types, use Assert<Equal<YourType, Schema.ToType<typeof schema>>> so the type stays in sync with the schema.

ts
import { Assert, Equal } from "@adobe/data/types";
import { Schema } from "@adobe/data/schema";
import { schema } from "./schema.js";
export type Bounds = {
/** Left edge in world units. */
x: number;
/** Top edge in world units. */
y: number;
/** Width in world units. */
width: number;
/** Height in world units. */
height: number;
};
type _CheckSameType = Assert<Equal<Bounds, Schema.ToType<typeof schema>>>;
export * as Bounds from "./public.js";

Testing

sudolang
Constraints {
Give each function file its own <same-name>.test.ts unit test
}

Execute

sudolang
fn whenRefactoringToNamespace() {
Constraints {
Identify constants in the current file
Extract them into the standard pattern
Identify all consumers of public namespaces
Check each consumer: imports use <type-name>.ts only, never public.js or individual child files
Ensure unit tests exist per function file, splitting as needed
}
}

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
387
Repository forks
33
Repository npm downloads, 7 days
945
7-day trend score
46

Stars and forks are for the whole GitHub repository, not this skill alone. Downloads are for the repository's npm package. Refreshed 28 Apr 2026, 6 months ago.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/paralleldrive/aidd/aidd-namespace/badge)](https://verified-skill.com/skills/paralleldrive/aidd/aidd-namespace)

Something wrong with this skill or its page? Tell us.