Agent skill

Write API Decision

by razorpay in razorpay/blade

This rule helps in writing API decisions for new components of blade design system

MITAuto-check passedFrontend & Design

Install Write API Decision

skills CLI
$ npx skills add razorpay/blade --skill write-api-decision -a claude-code

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

GitHub CLI
$ gh skill install razorpay/blade write-api-decision --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/razorpay/blade.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/write-api-decision .claude/skills/write-api-decision && 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
write-api-decision
GitHub stars
656
Token cost
~1.7k tokens
SKILL.md length
733 words
Files
1
Skills in repo
16
Repo updated
First seen
Licence
MIT

At a glance

This rule helps in writing API decisions for new components of blade design system

  • Works in 6 steps: Follow Existing Patterns: Study the… → Props Section Requirements → API Section Requirements → …
  • Tasks that involve Design systems
  • SKILL.md covers Key Examples to Reference, API Decision Structure, Design and API, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Write API Decision is an agent skill from razorpay/blade. This rule helps in writing API decisions for new components of blade design system

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Frontend & Design, covering Design systems. The repository describes itself as: Design System that powers Razorpay. The licence is MIT.

When your agent uses it

  • Tasks that involve Design systems

Example prompts

  • “/write-api-decision”

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Follow Existing Patterns: Study the referenced decisions.md files to maintain consistency with established naming conventions and prop…
  2. Props Section Requirements
  3. API Section Requirements
  4. Examples Section Requirements
  5. Common Prop Naming Patterns (from existing components)
  6. Component Structure Patterns

What it can do on your machine

Read from SKILL.md and the folder at commit e65bdec. 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

    No scripts in the folder and no shell commands in SKILL.md (its code samples are javascript and typescript).

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

  • Network

    No URLs in SKILL.md.

    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

Write API Decision loads about 1.7k tokens when it runs. Until then it costs about 25 tokens; SKILL.md has 733 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~25
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k

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 razorpay/blade at commit e65bdec, republished under its MIT licence (© razorpay). 733 words, ~1,747 tokens.

Download SKILL.mdSave it as .claude/skills/write-api-decision/SKILL.md (or your agent's skills folder).
name
write-api-decision
description
This rule helps in writing API decisions for new components of blade design system
disable-model-invocation
true

You work in the Design System team of Razorpay. Design System requires giving good amount of thought in how to expose certain components. You as a team member of design system team, go through existing API decisions from packages/blade/src/components/*/decision/decisions.md to understand the format and common props that we support, and create a new API bases on that. Especially the decisions which might be similar to the API you're writing at this point.

  • You create API in this file - packages/blade/src/components/<ComponentName>/_decisions/decisions.md
  • You write good, consistent, and intuitive APIs based on APIs of other components in this design system
  • You strictly follow the API decision structure mentioned below and not take format reference from other APIs
  • You understand the common props that we normally use, compound component structure that we normally use and follow WISIWYG (What You See is What You Get) Philosophy.
  • To understand the component you're writing the API for, you understand the given task well
  • You create APIs that are possible to implement
  • When given Figma props screenshots, you try to cover all scenarios but don't try to map each prop. E.g. showLeading prop might exist on figma but won't be needed on dev as leading prop alone is enough to know whether leading should be added or not.

Key Examples to Reference

Study these existing decisions.md files for consistent patterns and formatting:

  • packages/blade/src/components/SideNav/_decisions/decisions.md
  • packages/blade/src/components/Modal/_decisions/decisions.md
  • packages/blade/src/components/Button/_decisions/decisions.md
  • packages/blade/src/components/Typography/_decisions/decisions.md
  • packages/blade/src/components/Badge/_decisions/decisions.md

You can look for similar components in existing design systems on the internet for reference

API Decision Structure

All API decisions must follow this exact structure:

--------------------------markdown

ComponentName

3-4 lines description of what the component does, its purpose in the design system, and when it should be used. Keep it concise but informative about the component's role and primary use cases.

Design

API

Overall structure of the API showing the main usage pattern with realistic example:

jsx
import { Component, SubComponent } from '@razorpay/blade/components';

<Component prop="value">
  <SubComponent title="Example" />
</Component>;
<details>
  <summary>Alternate APIs (if needed. avoid creating unnecessary and far fetched alternate APIs. Skip this section if main API is obvious)</summary>
Alternate API 1
jsx
  • Pros
    • ...list down pros of this API
  • Cons -...list down cons of this API
Alternate API 2 (Optional)
jsx
  • Pros
    • ...list down pros of this API
  • Cons -...list down cons of this API
</details>
Props
ComponentName
typescript
type ComponentNameProps = {
  /**
   * jsdoc for propName
   */
  propName: 'option1' | 'option2';

  /**
   * jsdoc for optionalProp
   * @default -
   */
  optionalProp?: string;

  /**
   * jsdoc for children
   */
  children: React.ReactNode;

  /**
   * jsdoc for onAction
   */
  onAction?: (value: string) => void;
};
SubComponent (if applicable)
typescript
type SubComponentProps = {
  /**
   * jsdoc for title
   */
  title: string;

  /**
   * jsdoc for variant
   * @default medium
   */
  variant?: 'small' | 'medium' | 'large';

  /**
   * jsdoc for isActive
   * @default -
   */
  isActive?: boolean;
};

