Agent skill

Testing Blocks

by adobe in adobe/skills

Use this when you have made AEM Edge Delivery Services code changes to blocks, scripts, or styles and need to validate them before opening a pull request.

Apache-2.0Auto-check passedDevelopment

Install Testing Blocks

skills CLI
$ npx skills add adobe/skills --skill testing-blocks -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install adobe/skills testing-blocks --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/adobe/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/aem/edge-delivery-services/skills/testing-blocks .claude/skills/testing-blocks && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
testing-blocks
GitHub stars
196
Token cost
~2.4k tokens
SKILL.md length
896 words
Files
8 (incl. references)
Skills in repo
65
Repo updated
First seen
Licence
Apache-2.0

At a glance

Use this when you have made AEM Edge Delivery Services code changes to blocks, scripts, or styles and need to validate them before opening a pull request.

  • Works in 4 steps: Run Linting → Browser Validation (MANDATORY) → Unit Tests (Optional) → …
  • Tasks that involve Linting and formatting
  • SKILL.md covers Related Skills, When to Use This Skill, Testing Workflow and Step 1: Run Linting, plus 6 more sections
  • Calls npm and node

What it does

Testing Blocks is an agent skill from adobe/skills. Use this when you have made AEM Edge Delivery Services code changes to blocks, scripts, or styles and need to validate them before opening a pull request. Covers unit testing for utilities and logic, browser testing with Playwright, linting, and guidance on what to test and how.

Its SKILL.md is about 2.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 8 other files, including reference files (for example `.releaserc.json`, `CHANGELOG.md` and `package.json`).

It sits in Development, covering Linting and formatting, Browser testing and Unit testing. It works with Adobe Experience Manager and Playwright. The repository describes itself as: Adobe Skills for Agents. The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Linting and formatting
  • Tasks that involve Browser testing
  • Tasks that involve Unit testing

Example prompts

  • “/testing-blocks”

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Run Linting
  2. Browser Validation (MANDATORY)
  3. Unit Tests (Optional)
  4. Run Existing Tests

What it can do on your machine

Read from SKILL.md and the folder at commit 985c436. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npm
    • node

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npm, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Testing Blocks loads about 2.4k tokens when it runs, and up to ~8.3k if it reads all its reference files. Until then it costs about 74 tokens; SKILL.md has 896 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~74
When it runs · the whole SKILL.md, loaded when a task matches
~2.4k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~8.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from adobe/skills at commit 985c436, republished under its Apache-2.0 licence (© adobe). 896 words, ~2,449 tokens.

