Agent skill

AI Client

by Opentrons in Opentrons/opentrons

Conventions for the opentrons-ai-client React/TypeScript frontend — project structure, API integration, state management (Jotai), feature flags, types, and testing.

Apache-2.0Auto-check passedBackend & APIs

Install AI Client

skills CLI
$ npx skills add Opentrons/opentrons --skill ai-client -a claude-code

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

GitHub CLI
$ gh skill install Opentrons/opentrons ai-client --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/Opentrons/opentrons.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.cursor/skills/ai-client .claude/skills/ai-client && 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
ai-client
GitHub stars
523
Token cost
~1.6k tokens
SKILL.md length
395 words
Files
1
Skills in repo
17
Repo updated
First seen
Licence
Apache-2.0

At a glance

Conventions for the opentrons-ai-client React/TypeScript frontend — project structure, API integration, state management (Jotai), feature flags, types, and testing.

  • Works in 4 steps: Calls getAccessToken() to get a fresh… → Calls buildRequestConfig() to assemble… → Calls callApi(config) from useApiCall → …
  • Working with files in opentrons-ai-client/
  • SKILL.md covers Overview, Project Structure, Types — Use camelCase Throughout and State Management (Jotai), plus 6 more sections
  • Calls make

What it does

AI Client is an agent skill from Opentrons/opentrons. Conventions for the opentrons-ai-client React/TypeScript frontend — project structure, API integration, state management (Jotai), feature flags, types, and testing. Use when working with files in opentrons-ai-client/ or discussing the AI client application.

Its SKILL.md is about 1.6k 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 Backend & APIs, covering State management and Third-party API integration. It works with React and TypeScript. The repository describes itself as: Software for writing protocols and running them on the Opentrons Flex and Opentrons OT-2. The licence is Apache-2.0.

When your agent uses it

  • Working with files in opentrons-ai-client/
  • Discussing the AI client application

Example prompts

  • “Use the ai-client skill to convention for the opentrons-ai-client React/TypeScript frontend — project structure, API integration, state management…”
  • “/ai-client”

Workflow steps

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

  1. Calls getAccessToken() to get a fresh token before each request
  2. Calls buildRequestConfig() to assemble the Axios config
  3. Calls callApi(config) from useApiCall
  4. On completion, updates chatDataAtom and chatHistoryAtom

What it can do on your machine

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

    • make

    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

AI Client loads about 1.6k tokens when it runs. Until then it costs about 67 tokens; SKILL.md has 395 words of instructions outside code blocks.

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

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 Opentrons/opentrons at commit adb4970, republished under its Apache-2.0 licence (© Opentrons). 395 words, ~1,609 tokens.

