Atlas / Skills / google-labs-code / DESIGN.md

DESIGN.mdBLOCK

skills/google-labs-code/tdd-red-green-refactor

A format specification for describing a visual identity to coding agents. DESIGN.md gives agents a persistent, structured understanding of a design system.

Verdict
BLOCK
Grade
D
Trust score
67 /100
Version
—
Hosts
2 documented
License
Apache-2.0
Stars
28,436
01

Overview

From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.

A format specification for describing a visual identity to coding agents. DESIGN.md gives agents a persistent, structured understanding of a design system.

The Format

A DESIGN.md file combines machine-readable design tokens (YAML front matter or interleaved YAML code blocks) with human-readable design rationale (markdown prose). Tokens give agents exact values. Prose tells them why those values exist and how to apply them.

---
name: Heritage
colors:
primary: "#1A1C1E"
secondary: "#6C7278"
tertiary: "#B8422E"
neutral: "#F7F5F2"
typography:
h1:
fontFamily: Public Sans
fontSize: 3rem
body-md:
fontFamily: Public Sans
fontSize: 1rem
label-caps:
fontFamily: Space Grotesk
fontSize: 0.75rem
rounded:
sm: 4px
md: 8px
spacing:
sm: 8px
md: 16px
---

## Overview

Architectural Minimalism meets Journalistic Gravitas. The UI evokes a
premium matte finish — a high-end broadsheet or contemporary gallery.

## Colors

The palette is rooted in high-contrast neutrals and a single accent color.

