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.
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.
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| 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 |
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.