Examples

Basic Usage

-- 2 lines description --

jsx
<Component>
  <SubComponent title="Basic Example" />
</Component>
Advanced Usage

-- 2 lines description --

jsx
<Component onAction={(value) => console.log(value)}>
  <SubComponent title="Advanced Example" variant="large" isActive />
</Component>
[Specific Use Case Name]

-- 2 lines description --

jsx
// Show how the component handles specific scenarios

Accessibility

  • List accessibility features and requirements
  • Mention keyboard navigation patterns
  • Note ARIA attributes and roles
  • Include screen reader considerations

Open Questions

  • Document any decisions made during API design
  • List alternative approaches considered
  • Note future considerations or potential changes

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

Writing Guidelines

  1. Follow Existing Patterns: Study the referenced decisions.md files to maintain consistency with established naming conventions and prop patterns used in Blade.

  2. Props Section Requirements:

    • Use TypeScript type definitions, not prop tables
    • Group props by component (main component first, then sub-components)
    • Use union types for enums ('small' | 'medium' | 'large')
    • Mark optional props with ?
    • Use consistent naming patterns from existing components
  3. API Section Requirements:

    • Show the overall structure first
    • Include realistic imports
    • Use actual component names and realistic props
    • Show parent-child relationships clearly
  4. Examples Section Requirements:

    • Start with basic usage
    • Progress to more complex scenarios
    • Include real use cases from the design system
    • Show different prop combinations
  5. Common Prop Naming Patterns (from existing components):

    • variant for visual variations
    • size for sizing options ('small' | 'medium' | 'large')
    • isActive, isDisabled, isOpen for boolean states
    • children for content slots
    • onDismiss, onClick, onChange for event handlers
    • accessibilityLabel for accessibility
  6. Component Structure Patterns:

    • Use compound components (Parent + Header + Body + Footer)
    • Follow WISIWYG (What you see is what you get) philosophy for component structure
    • Include as prop for polymorphic components
    • Avoid magic abstractions (e.g. adding some prop that internally does non-intuitive things)
    • Support both controlled and uncontrolled APIs where appropriate
    • If you're refering to figma props, you try to cover all scenarios but don't try to map each prop. E.g. showLeading prop might exist on figma but won't be needed on dev as leading prop can be internally used to decide show or hide leading.

Remember: Always reference existing decisions.md files before writing new APIs to ensure consistency with the established Blade design system patterns and naming conventions.

  • Document edge cases and constraints
  • Explain design decisions in "Open Questions" or "Discussions" sections

Remember: The goal is to create comprehensive, implementable API documentation that serves both current needs and future extensibility while maintaining consistency with the established Blade design system patterns.

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

Files

Just SKILL.md in .agents/skills/write-api-decision of razorpay/blade.

Open the folder on GitHubat commit e65bdec

Compare with similar skills

Write API Decision 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.

Write API Decision compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Write API Decision this skillrazorpay/blade656—~1.7kAutomated safety check: PassMIT
Impeccablebestofjs/bestofjs3.1k27 repos~2.6kAutomated safety check: PassMIT
Figma Design System Builderwarpdotdev/warp65k2 repos~4.4kAutomated safety check: PassAGPL-3.0
Figma use_figma Plugin API Ruleswarpdotdev/warp65k4 repos~4.4kAutomated safety check: PassAGPL-3.0
UI StylingOhh-889/skyroc79513 repos~2.5kAutomated safety check: PassMIT
Shadcnsupabase/evals14342 repos~4.5kAutomated safety check: PassApache-2.0

