Hubify/Docs/API
Hubify Docs

.hub Format

Complete specification for .hub manifest files

.hub Format

The .hub file is the manifest that defines a skill. This page documents the complete specification.

File Location

The .hub file should be at the root of your skill directory:

my-skill/
├── .hub           # Manifest file
├── prompt.md      # Optional: separate prompt file
└── examples/      # Optional: example files

Minimal Example

name: my-skill
version: 0.1.0
category: coding
description: A brief description
prompt: |
  Your skill instructions here...

Complete Specification

Core Fields

FieldTypeRequiredDescription
namestringYesUnique skill identifier
versionstringYesSemver version (e.g., "1.0.0")
categorystringYesSkill category
descriptionstringYesBrief description (max 200 chars)
promptstringYes*Skill instructions
prompt_filestringNoPath to external prompt file

*Either prompt or prompt_file is required.

Metadata Fields

FieldTypeRequiredDescription
authorstringNoAuthor identifier (@username)
licensestringNoLicense (MIT, Apache-2.0, etc.)
homepagestringNoURL to documentation
repositorystringNoSource repository URL

Platform & Targeting

FieldTypeRequiredDescription
platformsstring[]NoSupported platforms
use_casesstring[]NoWhen to use this skill
tagsstring[]NoSearchable tags

Dependencies

FieldTypeRequiredDescription
dependencies.requiresstring[]NoSkills that must be installed
dependencies.extendsstring[]NoSkills this builds upon
dependencies.integrates_withstring[]NoCompatible skills
dependencies.conflicts_withstring[]NoIncompatible skills

Tools

FieldTypeRequiredDescription
tools.requiredstring[]NoRequired tool integrations
tools.optionalstring[]NoOptional tool integrations

Evolution

FieldTypeRequiredDescription
evolution.min_executionsnumberNoMin executions before evolution
evolution.confidence_thresholdnumberNoMin confidence to trigger
evolution.manual_approvalbooleanNoRequire author approval
evolution.canary_durationnumberNoCanary test duration (hours)
evolution.scopestring[]NoAllowed evolution types

Examples

FieldTypeRequiredDescription
examplesobject[]NoUsage examples
examples[].titlestringYesExample title
examples[].promptstringYesUser prompt
examples[].expectedstringYesExpected outcome

Full Example

# Skill identity
name: typescript-strict-mode
version: 1.2.0
category: coding

# Metadata
author: "@houstongolden"
license: MIT
homepage: https://hubify.com/skills/typescript-strict-mode
repository: https://github.com/hubify/skills

# Description
description: |
  Enforce strict TypeScript configuration for improved type safety

# Targeting
platforms:
  - claude-code
  - cursor
  - windsurf

use_cases:
  - Configure tsconfig.json for strict mode
  - Add strict type checking rules
  - Enforce null checks
  - Migrate existing projects to strict TypeScript

tags:
  - typescript
  - configuration
  - type-safety
  - tsconfig

# Dependencies
dependencies:
  requires: []
  extends:
    - typescript-base-config
  integrates_with:
    - eslint-typescript
    - prettier-config
  conflicts_with:
    - typescript-loose-mode

# Tools
tools:
  required: []
  optional:
    - github  # For PR integration

# Evolution settings
evolution:
  min_executions: 100
  confidence_threshold: 0.85
  manual_approval: false
  canary_duration: 48
  scope:
    - prompt_refinement
    - example_addition
    - platform_compatibility

# The prompt
prompt: |
  When setting up TypeScript strict mode, follow these guidelines:

  ## Step 1: Enable Strict Mode

  Add or update your `tsconfig.json`:

  ```json
  {
    "compilerOptions": {
      "strict": true,
      "noUncheckedIndexedAccess": true,
      "exactOptionalPropertyTypes": true,
      "noImplicitReturns": true,
      "noFallthroughCasesInSwitch": true,
      "noImplicitOverride": true
    }
  }

Step 2: Handle Existing Errors

For existing projects with many type errors:

  1. Start with strict: false
  2. Enable flags incrementally
  3. Use // @ts-expect-error sparingly

Step 3: Configure ESLint

Add TypeScript ESLint for runtime checks:

npm install -D @typescript-eslint/parser @typescript-eslint/eslint-plugin

Examples

examples:

  • title: "New Next.js Project" prompt: "Set up strict TypeScript for my new Next.js app" expected: "Configure tsconfig.json with all strict flags enabled"

  • title: "Existing Project Migration" prompt: "Migrate my existing project to strict TypeScript" expected: "Provide incremental migration strategy"

  • title: "Monorepo Setup" prompt: "Configure strict TypeScript for a Turborepo monorepo" expected: "Set up base tsconfig with strict mode, extend in packages"


## Field Details

### name

Must be lowercase, alphanumeric with hyphens. 3-50 characters.

```yaml
# Valid
name: my-skill
name: typescript-strict-mode-v2

# Invalid
name: My Skill        # No spaces
name: mySkill         # No camelCase
name: ab              # Too short

version

Must follow semantic versioning:

version: 1.0.0    # Major.Minor.Patch
version: 0.1.0    # Pre-release
version: 2.0.0-beta.1  # Pre-release tag

category

One of the allowed categories:

category: coding        # Programming patterns
category: workflow      # Development workflows
category: documentation # Doc generation
category: testing       # Testing strategies
category: security      # Security practices
category: devops        # Deployment/infra
category: research      # Research/analysis

platforms

Supported AI agent platforms:

platforms:
  - claude-code
  - cursor
  - windsurf
  - copilot
  - cody
  - custom  # For custom implementations

prompt vs prompt_file

Either inline the prompt or reference an external file:

# Inline (recommended for short prompts)
prompt: |
  Your instructions here...

# External file (recommended for long prompts)
prompt_file: ./prompt.md

CLI Commands

Create .hub

hubify hub init

Interactive wizard to create a .hub file.

Validate

hubify hub validate ./my-skill

View Info

hubify hub info ./my-skill

Update Hashes

hubify hub update ./my-skill

Updates content hashes for integrity verification.

Best Practices

Keep the .hub file focused on metadata. Put long prompts in a separate prompt.md file.

Organization

my-skill/
├── .hub              # Metadata only
├── prompt.md         # Main prompt
├── examples/
│   ├── basic.md
│   └── advanced.md
└── README.md         # For humans

Versioning

Bump versions appropriately:

  • Patch (0.0.X): Typos, minor clarifications
  • Minor (0.X.0): New examples, additional cases
  • Major (X.0.0): Core prompt changes, breaking changes

Next Steps