add-core-functionlisted
Install: claude install-skill aiskillstore/marketplace
# Adding Core Functions
## When to Use
- Creating new ADT operations (CRAUD, discovery, preview)
- Adding pure business logic functions
- Implementing library-consumable functionality
## One Function Per File
Each core function gets its own file. No multi-function files.
**Location:** `src/core/{domain}/{function}.ts`
```
core/adt/
├── index.ts # Barrel exports
├── types.ts # Shared types (AdtRequestor, ObjectConfig)
├── helpers.ts # Internal helpers (not exported from barrel)
│
├── craud/
│ ├── read.ts → readObject()
│ ├── create.ts → createObject()
│ └── ...
│
└── discovery/
├── packages.ts → getPackages()
└── ...
```
## Import Hierarchy
Files must follow this hierarchy (no circular dependencies):
```
types.ts (shared types, no imports from package)
↓
helpers.ts (internal utilities, imports types)
↓
subfolder files (import ../types and ../helpers)
↓
index.ts (barrel exports, imports from subfolders)
```
**Relative path patterns:**
- `../types` — shared types
- `../helpers` — shared helpers
- `../../utils/xml` — core utilities
- `../../../types/result` — global types
## Function File Pattern
```typescript
// src/core/adt/discovery/packages.ts
import type { AdtRequestor } from '../types';
import type { AsyncResult } from '../../../types/result';
export interface Package {
name: string;
description: string;
}
export async function getPack