# Forgebuild

> Create, convert, assemble, or build portable NexusOS procedures, skills, and plugin bundles using the canonical FORGEBUILD v2.1 procedure. Use when Pafi says forgebuild, forge/build a procedure, create a reusable workflow, turn a procedure into a skill, build a plugin/skill bundle, or standardize a skill across Codex/Claude runtimes. ANTI-PATTERN: Do not use for one-off task execution, ordinary code edits, or prompt optimization.

- Skill: `cryptopafi/forgebuild` (Agent Skill)
- Install (CLI): `npx skillmds@latest add cryptopafi/forgebuild`
- Raw SKILL.md: https://api.skillmd.com/api/skills/cryptopafi/forgebuild/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: cryptopafi (https://skillmd.com/u/cryptopafi)
- Updated: 2026-09-21
- Page: https://skillmd.com/skills/cryptopafi/forgebuild

---


# FORGEBUILD

Use this skill to apply the canonical NexusOS FORGEBUILD procedure from:

- `/Users/pafi/.nexus/procedures/FORGEBUILD.md`
- GitHub mirror: `cryptopafi/nexus:procedures/FORGEBUILD.md`

Do not use the obsolete exported `forge` skill as authority when it points to `FORGE.md` or `forge_version: 1.4`. Treat that as legacy context only. The live standard is FORGEBUILD v2.1.

## Workflow

1. Read the relevant section of `/Users/pafi/.nexus/procedures/FORGEBUILD.md`.
2. Choose the path:
   - `CREATE`: new NexusOS procedure.
   - `CONVERT`: existing procedure into a skill/plugin.
   - `ASSEMBLE`: full plugin bundle with skills, commands, hooks, docs, and metadata.
   - `PORTABLE-SKILL`: one shared skill core with runtime-specific targets and generated SKILL.md outputs.
3. If the output is a skill, run the mandatory `SKILL-SEARCH` gate before building from scratch.
4. If no duplicate skill exists, run the mandatory `COMPONENT-REUSE` scan before new build work.
5. Create only the minimum procedure/skill/plugin files required for the task.
6. Validate with the relevant validator before delivery.
7. Save meaningful discoveries or deliverables to Cortex and record a short Genie handoff.

## Portable Skill Path

Use `PORTABLE-SKILL` when a skill needs runtime-native frontmatter across Codex, Claude Code, Hermes, or OpenClaw-compatible targets.

Required structure:

```text
skills-src/<skill>/
├── SKILL.core.md
├── targets/<runtime>/frontmatter.yaml
└── build/<runtime>/SKILL.md
```

Run the deterministic helper when available:

```bash
python3 /Users/pafi/.nexus/scripts/forgebuild-portable-skill.py lint /path/to/skills-src/<skill>
python3 /Users/pafi/.nexus/scripts/forgebuild-portable-skill.py build /path/to/skills-src/<skill>
```

Rules:
- Do not create a separate `skillforge` skill. `skillforge` is only an internal implementation name if needed.
- Keep `SKILL.core.md` runtime-neutral.
- Keep model IDs and runtime paths in `targets/<runtime>/frontmatter.yaml` or wrappers.
- Generated `build/<runtime>/SKILL.md` files are outputs; do not hand edit them.

## Mandatory Gates

### Skill Search

Before creating a new skill, search:

- `/Users/pafi/.codex/skills`
- `/Users/pafi/.agents/skills`
- `/Users/pafi/.claude/plugins`
- `/Users/pafi/.nexus/library/repos/nexusos-skills`
- `/Users/pafi/.nexus/library/repos/nexusos-plugins`
- `cryptopafi/nexus` and `cryptopafi/claude-plugins` through `gh` when local sources are insufficient
- Cortex `procedures` collection for `skill:<name>` or related workflow names

If a matching skill exists, prefer import/adapt over rebuilding.

### Component Reuse

If no duplicate exists, search for reusable pieces:

- Browser/web extraction skills.
- Cortex store/search skills.
- Reporter/output skills.
- Audit/critic skills.
- Domain-specific skills relevant to the requested workflow.

Reuse by dependency or narrow adaptation. Do not duplicate large existing workflows just to place them under a new skill name.

## Skill Creation Rules

- Use lowercase hyphen-case folder names.
- Keep `SKILL.md` concise; move long references into separate files only when they are directly useful.
- Frontmatter must include `name` and a trigger-rich `description`.
- Descriptions must include when to use the skill and at least one clear anti-pattern when appropriate.
- For portable skills, generated runtime frontmatter must stay provider-native: Codex targets do not use `claude-*`; Claude Code targets do not use `gpt-*`.
- Validate Codex skills with:

```bash
python3 /Users/pafi/.codex/skills/.system/skill-creator/scripts/quick_validate.py /Users/pafi/.codex/skills/<skill-name>
```

## When to Use vs Alternatives

- `forgebuild`: use for reusable procedures, skill conversion, plugin bundles, and persistent workflow standardization.
- `skill-creator`: use for Codex skill mechanics and validator expectations.
- `opt`: use only to optimize a prompt; do not execute the optimized task.
- `github`: use when repository metadata, issues, PRs, or GitHub API access is needed.

