Skip to content
Back

Agent prompt copyPro

A Give to your agent split button: the main part copies an agent-ready hand-off for the chosen coding agent, the chevron picks the agent (official marks) and the format (prompt, skill file, install command), and the preview shows exactly what is copied.

oxyn add agent-prompt-copy

Test ticks

Hand this component to your coding agent

Claude Code · Prompt191 characters
Add the Oxyn Test ticks component to this project.
1. Run `oxyn add test-ticks`.
2. Render `oxyn_dioxus::TestTicks` where test results show.
3. Wire `now` to the app clock.
(For Claude Code.)
The code is part of Oxyn Pro

The preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.

Get Pro

Rendered from Rust at build time · goes live when visible

When to use

  • Hand a component to a coding agent in one press: the exact prompt, skill file or install command that agent understands.

When not to use

  • An action label that swaps to its next state while keeping its place: use Action states instead.
  • A pill that confirms by splitting: use Split confirm instead.
  • Eight variants and five sizes, with a shimmering loading state, a progress fill, press-and-hold for destructive actions and a shortcut chip: use Button instead.

Installation

Agent prompt copy is part of Oxyn Pro; the preview is free. Pro items install with the oxyn CLI once your licence is signed in; until then Pro members copy the code from this page.

Terminal
oxyn add agent-prompt-copy

Usage

Dioxus · rust
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Examples

Prompt

A prompt for the first agent.

Test ticks

Hand this component to your coding agent

Claude Code · Prompt191 characters
Add the Oxyn Test ticks component to this project.
1. Run `oxyn add test-ticks`.
2. Render `oxyn_dioxus::TestTicks` where test results show.
3. Wire `now` to the app clock.
(For Claude Code.)
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Skill

A skill file for Cursor.

Test ticks

Hand this component to your coding agent

Cursor · Skill file192 characters
# .cursor/rules/oxyn-test-ticks.md
---
name: oxyn-test-ticks
when: adding a test run view
---
Use `oxyn_dioxus::TestTicks`. Pass the host clock as `now`.
Keep the tick grid keyboard reachable.
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Button only

Just the button (Oxyn extra).

Test ticks

Hand this component to your coding agent

Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

API reference

AgentPromptCopy

PropTypeDefaultDescription
nowrequiredClockMs—Host clock.
agentusizeDefault::default()Starting agent (index into the agents list).
formatusizeDefault::default()Starting format (0 prompt, 1 skill file, 2 install command).
previewbooltrueShow the preview of what will be copied.
failboolDefault::default()The clipboard refuses (error scenario).

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
EnterorSpaceCopy (menu closed) or pick the row (menu open)
↓Open the menu
↑ ↓ · HomeorEndMove in the menu
EscapeClose the menu

Accessibility

  • The menu uses radio items for agent and format, each with its checked state.
  • Copy results are announced, including when the clipboard is blocked.
  • The preview is focusable so the text can be selected by keyboard.
From the spec

Menu items are menuitemradio with aria-checked; ArrowDown opens, arrows move, Enter picks, Escape closes; copy results are announced. Every action returns the line the polite live region announces. The focus outline shows only for keyboard focus.

Motion & interaction

The split button shows the chosen agent mark; copying morphs it to a check with the agent name; the chevron opens a menu with radio items for agent and format; the preview updates live.

Timing

Everything on screen is derived from the host clock now (no timers in the component), so playback, tests and the GPUI view agree.

TransitionDurationEasing
Copied state1800 ms (COPIED_MS)—
Menu180 msease-out

Reduced motion: CSS motion is cut to a frame; decorative bands and rings are hidden or still; state and text changes stay.

Responsive behaviour

  • The button drops under the title when space runs out; the preview wraps long lines.
Edge cases (spec)

The button drops under the title when narrow; the preview wraps long lines and scrolls past 180 px. Agent marks are the official coloured marks (Lobe Icons / Simple Icons). Checked at 1440, 768 and 390 px in light and dark with no text overlap. Chrome is monochrome grey; colour is semantic only (success, warning, danger, info) plus the official coloured brand marks.

Notes for AI

  • Import AgentPromptCopy from oxyn_dioxus and include STATUS_INDICATOR_CSS plus the token stylesheet once.
  • A GPUI version exists: XPostView in oxyn_gpui.
  • Props to set first: now.
  • It reads a clock (now) for live timers; pass one clock for the whole page rather than one per component.
  • Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.

Guides

Oxyn · 74 free components · 264 Pro components · 96 screens · 20 blocks · Dioxus and GPUI