ui copilot-instructions.md

ui copilot-instructions.md is an instructions file for GitHub Copilot from farsi-ui/ui. It costs 1,533 tokens per session, scanned A, original, MIT.

Project instructions for Farsi UI, a copy-and-customize React component library designed for Persian and other right-to-left interfaces.

In plain words
What is it for?
Building and modifying RTL-aware Next.js interfaces with React, TypeScript, Tailwind CSS, and reusable UI components.
Why use it?
They give an agent the project's architecture, technology choices, and design rules so generated changes fit the existing codebase.

Instructions file for GitHub Copilot

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 instructions/farsi-ui/ui/copilot-instructions
Clone the repo
git clone --depth 1 https://github.com/farsi-ui/ui

Made for: GitHub Copilot.

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 ui copilot-instructions.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/farsi-ui/ui/copilot-instructions.svg)](https://agentmods.dev/instructions/farsi-ui/ui/copilot-instructions)
Your own site
<a href="https://agentmods.dev/instructions/farsi-ui/ui/copilot-instructions"><img src="https://agentmods.dev/badge/instructions/farsi-ui/ui/copilot-instructions.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,533 This file is loaded in full into every session.
When invoked 1,533 The same file — it is already loaded in full.
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.01533 $0.01533
Opus 5 $0.00766 $0.00766
Sonnet 5 $0.00307 $0.00307
Haiku 4.5 $0.00153 $0.00153

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

Security

Grade A, and why

ui copilot-instructions.md 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.

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.

.github/copilot-instructions.md · 153 lines

How it starts

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

Copilot Instructions for Farsi UI

Project Overview

Farsi UI is a Persian/RTL-first component library inspired by shadcn/ui. It is not a packaged library but a copy-paste foundation for building RTL-aware React UIs. Key difference from shadcn/ui: everything is RTL-native from the start, not an afterthought.

  • Stack: Next.js, React 18+, TypeScript, Tailwind CSS, Radix UI
  • Distribution: Copy components into your project and customize them
  • Philosophy: Full ownership, no lock-in, no hidden registry

Architecture & Project Structure

Core Directories

  • components/ui/ – Reusable, primitive UI components (50+ components)
  • components/docs/ – Documentation layout components (ComponentPreview, Header, Nav)
  • components/theme-provider.tsx – Next-themes wrapper for dark mode
  • app/docs/ – Next.js App Router documentation site
  • hooks/ – Custom hooks (use-mobile, use-toast)
  • lib/utils.ts – Central utility: cn() function (clsx + tailwind-merge)
  • app/globals.css – Design tokens + Tailwind config (Moon Design System color naming)

Design Token System

Colors use Moon Design System naming (e.g., --piccolo, --hales, --bulma) mapped to semantic colors via CSS variables:

  • --primary, --secondary, --destructive, --accent, etc.
  • Variables use oklch() color space for better perceptual uniformity
  • Dark mode variants prefixed with dark:

Critical Patterns

1. Component Structure

All UI components follow this pattern:

// 1. Use CVA (class-variance-authority) for variants
const componentVariants = cva("base-styles", {
  variants: {
    variant: { ... },
    size: { ... },
  },
  defaultVariants: { ... },
})

// 2. Accept component props + variant props + className
function Component({
  className,
  variant,
  size,
  asChild = false,
  ...props
}: React.ComponentProps<'element'> & VariantProps<typeof componentVariants> & { asChild?: boolean })

// 3. Use Slot if asChild=true (from @radix-ui/react-slot)
const Comp = asChild ? Slot : 'element'
return <Comp className={cn(componentVariants({ variant, size, className }))} {...props} />

Read the full file on GitHub · 153 lines

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 · 153 lines · 1,533 tokens per session scan A 1fb19edcc64a

Subscribe to this mod's changes

ui copilot-instructions.md is an instructions file published in the GitHub repository farsi-ui/ui (11 stars, last pushed 1mo ago), licensed MIT. It adds 1,533 tokens to every session, about $0.0077 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-09-02.

Related

Other instructions, from other repositories