theme-authoring

bởi microsoft

Thêm một chủ đề màu mới vào Ontology Playground. Sử dụng khi ai đó muốn tạo, soạn hoặc cắm một chủ đề, bảng màu, cách phối màu, chế độ tối hoặc sáng…

npx skills add https://github.com/microsoft/ontology-playground --skill theme-authoring

Theme Authoring Skill

Goal

Plug a new color theme into the Playground so it appears in the header theme picker, is remembered across sessions, and themes every surface (main graph, designer preview, learn pages) — with no component or graph-rendering edits.

Read First

  1. docs/theme-authoring-guide.md — full architecture, token table, gotchas, worked example.
  2. src/store/appStore.ts — ThemeId, THEME_OPTIONS, DARK_BASED_THEMES, isDarkTheme, themeClass.
  3. src/styles/app.css — the :root / .light-theme / .theme-aurora / .theme-crimson token blocks (copy the nearest one).

Intake Questions

Ask the user:

  1. Theme id (lowercase, e.g. indigo) and display label (e.g. Indigo)?
  2. Dark-based or light-based? (Determines DARK_BASED_THEMES membership and which block to copy.)
  3. Accent / signature color (used for the picker swatch and --ms-blue* / --info)?
  4. Any specific surface, text, or graph colors, or should they be derived from the accent?

Procedure

Make all edits in src/store/appStore.ts and src/styles/app.css. The guide's "Add a theme in six steps" section has copy-paste snippets.

  1. Add the id to the ThemeId union.
  2. Add a THEME_OPTIONS entry: { id, label, swatch } (swatch = accent hex).
  3. If dark-based, add the id to DARK_BASED_THEMES. If light-based, leave it out.
  4. Add a themeClass() case:
    • dark-based → return 'theme-<id>';
    • light-based → return 'light-theme theme-<id>'; (layer over the light base).
  5. Add a .theme-<id> block in app.css by copying .theme-aurora (dark) or .theme-crimson (light) and retuning the tokens.
  6. Verify (see below).

