PixelPilot: Instructions file for GitHub Copilot

vscode/.github/instructions/uiux-component-docs.instructions.md

PixelPilot uiux-component-docs.instructions.md is an instructions file for GitHub Copilot from dev-lou/PixelPilot. It costs 2,951 tokens per session, scanned A, original, MIT.

A documentation generator for frontend components written in React or Vue. It creates pages describing component properties, examples, and design-token usage from the source code.

In plain words
What is it for?
It is for generating React documentation with react-docgen, Vue documentation with vuese, or component sites with VitePress.
Why use it?
It removes the need to write and update basic component documentation by hand whenever the source changes.

Instructions file for GitHub Copilot

Written for GitHub Copilot: a Copilot instructions file.

This is dev-lou/PixelPilot's own configuration. It tells GitHub Copilot how to work on PixelPilot itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything PixelPilot configures →

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import Button from '../../src/components/Button.vue';.

Reuse

Borrowing it

Nothing to install: this file belongs to dev-lou/PixelPilot. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/dev-lou/PixelPilot/main/vscode/.github/instructions/uiux-component-docs.instructions.md
Clone the repo
git clone --depth 1 https://github.com/dev-lou/PixelPilot

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 PixelPilot uiux-component-docs.instructions.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/dev-lou/pixelpilot/uiux-component-docs/github.svg)](https://agentmods.dev/instructions/dev-lou/pixelpilot/uiux-component-docs)
Your own site
<a href="https://agentmods.dev/instructions/dev-lou/pixelpilot/uiux-component-docs"><img src="https://agentmods.dev/badge/instructions/dev-lou/pixelpilot/uiux-component-docs/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for PixelPilot uiux-component-docs.instructions.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/dev-lou/pixelpilot/uiux-component-docs"><img src="https://agentmods.dev/badge/instructions/dev-lou/pixelpilot/uiux-component-docs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,951 This file is loaded in full into every session.
When invoked 2,951 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.02951 $0.02951
Opus 5.5 $0.01180 $0.01180
Sonnet 5.5 $0.00590 $0.00590
Haiku 4.5 $0.00295 $0.00295

Measured 2mo ago against content hash 3b69834f1433, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

PixelPilot uiux-component-docs.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 2mo 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.

vscode/.github/instructions/uiux-component-docs.instructions.md · 482 lines

How it starts

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

Component Documentation Skill

Generate documentation for components automatically from source code.


CORE PRINCIPLE

Rule: Every component should have documentation generated from its source code. Documentation must include props, examples, and design token usage.


REACT (REACT-DOCGEN + MARKDOWN)

Setup

npm install -D react-docgen-typescript typescript

Script

// scripts/generate-docs.ts
import * as fs from 'fs';
import * as path from 'path';
import { parse } from 'react-docgen-typescript';

const COMPONENTS_DIR = './src/components';
const DOCS_DIR = './docs/components';

// Ensure docs directory exists
if (!fs.existsSync(DOCS_DIR)) {
  fs.mkdirSync(DOCS_DIR, { recursive: true });
}

// Parser options
const options = {
  savePropValueAsString: true,
  shouldExtractLiteralValuesFromEnum: true,
  shouldRemoveUndefinedFromOptional: true,
  propFilter: (prop: any) => {
    // Filter out HTML attributes
    if (prop.declarations?.length > 0) {
      return prop.declarations.some(
        (d: any) => !d.fileName.includes('node_modules')
      );
    }
    return true;
  },
};

// Find all component files
function findComponents(dir: string): string[] {
  const files: string[] = [];
  
  fs.readdirSync(dir).forEach(file => {
    const fullPath = path.join(dir, file);
    const stat = fs.statSync(fullPath);
    
    if (stat.isDirectory()) {
      files.push(...findComponents(fullPath));
    } else if (file.match(/\.(tsx|ts)$/) && !file.includes('.test.') && !file.includes('.stories.')) {
      files.push(fullPath);
    }
  });
  
  return files;
}

// Generate markdown for a component
function generateMarkdown(component: any): string {
  let md = `# ${component.displayName}\n\n`;
  
  if (component.description) {
    md += `${component.description}\n\n`;
  }
  
  // Props table
  const props = Object.entries(component.props || {});
  if (props.length > 0) {
    md += `## Props\n\n`;
    md += `| Prop | Type | Default | Required | Description |\n`;
    md += `|------|------|---------|----------|-------------|\n`;
    
    props.forEach(([name, prop]: [string, any]) => {
      const type = prop.type?.name || 'unknown';
      const defaultValue = prop.defaultValue?.value || '-';
      const required = prop.required ? '✅' : '❌';
      const description = prop.description || '-';
      
      md += `| \`${name}\` | \`${type}\` | \`${defaultValue}\` | ${required} | ${description} |\n`;
    });
    
    md += '\n';
  }
  
  // Design tokens section
  md += `## Design Tokens Used\n\n`;
  md += `> This component uses the following design tokens:\n\n`;
  md += `\`\`\`css\n`;
  md += `/* Spacing */\n`;
  md += `var(--space-2), var(--space-4)\n\n`;
  md += `/* Colors */\n`;
  md += `var(--accent), var(--text), var(--border)\n\n`;
  md += `/* Radius */\n`;
  md += `var(--radius-md)\n`;
  md += `\`\`\`\n\n`;
  
  // Usage example
  md += `## Usage\n\n`;
  md += `\`\`\`tsx\n`;
  md += `import { ${component.displayName} } from '@/components/${component.displayName}';\n\n`;
  md += `function Example() {\n`;
  md += `  return (\n`;
  md += `    <${component.displayName}\n`;
  
  // Add example props
  props.slice(0, 3).forEach(([name, prop]: [string, any]) => {
    if (prop.required) {
      const exampleValue = getExampleValue(prop.type?.name);
      md += `      ${name}={${exampleValue}}\n`;
    }
  });
  
  md += `    />\n`;
  md += `  );\n`;
  md += `}\n`;
  md += `\`\`\`\n\n`;
  
  return md;
}

function getExampleValue(type: string): string {
  switch (type) {
    case 'string': return '"example"';
    case 'number': return '42';
    case 'boolean': return 'true';
    case 'function':
    case '() => void': return '() => {}';
    default: return '...';
  }
}

// Main execution
const componentFiles = findComponents(COMPONENTS_DIR);

componentFiles.forEach(file => {
  try {
    const components = parse(file, options);
    
    components.forEach(component => {
      if (component.displayName) {
        const markdown = generateMarkdown(component);
        const outputPath = path.join(DOCS_DIR, `${component.displayName}.md`);
        
        fs.writeFileSync(outputPath, markdown);
        console.log(`✅ Generated: ${outputPath}`);
      }
    });
  } catch (error) {
    console.warn(`⚠️ Skipped: ${file}`);
  }
});

// Generate index
const indexContent = `# Component Documentation\n\n` +
  fs.readdirSync(DOCS_DIR)
    .filter(f => f.endsWith('.md') && f !== 'index.md')
    .map(f => `- [${f.replace('.md', '')}](./${f})`)
    .join('\n');

fs.writeFileSync(path.join(DOCS_DIR, 'index.md'), indexContent);
console.log('\n✅ Generated index.md');

Read the full file on GitHub · 482 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. 2mo ago First seen · 482 lines · 2,951 tokens per session scan A 3b69834f1433

Subscribe to this mod's changes

PixelPilot uiux-component-docs.instructions.md is an instructions file published in the GitHub repository dev-lou/PixelPilot (2 stars, last pushed 7mo ago), licensed MIT. It adds 2,951 tokens to every session, about $0.0118 per session on Opus 5.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-08-31.

Related

PixelPilot uiux-component-docs.instructions.md compared with instructions from other repositories

PixelPilot uiux-component-docs.instructions.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
PixelPilot uiux-component-docs.instructions.mddev-lou/PixelPilotInstructions file27mo agoMITA2,951GitHub Copilot
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode