From arn-code
This skill should be used when the user says "sketch", "arness code sketch", "preview this", "show me what this looks like", "UI preview", "sketch the feature", "visual preview", "sketch this page", "what will this look like", "mock this up", "prototype this UI", "preview the design", "sketch the UI", "preview this command", "show me what the output looks like", "sketch the TUI", "what will the CLI look like", "mock up the terminal output", or wants to see a working interface preview of a feature in the context of their existing application before committing to full implementation. Creates real, runnable artifacts using the project's actual framework and conventions, rendered in a dedicated sketch namespace.
npx claudepluginhub appsvortex/arness --plugin arn-codeThis skill uses the workspace's default tool permissions.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Compares coding agents like Claude Code and Aider on custom YAML-defined codebase tasks using git worktrees, measuring pass rate, cost, time, and consistency.
Create a working interface preview of a feature using the project's actual framework, conventions, and styling system. The sketch renders the new feature in context -- showing it within the real application where it will live, not in isolation. This lets the user see and interact with a preview before committing to the full implementation pipeline.
Sketches are real code: runnable artifacts written with the project's conventions, served from a dedicated arness-sketches/ namespace. They can be iterated on via feedback, promoted into the real codebase, or cleaned up when no longer needed.
This is a conversational skill. It runs in normal conversation (NOT plan mode).
Arness must be configured. Read the project's CLAUDE.md and check for a ## Arness section. If missing, inform the user: "Arness is not configured for this project yet. Run /arn-implementing to get started — it will set everything up automatically." Do not proceed without it.
Sketch strategy must exist. Read ui-patterns.md from the project's code patterns directory (the path under Code patterns: in the ## Arness config). Look for a ## Sketch Strategy section. If absent, halt with:
"No sketch strategy found. Run /arn-implementing to get started — pattern documentation will be generated on first use, including the sketch strategy if your project has a UI framework."
Do not proceed without a sketch strategy.
Entry points:
- Direct: user says "sketch this" / "preview this"
- From feature-spec: proactively offered after initial proposal when UI is involved
- From feature-spec-teams: proactively offered after debate converges when UI is involved
- From swift: after swift assessment, offered for interface changes above threshold
arn-code-sketch (this skill)
=========================
For interface preview before implementation
Input: Feature description (from spec, swift, or direct)
|
v
Load: Sketch strategy + paradigm reference from pattern docs
|
v
Assess: Should this be sketched? (threshold rules)
|
+--- Below threshold --> "This change is small enough to implement
| directly. Proceed with /arn-code-swift or
| /arn-code-feature-spec instead."
|
+--- Above threshold --> Continue
|
v
Create: arness-sketches/[feature-name]/ artifact namespace
|
v
Build: Spawn arn-code-sketch-builder agent
|
v
Present: Show preview instructions, iterate on feedback
|
v
Finish: Promote to real codebase OR clean up
Load the sketch setup and paradigm routing rules:
Read
${CLAUDE_PLUGIN_ROOT}/skills/arn-code-sketch/references/sketch-setup.md
Follow the setup sequence:
Read ui-patterns.md from the project's code patterns directory (already read in Prerequisites). Parse the ## Sketch Strategy section to extract:
web, cli, tui, desktop, mobile)Read architecture.md from the code patterns directory for Technology Stack confirmation (framework, language, key libraries).
Load paradigm reference -- based on the paradigm extracted from the sketch strategy:
Read
${CLAUDE_PLUGIN_ROOT}/skills/arn-code-sketch/references/paradigm-<paradigm>.md
If the paradigm-specific reference file does not exist, fall back to:
Read
${CLAUDE_PLUGIN_ROOT}/skills/arn-code-sketch/references/paradigm-stub.md
Hold the sketch strategy context (paradigm, artifact structure, preview mechanism) and paradigm reference for use by the builder agent.
Determine what to sketch from one of these sources (check in order):
From conversation context -- if invoked after /arn-code-feature-spec or /arn-code-swift, the feature description and architectural decisions are already in the conversation. Extract the interface-relevant portions.
From a spec file -- if the user references a spec (e.g., "sketch F-001" or "sketch the auth feature"), read the spec file from the project's specs directory.
From direct description -- if the user describes what they want directly (e.g., "sketch a settings page with a profile form and notification preferences"), use that description.
If the feature description is vague, ask one clarifying question focused on what the user wants to SEE:
"What should I show in the preview? For example: 'a settings page with profile form and notification toggles', 'the new dashboard widget showing recent activity', 'the deploy command with its subcommands and flags', or 'the status screen with live metrics'."
Not every interface change warrants a sketch. Apply these threshold rules based on the paradigm:
Skip sketching (below threshold):
For below-threshold changes, suggest the direct path:
"This change is straightforward enough to implement directly. Would you like to proceed with /arn-code-swift instead?"
Offer sketching (above threshold):
If the user explicitly asked for a sketch (e.g., "sketch this", "preview this"), always proceed regardless of threshold.
Create the artifact structure as specified by the loaded paradigm reference file. The paradigm reference (loaded in Step 1) defines the exact files, directory layout, and naming conventions for the current paradigm.
The artifact namespace is arness-sketches/[feature-name]/. For web paradigms, the paradigm reference file may specify a framework-specific location within the routing directory (e.g., app/arness-sketches/ for Next.js App Router, src/routes/arness-sketches/ for SvelteKit). The project root arness-sketches/ is the default for non-web paradigms. Every sketch includes a sketch-manifest.json:
{
"featureName": "",
"description": "",
"sourceSpec": "",
"paradigm": "",
"framework": "",
"createdAt": "",
"targetPage": "",
"previewCommand": "",
"components": [],
"componentMapping": [],
"composition": {
"blueprint": "",
"layout": [],
"dataFlow": [],
"interactionSequence": [],
"animation": []
},
"status": "draft"
}
Where targetPage is the real location where this feature will eventually live (a route for web, a command module for CLI, a screen for TUI). The paradigm field records the interface type. The previewCommand field records how to run or view the sketch (e.g., a URL for web, a shell command for CLI/TUI).
The composition.animation array documents animations implemented in the sketch. Each entry records: the component name, animation type (entrance/exit/state-change/feedback/scroll-triggered), trigger condition, a platform-agnostic description of the effect, and the animation approach used. This metadata enables the feature planner to generate animation-aware promotion tasks.
See the arn-code-sketch-builder agent Step 6 for the full schema including componentMapping and composition fields. These are populated by the builder during creation and by this skill during Step 8.
Spawn the arn-code-sketch-builder agent with:
--- SKETCH CONTEXT --- Feature: [feature name and description] Target page: [the real location where this feature will live -- a route for web, a command module for CLI, a screen for TUI] Paradigm: [paradigm from sketch strategy -- e.g., web, cli, tui] Paradigm reference: [path to the loaded paradigm reference file] Framework: [detected framework and version from architecture.md / ui-patterns.md] Component library: [detected component library, if applicable] Styling approach: [detected styling approach, if applicable] Artifact namespace: arness-sketches/[feature-name]/ --- END SKETCH CONTEXT ---
--- CODEBASE CONTEXT --- [Contents of ui-patterns.md] [Contents of architecture.md Technology Stack section if it exists] --- END CODEBASE CONTEXT ---
--- TARGET CONTEXT --- [Contents of the target location -- the page, command module, or screen where this feature will live] [Key imports and patterns used by that target] --- END TARGET CONTEXT ---
Output directory: arness-sketches/[feature-name]/ Manifest file: arness-sketches/[feature-name]/sketch-manifest.json
The agent will read the project's existing code and create the sketch using real, runnable artifacts matching the project's conventions.
After the builder agent completes:
Verify the sketch files were created by checking the output directory.
Present the preview to the user based on the paradigm's preview mechanism (from the ## Sketch Strategy in ui-patterns.md):
previewCommand from the sketch manifestFor detailed framework-specific instructions, the paradigm reference file (loaded in Step 1) provides the exact commands and URLs.
Include a brief description of what was built and prompt: "What would you like to change?"
Load the iteration guide:
Read
${CLAUDE_PLUGIN_ROOT}/skills/arn-code-sketch/references/iteration-guide.md
Follow the feedback loop protocol:
When the user is satisfied (or decides to move on), offer three options:
Promote -- Populate component mapping, then copy sketch artifacts into the real codebase structure using per-component promotion. The builder agent handles import path and reference updates. Mark sketch-manifest.json status as "promoted".
Keep -- Populate component mapping, then leave the sketch in arness-sketches/ for reference during implementation. Mark status as "kept". The sketch serves as a living reference while building the real feature. The component mapping tells downstream consumers (arn-code-task-executor, arness-swift) exactly how to promote each component later.
Clean up -- Delete the arness-sketches/[feature-name]/ directory. Useful when the sketch served its purpose during the conversation. No component mapping needed.
Populating component mapping (for Promote and Keep):
Before performing the promote or keep action, present the detected components and let the user confirm target paths and promotion modes (direct vs refine).
Read
${CLAUDE_PLUGIN_ROOT}/skills/arn-code-sketch/references/iteration-guide.mdfor the full component mapping population procedure.
Write the confirmed mapping to the manifest before proceeding with the chosen action.
If the user proceeds to /arn-code-feature-spec or /arn-code-plan after sketching, mention that the sketch exists as a reference:
"The sketch at arness-sketches/[feature-name]/ shows the approved design with component mapping. Implementation should match this preview -- the manifest's componentMapping tells executors exactly which files to promote and how."
ui-patterns.md. Run /arn-implementing to get started — pattern documentation will be generated on first use." If the user believes a sketch strategy should exist, suggest re-running the codebase analyzer.paradigm-stub.md as a fallback. Inform the user: "No paradigm-specific reference found for '[paradigm]'. Using generic sketch guidelines. The sketch may need manual adjustments."arness-sketches/[feature-name]/ already exists, ask the user: "A sketch for '[feature-name]' already exists. Overwrite it, choose a different name, or iterate on the existing sketch?"After the initial proposal is presented (Step 3c), if the feature involves UI and ui-patterns.md has a Sketch Strategy section, arn-code-feature-spec proactively offers a sketch:
"This feature involves interface work. Would you like to see a visual preview before we dive deeper?"
The user can also request a sketch at any time during the exploration conversation. In both cases, arn-code-feature-spec invokes Skill: arn-code:arn-code-sketch with the current feature context.
After the debate converges (Step 5b), if the feature involves UI and Sketch Strategy is configured, the teams skill offers a sketch before writing the final spec. The user can also request a sketch during debate rounds.
After the swift assessment, if the change involves an interface and is above the sketch threshold, swift may offer a sketch before implementation.
At ship time, the arn-code-ship skill checks for arness-sketches/ directories and offers cleanup:
arness-sketches/.sketch-manifest.json for traceability.