Critical Rules

  • Opaque canvas base for light themes. --chess-square-light is the graph canvas's solid backdrop. The theme class sits on .app-container, not <body>, and <body> stays dark (#1B1B1B). A translucent --chess-square-light lets the dark body bleed through → dark canvas + unreadable labels. Use an opaque light color (e.g. #FBF7F8), not rgba(..., 0.03). (Guide → Gotcha 1.)
  • Graph colors are CSS-driven. Define --graph-bg, --graph-node-text, --graph-edge-color, --graph-edge-text, --graph-edge-label-bg in the block; the graph and designer read them at runtime. No .tsx edits.
  • Meet WCAG 2.1 AA contrast. Text and labels need 4.5:1; graph edge lines and other non-text need 3:1. Set --on-accent (label color on accent fills) to a dark value for a light accent (white fails on Aurora's mint) and white for a dark accent. Edge text must clear 4.5:1 against --graph-edge-label-bg. Stat-tile icons/values (--stat-blue/green/purple) need 3:1 over the tint and cascade automatically (bright from :root, dark from .light-theme). Amber text/icons use --ms-yellow-fg (bright #FFB900 on dark, dark gold #8A6A00 on light); the .progress-fill stops --progress-from/--progress-to each need 3:1 on the --bg-tertiary track. npm run test:a11y enforces this for every theme. (Guide → Accessibility.)
  • Register dark themes in DARK_BASED_THEMES so darkMode is correct (graph fallback, label backplate, PNG export bg).
  • Don't introduce brand names in ids, labels, comments, or commits. Use generic palette names (e.g. Aurora, Crimson, Indigo, Sand).

Person Names

If any example data, docs, or sample instances need person names, use the name-generator skill — do not invent names.

Validate

npm run dev          # switch to the theme in the header; check graph, designer, learn pages
npm run test:a11y    # WCAG 2.1 AA contrast for every theme (also a CI gate)
npx tsc --noEmit     # the ThemeId union change is type-checked here
npm run build        # full build

If npm run build only changed public/learn.json (a timestamp), revert it: git checkout -- public/learn.json.

Done Criteria

  • New swatch + label appear in the picker; selection check mark tracks state.
  • Theme persists across reload (localStorage['theme']).
  • Main graph, designer preview, and learn pages are legible in the new theme; the graph canvas backdrop matches the theme (Gotcha 1 satisfied).
  • Dark, Light, Aurora, Crimson unchanged.
  • npm run test:a11y passes (WCAG 2.1 AA contrast for the new theme).
  • tsc --noEmit and npm run build pass; no brand references introduced.

Thêm skills từ microsoft

oss-growth
microsoft
Cá tính tăng trưởng OSS
agent-framework-azure-ai-py
microsoft
Xây dựng các tác nhân Azure AI Foundry bằng SDK Python của Microsoft Agent Framework (agent-framework-azure-ai). Sử dụng khi tạo các tác nhân bền vững với AzureAIAgentsProvider, sử dụng các công cụ được lưu trữ (trình thông dịch mã, tìm kiếm tệp, tìm kiếm web), tích hợp máy chủ MCP, quản lý chuỗi hội thoại hoặc triển khai phản hồi phát trực tuyến. Bao gồm các công cụ hàm, đầu ra có cấu trúc và các tác nhân đa công cụ.
development
airunway-aks-setup
microsoft
Thiết lập AI Runway trên AKS — từ cụm trống đến mô hình đang chạy. Bao gồm xác minh cụm, cài đặt controller, đánh giá GPU, thiết lập nhà cung cấp và triển khai đầu tiên. KHI NÀO: "thiết lập AI Runway", "onboard cụm AKS", "cài đặt AI Runway", "thiết lập airunway", "triển khai mô hình lên AKS", "suy luận GPU trên AKS", "thiết lập KAITO trên AKS", "chạy LLM trên AKS", "vLLM trên AKS", "thiết lập phục vụ mô hình trên AKS", "AI Runway controller".
devops
appinsights-instrumentation
microsoft
Hướng dẫn để instrument các ứng dụng web với Azure Application Insights. Cung cấp các mẫu telemetry, thiết lập SDK, và tài liệu tham khảo cấu hình. KHI NÀO: cách instrument ứng dụng, App Insights SDK, các mẫu telemetry, App Insights là gì, hướng dẫn Application Insights, ví dụ instrumentation, các phương pháp tốt nhất APM.
devops
applicationinsights-web-ts
microsoft
Instrument các ứng dụng trình duyệt/web bằng SDK JavaScript Application Insights (@microsoft/applicationinsights-web). Dùng cho Real User Monitoring (RUM) — lượt xem trang, nhấp chuột, phụ thuộc AJAX/fetch, ngoại lệ, sự kiện tùy chỉnh và dấu vết tác nhân GenAI phía trình duyệt tương quan với dấu vết OpenTelemetry phía backend. Bao gồm thiết lập SDK Loader Script và npm, tiện ích mở rộng framework (React, React Native, Angular), Click Analytics, trình khởi tạo telemetry và quy ước ngữ nghĩa OTel GenAI cho các span tác nhân/công cụ/mô hình phát ra từ trình duyệt.
devops
azure-ai-anomalydetector-java
microsoft
Xây dựng ứng dụng phát hiện bất thường với Azure AI Anomaly Detector SDK cho Java. Sử dụng khi triển khai phát hiện bất thường đơn biến/đa biến, phân tích chuỗi thời gian hoặc giám sát hỗ trợ AI.
development
azure-ai-language-conversations-py
microsoft
Triển khai Conversational Language Understanding (CLU) bằng SDK Python azure-ai-language-conversations. Sử dụng khi làm việc với ConversationAnalysisClient để phân tích ý định và thực thể trong hội thoại, xây dựng tính năng NLP, hoặc tích hợp hiểu ngôn ngữ vào ứng dụng.
development
azure-ai-ml-py
microsoft
Azure Machine Learning SDK v2 cho Python. Dùng cho không gian làm việc ML, công việc, mô hình, tập dữ liệu, tính toán và quy trình. Kích hoạt: "azure-ai-ml", "MLClient", "không gian làm việc", "đăng ký mô hình", "công việc đào tạo", "tập dữ liệu".
development