ソース情報
- リポジトリ
- tomevault-io/tomes
- ソースの最終更新活動
- 2026年7月23日 21:48
- 検出された SKILL.md の言語
- 英語
- スター
- 1
- フォーク
- 0
インストール方法
デフォルトでは、最初にソースを確認する Prompt が選択されています。直接コマンドに切り替えるか、ローカルコピーをダウンロードすることもできます。
ソースファイルを確認
インストールを決める前に、SKILL.md と SkillsMP に表示されている付属ファイルをお読みください。
メニュー
デフォルトでは、最初にソースを確認する Prompt が選択されています。直接コマンドに切り替えるか、ローカルコピーをダウンロードすることもできます。
インストールを決める前に、SKILL.md と SkillsMP に表示されている付属ファイルをお読みください。
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
直接コマンドでは確認用 Prompt が省略されます。実行前にソースを確認してください。
npx skills add https://github.com/tomevault-io/tomes --skill build-block-from-figmaコマンドは1行のまま表示されます。コピー前に横へスクロールして全体を確認してください。
ローカルで確認しますか?SkillsMP が現在取得できるファイルをダウンロードできます。
> Use when this capability is needed.
Use when writing kernel, account, or note MASM code that reads from or writes to the advice provider (advice stack / advice map) — validate advice data.
Use when writing a Rust test that exercises a failure path or a MASM test that expects a `panic` / `assert` — assert on the specific expected error variant or error code.
SOC 職業分類に基づく
SKILL.md を表示中
| name | build-block-from-figma |
| description | > Use when this capability is needed. |
You are building a new block component for the C2 design system inside
the adobecom/milo repository. Components are plain HTML blocks styled
with plain CSS and initialised by an external orchestrator that calls
init() on load — you never add self-initialisation logic.
Critical path rules
- Block code patterns come exclusively from
libs/c2/blocks/. Never reference or imitate blocks underlibs/blocks/. Never copy or create files inlibs/blocks/— if the page does not load C2 blocks, the foundation metadata is missing (see Phase 1 gate). Do not work around this.- Shared utilities live in
libs/utils/decorate.js(decorateBlockText,decorateTextOverrides, and the viewport content parser) andlibs/utils/utils.js(createTag). Re-use these; do not duplicate their logic.- Design tokens live in
libs/c2/styles/styles.css.- The platform is Adobe EDS. Use the Fluffyjaws MCP to look up any EDS conventions you are unsure about.
Do not load these upfront. Each phase below tells you which file to read at the point it becomes relevant.
| File | Purpose |
|---|---|
design-tokens.md | --s2a- token mapping rules, font-family exceptions, responsive token behaviour. |
grid-system.md | Breakpoints, column counts, container variants, n-up layouts, masonry. |
viewport-content.md | Per-device content authoring spec, inheritance rules, decorateViewportContent API. |
eds-patterns.md | EDS block anatomy, shared utilities, CTA patterns, Fluffyjaws MCP usage. |
acceptance-criteria.md | JS/CSS rules, quality checklists, media-query syntax, token usage. |
remote-branch-workflow.md | .aem.page publishing, branch creation, push procedure, CDN refresh, iteration batching. |
| File | Purpose |
|---|---|
visual-comparison.md | Playwright screenshot loop — layout, spacing, colour, media fidelity checks. |
accessibility-check.md | axe-core WCAG 2.2 AA audit scoped to the block. |
performance-check.md | Lighthouse CLI audit — LCP, CLS, INP, TBT, overall score. |
Ask the user to provide the following before proceeding:
| Input | Required | Example |
|---|---|---|
| Preview URL | Yes | http://localhost:6456/..., https://main--repo--org.aem.page/path, or https://main--repo--org.aem.live/path |
| Figma URL — Mobile (S, up to 767 px) | At least one Figma URL | frame link |
| Figma URL — Tablet (M, 768–1279 px) | frame link | |
| Figma URL — Desktop (L, 1280–1440 px) | frame link | |
| Figma URL — HD (XL, 1441 px +) | frame link | |
| Base branch | No (default: stage) | my-experiment, feature/viewport-parser |
Do not proceed until you have the preview URL and at least one Figma URL.
If a custom base branch is provided, it must be available on
adobecom/milo. If it only exists locally, the skill will push it
to adobecom/milo automatically during branch creation
(see remote-branch-workflow.md section 2, step 3).
After collecting the preview URL, determine its type and resolve it to a usable URL before proceeding.
http://localhost:...)No special handling. Proceed directly to Phase 1.
.aem.page)A .aem.page URL is only a preview and will not work with
?milolibs=. Inform the user that a published (.aem.live) URL
is required. Offer two options:
If the user wants Claude to publish, load
references/remote-branch-workflow.md section 1 now and follow
the publishing procedure (path safety check, API calls).
After obtaining the .aem.live URL (whether user-provided or just
published), fall through to the DA published section below to
parse it and set remote-branch-mode.
.aem.live)Parse the URL to extract org, repo, and page path:
https://main--<repo>--<org>.aem.live/<path>
Store these values — they are needed in Phase 1 for branch creation and in Phase 5 for Playwright URL construction.
Set an internal flag: remote-branch-mode = true.
STOP: Do NOT proceed to Phase 1 until you have either a localhost URL or a resolved
.aem.liveURL. From this point forward, the resolved URL is referred to as the page URL.
Use Playwright MCP to navigate to the page URL.
Before inspecting the block, verify that the page is running the C2
foundation. Check the <head> for a <meta> tag:
<meta name="foundation" content="c2">
If this meta tag is missing, stop and ask the user to add the
foundation: c2 metadata to the page before continuing. Do not
attempt to work around this by copying files to libs/blocks/ or
modifying import paths — the C2 foundation loader handles all path
resolution automatically once the metadata is present.
Remote-branch-mode recovery: if the metadata is missing on a
published page, the user must add foundation: c2 to the
document's metadata block in DA, then re-preview and re-publish.
Offer to handle the preview and publish steps via the EDS admin API
(same procedure as references/remote-branch-workflow.md section 1).
Wait for the page to update before continuing.
Inspect the DOM inside <main> only — ignore header, footer, and nav.
Look for the block identifier (a distinctive class name, e.g.
class="hero-banner"). Derive the component name in kebab-case.
Confirm the inferred name with the user before continuing.
Skip this section if remote-branch-mode is false (localhost).
Load references/remote-branch-workflow.md section 2 now and
follow the branch creation procedure. Do NOT proceed to Phase 2
until the user confirms the branch.
Before writing any code:
libs/c2/blocks/ to see available blocks,
then read 2–3 blocks from that listing. Every block you read
must come from libs/c2/blocks/ — never from libs/blocks/.
The libs/blocks/ directory is the legacy (non-C2) codebase and
its patterns are incompatible. If you catch yourself reading from
libs/blocks/, stop and correct course.
For each block you read, study:
block-name/block-name.js + block-name.cssinit(el) is structured and exportedreferences/eds-patterns.md now — it covers EDS block
anatomy, shared utilities, and CTA patterns.libs/c2/styles/styles.css and extract every CSS custom
property. Pay special attention to --s2a- prefixed tokens —
these are the design-token source of truth.
Load references/design-tokens.md now for the full mapping rules.libs/utils/decorate.js to understand decorateBlockText,
decorateTextOverrides, and the viewport content parser
(decorateViewportContent).
Load references/viewport-content.md now — but only if the
block's authored DOM contains mobile-viewport, tablet-viewport,
or desktop-viewport keywords. If it does not, skip this reference.libs/utils/utils.js for createTag and any other helpers.libs/c2/blocks/section-metadata/section-metadata.css for
the grid/container system.
Load references/grid-system.md now.Use the Figma MCP to retrieve each provided frame URL. For each frame, extract:
--s2a- CSS variables. Always prefer a
matching variable over a hardcoded value.If multiple frames are provided, explicitly note layout differences between breakpoints — these drive your CSS overrides.
After retrieving each frame, save the Figma frame image to a local cache directory so it remains available during Phase 5 even if the Figma MCP session expires:
/tmp/build-block-figma/
mobile.png
tablet.png
desktop.png
hd.png
Use Playwright MCP or shell commands to write the images. Phase 5 should read from this cache instead of re-fetching from Figma.
After reading all Figma frames, compile a comparison table that lists every visible element at each breakpoint. This is essential for catching cross-viewport omissions. Example format:
Element | Mobile | Tablet | Desktop | HD
─────────────────────────────────────────────────
Heading | ✓ | ✓ | ✓ | ✓
Body text | ✓ | ✓ | ✓ | ✓
CTA button | ✓ | ✓ | ✓ | ✓
Hero image | ✓ | ✓ | ✓ | ✓
Background | solid | gradient| gradient| gradient
If an element (especially media — images, video, icons) appears in any Figma frame, explicitly flag which breakpoints include it and which do not. Carry this inventory forward into Phase 4 as a checklist — the implementation must match element presence per breakpoint exactly.
Skip this section if remote-branch-mode is false (localhost).
Load references/remote-branch-workflow.md section 3 now and
follow steps 1-2 only (fetch and check out the temporary local
branch from the upstream feature branch). Do not commit or push
yet. All file creation and editing below happens on this temporary
branch.
Create files at:
libs/c2/blocks/<name>/<name>.jslibs/c2/blocks/<name>/<name>.cssOpen libs/utils/utils.js and find the C2_BLOCKS array (or
similarly named constant that lists known C2 block names). Add
the new block's kebab-case name to this list. This step is
mandatory — without it, the EDS block loader will not find the
block under libs/c2/blocks/ and will fall back to libs/blocks/,
which is exactly the failure we need to prevent.
Load references/acceptance-criteria.md now. It contains all JS
rules (init pattern, utility re-use, viewport content, media parity),
CSS rules (mobile-first, media-query syntax, token usage), and both
quality checklists. Follow every item during implementation.
Run ESLint on the newly created files before proceeding:
npx eslint libs/c2/blocks/<name>/<name>.js --fix
If errors remain after --fix, resolve them manually. Do not
move to Phase 5 until the block's JS passes ESLint with zero
errors.
Skip this section if remote-branch-mode is false (localhost).
Complete the remaining steps from remote-branch-workflow.md
section 3 (steps 3-4): commit the block's JS, CSS, and
libs/utils/utils.js, push to the feature branch, then clean up
the temporary local branch.
Skip this section if remote-branch-mode is true.
If you modified the DA HTML at any point (e.g. adding metadata in Phase 1), force-refresh the preview so the dev server picks up the new content:
curl -s -X POST \
"https://admin.hlx.page/preview/<org>/<repo>/main/<page-path>"
Localhost mode: use the page URL as-is.
Remote-branch-mode: append ?milolibs=<branch-name> to the
page URL:
<page-url>?milolibs=<branch-name>
Example:
https://main--<repo>--<org>.aem.live/drafts/<your-ldap>/test-page?milolibs=base-card-autogenerated
This URL is referred to as the Playwright URL in all subsequent steps and agents.
Skip this section if remote-branch-mode is false.
Follow the CDN force-refresh procedure in
references/remote-branch-workflow.md section 4.
Before taking any screenshots, navigate to the Playwright URL (constructed in 5b) and verify the block actually loaded. Run a JS evaluation on the page:
document.querySelector('.<block-name>') exists.data-block-status equals "loaded"..foreground, .media, or whatever your init() adds).Common failures and fixes:
/upp/blocks/...
instead of /libs/c2/blocks/...): the foundation: c2 meta tag
is missing from the page, or the block name is not in the
C2_BLOCKS array in utils.js.utils.js without the new C2_BLOCKS
entry. Ensure the Playwright page.route() cache bypass from
remote-branch-workflow.md section 4b is active, then reload.data-block-status is null: the block JS was never fetched.
Check the network/console for the root cause before proceeding.remote-branch-workflow.md section 4a,
wait 10-15 seconds, then reload.Do not proceed to screenshots until the pre-flight check passes.
Load agents/visual-comparison.md now — it defines what to
assess (layout, spacing, colour, media) and how to identify fixes.
For each provided breakpoint, screenshot the component and compare against the cached Figma frame. Maximum 5 passes total across all breakpoints. Stop early if fidelity is high.
What counts as one pass:
references/remote-branch-workflow.md section 5 for the
batching criteria.Important: only after the visual loop is complete, proceed to Phase 6 and Phase 7. Do not run accessibility or performance checks during visual iteration.
Load agents/accessibility-check.md now and follow its procedure.
Run axe-core against the block's container element. Fix any WCAG 2.2 AA
violations found. If fixes require code changes and
remote-branch-mode is true, push via
references/remote-branch-workflow.md section 3, then
force-refresh per section 4.
Report the subagent's Obstacles Encountered section in the
final summary.
Load agents/performance-check.md now and follow its procedure.
Run a Lighthouse audit against the Playwright URL. Assess LCP
impact and flag any regressions. If fixes require code changes
and remote-branch-mode is true, push via
references/remote-branch-workflow.md section 3, then
force-refresh per section 4.
Report the subagent's Obstacles Encountered section in the
final summary.
Output:
--s2a- token referenced.After presenting the summary, suggest the user's likely next actions:
<branch-name> into stage for code review.<page-url>?milolibs=<branch-name>.After presenting the summary, ask the user whether to remove the
.playwright-mcp folder and the /tmp/build-block-figma/ cache
created during the run. If the user confirms, delete both:
rm -rf .playwright-mcp /tmp/build-block-figma
If the user declines, leave them in place.
Source: adobecom/milo — distributed by TomeVault.