promote-component

promote-component is a skill for Claude Code, Codex from lukedj78/dev-flow. It costs 193 tokens per session (3,010 once invoked), scanned A, original, MIT.

A tool for moving React or React Native components to a shared location when they are used in several parts of a codebase. It follows the Rule of Three: reuse is considered after a component appears in three places.

In plain words
What is it for?
Use it to scan for components worth sharing or to move a named component, updating its references and recording the change.
Why use it?
It reduces duplicated components and helps keep shared code in an appropriate location, including in Next.js, Expo, or monorepo projects.

Skill for Claude CodeCodex

Part of the dev-flow plugin — 45 skills shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/lukedj78/dev-flow/promote-component
Any agent
npx skills add lukedj78/dev-flow --skill promote-component
Clone the repo
git clone --depth 1 https://github.com/lukedj78/dev-flow

Made for: Claude Code, Codex.

Or install dev-flow, the plugin that ships this one along with the rest of its 45 skills.

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 promote-component

README.md
[![agentmods](https://agentmods.dev/badge/skills/lukedj78/dev-flow/promote-component.svg)](https://agentmods.dev/skills/lukedj78/dev-flow/promote-component)
Your own site
<a href="https://agentmods.dev/skills/lukedj78/dev-flow/promote-component"><img src="https://agentmods.dev/badge/skills/lukedj78/dev-flow/promote-component.svg" alt="Measured on agentmods" height="20"></a>
Per session 193 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,010 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00193 $0.03010
Opus 5 $0.00097 $0.01505
Sonnet 5 $0.00039 $0.00602
Haiku 4.5 $0.00019 $0.00301

Measured 3d ago against content hash 17bd1f25805b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

promote-component 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 3d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/promote.py, scripts/scan_promotion.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

promote-component/SKILL.md · 227 lines

How it starts

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

promote-component — Rule of Three automation

Contract

See references/contracts.md (vendored from dev-flow). Key facts:

  • Reads <project-root>/.workflow/meta.json#stack.framework (must be "next", "expo-rn", or "monorepo").
  • Reads meta.json#stack.route_groups (optional, helps detect the target level).
  • Modifies code in <project-root>/ (or <project-root>/apps/<web|mobile>/ for monorepo).
  • Does NOT modify meta.json#phase. Appends to meta.json#history.
  • Always idempotent: re-running the scan reports the same candidates; re-running a promote on an already-promoted component does nothing.

When this skill applies

  • User says "scan promotion candidates" / "scansiona candidati promozione" → run the scan.
  • User says "promote " / "promovi " → execute the move.
  • The user is reviewing the codebase after a feature lands and wants to clean up duplication.

Orchestrator does NOT route here automatically — invoked on demand.

Knowledge dependencies

  • composition-patterns-guide/SKILL.md — the 7 Vercel composition rules + our colocation rules.
  • references/colocation-rules.md — the canonical Rule of Three + L0/L1/L2 spec.

Web vs mobile targets (read this first)

Next.js App Router supports _-prefixed private folders — app/<route>/_components/ is a valid non-routable convention there. Expo Router does not: every file under app/ (aside from a short reserved list) becomes a real route, so app/<route>/_components/ would create a ghost route on mobile, not a private folder. Settled upstream, not pending: the request (expo/expo#44696) was closed won't fix on 2026-06-01 — Expo Router wants components outside app/ by design. Confirmed mechanically at [email protected]: no underscore rule in the route scanner. Treat mobile app/ as routes-only, permanently. See references/colocation-rules.md.

Consequently this skill uses different scan/target paths per platform — see references/colocation-rules.md for the full model and rationale. Summary:

Read the full file on GitHub · 227 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 3d ago First seen · 227 lines · 193 tokens per session scan A 17bd1f25805b

Subscribe to this mod's changes

promote-component is a skill published in the GitHub repository lukedj78/dev-flow (5 stars, last pushed 5d ago), licensed MIT. It adds 193 tokens to every session and 3,010 once invoked, about $0.0010 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-31.

Related

Other skills, from other repositories

formkit

Use when working with FormKit forms, validation, schema, or custom inputs in React, Vue, or Nuxt projects.

formkit/formkit · 28 tokens

writing-react-native-storybook-stories

Create and edit React Native Storybook stories using Component Story Format (CSF). Use when writing .stories.tsx files, adding stories to React Native components, configuring Storybook addons (controls, actions, backgrounds, notes), setting up argTypes, decorators, parameters, or working with portable stories for…

storybookjs/react-native · 83 tokens

setup-react-native-storybook

Set up Storybook for React Native in Expo, React Native CLI, or Re.Pack projects. Use when adding Storybook to a project, configuring metro.config.js with withStorybook, creating .rnstorybook configuration files, setting up Storybook routes in Expo Router, configuring getStorybookUI, or adding the StorybookPlugin to a…

storybookjs/react-native · 102 tokens

codegen-html

Scaffold and iterate on standalone Preact + HTM applications with zero build dependencies.

initializ/forge · 20 tokens

codegen-react

Scaffold and iterate on Vite + React applications.

initializ/forge · 14 tokens

upgrading-react-native-storybook

Incrementally upgrade React Native Storybook across the supported migration paths. Use when upgrading @storybook/react-native projects from 5.3.x to 6.5.x, 6.5.x to 7.6.x, 7.6.x to 8.3.x, 8.x to 9.x, or 9.x to 10.x. Detect the currently installed Storybook version, choose only the next migration step, update…

storybookjs/react-native · 151 tokens