merlin: Skill for Claude Code

.claude/skills/artifact-layout/SKILL.md

artifact-layout is a skill for Claude Code from ucb-bar/merlin. It costs 77 tokens per session (1,730 once invoked), scanned A, original, Apache-2.0.

A file-layout guide for generated output in the Merlin project. It defines one top-level `out/` folder and separate locations for runs, artifacts, and build files.

In plain words
What is it for?
Use it when creating experiment runs, results, plots, figures, presentations, caches, or other generated files in Merlin.
Why use it?
It prevents generated files from being scattered across the repository or written to retired folders. It also helps tools find outputs consistently.

Skill for Claude Code

Written for Claude Code: PreToolUse hook event. Also seen: reads .claude/ paths.

This is ucb-bar/merlin's own configuration. It tells Claude Code how to work on merlin itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything merlin configures →

Reuse

Borrowing it

Nothing to install: this file belongs to ucb-bar/merlin. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/ucb-bar/merlin/main/.claude/skills/artifact-layout/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/ucb-bar/merlin

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for artifact-layout

README.md
[![agentmods](https://agentmods.dev/badge/skills/ucb-bar/merlin/artifact-layout/github.svg)](https://agentmods.dev/skills/ucb-bar/merlin/artifact-layout)
Your own site
<a href="https://agentmods.dev/skills/ucb-bar/merlin/artifact-layout"><img src="https://agentmods.dev/badge/skills/ucb-bar/merlin/artifact-layout/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for artifact-layout

Your own site · 80×15
<a href="https://agentmods.dev/skills/ucb-bar/merlin/artifact-layout"><img src="https://agentmods.dev/badge/skills/ucb-bar/merlin/artifact-layout.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 77 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,730 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00077 $0.01730
Opus 5.5 $0.00031 $0.00692
Sonnet 5.5 $0.00015 $0.00346
Haiku 4.5 $0.00008 $0.00173

Measured 15d ago against content hash beeaba25fa55, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

artifact-layout scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 15d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/artifact-layout/SKILL.md · 98 lines

How it starts

The opening of the file, as written. The whole thing — 98 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Artifact & run layout (MANDATORY convention)

Generated output in this repo lives under a single top-level out/ root, with three subdirs (out/runs/, out/artifacts/, out/build/). Never write generated files anywhere else (no top-level runs//artifacts//build/, no output/, results/, selfcheck_out/, docs/presentation/, or per-experiment runs//reports/ — those are retired). A PreToolUse hook (.claude/hooks/guard_artifact_writes.py) blocks violations; build_tools/scripts/check_artifact_layout.py lints them. Resolve roots via merlin.common.paths — out_dir()/runs_dir()/artifacts_dir()/ build_dir() (honoring MERLIN_OUT_ROOT); never hard-code the literal strings.

Root Holds How to create
out/runs/<target>/<suite>/<run-id>/ aet experiment runs (logs/ metrics/ artifacts/ generated/ contracts/ + run_record.json) merlin.common.artifacts.start_run(...)
out/runs/<target>/phase<N>/<TS>_<method>_<sha7>/ a phase run (engine output; oot/ = harness-owned git history) start_phase_run(target=, phase=, method=); merlin.common.oot_repo for oot/
out/artifacts/protocols/<target>/phase0-<TS>-<sha7>/ sealed phase-0 corpus release (pinned) merlin experiment corpus prepare + seal
out/artifacts/targets/<target>/champions/<package_id>/ phase-2 champion from a best tag (pinned) merlin.targetgen.champions.export_champion
out/artifacts/targets/<target>/INDEX.yaml generated per-target index merlin experiment index <target>
out/artifacts/<topic>/<target>/v<ver>/<leaf>/ versioned products (+ manifest.yaml, latest symlink) merlin.common.artifacts.new_product(...)
out/artifacts/cache/<ns>/ large regenerable caches (PURGEABLE) merlin.common.artifacts.cache_dir(ns)
out/artifacts/recaptures/ 130 GB model recaptures (PURGEABLE) merlin.common.artifacts.recaptures_dir()
out/build/ compiled / CMake / codegen scaffolds, baseline toolchains build system

Concern-first. out/artifacts/ is organized by tool/concern, and EACH concern uses ITS OWN natural axis — do not force a hardware target where it doesn't apply:

Concern Axis Tools
dse-guidance/<workload>/ workload/model merlin-dse-guidance
dse/<workload>/<feature>/ workload merlin-dse
design-pressure/<workload>/ workload merlin-design-pressure
kernel-mining/<target>/<op>/ target backend merlin-rvv-mine/-autotune/-report
kernel-index/<framework>/ source framework kernel-index/-extract/-audit
ceiling/ cross-framework kernel-bench
compare/<ts>/ config×workload merlin-compare
measurements/<substrate>/<model>/<exp>_v<ver>_<TS>_<sha>/ substrate→model→experiment scripts/k1_*, firesim/zephyr/baremetal sweeps
recaptures/<model>_<dtype>/ model+dtype (PURGEABLE) capture harness
perf-bench/<target>/, capsule-bench/<target>/ target experiment reports
targets/<target>/<package_id>/ target backend merlin-rvv-mine/-autotune, merlin-targetgen (codegen packages)
presentation/, cache/, selfcheck/ topic / ns / target misc

out/runs/<target>/<suite>/<run-id>/ is for aet experiment runs (target-centric). out/build/ for compiler output.

Target at folder level (where target IS the axis). Pass target= to start_run/new_product so the target becomes a folder component. Keep inner file names identical across the axis (always perf_results.json, findings.csv, manifest.yaml) so A-vs-B diffs are trivial. DSE is NOT target-axis — it keys by workload/model.

Read the full file on GitHub · 98 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 15d ago First seen · 98 lines · 77 tokens per session scan A beeaba25fa55

Subscribe to this mod's changes

artifact-layout is a skill published in the GitHub repository ucb-bar/merlin (21 stars, last pushed yesterday), licensed Apache-2.0. It adds 77 tokens to every session and 1,730 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-14.