Foundry

An open-source project from Horizon Foundry, created and maintained by Craig Martin.

Foundry is eleven Claude Code skills that turn fast, AI-built code into something you can ship. The flagship, production-audit, audits the whole application across eleven dimensions and ends in one verdict: safe to ship; ready to ship, risks noted; or do not ship. Every finding cites the code that motivated it, and a static run never claims a runtime result.

The proof is public: we audited Foundry with Foundry, fixed the risks the report found, and published it. Read the self-audit against this source.

Install

npx skills@latest add horizon-foundry/foundry

Pick the skills you want; they install as top-level commands. Then run one:

claude
/foundry check          # preview your release gates, read-only
/production-audit       # the whole-application audit and verdict

Or install from source, which symlinks every skill so it tracks the repo:

git clone https://github.com/horizon-foundry/foundry
cd foundry
make install

Update from source with git pull && make install; remove with make uninstall. An npx skills install is a one-time copy, so update it by re-running the install command. Requirements: Claude Code, and Node for npx skills (or git + make for the source path).

Version check

Each skill carries its version in its frontmatter, and at most once a day a skill run asks foundry.thehorizonfoundry.com/api/version for the current released version, telling you to re-run the install command when yours is older. The whole contract is enforced in the check command itself, in every skill's "Version check" section, not just promised here: the FOUNDRY_NO_VERSION_CHECK opt-out (set it to any non-empty value and the command exits before any network call), the daily rate limit via a stamp file at ~/.claude/.foundry-version-checked (the one file the skills write outside the skills directory; make uninstall does not remove it), a 10s timeout, and silence on any failure, so the check can never block a skill run. What the event records: the skill's name and its installed version, nothing else, with no user, machine, or install identity attached. Like any HTTPS request, the connection carries your IP address to the server; it is not recorded or attached to the event.

The skills

User-invoked (orchestration you type):

Skill What it does
foundry One pre-ship pass over the release gates your launch actually requires. check previews read-only, citing the records that exist; prepare closes the gaps; one independent audit delivers the verdict.
production-audit Audits the whole application, separates risks (which drive the verdict) from improvements (which never cap it), and ends in a verdict that names its evidence.
frame You declare the one-page product frame; the skill audits it like code. Blanks are findings, so a disciplined build cannot ship an unexamined idea.
feature-design You declare a feature's design; the skill audits it against the actual repository, file and line cited: behavior already built (or built and unreachable), call sites that do not exist, dependencies nothing produces.
scaffold Starts a project in the shape its profile needs, experiment through web product, and verifies no placeholder survives.
document Keeps the docs true to the code: repairs drift, flags suspected regressions, and renders the docs as a live surface so they cannot rot unseen.
mobile Reproduces the broken state before fixing anything, then walks a real device matrix and leaves the filled matrix as the record.
instrumentation Defines the funnel before the feature, keys every event on one identity model, and measures activation with a guardrail beside it.
readout Reviews the surfaces that display your numbers: pitched at a named reader with the detail one click down, a window and a population on every face, a failed read that never renders as a zero, and a rendered review by someone who did not build it.

Model-invoked (disciplines the agent applies itself):

Skill What it does
phase-plan Writes the next unit's plan while context is warm and indexes it, so the next session resumes instead of reconstructing.
brand-voice One voice from one approved source across every surface. Clarity outranks it.

Shared references: reference/doc-set-spec.md (the documentation architecture the skills enforce) and reference/skill-authoring.md (how the skills are written to resist being ignored). A named skill is invoked and followed, never hand-reproduced.

How it fits

Foundry is the outer loop: the release gate at the end of the build cycle. It composes with the inner-loop skills you already use to write and review code, and installs through the same channel. Six promises carry the suite, each kept by a skill: intent is declared and audited (frame), the design is checked against the code before it is built (feature-design), context survives every session (phase-plan), the outcome is instrumented (instrumentation), the docs match reality (document), and readiness is audited before real users arrive (foundry + production-audit).

You set the scope, not the bar. Which gates apply, the risk tier, and the risks you accept are your call, on the record. The severity rubric and the meaning of the verdict are fixed on purpose: a bar you could lower until it reads green is the false comfort an audit exists to replace.

Honest limits, stated plainly: the audit reads code and traces flows; it is not a penetration test, and anything it could not verify is listed in the report as not assessed.

Usage

/production-audit                # full audit: applicable dimensions from eleven, risks separated from improvements
/production-audit security       # one dimension (scoped posture, not a release verdict)
/production-audit --quick        # security + reliability triage
/production-audit --runtime      # add a live browser pass

Tech Stack

Layer Technology
Skills Claude Code skills (Markdown), installed user-global via symlink
Report contract JSON Schema
Site Next.js 16 (App Router), React 19, TypeScript, Tailwind CSS v4
Deploy Fly.io, Node 22 standalone Docker image

Local Development

# Install every skill user-global (symlinks into ~/.claude/skills)
make install

# Validate reports against the schema, bundled copies, and the version marker
make validate

# Site (Node 22+)
npm install
npm run dev          # localhost:3000
npm run lint
npm run build

# Local /reports testing needs the Supabase env (see .env.example); copy it to
# .env.local and add http://localhost:3000/auth/confirm to the Supabase
# project's redirect URL allowlist.

Building & Deployment

The site deploys to Fly.io as a Node 22 standalone Docker image (fly deploy). Audit reports live in reports/*.json and render through one shared template. The /reports index is public: a signed-out visitor sees the public example audits and a sign-in prompt, and a signed-in visitor also sees the reports whose meta.owner matches their email (ADMIN_EMAILS see all). Owned-report detail pages under /reports/[slug] are gated server-side (signed-out redirect, non-owner 404); public examples render ungated at /example/<slug>. Set three Fly secrets before sign-in works (fail-closed without them):

fly secrets set SUPABASE_URL="https://<ref>.supabase.co"
fly secrets set SUPABASE_ANON_KEY="<anon key>"
fly secrets set ADMIN_EMAILS="[email protected]"

Publishing a new audit: run /production-audit, copy the emitted JSON into reports/<project>-<date>.json, and deploy.

Site analytics (PostHog) are optional and off by default: without a key every capture no-ops. The browser key is a build arg (fly.toml [build.args] NEXT_PUBLIC_POSTHOG_KEY, public by design); the server reads POSTHOG_KEY at runtime. The event plan lives in CLAUDE.md.

Project Structure

foundry/
├── PRODUCT.md · BRAND.md · DESIGN.md   # forever spec · voice · looks
├── NOTES.md · PROMPTS.md · FRICTION.md # why · what happened · friction
├── CLAUDE.md · TODOS.md · README.md · LICENSE
├── reference/     # doc-set-spec.md + skill-authoring.md + templates/
├── skills/        # the suite (each dir symlinks into ~/.claude/skills/<name>;
│                  # three carry bundled copies: the report schema,
│                  # BRAND.template.md, plan.template.md)
├── schema/        # audit-report.schema.json (canonical) + examples/
├── scripts/       # validate-report-invariants.mjs + sync-version.sh
├── VERSION        # suite version, single source of truth (make sync-version)
├── reports/       # published audit JSON; public ones at /example, owned at /reports (public index)
├── app/ · components/ · lib/           # Next.js site
├── Dockerfile · fly.toml
└── Makefile

License

MIT, see LICENSE.