Loading component…
Loading component…
This component has not been implemented locally yet.
To reuse this local React demo, copy all files from the Code tab into the same folder, then import Agent/Skills from ./agent-skills.
import { AgentSkillsScreen } from "@/components/ui/agent-skills";
export default function Page() {
const [skills, setSkills] = useState(initialSkills);
return (
<AgentSkillsScreen
skills={skills} // installed and not – Discover shows the rest
onInstall={(id) => api.installSkill(id)} // a promise keeps the ring filling until it settles
onToggle={(id, enabled) => api.setSkill(id, { enabled })}
onRemove={(id) => api.removeSkill(id)}
onCreate={(skill) => api.createSkill(skill)} // from the New skill window
onNavigate={(label) => router.push(routes[label])}
/>
);
}| Name | Type | Default | Description |
|---|---|---|---|
| skills | { id; name; description; category; icon?; tone?; source: "builtin" \| "yours" \| "community"; author?; version?; installed?; enabled?; uses?; installs?; triggers?; steps?; needs?; usedIn?: { task; at }[] }[] | Every skill. Installed ones are calm cards with a switch under Installed, the rest cards with a + under Discover; the categories become filters above. triggers are things you might say that make it step in; steps what it does; daily runs per day for the last 14 days (the bars in the panel); needs the apps and rights it uses (with a way to Permissions); uses how often it ran this week; installs how many people use a community skill. Pass a stable array (state) | |
| defaultSelected | string \| null | "voice" | The skill open on the right when the screen starts |
| onInstall | (id) => void \| Promise | Called with Install – the ring fills for at least 1.4 seconds and until a returned promise settles; then the skill joins Installed | |
| onToggle | (id, enabled) => void | Called when a skill is switched on or off | |
| onRemove | (id) => void | Called with Remove – yours and community skills; built-in ones can only be turned off | |
| onCreate | (skill: Skill) => void | Called with a skill made in New skill – described to the agent (it drafts name, use and steps to check), written by hand or read from an uploaded SKILL.md; it lands among yours and opens on the right | |
| onSelect | (id) => void | Called when a skill is opened | |
| onNavigate | (label: string) => void | Called with the label of a sidebar item – and with "Permissions" from What it needs | |
| labels | { skills?; installed?; discover?; install?; installing?; done?; runsWhen?; steps?; needs?; … } | Labels, e.g. for a translation | |
| className | string | Extra class on the root |
Your skills and Discover share one grid – tiles fill the width in as many columns as fit; the category filters scroll sideways when they don't fit
Discover cards fill the width in as many columns as fit; one column on phones
Below 560px everything is one column, the search folds to its icon until you type and New skill to its +
Touch targets grow to 36px and the switch to 40 × 24 on touch screens
Dark mode built in: switches when an ancestor (usually <html>) has the class dark or data-theme="dark"