Forge Load banner
N4M3Z N4M3Z

Forge Load

Development community

Description

Lazy skill loading library for non-Claude-Code providers — part of the forge module framework

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

forge-load

Lazy loading of skill metadata for non-Claude-Code providers. Provides `load_context` and `load_user_content` functions that session-start hooks source for metadata emission.

How It Works

Claude Code discovers skills natively via SKILL.md frontmatter. Other providers (OpenCode, Cursor) need session-start hooks to emit skill metadata. forge-load provides the loading infrastructure.

**Config mode**: When a module has config.yaml or defaults.yaml, reads system/user content paths and metadata field mapping from config.

**Convention mode**: When no config file exists, reads `module.yaml → metadata:` for field mapping and auto-discovers `skills/*/SKILL.md`. No config required.

Usage

Source from a module's session-start.sh:

FORGE_LOAD="${FORGE_ROOT:-$PROJECT_ROOT}/Modules/forge-load/src"
if [ -f "$FORGE_LOAD/load.sh" ]; then
  source "$FORGE_LOAD/load.sh"
  load_context "$MODULE_ROOT" "$PROJECT_ROOT" --index-only
fi

Functions

Function Purpose
load_context Load system + user content with metadata transformation
load_user_content Load only user content (frontmatter stripped)
transform_front Transform frontmatter per field mapping
strip_front Strip frontmatter and H1 heading

Not in forge.yaml

forge-load has no events — it's a passive library discovered by path convention (`$FORGE_ROOT/Modules/forge-load/src/load.sh`). Modules source it when needed.