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-copyTest ticks
Hand this component to your coding agent
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 preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.
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.
oxyn add agent-prompt-copyUsage
The preview is free. Pro opens the code of every Pro component, screen and template.
Examples
Prompt
A prompt for the first agent.
Test ticks
Hand this component to your coding agent
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 preview is free. Pro opens the code of every Pro component, screen and template.
Skill
A skill file for Cursor.
Test ticks
Hand this component to your coding agent
# .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 preview is free. Pro opens the code of every Pro component, screen and template.
Button only
Just the button (Oxyn extra).
Test ticks
Hand this component to your coding agent
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
API reference
AgentPromptCopy
| Prop | Type | Default | Description |
|---|---|---|---|
nowrequired | ClockMs | — | Host clock. |
agent | usize | Default::default() | Starting agent (index into the agents list). |
format | usize | Default::default() | Starting format (0 prompt, 1 skill file, 2 install command). |
preview | bool | true | Show the preview of what will be copied. |
fail | bool | Default::default() | The clipboard refuses (error scenario). |
Read from the Rust signature and doc comments.
Keyboard interactions
| Key | Action |
|---|---|
| EnterorSpace | Copy (menu closed) or pick the row (menu open) |
| ↓ | Open the menu |
| ↑ ↓ · HomeorEnd | Move in the menu |
| Escape | Close 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.
| Transition | Duration | Easing |
|---|---|---|
| Copied state | 1800 ms (COPIED_MS) | — |
| Menu | 180 ms | ease-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
AgentPromptCopyfromoxyn_dioxusand includeSTATUS_INDICATOR_CSSplus the token stylesheet once. - A GPUI version exists:
XPostViewinoxyn_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.