skills/artisan-edge/add-core-function/SKILL.md
Add new core business logic functions to Catalyst-Relay. Use when creating pure functions, ADT operations, or library-consumable code.
npx skillsauth add aiskillstore/marketplace add-core-functionInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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()
└── ...
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// 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 getPackages(
requestor: AdtRequestor,
filter?: string
): AsyncResult<Package[]> {
// Implementation
const response = await requestor.get('/packages', { params: { filter } });
if (response.error) {
return [null, response.error];
}
return [parsePackages(response.data), null];
}
// Internal helper (not exported)
function parsePackages(xml: string): Package[] {
// ...
}
Use Go-style error tuples:
import type { AsyncResult } from '../../../types/result';
// Returns [data, null] on success, [null, error] on failure
export async function someOperation(): AsyncResult<Data> {
// ...
}
Add to index.ts for public API:
// src/core/adt/index.ts
// Types
export type { AdtRequestor, ObjectConfig } from './types';
// Discovery
export { getPackages } from './discovery/packages';
export { getTree } from './discovery/tree';
// CRAUD
export { readObject } from './craud/read';
export { createObject } from './craud/create';
Helpers not exported from barrel go in helpers.ts:
// src/core/adt/helpers.ts
import type { AdtRequestor } from './types';
// Internal - not exported from index.ts
export function buildObjectUri(name: string, extension: string): string {
// ...
}
- [ ] Create function file in src/core/{domain}/{subfolder}/
- [ ] Define types at top of file or in ../types.ts
- [ ] Use AsyncResult return type for async functions
- [ ] Follow import hierarchy (no circular deps)
- [ ] Export from index.ts if public API
- [ ] Put internal helpers in helpers.ts
- [ ] Run typecheck: bun run typecheck
development
Apple Human Interface Guidelines for content display components. Use this skill when the user asks about charts component, collection view, image view, web view, color well, image well, activity view, lockup, data visualization, content display, displaying images, rendering web content, color pickers, or presenting collections of items in Apple apps. Also use when the user says how should I display charts, what's the best way to show images, should I use a web view, how do I build a grid of items, what component shows media, or how do I present a share sheet. Cross-references: hig-foundations for color/typography/accessibility, hig-patterns for data visualization patterns, hig-components-layout for structural containers, hig-platforms for platform-specific component behavior.
tools
Automate HelpDesk tasks via Rube MCP (Composio): list tickets, manage views, use canned responses, and configure custom fields. Always search tools first for current schemas.
testing
Expert Haskell engineer specializing in advanced type systems, pure functional design, and high-reliability software. Use PROACTIVELY for type-level programming, concurrency, and architecture guidance.
tools
GraphQL gives clients exactly the data they need - no more, no less. One endpoint, typed schema, introspection. But the flexibility that makes it powerful also makes it dangerous. Without proper controls, clients can craft queries that bring down your server. This skill covers schema design, resolvers, DataLoader for N+1 prevention, federation for microservices, and client integration with Apollo/urql. Key insight: GraphQL is a contract. The schema is the API documentation. Design it carefully.