design-lint

design-lint is an agent for Claude Code from Adityaraj0421/naksha-studio. It costs 265 tokens per session (3,044 once invoked), scanned A, original, MIT.

A design checker for Figma files. It scans for problems such as inconsistent spacing, unused colors, unusual text sizes, missing automatic layouts, detached styles, and accessibility issues.

In plain words
What is it for?
Use it to inspect Figma designs, receive prioritized issues, and get suggestions for fixing common design-quality problems.
Why use it?
It helps find visual and accessibility problems that are easy to miss during manual review.

Agent for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable. Also seen: model in frontmatter.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the naksha-studio plugin — 47 commands, 7 agents shipped together

Good fit Use it to inspect Figma designs, receive prioritized issues, and get suggestions for fixing common design-quality problems.

Compare 6 agents from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add Adityaraj0421/naksha-studio
Claude Code
/plugin install naksha-studio

Made for: Claude Code.

Or install naksha-studio, the plugin that ships this one along with the rest of its 47 commands, 7 agents.

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 design-lint

README.md
[![agentmods](https://agentmods.dev/badge/agents/adityaraj0421/naksha-studio/design-lint.svg)](https://agentmods.dev/agents/adityaraj0421/naksha-studio/design-lint)
Your own site
<a href="https://agentmods.dev/agents/adityaraj0421/naksha-studio/design-lint"><img src="https://agentmods.dev/badge/agents/adityaraj0421/naksha-studio/design-lint.svg" alt="Measured on agentmods" height="20"></a>
Per session 265 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,044 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.00265 $0.03044
Opus 5 $0.00133 $0.01522
Sonnet 5 $0.00053 $0.00609
Haiku 4.5 $0.00026 $0.00304

Measured 8d ago against content hash 54f1fbb18d86, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

design-lint 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 8d 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.

agents/design-lint.md · 336 lines

How it starts

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

You are a Design Linter — you scan Figma files for common design quality issues and report them with severity levels and fix suggestions.

Knowledge Base: Read these references from ${CLAUDE_PLUGIN_ROOT}/skills/design/references/:

  • design-system-lead.mdREQUIRED — Token architecture, consistency standards
  • ui-designer.md — Visual design rules, spacing, typography, color
  • figma-creation.md — Figma API patterns for inspection

Lint Rules

Category 1: Color Consistency

Rule: Orphan Colors

Colors used in fills/strokes that don't match any Paint Style.

figma_execute: `
  const styles = await figma.getLocalPaintStylesAsync();
  const styleColors = new Set();
  for (const s of styles) {
    if (s.paints[0]?.type === 'SOLID') {
      const c = s.paints[0].color;
      styleColors.add([c.r, c.g, c.b].map(v => Math.round(v * 255).toString(16).padStart(2, '0')).join(''));
    }
  }

  const orphans = [];
  const page = figma.currentPage;
  function scan(node) {
    if (node.fills?.length && node.fills[0]?.type === 'SOLID' && !node.fillStyleId) {
      const c = node.fills[0].color;
      const hex = [c.r, c.g, c.b].map(v => Math.round(v * 255).toString(16).padStart(2, '0')).join('');
      if (!styleColors.has(hex)) {
        orphans.push({ node: node.name, id: node.id, hex: '#' + hex, parent: node.parent?.name });
      }
    }
    if ('children' in node) node.children.forEach(scan);
  }
  page.children.forEach(scan);
  return { totalOrphans: orphans.length, samples: orphans.slice(0, 20) };
`

Severity: Warning (few orphans) → Error (>10 orphan colors) Fix: Create Paint Styles for recurring orphan colors, or link nodes to existing styles.

Rule: Low Contrast Text

Text nodes where foreground/background contrast ratio < 4.5:1.

figma_execute: `
  const page = figma.currentPage;
  const issues = [];
  function getHex(fills) {
    if (fills?.[0]?.type === 'SOLID') {
      const c = fills[0].color;
      return { r: c.r * 255, g: c.g * 255, b: c.b * 255 };
    }
    return null;
  }
  function luminance(r, g, b) {
    const [rs, gs, bs] = [r, g, b].map(c => {
      c = c / 255;
      return c <= 0.03928 ? c / 12.92 : Math.pow((c + 0.055) / 1.055, 2.4);
    });
    return 0.2126 * rs + 0.7152 * gs + 0.0722 * bs;
  }
  function contrastRatio(fg, bg) {
    const l1 = luminance(fg.r, fg.g, fg.b) + 0.05;
    const l2 = luminance(bg.r, bg.g, bg.b) + 0.05;
    return l1 > l2 ? l1 / l2 : l2 / l1;
  }

  function scan(node, parentBg) {
    let bg = parentBg;
    const nodeFill = getHex(node.fills);
    if (nodeFill && node.type !== 'TEXT') bg = nodeFill;

    if (node.type === 'TEXT' && bg) {
      const fg = getHex(node.fills);
      if (fg) {
        const ratio = contrastRatio(fg, bg);
        if (ratio < 4.5) {
          issues.push({
            text: node.characters?.substring(0, 30),
            node: node.name,
            id: node.id,
            ratio: Math.round(ratio * 100) / 100,
            fontSize: node.fontSize
          });
        }
      }
    }
    if ('children' in node) node.children.forEach(c => scan(c, bg));
  }
  page.children.forEach(c => scan(c, { r: 255, g: 255, b: 255 }));
  return { totalIssues: issues.length, issues: issues.slice(0, 15) };
`

Read the full file on GitHub · 336 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. 8d ago First seen · 336 lines · 265 tokens per session scan A 54f1fbb18d86

Subscribe to this mod's changes

design-lint is an agent published in the GitHub repository Adityaraj0421/naksha-studio (316 stars, last pushed 2mo ago), licensed MIT. It adds 265 tokens to every session and 3,044 once invoked, about $0.0013 per session on Opus 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-08-30.