open-index/open-npm huggingface dataset:
npm package: @skills-hub-ai/shared
Description: Shared constants, Zod schemas, and TypeScript types for the [skills-hub.ai](https://skills-hub.ai) platform.
Latest version: 0.2.1

# @skills-hub-ai/shared

Shared constants, Zod schemas, and TypeScript types for the [skills-hub.ai](https://skills-hub.ai) platform.

This is an internal library used by `@skills-hub-ai/cli`, `@skills-hub-ai/mcp`, and the skills-hub API. You probably don't need to install this directly.

## What's Inside

### Constants

- **Categories** — 13 skill categories (build, test, qa, review, deploy, docs, security, ux, analysis, productivity, integration, combo, meta)
- **Platforms** — CLAUDE_CODE, CURSOR, CODEX_CLI, OTHER
- **Visibility** — PUBLIC, PRIVATE, UNLISTED, ORG
- **Scoring** — Quality score breakdown (schema + instruction scoring)
- **Organization** — Roles, limits, invite expiry
- **Moderation** — Trust levels, report limits
- **Sandbox** — Free/pro tier limits for skill execution
- **Pagination** — Default and max page sizes

### Schemas (Zod)

Validation schemas for all API inputs: skills, versions, reviews, installs, media, organizations, agents, reports, auth, and users.

### Types

TypeScript types for all API responses: users, skills, reviews, sandbox runs, agents, organizations, reports, and pagination.

## Usage

```ts
import {
  CATEGORIES,
  PLATFORMS,
  createSkillSchema,
} from "@skills-hub-ai/shared";

const result = createSkillSchema.safeParse(input);
```

## Links

- [GitHub](https://github.com/tinh2/skills-hub)
- [skills-hub.ai](https://skills-hub.ai)
npm package: @skills-hub-ai/skill-parser
Description: Parser for SKILL.md files — extracts YAML frontmatter and instructions from the skills-hub skill format.
Latest version: 0.2.2

# @skills-hub-ai/skill-parser

Parser for SKILL.md files — extracts YAML frontmatter and instructions from the skills-hub skill format.

This is an internal library used by `@skills-hub-ai/cli`, `@skills-hub-ai/mcp`, and the skills-hub API.

## Usage

```ts
import { parseSkillMd } from "@skills-hub-ai/skill-parser";

const result = parseSkillMd(`---
name: My Skill
description: Does something useful
version: 1.0.0
category: code-quality
platforms:
  - claude-code
---

Your skill instructions here.
`);

if (result.success) {
  console.log(result.skill.name); // "My Skill"
  console.log(result.skill.instructions); // "Your skill instructions here."
}
```

## Exports

### `parseSkillMd(content: string): ParseResult`

Parses a SKILL.md file. Returns `{ success, skill?, errors[] }`.

**Required fields:** name, description, version
**Optional fields:** category (validated against known slugs), platforms (normalized to uppercase)

### `validateSemver(version: string): boolean`

Validates that a string matches `X.Y.Z` semver format.

### `compareSemver(a: string, b: string): number`

Compares two semver strings. Returns -1, 0, or 1.

### OpenFang support

```ts
import {
  translateToHand,
  serializeHandToml,
} from "@skills-hub-ai/skill-parser/openfang";

const hand = translateToHand(skill);
const toml = serializeHandToml(hand);
```

Converts SKILL.md format to OpenFang HAND.toml for agent execution.

## Links

- [GitHub](https://github.com/tinh2/skills-hub)
- [skills-hub.ai](https://skills-hub.ai)