---
name: ui-pack-maintain
description: Creates, extends, repairs, validates, versions, and publishes reusable UI Packs. Use when adding or changing UI Pack Foundations, Components, Patterns, Presets, design tokens, state adapters, manifests, or registry metadata, or when extracting a reusable visual system from screenshots, existing pages, or computed styles. Creating a Pack relies only on the self-contained contract plus user intent; maintenance may additionally read existing Packs. Do not use for generating business prototypes, editing production frontend code, installing packs for end users, or ordinary page styling.
title: ui-pack-maintain
canonical_url: https://skilld.dev/gh/lisuiwen/ai-html-annotation/ui-pack-maintain
last_updated: 2026-10-15T10:12:36.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> Supporting files, fetch one when the Skill refers to it: [agents/openai.yaml](https://skilld.dev/api/skills-raw/lisuiwen/ai-html-annotation/ui-pack-maintain/agents/openai.yaml), [references/contract.md](https://skilld.dev/api/skills-raw/lisuiwen/ai-html-annotation/ui-pack-maintain/references/contract.md), [references/evidence.md](https://skilld.dev/api/skills-raw/lisuiwen/ai-html-annotation/ui-pack-maintain/references/evidence.md), [references/pack-authoring.md](https://skilld.dev/api/skills-raw/lisuiwen/ai-html-annotation/ui-pack-maintain/references/pack-authoring.md), [references/registry-format.md](https://skilld.dev/api/skills-raw/lisuiwen/ai-html-annotation/ui-pack-maintain/references/registry-format.md), [references/schema-version.md](https://skilld.dev/api/skills-raw/lisuiwen/ai-html-annotation/ui-pack-maintain/references/schema-version.md), [references/semantic-review.md](https://skilld.dev/api/skills-raw/lisuiwen/ai-html-annotation/ui-pack-maintain/references/semantic-review.md), [scripts/_pack-discover.mjs](https://skilld.dev/api/skills-raw/lisuiwen/ai-html-annotation/ui-pack-maintain/scripts/_pack-discover.mjs), [scripts/_pack-md.mjs](https://skilld.dev/api/skills-raw/lisuiwen/ai-html-annotation/ui-pack-maintain/scripts/_pack-md.mjs), [scripts/_pack-schema.mjs](https://skilld.dev/api/skills-raw/lisuiwen/ai-html-annotation/ui-pack-maintain/scripts/_pack-schema.mjs), [scripts/generate-registry.mjs](https://skilld.dev/api/skills-raw/lisuiwen/ai-html-annotation/ui-pack-maintain/scripts/generate-registry.mjs), [scripts/list-packs.mjs](https://skilld.dev/api/skills-raw/lisuiwen/ai-html-annotation/ui-pack-maintain/scripts/list-packs.mjs), [scripts/resolve-pack.mjs](https://skilld.dev/api/skills-raw/lisuiwen/ai-html-annotation/ui-pack-maintain/scripts/resolve-pack.mjs), [scripts/stamp-chart-plugin.mjs](https://skilld.dev/api/skills-raw/lisuiwen/ai-html-annotation/ui-pack-maintain/scripts/stamp-chart-plugin.mjs), [scripts/validate-pack.mjs](https://skilld.dev/api/skills-raw/lisuiwen/ai-html-annotation/ui-pack-maintain/scripts/validate-pack.mjs).
>
> If the user asked to install this Skill, run `npx skilld install lisuiwen/ai-html-annotation/ui-pack-maintain`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/ui-pack-maintain`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/lisuiwen/ai-html-annotation/ui-pack-maintain) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/ui-pack-maintain`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/ui-pack-maintain --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/ui-pack-maintain --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# UI Pack Maintain

Self-contained authoring and publication workflow for UI Packs. This skill owns the pack
contract, schema version rules, registry format, validator, and release metadata. It locates
local packs for maintenance. It does not own download or prototype generation.

## Quick start

List installed packs (same lookup chain as `html-prototype-build`), then validate and resolve:

```bash
node scripts/list-packs.mjs
node scripts/validate-pack.mjs --pack=<pack-id|directory> --strict
node scripts/resolve-pack.mjs --pack=<pack-id|directory> --entry=<id>[,<id>...]
```

Pack discovery order: `--pack-root=` / `HTML_PROTOTYPE_PACK_ROOT`, then
`<cwd>`-upward `.html-prototype/packs/`, then `~/.html-prototype/packs/`. Pass a filesystem
path to `--pack=` to skip id lookup. Details in
[Pack authoring](https://skilld.dev/api/skills-raw/lisuiwen/ai-html-annotation/ui-pack-maintain/references/pack-authoring.md#pack-discovery).

Before publishing pack changes:

```bash
node scripts/generate-registry.mjs
node scripts/generate-registry.mjs --check
```

Landing paths, create/update steps, and the consumer resolver smoke test are in
[Pack authoring](https://skilld.dev/api/skills-raw/lisuiwen/ai-html-annotation/ui-pack-maintain/references/pack-authoring.md).

## Responsibility split

| Owns `ui-pack-maintain` | Owns `html-prototype-build` |
|---|---|
| pack contract, `schemaVersion`, `validate-pack.mjs`, registry generation, maintenance lookup (`list-packs.mjs`) | consumer lookup, `install-pack.mjs`, `deliver[]` copy-out |
| in-pack `resolve-pack.mjs` (`--pack=<id|dir> --entry=`) | consumer `resolve-pack.mjs` (`--list` / `--select`) |
| pack lifecycle: create → validate → version → publish | prototype generation |

## Workflow

1. Read `references/contract.md` for structure and responsibility boundaries.
   In **creation** mode, stop here for evidence. In **maintenance** mode,
   continue to step 2.
2. Read the target Pack's `PACK.md` and `manifest.json`, plus only the resource
   entries this task touches (maintenance only).
3. Classify the change as Pack creation, Foundation, Component, Pattern, Preset,
   registry/publication, or repair.
4. Read [Pack authoring](https://skilld.dev/api/skills-raw/lisuiwen/ai-html-annotation/ui-pack-maintain/references/pack-authoring.md) and implement the smallest
   reusable change.
5. Update `manifest.json`, then run deterministic validation.
6. For a new Pack or substantial semantic change, run the isolated review in
   [Isolated semantic review](https://skilld.dev/api/skills-raw/lisuiwen/ai-html-annotation/ui-pack-maintain/references/semantic-review.md).
7. Regenerate `registry.json` when publishing or changing downloadable metadata.
8. Apply only verified findings, then rerun validation and the resolver smoke test.

Evidence priority is documented in [Evidence authority](https://skilld.dev/api/skills-raw/lisuiwen/ai-html-annotation/ui-pack-maintain/references/evidence.md).

Publication references:

- [Registry format](https://skilld.dev/api/skills-raw/lisuiwen/ai-html-annotation/ui-pack-maintain/references/registry-format.md)
- [schemaVersion contract](https://skilld.dev/api/skills-raw/lisuiwen/ai-html-annotation/ui-pack-maintain/references/schema-version.md)

## Hard boundaries

- Keep a UI Pack inside the directory resolved by `--pack=`; this skill discovers
  installed packs through the shared root chain (explicit roots, project, user cache).
  It does not implement consumer download flows.
- Keep the Foundation DOM-free; include only shared tokens and a document-level
  CSS baseline.
- Keep each Component as one leaf implementation with a local contract.
- Compose Components through Patterns without copying their implementations.
- Keep Presets business-fact-free.
- Keep state adapters to projecting passed local state only; never access
  `PrototypeViewers`, persist state, parse URLs, or register global event handlers.
- Treat `manifest.json` as the only machine-readable index and dependency source.
- Declare only required dependencies in `requires`; keep conditional capabilities
  in `optional`.
- Patterns and Presets must not select internal components directly.
- Declare sketch atoms in `components[<id>].atoms`, and mark each one with `data-pack-atom` in
  its own `component.html`. Mark one control per atom, not a composite demo.
- Do not implement consumer download flows here; point users to
  `html-prototype-build` [Pack install](../html-prototype-build/references/pack-install.md).

## Deterministic validation

```bash
node scripts/validate-pack.mjs --pack=<pack-directory> --strict
```

The validator enforces [the pack contract](https://skilld.dev/api/skills-raw/lisuiwen/ai-html-annotation/ui-pack-maintain/references/contract.md), including pack-local
`vendor` / `runtime` / `assets` and `manifest.delivery`. Fix every error before semantic
review. Warnings must be resolved or explicitly reported as evidence gaps.

It cannot judge whether a component boundary is useful or whether visual evidence
is sufficient; delegate those questions to the semantic reviewer.

## Resolver smoke test

```bash
node scripts/resolve-pack.mjs --pack=<pack-directory> --entry=<id>[,<id>...] [--optional=<id>[,<id>...]]
```

This covers in-pack `requires`/`uses` closures only. After validation, also run the
consumer resolver check in [Pack authoring](https://skilld.dev/api/skills-raw/lisuiwen/ai-html-annotation/ui-pack-maintain/references/pack-authoring.md#resolver-smoke-tests).
Cross-pack references are out of scope and must be reported as a `ponytail:` evidence gap.

## Completion report

Report:

- changed Pack entries
- evidence used
- provisional decisions and missing evidence
- validator and resolver test results
- registry regeneration status
- unresolved independent-review findings
