ykb-ui-agent
v0.1.0
Published
VS Code Copilot agents, prompts, and instructions for building with ykb-ui from Figma MCP and Code Connect.
Readme
ykb-ui-agent
VS Code Copilot assets for implementing Figma designs with Figma MCP, Code Connect, and ykb-ui.
This package is the source for templates that consumer repositories can install into their own .github folders.
Target Workflow
- Figma MCP exposes the selected Figma frame or frame URL to VS Code Copilot.
- Code Connect resolves Figma components to real
ykb-uicomponents, imports, props, and examples. - The
YKB UI Agentcustom agent applies repository conventions and generates local code. - The developer reviews and tests changes locally before opening a pull request.
Install Command
Run this from the consumer repository root:
npx ykb-ui-agent initUseful options:
npx ykb-ui-agent init --dry-run
npx ykb-ui-agent init --check
npx ykb-ui-agent init --forceTemplate Output
.github/
agents/
ykb-ui-agent.agent.md
prompts/
figma-to-page.prompt.md
figma-to-component.prompt.md
review-ykb-ui-usage.prompt.md
instructions/
ykb-ui.instructions.md
copilot-instructions.mdVS Code Usage
After the templates are installed into a consumer repository:
- Select the
YKB UI Agentagent from Copilot Chat. - Run
/figma-to-page <Figma frame URL>to generate a local page. - Run
/figma-to-component <Figma frame or component URL>to generate a reusable component. - Run
/review-ykb-ui-usageto review generated code forykb-uiand Code Connect alignment.
The Figma MCP server is assumed to be named figma. If a consumer repository uses a different MCP server name, update the tools in .github/agents/ykb-ui-agent.agent.md.
Existing .github Files
The init command preserves consumer-owned files.
- If a target file does not exist, create it.
- If
.github/copilot-instructions.mdexists, append or update only the managed ykb-ui section. - If a package-owned prompt or agent file exists with ykb-ui markers, update it.
- If a conflicting file exists without ykb-ui markers, report the conflict instead of overwriting it.
- Use
--dry-runto preview changes without writing files. - Use
--checkto verify whether the repository is already up to date. - Use
--forceto overwrite conflicting package-owned files.
Managed sections use these markers:
<!-- ykb-ui-agent:start version="0.1.0" -->
<!-- ykb-ui-agent:end -->Current Scope
V1 details the Button mapping only. Other common components have placeholder sections in ykb-ui.instructions.md so future mappings can be added without changing the file structure.
