Agent skill

Clean Jsx No Inline Ternaries

by flornkm in flornkm/personal-site

Keep JSX and component logic clean by minimizing inline ternaries, nested conditionals, and stringified conditional classes.

No licenceAuto-check passedFrontend & Design

Install Clean Jsx No Inline Ternaries

skills CLI
$ npx skills add flornkm/personal-site --skill clean-jsx-no-inline-ternaries -a claude-code

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

GitHub CLI
$ gh skill install flornkm/personal-site clean-jsx-no-inline-ternaries --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/flornkm/personal-site.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/clean-jsx-no-inline-ternaries .claude/skills/clean-jsx-no-inline-ternaries && 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
clean-jsx-no-inline-ternaries
GitHub stars
151
Token cost
~988 tokens
SKILL.md length
313 words
Files
1
Skills in repo
14
Repo updated
First seen
Licence
None found

At a glance

Keep JSX and component logic clean by minimizing inline ternaries, nested conditionals, and stringified conditional classes.

  • Works in 7 steps: Zero ternaries inside className strings.… → At most one ternary per JSX expression.… → Use && for "render or nothing", not… → …
  • Editing a React component
  • SKILL.md covers The rules, When a ternary is fine and Review checklist before saving
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Clean Jsx No Inline Ternaries is an agent skill from flornkm/personal-site. Keep JSX and component logic clean by minimizing inline ternaries, nested conditionals, and stringified conditional classes. Hoist branching out of the render tree. Use whenever writing or editing a React component, especially when class strings, JSX, or props start branching.

Its SKILL.md is about 990 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 React components. The repository describes itself as: Florians personal site.

When your agent uses it

  • Editing a React component
  • Especially when class strings
  • Props start branching

Example prompts

  • “/clean-jsx-no-inline-ternaries”

Workflow steps

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

  1. Zero ternaries inside className strings. Use cn(...) with boolean expressions instead.
  2. At most one ternary per JSX expression. No nested a ? b : c ? d : e in markup. If you need two branches, hoist to a variable or early return
  3. Use && for "render or nothing", not ternaries with null.
  4. No ternaries that produce props. Compute the value above the return.
  5. Lift complex conditionals into named helpers or cva. If a component's class string branches on three or more booleans, that is a variant…
  6. Prefer lookup tables to ternary chains when branching on a discrete value
  7. Early returns over wrapping ternaries at the top of a component.

What it can do on your machine

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

Clean Jsx No Inline Ternaries loads about 988 tokens when it runs. Until then it costs about 77 tokens; SKILL.md has 313 words of instructions outside code blocks.

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

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

Without a licence we can't republish the file, so here is its outline and opening line. It has 313 words (~988 tokens).

“Inline ternaries and nested conditionals inside JSX are the fastest way to make a component unreadable. Push branching out of the render tree so the JSX shows shape, not logic.”

— opening of SKILL.md by flornkm
name
clean-jsx-no-inline-ternaries

Read the full SKILL.md on GitHub

Files

Just SKILL.md in .agents/skills/clean-jsx-no-inline-ternaries of flornkm/personal-site.

Open the folder on GitHubat commit 9e03437

Compare with similar skills

Clean Jsx No Inline Ternaries 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.

Clean Jsx No Inline Ternaries compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Clean Jsx No Inline Ternaries this skillflornkm/personal-site151—~988Automated safety check: PassNone
Web Artifacts Builderanthropics/skills180k40 repos~769Automated safety check: PassApache-2.0
Tailwindcss Developmentanonaddy/anonaddy4.9k10 repos~865Automated safety check: PassMIT
Core Component Library PatternsChrisWiles/claude-code-showcase6.1k8 repos~1.2kAutomated safety check: PassNone
React Router Developmentremix-run/react-router57k1 repos~1.5kAutomated safety check: PassMIT
React UI State PatternsChrisWiles/claude-code-showcase6.1k8 repos~1.6kAutomated safety check: PassNone

Similar skills

  • Web Artifacts Builder

    anthropics/skills

    Official

    Builds multi-component claude.ai HTML artifacts as a small React, TypeScript and Tailwind project, then bundles it into one shareable HTML file.

    180k GitHub starsUsed in 40 repos~769 tokens
    Frontend & DesignAuto-check passed
  • Tailwindcss Development

    anonaddy/anonaddy

    Always invoke when the user's message includes 'tailwind' in any form.

    4.9k GitHub starsUsed in 10 repos~865 tokens
    Frontend & DesignAuto-check passed
  • Core Component Library Patterns

    ChrisWiles/claude-code-showcase

    Reference for building UI with a token-based core component library: spacing, color and typography tokens, Box, stacks, Text, Button, Input and Card, plus layout patterns.

    6.1k GitHub starsUsed in 8 repos~1.2k tokens
    Frontend & DesignAuto-check passed
  • React Router Development

    remix-run/react-router

    Guides work on React Router apps by first identifying whether the app uses Framework, Data or Declarative mode, then loading the matching reference and the installed package docs.

    57k GitHub starsUsed in 1 repo~1.5k tokens
    Frontend & DesignAuto-check passed
  • React UI State Patterns

    ChrisWiles/claude-code-showcase

    Sets patterns for React interfaces: when to show loading spinners or skeletons, how to surface errors, how to disable buttons during async work and how to handle empty lists.

    6.1k GitHub starsUsed in 8 repos~1.6k tokens
    Frontend & DesignAuto-check passed
  • Chakra UI v3 Builder

    chakra-ui/chakra-ui

    Builds responsive, accessible Chakra UI v3 components and layouts, sets up Chakra in new or existing projects, and designs themes with tokens, semantic tokens and recipes.

    41k GitHub stars~3.1k tokensUpdated 3 days ago
    Frontend & DesignAuto-check passed

