add-core-function
Add new core business logic functions to Catalyst-Relay. Use when creating pure functions, ADT operations, or library-consumable code.
Best use case
add-core-function is best used when you need a repeatable AI agent workflow instead of a one-off prompt. It is especially useful for teams working in multi. Add new core business logic functions to Catalyst-Relay. Use when creating pure functions, ADT operations, or library-consumable code.
Add new core business logic functions to Catalyst-Relay. Use when creating pure functions, ADT operations, or library-consumable code.
Users should expect a more consistent workflow output, faster repeated execution, and less time spent rewriting prompts from scratch.
Practical example
Example input
Use the "add-core-function" skill to help with this workflow task. Context: Add new core business logic functions to Catalyst-Relay. Use when creating pure functions, ADT operations, or library-consumable code.
Example output
A structured workflow result with clearer steps, more consistent formatting, and an output that is easier to reuse in the next run.
When to use this skill
- Use this skill when you want a reusable workflow rather than writing the same prompt again and again.
When not to use this skill
- Do not use this when you only need a one-off answer and do not need a reusable workflow.
- Do not use it if you cannot install or maintain the related files, repository context, or supporting tools.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/add-core-function/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How add-core-function Compares
| Feature / Agent | add-core-function | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Add new core business logic functions to Catalyst-Relay. Use when creating pure functions, ADT operations, or library-consumable code.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# 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 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[] {
// ...
}
```
## Return Type Convention
Use Go-style error tuples:
```typescript
import type { AsyncResult } from '../../../types/result';
// Returns [data, null] on success, [null, error] on failure
export async function someOperation(): AsyncResult<Data> {
// ...
}
```
## Barrel Exports
Add to `index.ts` for public API:
```typescript
// 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';
```
## Internal Helpers
Helpers not exported from barrel go in `helpers.ts`:
```typescript
// src/core/adt/helpers.ts
import type { AdtRequestor } from './types';
// Internal - not exported from index.ts
export function buildObjectUri(name: string, extension: string): string {
// ...
}
```
## Checklist
```
- [ ] 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
```Related Skills
azure-functions
Expert patterns for Azure Functions development including isolated worker model, Durable Functions orchestration, cold start optimization, and production patterns. Covers .NET, Python, and Node.js programming models. Use when: azure function, azure functions, durable functions, azure serverless, function app.
writing-lib-functions
Use this skill when you need to write lib functions in `srs/lib` for the Next.js app
functional-patterns
Functional programming patterns that promote testability, composability, and maintainability.
when-validating-code-works-use-functionality-audit
Validates that code actually works through sandbox testing, execution verification, and systematic debugging. Use this skill after code generation or modification to ensure functionality is genuine rather than assumed. The skill creates isolated test environments, executes code with realistic inputs, identifies bugs through systematic analysis, and applies best practices to fix issues without breaking existing functionality.
functionality-audit
Validates that code actually works through sandbox testing, execution verification, and systematic debugging. Use this skill after code generation or modification to ensure functionality is genuine rather than assumed. The skill creates isolated test environments, executes code with realistic inputs, identifies bugs through systematic analysis, and applies best practices to fix issues without breaking existing functionality. This ensures code delivers its intended behavior reliably.
core-components
Core component library and design system patterns. Use when building UI, using design tokens, or working with the component library.
vueuse-functions
Apply VueUse composables where appropriate to build concise, maintainable Vue.js / Nuxt features.
core-development
Work on the core package (types, validation, normalization, diff). Use when modifying DSL processing logic or data flow.
azure-quotas
Check/manage Azure quotas and usage across providers. For deployment planning, capacity validation, region selection. WHEN: "check quotas", "service limits", "current usage", "request quota increase", "quota exceeded", "validate capacity", "regional availability", "provisioning limits", "vCPU limit", "how many vCPUs available in my subscription".
raindrop-io
Manage Raindrop.io bookmarks with AI assistance. Save and organize bookmarks, search your collection, manage reading lists, and organize research materials. Use when working with bookmarks, web research, reading lists, or when user mentions Raindrop.io.
zlibrary-to-notebooklm
自动从 Z-Library 下载书籍并上传到 Google NotebookLM。支持 PDF/EPUB 格式,自动转换,一键创建知识库。
discover-skills
当你发现当前可用的技能都不够合适(或用户明确要求你寻找技能)时使用。本技能会基于任务目标和约束,给出一份精简的候选技能清单,帮助你选出最适配当前任务的技能。