/osprey:panelfrom osprey
Scaffolds an OSPREY web-terminal panel: a self-contained, theme-aware HTML mini-app with manifest.json. Guides through directory setup, head boilerplate, design-token styling, and validation.
Ships in osprey. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
A panel is a directory bundling one HTML entry point plus a manifest.json.
It is a self-contained mini-app the OSPREY web terminal can mount alongside the
chat surface. A valid panel is theme-aware (it boots the shared theme before
first paint and honors ?theme=) and token-only (every color, surface,
border, and font resolves through a var(--…) design token — never a raw hex
literal).
Follow these steps in order. The panel is done when the validator (Step 5) raises nothing. Do not skip the self-check.
The canonical exemplar every panel is copied from ships with OSPREY at
interfaces/design_system/panels/reference/ (index.html + manifest.json),
under the package root that
python3 -c "import osprey, pathlib; print(pathlib.Path(osprey.__file__).parent)"
prints. This skill inlines everything you need, but that reference is the source
of truth if anything here is ambiguous.
Create a new directory for the panel (e.g. my-panel/) with two files:
index.html and manifest.json.
Start index.html from the exact head below. The order is load-bearing and
the validator checks three of these lines:
theme-boot.js FIRST in <head> — a plain (non-module) script that
resolves and applies data-theme before first paint, so the panel never
flashes the wrong theme. It reads the ?theme= query param for free.tokens.css (the var(--…)
custom properties everything styles against), base.css, and primitives.css
(the shared osprey-* components — buttons, cards, chips, banners, fields;
interfaces/design_system/DESIGN.md §9, §12 and §13 under the same package
root).fonts.css stylesheet — the shared web fonts; without it the panel
falls back to system fonts.type="module" script that calls initTheme({ role: 'follower' }) (this
surface is a follower, never the theme hub — the web terminal is the hub) and
applyEmbedded() (reads ?embedded=true and hides standalone chrome).Copy this head exactly — do not reorder, and do not convert the boot script to a module:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<!-- Pre-paint theme boot FIRST: resolves and applies data-theme before first
paint (reads ?theme=), so the panel never flashes the wrong theme. -->
<script src="/design-system/js/theme-boot.js"></script>
<link rel="stylesheet" href="/design-system/css/tokens.css">
<link rel="stylesheet" href="/design-system/css/base.css">
<link rel="stylesheet" href="/design-system/css/primitives.css">
<link rel="stylesheet" href="/static/fonts/fonts.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My Panel</title>
<script type="module">
// Follower role: this standalone surface is never the theme hub. It applies
// its own ?theme= when the host appends one, otherwise trusts what
// theme-boot.js set pre-paint. applyEmbedded() reads ?embedded=true and
// hides the standalone chrome so the panel sits flush in its host frame.
import { initTheme } from '/design-system/js/theme-manager.js';
import { applyEmbedded } from '/design-system/js/frame-params.js';
initTheme({ role: 'follower' });
applyEmbedded();
</script>
<style>
/* Every color/surface/border/font below resolves through a var(--…) token.
ZERO raw hex anywhere in this file. */
</style>
</head>
<body>
<!-- your panel content -->
</body>
</html>
Every color, background, border, and font in your CSS must be a var(--…)
token from tokens.css. A raw hex color literal anywhere in the HTML, or in any
sibling .css/.js file, fails the validator (RAW_HEX_COLOR). This is what
lets the panel render correctly under every theme family, in both light and
dark, for free.
Use these real token names (verified against tokens.css):
| Purpose | Token |
|---|---|
| Page background | var(--bg-primary) |
| Elevated card/surface background | var(--bg-elevated) |
| Primary text | var(--text-primary) |
| Secondary text | var(--text-secondary) |
| Muted / caption text | var(--text-muted) |
| Default border | var(--border-default) |
| Accent border | var(--border-accent) |
| Accent / link / highlight color | var(--color-accent-light) |
| Success (semantic) | var(--color-success) + tint var(--success-tint-08) |
| Warning (semantic) | var(--color-warning) |
| Secondary accent / decorative highlight | var(--color-accent-secondary-light) + tint var(--accent-secondary-tint-08) |
| Error (semantic) | var(--color-error) + tint var(--error-tint-08) |
| Accent tint (subtle fill) | var(--accent-tint-06) |
Neutral tint (subtle fill, e.g. <code>) | var(--neutral-tint-08) |
| Panel shadow | var(--shadow-panel) |
| Display / body font family | var(--font-display) |
| Monospace font family | var(--font-mono) |
If you need a color that isn't in this list, look it up in
interfaces/design_system/static/css/tokens.css under that same package root —
never invent a hex value. A --…-tint-NN token is a low-opacity fill of the base color (e.g.
--success-tint-08), useful for badge/pill backgrounds.
Reach for an osprey-* class from primitives.css before writing your own: a
button is osprey-btn, a card osprey-card, a status pill osprey-chip. Every
class the panel sets must be defined, in the panel's own *.css or one of the
three linked sheets.
?theme= and ?embedded=Both are handled for free by the head in Step 1 — you only wire up the CSS:
?theme= is applied pre-paint by theme-boot.js and thereafter by
initTheme. You do nothing beyond styling with tokens.
?embedded=true makes applyEmbedded() add body.embedded. Put any
standalone-only chrome (a page header/title bar that only makes sense when the
panel is opened on its own) behind a rule that hides it when embedded:
.panel-chrome { /* header shown only standalone */ }
body.embedded .panel-chrome { display: none; }
manifest.jsonThe manifest declares the panel's identity and entry point. Required fields:
id — a lowercase kebab slug matching ^[a-z0-9][a-z0-9-]*$ (starts with
a lowercase letter or digit, then lowercase letters/digits/single hyphens).
Examples: beam-status, rf-cavity, my-panel. Not My_Panel, not
beam status.label — human-readable display name (non-empty string).entry — the HTML entry filename, relative to the panel dir, and it must
actually exist on disk. Use index.html.Optional: version (integer, defaults to 1). Unknown keys are tolerated
(preserved for forward compatibility), so extra fields won't fail validation.
Exact shape:
{
"id": "my-panel",
"label": "My Panel",
"entry": "index.html",
"version": 1
}
There is no CLI wrapper. Run the validator with this one-liner, replacing
PATH/TO/PANEL_DIR with your panel directory. It prints nothing and exits 0
when the panel is valid; it raises PanelValidationError (listing every
failure) when it is not:
uv run python -c "from osprey.interfaces.design_system.panels.validator import assert_valid_panel; assert_valid_panel('PATH/TO/PANEL_DIR')"
If it raises, fix each reported PanelRule and re-run until it is silent:
| Rule | Meaning | Fix |
|---|---|---|
MANIFEST_MISSING | no manifest.json in the dir | add it (Step 4) |
MANIFEST_INVALID | bad JSON, missing/empty/wrong-typed field, or id not a kebab slug | fix the manifest (Step 4) |
ENTRY_MISSING | the entry file doesn't exist on disk | create it, or fix the entry value |
MISSING_DESIGN_SYSTEM_LINK | entry HTML doesn't link all three sheets: tokens.css, base.css, primitives.css | add the missing <link> (Step 1) |
MISSING_THEME_BOOT | entry HTML doesn't load theme-boot.js | add the <script>, first in head (Step 1) |
MISSING_FONT_LINK | entry HTML doesn't link /static/fonts/fonts.css | add the <link> (Step 1) |
RAW_HEX_COLOR | a raw #rgb/#rrggbb/… literal appears where a token belongs | replace it with a var(--…) token (Step 2) |
Note the RAW_HEX_COLOR scan is a raw text scan: a URL fragment whose name is
all hex digits and exactly 3/4/6/8 long (e.g. href="#abc" or
href="#deadbeef") is flagged as if it were a color. If that happens, rename
the fragment — never loosen the token-only rule.
The panel is complete when the one-liner raises nothing.
A panel that belongs to an application (apps/<name>/panel/) is also judged by
osprey app check, which says exactly what osprey build would: it refuses a
panel that does not link all three sheets (design_system_css) and any class the
panel's HTML or JS sets that no rule in its own *.css or a linked design-system
sheet defines (undefined_class). Run it from the deployment and fix until it
passes.
The web terminal serves its panels through the panel proxy, so panel and host
share one origin — there is no cross-origin surface, and the interface apps
register no CORS middleware. The proxy is strict in both directions: it strips
cookie, authorization and the operator-secret header from what it forwards
to your backend, and strips Set-Cookie and Access-Control-* from what your
backend returns, so a panel cannot set a cookie on the terminal's origin or open
itself to another one. Re-theme by having the host append an updated ?theme=
and reloading — that path always works and is the one to rely on.
postMessage-based live re-theming is same-origin only; since panel and host
share an origin it is available, but the ?theme= boot (Step 1) plus reload
remains the robust path and is what you should build against.
Do NOT:
theme-boot.js must be first, then tokens.css,
base.css, primitives.css.osprey app check refuses it.type="module" — it must run synchronously,
pre-paint.var(--…).tokens.css.id uppercase, spaces, or underscores — kebab slug only.entry at a file that doesn't exist.postMessage re-theming (Step 6).What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
osprey, web-terminal, panel-scaffold, design-system, theme-aware
npx claudepluginhub als-apg/osprey --plugin osprey12 skills in this plugin
/build-appBuild an OSPREY app: a panel in the web terminal's sidebar, the backend container behind it, and the agent tools that reach the same backend, all declared in one app.yml. Use whenever someone wants to create, scaffold, extend or fix an OSPREY app or application, runs or asks about `osprey app new` / `osprey app check`, edits an app.yml, adds a tool, a route, a write with an approval card, or a skill or subagent to an app, or wants an operator screen that the agent can also read and drive, even when they only say "panel with a backend" or "give the agent a tool for X". Works in a facility deployment repo with OSPREY installed and in an OSPREY checkout. Starts by checking itself against the installed OSPREY's app contract. For a static themed page with no backend and no tools, use the panel skill instead.
/contributeGuides a contributor through the OSPREY GitHub Flow contribution journey from a working-tree change to a merged PR on main. Use when someone says "I want to contribute X to osprey", "help me commit/push this", "prep this branch for a PR", "open a PR", "my CI is failing on this branch", "rebase onto main", or wants help following the contributing workflow. Auto-detects whether they have push access to als-apg/osprey or are contributing from a fork. Composes with /osprey:pre-commit and /osprey:release, and with the external commit-organize skill when it is installed — invoke this whenever someone is contributing code to OSPREY, even if they haven't named the workflow explicitly.
/design-philosophyOSPREY's design and architecture principles — the rules that define how OSPREY code should be structured, and the anti-pattern each one prevents. Consult before designing, adding, or reviewing any feature (connectors, MCP servers, providers, capabilities, CLI, registry, runtime, config), and when redirecting work that is drifting from these principles. Trigger when the user says "is this the right direction", "does this fit OSPREY", "this feels wrong", "check the design philosophy", or points an agent at how OSPREY code should look. Apply before adding a config knob, a new abstraction, a new subsystem, or anything touching hardware-write safety./doc-syncUse when a maintainer wants to know where a page under docs/source says something the code no longer does — before cutting a release, after a long stretch of merges, or when one page is suspected of describing a flag, key, default, or procedure that has moved on. Triggers: "run doc-sync", "sync the docs", "do the docs match the code", "is this page still right", "check the how-to guides", "validate the docs", "doc drift", "audit the docs", "which pages went stale". Prefer it over reading a page and forming an opinion whenever the question is "is what this page says still true". Config comments, shipped prompts, runtime messages, and pinned versions are not doc pages; those are osprey:housekeeping.
/facility-reviewResolves what the OSPREY facility build flags, with the person who maintains the facility repository: runs `osprey facility validate`, investigates every stop and warning it prints, groups the ones that share a cause, asks one evidence-backed question per group, writes each confirmed answer into `fixes.yaml` or `policy.yaml` (or proposes a diff to an authored facility file), rebuilds, and shows the finding gone. Use whenever a facility build stops or warns, whenever someone pastes a `facility: <kind>: ...` line, after `osprey facility import` brings in a cable schedule, rack layout, MML export or channel list, and when someone says "review my facility", "clean up the facility warnings", "two sources disagree", "contested relations", "layer-conflict", "which source wins", or asks why a relation is contested or superseded, even if they do not name this skill.
/housekeepingUse when a maintainer wants to know where OSPREY tells its users something that is no longer true — before cutting a release, after a long stretch of merges without one, or when the generated project, a shipped skill, a runtime message, or a pinned version is suspected of having fallen behind the code — or when the shipped presets, which are supposed to agree (hello-world and demo), may have drifted apart. Triggers: "run housekeeping", "check for drift", "what has rotted", "is anything stale", "housekeeping report", "sweep the repo", "preset parity", "do the presets still agree", "what maintainer chores are outstanding", "pre-release drift check". Prefer it over ad-hoc grepping whenever the question is "has anything drifted" rather than "fix this one thing". Doc-page prose is not this skill's job; that is osprey:doc-sync.
Other plugins' skills for the same job