- **Primary (#1A1C1E):** Deep ink for headlines and core text.
- **Secondary (#6C7278):** Sophisticated slate for borders, captions, metadata.
- **Tertiary (#B8422E):** "Boston Clay" — the sole driver for interaction.
- **Neutral (#F7F5F2):** Warm limestone foundation, softer than pure white.

An agent that reads this file will produce a UI with deep ink headlines in Public Sans, a warm limestone background, and Boston Clay call-to-action buttons.

Getting Started

Validate a DESIGN.md against the spec, catch broken token references, check WCAG contrast ratios, and surface structural findings — all as structured JSON that agents can act on.

npx @google/design.md lint DESIGN.md
{
"findings": [
{
"severity": "warning",
"path": "components.button-primary",
"message": "textColor (#ffffff) on backgroundColor (#1A1C1E) has contrast ratio 15.42:1 — passes WCAG AA."
}
],
"
Read from source at commit 6302b8cc6769OBSERVED · 2026-10-20
Advertisement
02

Install

Commands as the repository documents them. They are shown, not run.

npm install @google/design.md
npm install "@google/design.md"
03

Host compatibility

What the documentation claims. We have not run a compatibility test.

HostStatusNotes
cursormentioned
openclawmentioned
04

What it tells the agent

The instruction file, verbatim from the audited commit — this is the text the model reads, and the surface the audit's instruction layer examines. Quoted here so you can judge it without cloning anything.

---
name: agent-dx-cli-scale
description: A scoring scale for evaluating how well a CLI is designed for AI agents, based on the "Rewrite Your CLI for AI Agents" principles.
---

# Agent DX CLI Scale

Use this skill to **evaluate any CLI** against the principles of agent-first design. Score each axis from 0–3, then sum for a total between 0–21.

> Human DX optimizes for discoverability and forgiveness.
> Agent DX optimizes for predictability and defense-in-depth.
> — [You Need to Rewrite Your CLI for AI Agents](/posts/rewrite-your-cli-for-ai-agents)

---

## Scoring Axes

### 1. Machine-Readable Output

Can an agent parse the CLI's output without heuristics?

| Score | Criteria                                                                                              |
| ----- | ----------------------------------------------------------------------------------------------------- |
| 0     | Human-only output (tables, color codes, prose). No structured format available.                       |
| 1     | `--output json` or equivalent exists but is incomplete or inconsistent across commands.               |
| 2     | Consistent JSON output across all commands. Errors also return structured JSON.                       |
| 3     | NDJSON streaming for paginated results. Structured output is the default in non-TTY (piped) contexts. |

### 2. Raw Payload Input

Can an agent send the full API payload without translation through bespoke flags?

| Score | Criteria                                                                                                                              |
| ----- | ------------------------------------------------------------------------------------------------------------------------------------- |
| 0     | Only bespoke flags. No way to pass structured input.                                                                                  |
| 1     | Accepts `--json` or stdin JSON for some commands, but most require flags.                                                             |
| 2     | All mutating commands accept a raw JSON payload that maps directly to the underlying API schema.                                      |
| 3     | Raw payload is first-class alongside convenience flags. The agent can use the API schema as documentation with zero translation loss. |

### 3. Schema Introspection

Can an agent discover what the CLI accepts at runtime without pre-stuffed documentation?

| Score | Criteria                                                                                                                                                |
| ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 0     | Only `--help` text. No machine-readable schema.                                                                                                         |
| 1     | `--help --json` or a `describe` command for some surfaces, but incomplete.                                                                              |
| 2     | Full schema introspection for all commands — params, types, required fields — as JSON.                                                                  |
| 3     | Live, runtime-resolved schemas (e.g., from a discovery document) that always reflect the current API version. Includes scopes, enums, and nested types. |

### 4. Context Window Discipline

Does the CLI help agents control response size to protect their context window?

| Score | Criteria                                                                                                                                                    |
| ----- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 0     | Returns full API responses with no way to limit fields or paginate.                                                                                         |
| 1     | Supports `--fields` or field masks on some commands.                                                                                                        |
| 2     | Field masks on all read commands. Pagination with `--page-all` or equivalent.                                                                               |
| 3     | Streaming pagination (NDJSON per page). Explicit guidance in context/skill files on field mask usage. The CLI actively protects the agent from token waste. |

### 5. Input Hardening

Does the CLI defend against the specific ways agents fail (hallucinations, not typos)?

| Score | Criteria                                                                                                                                                                                |
| ----- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 0     | No input validation beyond basic type checks.                                                                                                                                           |
| 1     | Validates some inputs, but does not cover agent-specific hallucination patterns (path traversals, embedded query params, double encoding).                                              |
| 2     | Rejects control characters, path traversals (`../`), percent-encoded segments (`%2e`), and embedded query params (`?`, `#`) in resource IDs.                                            |
| 3     | Comprehensive hardening: all of the above, plus output path sandboxing to CWD, HTTP-layer percent-encoding, and an explicit security posture — _"The agent is not a trusted operator."_ |

### 6. Safety Rails

Can agents validate before acting, and are responses sanitized against prompt injection?

| Score | Criteria                
05

Trust audit

BLOCKgrade D · trust 67/100 Do not install this without reading the findings. The audit found something that could harm you or your machine.

LayerWhat it checksResult
L0Provenance & inventoryPASS
L1Static analysis of the codeFAIL
L2Instruction surface (what it tells the agent)PASS
L3Class-specific surfacePASS
L4Behavioural (sandbox)SKIPPED

What the source does

Filesystem
declared (5 observation(s))
Network
none-observed
Shell
declared (6 observation(s))
Dependencies
not all pinned
Secrets in source
none-found

Findings (12)

HIGHCode injection · code.eval_exec · CWE-78, CWE-94, CWE-95
packages/cli/scripts/check-package.ts:266
const importCheck = exec(`node ${smokeFile}`);
Why it matters. evaluates text as code
Fix. remove; use a parser or a dispatch table
HIGHCode injection · code.eval_exec · CWE-78, CWE-94, CWE-95
packages/cli/scripts/check-package.ts:301
const sanityCheck = exec(`node ${sanityFile}`);
Why it matters. evaluates text as code
Fix. remove; use a parser or a dispatch table
HIGHCode injection · code.eval_exec · CWE-78, CWE-94, CWE-95
packages/cli/scripts/check-package.ts:312
const cliCheck = exec(`node ${cliIndex} --help`);
Why it matters. evaluates text as code
Fix. remove; use a parser or a dispatch table
HIGHCode injection · code.eval_exec · CWE-78, CWE-94, CWE-95
packages/cli/scripts/check-package.ts:317
const specCheck = exec(`node ${cliIndex} spec`);
Why it matters. evaluates text as code
Fix. remove; use a parser or a dispatch table
HIGHCode injection · code.eval_exec · CWE-78, CWE-94, CWE-95
packages/cli/src/linter/spec-gen/compiler.ts:32
const fn = new Function(...Object.keys(scope), `return ${expr}`);
Why it matters. evaluates text as code
Fix. remove; use a parser or a dispatch table
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
packages/cli/src/linter/linter/rules/broken-ref.ts:15
import type { DesignSystemState } from '../../model/spec.js';
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
packages/cli/src/linter/linter/rules/broken-ref.ts:16
import { VALID_COMPONENT_SUB_TOKENS } from '../../model/spec.js';
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
packages/cli/src/linter/linter/rules/contrast-ratio.ts:15
import type { DesignSystemState, ResolvedColor, ResolvedValue } from '../../model/spec.js';
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
packages/cli/src/linter/linter/rules/contrast-ratio.ts:16
import { contrastRatio } from '../../model/handler.js';
LOWFilesystem / path · fs.traversal · CWE-22, CWE-59
packages/cli/src/linter/linter/rules/index.ts:16
import type { DesignSystemState } from '../../model/spec.js';
LOWSupply chain · supply.unpinned · CWE-829, CWE-1357
package.json
@types/node, bun-types, turbo, typescript
Why it matters. 4 dependency range(s) float
Fix. pin exact versions or ship a lockfile
LOWSupply chain · supply.unpinned · CWE-829, CWE-1357
packages/cli/package.json
citty, remark-frontmatter, remark-mdx, remark-parse, remark-stringify, unified, unist-util-visit, yaml
Why it matters. 14 dependency range(s) float
Fix. pin exact versions or ship a lockfile

Gates applied: no_behavioural_pass.

Audited 2026-10-20 · audit v0.4.1 · source sha 6302b8cc6769full audit observations/trust-audit/skill/google-labs-code__tdd-red-green-refactor.json · Report an issue / request a re-scan
06

Audit history

Every audit this skill has had.

DateSourceVerdictGradeScoreChange
2026-10-206302b8cc6769BLOCKD67first audit
07

Questions

What does the tdd-red-green-refactor — google-labs-code/design.md skill do?

A format specification for describing a visual identity to coding agents. DESIGN.md gives agents a persistent, structured understanding of a design system.

Is tdd-red-green-refactor — google-labs-code/design.md safe to install?

No — not without reading the findings first. The audit graded it D (67/100) and found 5 critical or high issues in the source. Each one is listed on this page with the file and line it is on.

What can tdd-red-green-refactor — google-labs-code/design.md access on my machine?

The audit observed that it runs shell commands and reads or writes files. Each of those is consistent with what it says it does. Secrets in the source: none found.

Which assistants does tdd-red-green-refactor — google-labs-code/design.md work with?

Its documentation mentions cursor and openclaw. That is what the text claims, not a compatibility test we ran.

How current is this page?

The grade is for one exact copy of the source (6302b8cc6769), read on 2026-10-20. The repository is watched, and a new audit runs when it changes — this is the first audit.

Add this badge to your README

Shows this page's audit result and links back to it. It updates when the audit does.

ModelsAtlas audit badge

Markdown
[![ModelsAtlas audit: DESIGN.md](https://modelsatlas.com/skills/google-labs-code/tdd-red-green-refactor/badge.svg)](https://modelsatlas.com/skills/google-labs-code/tdd-red-green-refactor/)

Not your listing, or something out of date? Claim or update your listing.

Advertisement