Download SKILL.mdSave it as .claude/skills/testing-blocks/SKILL.md (or your agent's skills folder). This skill also uses 7 other files; get the full folder from GitHub.
name
testing-blocks
description
Use this when you have made AEM Edge Delivery Services code changes to blocks, scripts, or styles and need to validate them before opening a pull request. Covers unit testing for utilities and logic, browser testing with Playwright, linting, and guidance on what to test and how.
license
Apache-2.0
metadata.version
2.0.1

Testing Blocks

This skill guides you through testing code changes in AEM Edge Delivery Services projects. Testing follows a value-versus-cost philosophy: create and maintain tests when the value they bring exceeds the cost of creation and maintenance.

CRITICAL: Browser validation is MANDATORY. You cannot complete this skill without providing proof of functional testing in a real browser environment.

  • content-driven-development: Test content created during CDD serves as the basis for testing
  • building-blocks: Invokes this skill during Step 5 for comprehensive testing
  • block-collection-and-party: May provide reference test patterns from similar blocks

When to Use This Skill

Use this skill:

  • ✅ After implementing or modifying blocks
  • ✅ After changes to core scripts (scripts.js, delayed.js, aem.js)
  • ✅ After style changes (styles.css, lazy-styles.css)
  • ✅ After configuration changes that affect functionality
  • ✅ Before opening any pull request with code changes

This skill is typically invoked by the building-blocks skill during Step 5 (Test Implementation).

Testing Workflow

Track your progress:

  • Step 1: Run linting and fix issues
  • Step 2: Perform browser validation (MANDATORY)
  • Step 3: Determine if unit tests are needed (optional)
  • Step 4: Run existing tests and verify they pass

Step 1: Run Linting

Run linting first to catch code quality issues:

bash
npm run lint

If linting fails:

bash
npm run lint:fix

Manually fix remaining issues that auto-fix couldn't handle.

Success criteria:

  • ✅ Linting passes with no errors
  • ✅ Code follows project standards

Mark complete when: npm run lint passes with no errors


Step 2: Browser Validation (MANDATORY)

CRITICAL: You must test in a real browser and provide proof.

What to Test

Load test content URL(s) in browser and validate:

  • ✅ Block/functionality renders correctly
  • ✅ Responsive behavior (mobile, tablet, desktop viewports)
  • ✅ No console errors
  • ✅ Visual appearance matches requirements/acceptance criteria
  • ✅ Interactive behavior works (if applicable)
  • ✅ All variants render correctly (if applicable)
How to Test

Choose the method that makes most sense given your available tools:

Option 1: Browser/Playwright MCP (Recommended)

If you have MCP browser or Playwright tools available, use them directly:

  • Navigate to test content URL
  • Take accessibility snapshots to inspect rendered content (preferred for interaction)
  • Take screenshots at different viewports for visual validation
    • Consider both full-page screenshots and element-specific screenshots of the block being tested
  • Interact with elements as needed
  • Most efficient for agents with tool access

Option 2: Playwright automation

Write one (or more) temporary test scripts to validate functionality with playwright and capture snapshots/screenshots for inspection and validation.

javascript
// test-my-block.js (temporary - don't commit)
import { chromium } from 'playwright';

async function test() {
  const browser = await chromium.launch({ headless: false });
  const page = await browser.newPage();

  // Navigate and wait for block
  await page.goto('http://localhost:3000/path/to/test');
  await page.waitForSelector('.my-block');

  // Inspect accessibility tree (useful for validating structure)
  const accessibilityTree = await page.accessibility.snapshot();
  console.log('Accessibility tree:', JSON.stringify(accessibilityTree, null, 2));
  
  // Optionally save to file for easier analysis
  await require('fs').promises.writeFile(
    'accessibility-tree.json',
    JSON.stringify(accessibilityTree, null, 2)
  );

  // Test viewports and take screenshots
  await page.setViewportSize({ width: 375, height: 667 });
  await page.screenshot({ path: 'mobile.png', fullPage: true });
  await page.locator('.my-block').screenshot({ path: 'mobile-block.png' });

  await page.setViewportSize({ width: 768, height: 1024 });
  await page.screenshot({ path: 'tablet.png', fullPage: true });
  await page.locator('.my-block').screenshot({ path: 'tablet-block.png' });

  await page.setViewportSize({ width: 1200, height: 800 });
  await page.screenshot({ path: 'desktop.png', fullPage: true });
  await page.locator('.my-block').screenshot({ path: 'desktop-block.png' });

  // Check for console errors
  page.on('console', msg => console.log('Browser:', msg.text()));

  await browser.close();
}

test().catch(console.error);

Run: node test-my-block.js then delete the script and analyze the resulting artifacts.

Option 3: Manual browser testing

Use a standard web browser with dev tools:

  1. Navigate to test content: http://localhost:3000/path/to/test/content
  2. Use browser dev tools responsive mode to test viewports:
    • Mobile: <600px (e.g., 375px)
    • Tablet: 600-900px (e.g., 768px)
    • Desktop: >900px (e.g., 1200px)
  3. Check console for errors at each viewport
  4. Take screenshots as proof (browser screenshot tool or dev tools)
Validation Against Acceptance Criteria

If acceptance criteria provided (from CDD Step 2):

  • Review each criterion
  • Test specific scenarios mentioned
  • Verify all criteria are met

If design/mockup screenshots provided:

  • Compare implementation to design
  • Verify visual alignment
  • Note any intentional deviations
Proof of Testing

You must provide:

  • ✅ Screenshots of test content in browser (at least one viewport)
  • ✅ Confirmation no console errors
  • ✅ Confirmation acceptance criteria met (if provided)

Success criteria:

  • ✅ All test content loads and renders correctly
  • ✅ Responsive behavior validated across viewports
  • ✅ No console errors
  • ✅ Screenshots captured as proof
  • ✅ Acceptance criteria validated (if provided)

Mark complete when: Browser testing complete with screenshots as proof


Show full SKILL.md (342 more words)Show less

Step 3: Unit Tests (Optional)

Determine if unit tests are needed for this change.

Write unit tests when:

  • ✅ Logic-heavy functions (calculations, transformations)
  • ✅ Utility functions used across multiple blocks
  • ✅ Data processing or API integrations
  • ✅ Complex business logic

Skip unit tests when:

  • ❌ Simple DOM manipulation
  • ❌ CSS-only changes
  • ❌ Straightforward decoration logic
  • ❌ Changes easily validated in browser

For guidance on what to test: See references/testing-philosophy.md

If unit tests needed:

bash
# Verify test setup (see references/vitest-setup.md if not configured)
npm test

# Write test for utility function
# test/utils/my-utility.test.js
import { describe, it, expect } from 'vitest';
import { myUtility } from '../../scripts/utils/my-utility.js';

describe('myUtility', () => {
  it('should transform input correctly', () => {
    expect(myUtility('input')).toBe('OUTPUT');
  });
});

For detailed unit testing guidance: See references/unit-testing.md

Success criteria:

  • ✅ Unit tests written for logic-heavy code
  • ✅ Tests pass: npm test
  • ✅ OR determined unit tests not needed

Mark complete when: Unit tests written and passing, or determined not needed


Step 4: Run Existing Tests

Verify your changes don't break existing functionality:

bash
npm test

If tests fail:

  1. Read error message carefully
  2. Run single test to isolate: npm test -- path/to/test.js
  3. Fix code or update test if expectations changed
  4. Re-run full test suite

Success criteria:

  • ✅ All existing tests pass
  • ✅ No regressions introduced

Mark complete when: npm test passes with no failures

Troubleshooting

For detailed troubleshooting guide, see references/troubleshooting.md.

Common issues:

Tests fail
  • Read error message carefully
  • Run single test: npm test -- path/to/test.js
  • Fix code or update test
Linting fails
  • Run npm run lint:fix
  • Manually fix remaining issues
Browser tests fail
  • Verify dev server running: aem up --html-folder drafts
  • Check test content exists in drafts/tmp/
  • Verify URL uses /tmp/ path: http://localhost:3000/drafts/tmp/my-block
  • Add waits: await page.waitForSelector('.block')

Resources

Integration with Building Blocks Skill

The building-blocks skill invokes this skill during Step 5 (Test Implementation).

Inputs received from building-blocks:

  • Block name being tested
  • Test content URL(s) (from CDD Step 4)
  • Any variants that need testing
  • Screenshots of existing implementation/design/mockup to verify against (if provided)
  • Acceptance criteria to verify (from CDD Step 2)

Expected outputs to return to building-blocks:

  • ✅ Confirmation all testing steps complete
  • ✅ Screenshots from browser testing as proof
  • ✅ Confirmation linting passes
  • ✅ Confirmation tests pass
  • ✅ Any issues discovered and resolved

© adobe, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 7 other files (references) in plugins/aem/edge-delivery-services/skills/testing-blocks of adobe/skills.

  • SKILL.md
  • .releaserc.json
  • CHANGELOG.md
  • package.json
  • references/testing-philosophy.md
  • references/troubleshooting.md
  • references/unit-testing.md
  • references/vitest-setup.md

Open the folder on GitHubat commit 985c436

Compare with similar skills

Testing Blocks next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Testing Blocks compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Testing Blocks this skilladobe/skills196—~2.4kAutomated safety check: PassApache-2.0
Code Reviewnteract/semiotic2.7k—~1.5kAutomated safety check: PassApache-2.0
Ha Frontend Testinghome-assistant/frontend5.7k—~1.7kAutomated safety check: PassApache-2.0
Playwright Visual Testingmanagedcode/dotnet-skills486—~1.9kAutomated safety check: PassMIT
Appbuilder E2E TestingNeverSight/learn-skills.dev2161 repos~1.8kAutomated safety check: PassApache-2.0
Adk Setupgoogle/adk-python22k—~993Automated safety check: NotesApache-2.0

Similar skills

  • Code Review

    nteract/semiotic

    Review Semiotic pull requests for behavioral bugs, regressions, contract drift, and missing evidence.

    2.7k GitHub stars~1.5k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Ha Frontend Testing

    home-assistant/frontend

    Home Assistant frontend testing and validation workflow. An agent skill from home-assistant/frontend.

    5.7k GitHub stars~1.7k tokensUpdated today
    Testing & QAAuto-check passed
  • Playwright Visual Testing

    managedcode/dotnet-skills

    Add, repair, or review Playwright visual regression tests for browser-facing .NET apps, including screenshot baselines, Pixelmatch thresholds, deterministic rendering, and GitHub Actions artifacts.

    486 GitHub stars~1.9k tokensUpdated today
    Testing & QAAuto-check passed
  • Appbuilder E2E Testing

    NeverSight/learn-skills.dev

    A skill your agent uses whenever the user wants browser-based end-to-end tests for an Adobe App Builder application.

    216 GitHub starsUsed in 1 repo~1.8k tokens
    Testing & QAAuto-check passed
  • Adk Setup

    google/adk-python

    Official

    Sets up a local ADK Python development environment in a git clone of the open-source adk-python repository: a uv virtual environment, all dependency extras, pre-commit hooks, and a first unit-test…

    22k GitHub stars~993 tokensUpdated today
    DevelopmentAuto-check: notes
  • Verify Cozytouch

    gduteil/cozytouch

    Prove a change to the Cozytouch Home Assistant integration in a real Home Assistant — a throwaway instance against a fake Atlantic cloud served from a diagnostics dump (a fixture or a reporter's)…

    128 GitHub stars~2.2k tokensUpdated today
    DevelopmentAuto-check passed

More from adobe/skills

All 65 skills in this repo
  • Scaffolds, implements, deploys and debugs Adobe Runtime actions in App Builder projects, with templates for webhooks, events, database CRUD, sequences and Asset Compute workers.

    196 GitHub stars~3.1k tokensUpdated today
    Auto-check passed
  • Launches Chrome with an unpacked extension over CDP, opens its sidepanel, popup or options page, and hands over to cdp-connect for clicks, typing and screenshots.

    196 GitHub stars~952 tokensUpdated today
    Auto-check passed
  • Extracts icons, metadata, text, forms, videos and social links from any web page with playwright-cli, with SVG icon classification and cleanup.

    196 GitHub stars~1k tokensUpdated today
    Auto-check passed
  • Page Langs

    adobe/skills

    Detect all languages used on a webpage — both declared (html@lang, hreflang alternate links, nested lang= attributes, meta content-language) and actually present in the body text (Google CLD3 via…

    196 GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Page Prep

    adobe/skills

    Prepare any webpage for clean interaction by detecting and removing disruptive overlays (cookie banners, GDPR consent, modals, popups, newsletter signups, paywalls, login walls).

    196 GitHub stars~2.1k tokensUpdated today
    Auto-check passed
  • Page Reduce

    adobe/skills

    Reduce a webpage to a structural skeleton with semantic tokens.

    196 GitHub stars~1.9k tokensUpdated today
    Auto-check passed

Questions about Testing Blocks

What does Testing Blocks do?

Use this when you have made AEM Edge Delivery Services code changes to blocks, scripts, or styles and need to validate them before opening a pull request. Testing Blocks is an agent skill from adobe/skills. Use this when you have made AEM Edge Delivery Services code changes to blocks, scripts, or styles and need to validate them before opening a pull request.

When should I use Testing Blocks?

Testing Blocks fits situations like: tasks that involve Linting and formatting; tasks that involve Browser testing; tasks that involve Unit testing.

How do I install Testing Blocks in Claude Code?

Run `npx skills add adobe/skills --skill testing-blocks -a claude-code`. Or copy the skill folder (plugins/aem/edge-delivery-services/skills/testing-blocks in adobe/skills) into .claude/skills/testing-blocks in your project. Claude Code loads it when a task matches its description.

How do I install Testing Blocks in Codex?

Run `npx skills add adobe/skills --skill testing-blocks -a codex`. Or copy the skill folder (plugins/aem/edge-delivery-services/skills/testing-blocks in adobe/skills) into .agents/skills/testing-blocks in your project. Codex loads it when a task matches its description.

Can I use Testing Blocks in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add adobe/skills --skill testing-blocks -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/testing-blocks, .gemini/skills/testing-blocks, .github/skills/testing-blocks and .opencode/skills/testing-blocks in your project.

What does Testing Blocks need to run?

Going by SKILL.md and its folder, Testing Blocks needs the command-line tools its instructions call (npm and node).

Does Testing Blocks access the network?

SKILL.md contains no URLs. Its commands use npm, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Testing Blocks safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Testing Blocks use?

Testing Blocks is published under the Apache-2.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Testing Blocks use?

About 2.4k tokens (SKILL.md is roughly 9.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 5.8k tokens, read only when the agent opens those files.

What are the alternatives to Testing Blocks?

Skills that share tags, products or a category with Testing Blocks: Code Review (nteract/semiotic, 2.7k stars), Ha Frontend Testing (home-assistant/frontend, 5.7k stars), Playwright Visual Testing (managedcode/dotnet-skills, 486 stars) and Appbuilder E2E Testing (NeverSight/learn-skills.dev, 216 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Testing Blocks?

adobe (a GitHub organization) maintains it in adobe/skills, which has 196 GitHub stars. The repository holds 65 skills in this directory. The repository was last updated on October 7, 2026.

Source: adobe/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.