More from flornkm/personal-site

All 14 skills in this repo
  • Animation Vocabulary

    flornkm/personal-site

    Reverse-lookup glossary that turns a vague description of a web animation or motion effect into its exact term ("the bouncy thing when a popover opens" → Pop in; "the iOS rubber-band scroll" →…

    151 GitHub starsUsed in 13 repos~3.2k tokens
    Auto-check passed
  • Apple Design

    flornkm/personal-site

    Apple's approach to interface design and fluid, physical motion, translated for the web.

    151 GitHub starsUsed in 19 repos~5.6k tokens
    Auto-check passed
  • Central Icons

    flornkm/personal-site

    ALWAYS ACTIVE. An agent skill from flornkm/personal-site.

    151 GitHub stars~475 tokensUpdated today
    Auto-check: notes
  • Design System

    flornkm/personal-site

    How to build UI in this repo — compose classes with cn, use the CSS-variable design tokens (never raw hex/px), reuse the typographic and ui/ primitives, and define variants with cva like the…

    151 GitHub stars~1.6k tokensUpdated today
    Auto-check passed
  • Prefer Container Queries

    flornkm/personal-site

    Enforce Tailwind container queries over viewport breakpoints for responsive components.

    151 GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Improve Animations

    flornkm/personal-site

    Survey a codebase's animation and motion code as a senior motion advisor, then produce a prioritized audit and self-contained implementation plans for other agents (or cheaper models) to execute.

    151 GitHub starsUsed in 12 repos~2k tokens
    Auto-check: warnings

Questions about Clean Jsx No Inline Ternaries

What does Clean Jsx No Inline Ternaries do?

Keep JSX and component logic clean by minimizing inline ternaries, nested conditionals, and stringified conditional classes. Clean Jsx No Inline Ternaries is an agent skill from flornkm/personal-site. Keep JSX and component logic clean by minimizing inline ternaries, nested conditionals, and stringified conditional classes.

When should I use Clean Jsx No Inline Ternaries?

Clean Jsx No Inline Ternaries fits situations like: editing a React component; especially when class strings; props start branching.

How do I install Clean Jsx No Inline Ternaries in Claude Code?

Run `npx skills add flornkm/personal-site --skill clean-jsx-no-inline-ternaries -a claude-code`. Or copy the skill folder (.agents/skills/clean-jsx-no-inline-ternaries in flornkm/personal-site) into .claude/skills/clean-jsx-no-inline-ternaries in your project. Claude Code loads it when a task matches its description.

How do I install Clean Jsx No Inline Ternaries in Codex?

Run `npx skills add flornkm/personal-site --skill clean-jsx-no-inline-ternaries -a codex`. Or copy the skill folder (.agents/skills/clean-jsx-no-inline-ternaries in flornkm/personal-site) into .agents/skills/clean-jsx-no-inline-ternaries in your project. Codex loads it when a task matches its description.

Can I use Clean Jsx No Inline Ternaries 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 flornkm/personal-site --skill clean-jsx-no-inline-ternaries -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/clean-jsx-no-inline-ternaries, .gemini/skills/clean-jsx-no-inline-ternaries, .github/skills/clean-jsx-no-inline-ternaries and .opencode/skills/clean-jsx-no-inline-ternaries in your project.

What does Clean Jsx No Inline Ternaries need to run?

SKILL.md names no scripts, command-line tools or credentials: Clean Jsx No Inline Ternaries is instructions for the agent only.

Does Clean Jsx No Inline Ternaries 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 Clean Jsx No Inline Ternaries 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 Clean Jsx No Inline Ternaries use?

No licence was found for Clean Jsx No Inline Ternaries or its repository. Without one, default copyright applies: ask the author before reusing or redistributing it.

How many tokens does Clean Jsx No Inline Ternaries use?

About 988 tokens (SKILL.md is roughly 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 Clean Jsx No Inline Ternaries?

Skills that share tags, products or a category with Clean Jsx No Inline Ternaries: Web Artifacts Builder (anthropics/skills, 180k stars), Tailwindcss Development (anonaddy/anonaddy, 4.9k stars), Core Component Library Patterns (ChrisWiles/claude-code-showcase, 6.1k stars) and React Router Development (remix-run/react-router, 57k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Clean Jsx No Inline Ternaries?

flornkm (a GitHub user) maintains it in flornkm/personal-site, which has 151 GitHub stars. The repository holds 14 skills in this directory. The repository was last updated on October 9, 2026.

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