Guides TypeScript + React frontend work with component boundaries, state placement (server/client/URL), and a staged delivery workflow. Use when building, refactoring, reviewing a diff or pull request, consulting on, or writing one Jira card or the child tasks of one epic or story for a TypeScript + React frontend — including vague build prompts like "make a todo app" or "add a settings page" — for custom hooks or feature-sliced structure, or for the /compforge:craft, /compforge:refactor, /co...
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of compforge?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/loosung-compforge-compforge)
---
name: compforge
description: Guides TypeScript + React frontend work with component boundaries, state placement (server/client/URL), and a staged delivery workflow. Use when building, refactoring, reviewing a diff or pull request, consulting on, or writing one Jira card or the child tasks of one epic or story for a TypeScript + React frontend — including vague build prompts like "make a todo app" or "add a settings page" — for custom hooks or feature-sliced structure, or for the /compforge:craft, /compforge:refactor, /compforge:consult, /compforge:test, /compforge:crucible, /compforge:review, and /compforge:jira prompts.
license: MIT
compatibility: Claude Code, Codex CLI, Cursor Agent, and Agent Skills-compatible clients with access to the complete Compforge pack.
metadata:
stability: stable
---
# Compforge
When a Compforge invocation contains `COMPFORGE_ACTIVATION_PROBE`, output these
three lines and stop without reading supporting files:
```text
COMPFORGE_LOADED
Assumptions
Component Contract
```
Use this skill when the user asks for Compforge, component architecture, state management design, disciplined React implementation, or the `/compforge:craft` prompt — and also for everyday frontend build requests in TypeScript + React (e.g. "make a dashboard", "add a login form"), so they are governed instead of free-formed.
**Stack scope:** Compforge targets **TypeScript + React** frontends (Vite or Next.js). Vue is **outside the 1.x support scope** — do not claim it works or that it is coming. If a request leaves the stack unspecified, steer the user to TypeScript + React rather than picking silently. If it targets an unsupported stack (Vue, Angular, Svelte, plain JS, mobile-native, backend), tell the user Compforge does not apply there; only build it as a plain (non-Compforge) task if the user explicitly insists. See `lang/frontend-stack.md`.
## The ladder
One thing to remember before any frontend change: **decide what not to write, then where state lives.** The eight rungs, and what is never cut to save lines (loading/error/empty states, accessibility, focus and keyboard paths, validation), are in `principles/component-discipline.md`.
## Command Routing
Treat **`/compforge:craft`** as the default Compforge entry point on **Claude Code**. Use **`/compforge:refactor`** for explicit behavior-preserving cleanup, **`/compforge:consult`** for advice, proposals, review, or explicit planning documents without implementation changes, **`/compforge:test`** to verify, write, or strengthen hook and component tests without changing production behavior, **`/compforge:crucible`** to run plan → build → refactor → test in one request, **`/compforge:review`** for prioritized findings on one finished diff, branch, or pull request without changing code, and **`/compforge:jira`** to write one Jira work card, or the child tasks of one existing epic or story, without touching code.
On **Codex CLI**, do not type Compforge `/` commands at the composer — Codex reserves `/` for built-in commands. Use `/skills` → **compforge**, then `craft: …`, `refactor: …`, `consult: …`, `test: …`, `crucible: …`, `review: …`, or `jira: …` (no leading `/`).
On **Cursor Agent CLI**, pass `--plugin-dir` (or the project-local skill plus
`--add-dir`) as in `{pack}/docs/setup/cursor.md`, then prompt
`Use Compforge craft: …`, `Use Compforge refactor: …`,
`Use Compforge consult: …`, `Use Compforge test: …`, `Use Compforge review: …`, or
`Use Compforge jira: …`.
## Project vs pack (paths)
- **Pack** — `$COMPFORGE_HOME`, then `~/.compforge`; when loaded as a Claude
Code plugin, the plugin root (the parent of this `skills/` directory); when
maintaining Compforge itself, the repository checkout is the final fallback.
This is not where user app code lives.
- **Skill references** — paths such as `workflow/...` and `react/...` resolve from `{pack}/skills`; paths prefixed with `{pack}` resolve from the pack root.
- **Target project** — the repo the user is working on; start the agent **from this directory**.
- **Compforge maintenance** — if the user asks to change Compforge itself, the pack repository is the work target; do not reject it as the wrong directory.
- User file paths (`docs/foo.md`, `@path`, absolute paths) resolve against the confirmed work target. For app work this is the target project, never the pack. If missing, ask for an absolute path — do not search only under `~/.compforge`.
| Prompt | Read first | Output |
|---|---|---|
| `/compforge:craft …` (Claude) or `Use Compforge craft: …` (Codex/Cursor) | `workflow/craft.md` + `workflow/gates.md` + `principles/component-discipline.md` | select the smallest frontend path; execute unless advisory only |
| `/compforge:refactor …` (Claude) or `Use Compforge refactor: …` (Codex/Cursor) | `workflow/refactor.md` + `workflow/gates.md` + `principles/component-discipline.md` | preserve behavior while improving one structural decision |
| `/compforge:consult …` (Claude) or `Use Compforge consult: …` (Codex/Cursor) | `workflow/consult.md` | answer, propose, review, or explicitly write one planning document without implementation changes |
| `/compforge:test …` (Claude) or `Use Compforge test: …` (Codex/Cursor) | `workflow/test.md` + `workflow/gates.md` | verify, write, or strengthen hook and component tests; production behavior unchanged |
| `/compforge:crucible …` (Claude) or `Use Compforge crucible: …` (Codex/Cursor) | `workflow/crucible.md` + `workflow/gates.md`; each stage's file read on entry | Consult plan → stop for approval → Craft → Refactor when earned → Test gap pass; one report |
| `/compforge:review …` (Claude) or `Use Compforge review: …` (Codex/Cursor) | `workflow/review.md` | P1/P2/P3 findings on one diff, branch, or pull request at a recorded base commit; posts only on explicit request |
| `/compforge:jira …` (Claude) or `Use Compforge jira: …` (Codex/Cursor) | `workflow/jira-card.md`; `workflow/jira-children.md` for the children of one existing epic or story | one card, or that parent's `[F.E]` `[B.E]` `[AI]` `[DOC]` tasks; writes to Jira only on explicit request |
Use Craft as the default when the user does not know which path fits. Existing Craft refactor and advisory requests remain valid; the explicit commands narrow authorization. Do not force the full Discovery→Test pipeline for small, focused tasks.
Natural language also works, for example: "Use Compforge Discovery for the checkout flow."
## Workflow Rules
1. Read the routed workflow file before producing output. After context
compaction, read it again before the next step: files read earlier in the
session are not re-attached.
2. Read only the relevant React or stack skill files needed for the task.
3. For `/compforge:craft`, follow `workflow/craft.md`; it owns classification, the Component Contract, and the execution path. `workflow/gates.md` owns startup, plan input, verification, and the completion report for Craft, Refactor, Test, and Crucible.
4. For an explicit Refactor request, use the `workflow/gates.md` gates, select `workflow/refactor.md` without reclassification, and preserve behavior.
5. For Consult, follow `workflow/consult.md`; default to read-only and write one planning document only after explicit document wording.
6. For an explicit Test request, use the `workflow/gates.md` gates, select `workflow/test.md` without reclassification, and do not change production behavior.
7. For Crucible, follow `workflow/crucible.md`; it runs the existing workflows in order and stops for plan approval.
8. For Review, follow `workflow/review.md`; report findings on one change and change nothing.
9. For Jira, follow `workflow/jira-card.md` for one issue. When the request creates the children of an existing epic or story, follow `workflow/jira-children.md` instead. Change nothing else.
10. Keep the normal order for new work: Discovery -> Design -> Delivery Plan -> Skeleton -> Implement -> Test.
11. Ask for human approval before moving from one workflow stage to the next.
12. Do not merge planning, implementation, and verification in a single step unless the user explicitly asks.
## Supporting Skills
Delivery stages, in order: `workflow/discovery.md` → `workflow/design.md` →
`workflow/delivery-plan.md` → `workflow/skeleton.md` → `workflow/implement.md` →
`workflow/test.md`. Resume and session cut: `workflow/continuity.md`.
Core React:
- Component boundary: `react/component-boundary.md`
- State placement (server/client/URL): `react/state-placement.md`
- Hooks discipline (custom hooks, effects): `react/hooks-discipline.md`
Stack and skeleton:
- Stack selection (Vite or Next.js; feature vs feature-sliced): `lang/frontend-stack.md`
- Folder structure / skeleton: `skeleton/frontend-skeleton.md`
- Lint enforcement (ESLint zones / steiger): `skeleton/lint-enforcement.md`
- Hard Rules (MUST / SHOULD / NEVER): `principles/hard-rules.md`
Playbooks:
- Feature: `playbooks/feature.md`
- Bug fix: `playbooks/bug-fix.md`
Anti-patterns:
- God component: `antipatterns/god-component.md`
- useEffect abuse: `antipatterns/useeffect-abuse.md`
- Prop drilling: `antipatterns/prop-drilling.md`
Consultation (experimental): `workflow/consult.md`
Review (experimental): `workflow/review.md`
Jira card (experimental): `workflow/jira-card.md`
Jira children (experimental): `workflow/jira-children.md`
1.x direction and non-goals: `{pack}/docs/project/direction.md`