Download SKILL.mdSave it as .claude/skills/ai-client/SKILL.md (or your agent's skills folder).
name
ai-client
description
Conventions for the opentrons-ai-client React/TypeScript frontend — project structure, API integration, state management (Jotai), feature flags, types, and testing. Use when working with files in opentrons-ai-client/ or discussing the AI client application.

AI Client Instructions

Overview

opentrons-ai-client is a React/TypeScript single-page application that generates and updates Opentrons protocols from natural language descriptions. It lives in the monorepo and is built with Vite.

Deployed environments: staging (staging.opentrons.ai) and prod (ai.opentrons.com).

Project Structure

opentrons-ai-client/
├── src/
│   ├── OpentronsAI.tsx           # Root component, Auth0 bootstrap, feature flag sync
│   ├── main.tsx                  # Auth0 provider, router, app entry
│   ├── analytics/                # Mixpanel event tracking
│   ├── assets/localization/en/   # i18next translation strings
│   ├── components/               # atoms/, molecules/, organisms/
│   ├── pages/                    # Chat, CreateProtocol, UpdateProtocol, Landing, Settings
│   ├── resources/
│   │   ├── atoms.ts              # Jotai atoms (app-wide state)
│   │   ├── constants.ts          # API base URLs and Auth0 config per environment
│   │   ├── types.ts              # Shared TypeScript types (ChatData, CreatePrompt, etc.)
│   │   ├── hooks/
│   │   │   ├── useInputPromptController.ts  # Main submit logic
│   │   │   ├── useGetAccessToken.ts         # Auth0 token fetching
│   │   │   ├── useApiCall.ts                # Axios wrapper (callApi, data, isLoading, error)
│   │   │   └── useAttachFiles.ts            # File attachment handling
│   │   └── utils/
│   │       ├── buildRequestConfig.ts        # Builds Axios config per endpoint type
│   │       ├── buildChatHistory.ts          # Formats chat history for the API
│   │       ├── createUserInput.ts           # Creates ChatData for user turns
│   │       ├── protocolUtils.ts             # Prompt builders for create/update
│   │       └── resolveErrorMessage.ts       # Maps API error_type to user-facing strings
│   └── feature-flags/            # Feature flag types and DEPRECATED_FLAGS cleanup
└── vite.config.mts

Types — Use camelCase Throughout

All types in src/resources/types.ts use camelCase field names. The API request/response bodies also use camelCase. Do not use snake_case for any new TypeScript types or API payload fields.

Key types:

TypePurpose
ChatDataA single turn in the chat display (user or assistant)
ChatA history entry sent to the server (role, content, protocolContent)
CreatePromptAtom shape for the create-protocol form state
UpdatePromptAtom shape for the update-protocol form state

State Management (Jotai)

Key atoms in src/resources/atoms.ts:

AtomPurpose
chatDataAtomAll turns displayed in the chat UI
chatHistoryAtomHistory sent to the server in API requests
createProtocolChatAtomCreate-protocol form values
updateProtocolChatAtomUpdate-protocol form values
featureFlagsAtomFeature flags (persisted to localStorage)
feedbackModalAtomWhether the feedback modal is open

tokenAtom has been removed. Always use useGetAccessToken() to fetch a fresh token before making API calls.

API Integration

The client communicates with the server via a standard JSON HTTP API. Endpoint selection is handled in buildRequestConfig.ts.

Request typeEndpoint
Update protocol (no files)POST /api/chat/update-protocol
Create protocol (no files)POST /api/chat/create-protocol
Chat completion (no files)POST /api/chat/completion
Chat completion (with files)POST /api/chat/completion-multipart

The useInputPromptController hook is the single entry point for all submissions. It:

  1. Calls getAccessToken() to get a fresh token before each request
  2. Calls buildRequestConfig() to assemble the Axios config
  3. Calls callApi(config) from useApiCall
  4. On completion, updates chatDataAtom and chatHistoryAtom
Show full SKILL.md (129 more words)Show less

Authentication

  • Use useGetAccessToken() (not the removed tokenAtom) whenever a token is needed
  • getAccessToken() is async — always await it and wrap in try/catch
  • FeedbackModal and other components that POST independently also use useGetAccessToken()

Environment-Driven URLs

constants.ts exports endpoint constants for three environments (LOCAL_*, STAGING_*, PROD_*). buildRequestConfig.ts uses _NODE_ENV_ (a Vite define) via pickEndpoint() to select the right URL.

Feature Flags

Feature flags live in featureFlagsAtom and are persisted to localStorage. Flags listed in DEPRECATED_FLAGS (src/feature-flags/types.ts) are automatically cleaned up on startup.

User-facing flags are toggled on the Settings page. The enablePrereleaseMode flag is toggled via window.enablePrereleaseMode() in the browser console.

useEffect Exhaustive-Deps Convention

New code wraps useEffect callbacks in the multi-line form and adds a FIXME comment for any suppressed exhaustive-deps lint rule:

ts
useEffect(
  () => {
    // ...
  },
  // FIXME(YYYY-MM-DD): Supply all missing dependencies, if it's safe. If it's unsafe, explain why.
  // eslint-disable-next-line react-hooks/exhaustive-deps
  [dep1, dep2]
)

Dev Commands

Run from the monorepo root:

bash
make -C opentrons-ai-client dev     # Start Vite dev server
make test-js-opentrons-ai-client    # Run unit tests
make format-js                      # Prettier auto-fix
make lint-js                        # ESLint + Prettier check
make lint-css                       # Stylelint check
make check-js                       # TypeScript type check

© Opentrons, 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

Just SKILL.md in .cursor/skills/ai-client of Opentrons/opentrons.

Open the folder on GitHubat commit adb4970

Compare with similar skills

AI Client 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.

AI Client compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
AI Client this skillOpentrons/opentrons523—~1.6kAutomated safety check: PassApache-2.0
Frontend Typescript Rulesshinpr/ai-coding-project-boilerplate233—~1.7kAutomated safety check: PassMIT
React Flow Node TSmicrosoft/skills3.1k6 repos~502Automated safety check: PassMIT
React Generate Skilljiushiwon/wg-skills114—~2.8kAutomated safety check: PassApache-2.0
Typescript Rulesshinpr/claude-code-workflows693—~1.8kAutomated safety check: PassMIT
React Code Reviewgiuseppe-trisciuoglio/developer-kit356—~2.6kAutomated safety check: NotesMIT

Similar skills

  • Frontend Typescript Rules

    shinpr/ai-coding-project-boilerplate

    Applies React/TypeScript type safety, component design, and state management rules.

    233 GitHub stars~1.7k tokensUpdated 5 days ago
    Frontend & DesignAuto-check passed
  • React Flow Node TS

    microsoft/skills

    Official

    Create React Flow node components with TypeScript types, handles, and Zustand integration.

    3.1k GitHub starsUsed in 6 repos~502 tokens
    Frontend & DesignAuto-check passed
  • React Generate Skill

    jiushiwon/wg-skills

    This skill should be used when the user wants to create a standardized React 18 + TypeScript + Vite + Zustand project from scratch.

    114 GitHub stars~2.8k tokensUpdated 2 days ago
    Frontend & DesignAuto-check passed
  • Typescript Rules

    shinpr/claude-code-workflows

    React/TypeScript frontend development rules including type safety, component design, state management, and error handling.

    693 GitHub stars~1.8k tokensUpdated 8 days ago
    Frontend & DesignAuto-check passed
  • React Code Review

    giuseppe-trisciuoglio/developer-kit

    Provides comprehensive code review capability for React applications, validates component architecture, hooks usage, React 19 patterns, state management, performance optimization, accessibility…

    356 GitHub stars~2.6k tokensUpdated 29 days ago
    Frontend & DesignAuto-check: notes
  • Use when implementing or refactoring React/TypeScript components and the task requires decisions about component ownership, feature boundaries, state, data…

    158k GitHub stars~626 tokensUpdated today
    Frontend & DesignAuto-check passed

More from Opentrons/opentrons

All 17 skills in this repo
  • AI Server

    Opentrons/opentrons

    Conventions for the opentrons-ai-server FastAPI service — project structure, uv dependency management, settings, testing, Docker, and deployment.

    523 GitHub stars~2.5k tokensUpdated today
    Auto-check: notes
  • Analyses Snapshot Testing

    Opentrons/opentrons

    Conventions for the analyses snapshot testing framework in analyses-snapshot-testing/.

    523 GitHub stars~1.7k tokensUpdated today
    Auto-check passed
  • CSS Modules

    Opentrons/opentrons

    CSS Modules conventions, Stylelint rules, design tokens (spacing, colors, typography, border-radius), and patterns for the Opentrons monorepo.

    523 GitHub stars~2.2k tokensUpdated today
    Auto-check passed
  • Docs

    Opentrons/opentrons

    Authoring and styling guidelines for the Opentrons /docs MkDocs project.

    523 GitHub stars~2.8k tokensUpdated today
    Auto-check passed
  • E2E Testing

    Opentrons/opentrons

    E2E testing conventions for Protocol Designer and Labware Library using Playwright + pytest in e2e-testing/.

    523 GitHub stars~3k tokensUpdated today
    Auto-check: notes
  • JS Package Testing

    Opentrons/opentrons

    Vite demo and Playwright + Applitools tests for packed @opentrons JS packages in js-package-testing/.

    523 GitHub stars~1.2k tokensUpdated today
    Auto-check: notes

Works with

Questions about AI Client

What does AI Client do?

Conventions for the opentrons-ai-client React/TypeScript frontend — project structure, API integration, state management (Jotai), feature flags, types, and testing. AI Client is an agent skill from Opentrons/opentrons. Conventions for the opentrons-ai-client React/TypeScript frontend — project structure, API integration, state management (Jotai), feature flags, types, and testing.

When should I use AI Client?

AI Client fits situations like: working with files in opentrons-ai-client/; discussing the AI client application.

How do I install AI Client in Claude Code?

Run `npx skills add Opentrons/opentrons --skill ai-client -a claude-code`. Or copy the skill folder (.cursor/skills/ai-client in Opentrons/opentrons) into .claude/skills/ai-client in your project. Claude Code loads it when a task matches its description.

How do I install AI Client in Codex?

Run `npx skills add Opentrons/opentrons --skill ai-client -a codex`. Or copy the skill folder (.cursor/skills/ai-client in Opentrons/opentrons) into .agents/skills/ai-client in your project. Codex loads it when a task matches its description.

Can I use AI Client 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 Opentrons/opentrons --skill ai-client -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ai-client, .gemini/skills/ai-client, .github/skills/ai-client and .opencode/skills/ai-client in your project.

What does AI Client need to run?

Going by SKILL.md and its folder, AI Client needs the command-line tools its instructions call (make).

Does AI Client 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 AI Client 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 AI Client use?

AI Client is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does AI Client use?

About 1.6k tokens (SKILL.md is roughly 6.4k 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 AI Client?

Skills that share tags, products or a category with AI Client: Frontend Typescript Rules (shinpr/ai-coding-project-boilerplate, 233 stars), React Flow Node TS (microsoft/skills, 3.1k stars), React Generate Skill (jiushiwon/wg-skills, 114 stars) and Typescript Rules (shinpr/claude-code-workflows, 693 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains AI Client?

Opentrons (a GitHub organization) maintains it in Opentrons/opentrons, which has 523 GitHub stars. The repository holds 17 skills in this directory. The repository was last updated on October 8, 2026.

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