Similar skills

  • Impeccable

    bestofjs/bestofjs

    A skill your agent uses when the user wants to design, redesign, shape, critique, audit, polish, clarify, distill, harden, optimize, adapt, animate, colorize, extract, or otherwise improve a…

    3.1k GitHub starsUsed in 27 repos~2.6k tokens
    Frontend & DesignAuto-check passed
  • Builds or updates a design system in Figma from a codebase in ordered phases: discovery, variables and tokens, components, theming and documentation, with checkpoints.

    65k GitHub starsUsed in 2 repos~4.4k tokens
    Frontend & DesignAuto-check passed
  • Required groundwork before any use_figma call: the rules and reference files for running JavaScript in a Figma file through the Plugin API without common failures.

    65k GitHub starsUsed in 4 repos~4.4k tokens
    Frontend & DesignAuto-check passed
  • UI Styling

    Ohh-889/skyroc

    Create beautiful, accessible user interfaces with shadcn/ui components (built on Radix UI + Tailwind), Tailwind CSS utility-first styling, and canvas-based visual designs.

    795 GitHub starsUsed in 13 repos~2.5k tokens
    Frontend & DesignAuto-check passed
  • Shadcn

    supabase/evals

    Official

    Manages shadcn components and projects — adding, searching, fixing, debugging, styling, and composing UI.

    143 GitHub starsUsed in 42 repos~4.5k tokens
    Frontend & DesignAuto-check passed
  • Design System

    Ohh-889/skyroc

    Token architecture, component specifications, and slide generation.

    795 GitHub starsUsed in 11 repos~1.7k tokens
    Frontend & DesignAuto-check passed

More from razorpay/blade

All 16 skills in this repo
  • Review PR

    razorpay/blade

    Review blade PRs by fetching diff, checking CI status, and getting Storybook URL.

    656 GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Migrate To Rn

    razorpay/blade

    Add React Native support (.native.tsx files) to Blade components that currently only have web implementations.

    656 GitHub stars~4.4k tokensUpdated today
    Auto-check passed
  • Migrate To Svelte

    razorpay/blade

    Orchestrate parallel migration of Blade React components to Svelte 5.

    656 GitHub stars~4.7k tokensUpdated today
    Auto-check passed
  • UI Code Guidelines

    razorpay/blade

    Important guidelines for writing frontend UI code. An agent skill from razorpay/blade.

    656 GitHub stars~866 tokensUpdated today
    Auto-check passed
  • Heal PR

    razorpay/blade

    Heal a Blade PR by fixing CI failures, missing changesets, and sanity issues.

    656 GitHub stars~414 tokensUpdated today
    Auto-check passed
  • Resolve Comments

    razorpay/blade

    Resolve PR review comments by pushing code fixes or replying with explanations.

    656 GitHub stars~647 tokensUpdated today
    Auto-check: warnings

Questions about Write API Decision

What does Write API Decision do?

This rule helps in writing API decisions for new components of blade design system. Write API Decision is an agent skill from razorpay/blade.

When should I use Write API Decision?

Write API Decision fits situations like: tasks that involve Design systems.

How do I install Write API Decision in Claude Code?

Run `npx skills add razorpay/blade --skill write-api-decision -a claude-code`. Or copy the skill folder (.agents/skills/write-api-decision in razorpay/blade) into .claude/skills/write-api-decision in your project. Claude Code loads it when a task matches its description.

How do I install Write API Decision in Codex?

Run `npx skills add razorpay/blade --skill write-api-decision -a codex`. Or copy the skill folder (.agents/skills/write-api-decision in razorpay/blade) into .agents/skills/write-api-decision in your project. Codex loads it when a task matches its description.

Can I use Write API Decision 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 razorpay/blade --skill write-api-decision -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/write-api-decision, .gemini/skills/write-api-decision, .github/skills/write-api-decision and .opencode/skills/write-api-decision in your project.

What does Write API Decision need to run?

SKILL.md names no scripts, command-line tools or credentials: Write API Decision is instructions for the agent only.

Does Write API Decision access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Write API Decision 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 Write API Decision use?

Write API Decision is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Write API Decision use?

About 1.7k tokens (SKILL.md is roughly 7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Write API Decision?

Skills that share tags, products or a category with Write API Decision: Impeccable (bestofjs/bestofjs, 3.1k stars), Figma Design System Builder (warpdotdev/warp, 65k stars), Figma use_figma Plugin API Rules (warpdotdev/warp, 65k stars) and UI Styling (Ohh-889/skyroc, 795 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Write API Decision?

razorpay (a GitHub organization) maintains it in razorpay/blade, which has 656 GitHub stars. The repository holds 16 skills in this directory. The repository was last updated on October 7, 2026.

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