contextos-agents 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/AGENTS.md +421 -0
- package/.agents/adapters/aider/export.js +137 -0
- package/.agents/adapters/claude/export.js +55 -0
- package/.agents/adapters/copilot/export.js +107 -0
- package/.agents/adapters/cursor/export.js +210 -0
- package/.agents/adapters/gemini/export.js +115 -0
- package/.agents/adapters/shared.js +119 -0
- package/.agents/adapters/zed/export.js +111 -0
- package/.agents/core/profiles/backend.yaml +47 -0
- package/.agents/core/profiles/enterprise.yaml +46 -0
- package/.agents/core/profiles/frontend.yaml +46 -0
- package/.agents/core/profiles/hackathon.yaml +45 -0
- package/.agents/core/profiles/mvp.yaml +43 -0
- package/.agents/core/profiles/startup.yaml +48 -0
- package/.agents/core/skills/adapters/EXAMPLES.md +19 -0
- package/.agents/core/skills/adapters/SKILL.md +105 -0
- package/.agents/core/skills/adapters/TROUBLESHOOTING.md +7 -0
- package/.agents/core/skills/adapters/VALIDATION.json +12 -0
- package/.agents/core/skills/adapters/skill.yaml +10 -0
- package/.agents/core/skills/architecture-diagrams/SKILL.md +108 -0
- package/.agents/core/skills/architecture-diagrams/VALIDATION.json +12 -0
- package/.agents/core/skills/architecture-diagrams/skill.yaml +8 -0
- package/.agents/core/skills/brutalist-design/SKILL.md +150 -0
- package/.agents/core/skills/brutalist-design/VALIDATION.json +12 -0
- package/.agents/core/skills/brutalist-design/skill.yaml +8 -0
- package/.agents/core/skills/context-manager/EXAMPLES.md +19 -0
- package/.agents/core/skills/context-manager/SKILL.md +126 -0
- package/.agents/core/skills/context-manager/TROUBLESHOOTING.md +7 -0
- package/.agents/core/skills/context-manager/VALIDATION.json +12 -0
- package/.agents/core/skills/context-manager/skill.yaml +10 -0
- package/.agents/core/skills/context-os/EXAMPLES.md +21 -0
- package/.agents/core/skills/context-os/SKILL.md +169 -0
- package/.agents/core/skills/context-os/TROUBLESHOOTING.md +7 -0
- package/.agents/core/skills/context-os/VALIDATION.json +12 -0
- package/.agents/core/skills/context-os/packs.yaml +59 -0
- package/.agents/core/skills/context-os/references/context-rules.md +68 -0
- package/.agents/core/skills/context-os/references/pipeline.md +119 -0
- package/.agents/core/skills/context-os/references/project-graph.md +103 -0
- package/.agents/core/skills/context-os/rules.yaml +135 -0
- package/.agents/core/skills/context-os/skill.yaml +10 -0
- package/.agents/core/skills/database/EXAMPLES.md +74 -0
- package/.agents/core/skills/database/SKILL.md +101 -0
- package/.agents/core/skills/database/TROUBLESHOOTING.md +18 -0
- package/.agents/core/skills/database/VALIDATION.json +11 -0
- package/.agents/core/skills/database/skill.yaml +25 -0
- package/.agents/core/skills/ddd/EXAMPLES.md +42 -0
- package/.agents/core/skills/ddd/SKILL.md +247 -0
- package/.agents/core/skills/ddd/TROUBLESHOOTING.md +19 -0
- package/.agents/core/skills/ddd/VALIDATION.json +12 -0
- package/.agents/core/skills/ddd/ddd.md +178 -0
- package/.agents/core/skills/ddd/skill.yaml +10 -0
- package/.agents/core/skills/decisions/EXAMPLES.md +35 -0
- package/.agents/core/skills/decisions/SKILL.md +90 -0
- package/.agents/core/skills/decisions/TROUBLESHOOTING.md +13 -0
- package/.agents/core/skills/decisions/VALIDATION.json +12 -0
- package/.agents/core/skills/decisions/skill.yaml +10 -0
- package/.agents/core/skills/docker/EXAMPLES.md +56 -0
- package/.agents/core/skills/docker/SKILL.md +63 -0
- package/.agents/core/skills/docker/TROUBLESHOOTING.md +18 -0
- package/.agents/core/skills/docker/VALIDATION.json +11 -0
- package/.agents/core/skills/docker/skill.yaml +23 -0
- package/.agents/core/skills/engineering-workflow/EXAMPLES.md +57 -0
- package/.agents/core/skills/engineering-workflow/SKILL.md +343 -0
- package/.agents/core/skills/engineering-workflow/TROUBLESHOOTING.md +19 -0
- package/.agents/core/skills/engineering-workflow/VALIDATION.json +12 -0
- package/.agents/core/skills/engineering-workflow/skill.yaml +13 -0
- package/.agents/core/skills/fastapi/EXAMPLES.md +36 -0
- package/.agents/core/skills/fastapi/SKILL.md +148 -0
- package/.agents/core/skills/fastapi/TROUBLESHOOTING.md +19 -0
- package/.agents/core/skills/fastapi/VALIDATION.json +12 -0
- package/.agents/core/skills/fastapi/fastapi.md +112 -0
- package/.agents/core/skills/fastapi/skill.yaml +10 -0
- package/.agents/core/skills/gemini-precision/SKILL.md +169 -0
- package/.agents/core/skills/gemini-precision/VALIDATION.json +12 -0
- package/.agents/core/skills/gemini-precision/skill.yaml +9 -0
- package/.agents/core/skills/generators/EXAMPLES.md +19 -0
- package/.agents/core/skills/generators/SKILL.md +112 -0
- package/.agents/core/skills/generators/TROUBLESHOOTING.md +7 -0
- package/.agents/core/skills/generators/VALIDATION.json +12 -0
- package/.agents/core/skills/generators/skill.yaml +10 -0
- package/.agents/core/skills/generators/templates/API.md +77 -0
- package/.agents/core/skills/generators/templates/ARCHITECTURE.md +70 -0
- package/.agents/core/skills/generators/templates/DATABASE.md +42 -0
- package/.agents/core/skills/generators/templates/DECISION.md +46 -0
- package/.agents/core/skills/generators/templates/PRD.md +67 -0
- package/.agents/core/skills/generators/templates/PROJECT_GRAPH.md +56 -0
- package/.agents/core/skills/generators/templates/ROADMAP.md +51 -0
- package/.agents/core/skills/generators/templates/TASKS.md +43 -0
- package/.agents/core/skills/generators/templates/UI.md +73 -0
- package/.agents/core/skills/graphify/EXAMPLES.md +73 -0
- package/.agents/core/skills/graphify/SKILL.md +130 -0
- package/.agents/core/skills/graphify/VALIDATION.json +12 -0
- package/.agents/core/skills/graphify/skill.yaml +13 -0
- package/.agents/core/skills/gstack-roles/EXAMPLES.md +23 -0
- package/.agents/core/skills/gstack-roles/SKILL.md +152 -0
- package/.agents/core/skills/gstack-roles/TROUBLESHOOTING.md +13 -0
- package/.agents/core/skills/gstack-roles/VALIDATION.json +12 -0
- package/.agents/core/skills/gstack-roles/skill.yaml +12 -0
- package/.agents/core/skills/impeccable-design/EXAMPLES.md +26 -0
- package/.agents/core/skills/impeccable-design/SKILL.md +201 -0
- package/.agents/core/skills/impeccable-design/TROUBLESHOOTING.md +19 -0
- package/.agents/core/skills/impeccable-design/VALIDATION.json +12 -0
- package/.agents/core/skills/impeccable-design/skill.yaml +14 -0
- package/.agents/core/skills/interview-me/SKILL.md +97 -0
- package/.agents/core/skills/interview-me/VALIDATION.json +12 -0
- package/.agents/core/skills/interview-me/skill.yaml +8 -0
- package/.agents/core/skills/microservices/EXAMPLES.md +38 -0
- package/.agents/core/skills/microservices/SKILL.md +164 -0
- package/.agents/core/skills/microservices/TROUBLESHOOTING.md +19 -0
- package/.agents/core/skills/microservices/VALIDATION.json +12 -0
- package/.agents/core/skills/microservices/microservices.md +119 -0
- package/.agents/core/skills/microservices/skill.yaml +10 -0
- package/.agents/core/skills/minimalist-design/SKILL.md +113 -0
- package/.agents/core/skills/minimalist-design/VALIDATION.json +12 -0
- package/.agents/core/skills/minimalist-design/skill.yaml +8 -0
- package/.agents/core/skills/nestjs/EXAMPLES.md +40 -0
- package/.agents/core/skills/nestjs/SKILL.md +139 -0
- package/.agents/core/skills/nestjs/TROUBLESHOOTING.md +19 -0
- package/.agents/core/skills/nestjs/VALIDATION.json +12 -0
- package/.agents/core/skills/nestjs/nestjs.md +103 -0
- package/.agents/core/skills/nestjs/skill.yaml +10 -0
- package/.agents/core/skills/nextjs/EXAMPLES.md +40 -0
- package/.agents/core/skills/nextjs/SKILL.md +163 -0
- package/.agents/core/skills/nextjs/TROUBLESHOOTING.md +19 -0
- package/.agents/core/skills/nextjs/VALIDATION.json +12 -0
- package/.agents/core/skills/nextjs/nextjs.md +67 -0
- package/.agents/core/skills/nextjs/skill.yaml +10 -0
- package/.agents/core/skills/node/EXAMPLES.md +80 -0
- package/.agents/core/skills/node/SKILL.md +128 -0
- package/.agents/core/skills/node/TROUBLESHOOTING.md +19 -0
- package/.agents/core/skills/node/VALIDATION.json +12 -0
- package/.agents/core/skills/node/node.md +87 -0
- package/.agents/core/skills/node/skill.yaml +10 -0
- package/.agents/core/skills/performance/EXAMPLES.md +30 -0
- package/.agents/core/skills/performance/SKILL.md +75 -0
- package/.agents/core/skills/performance/TROUBLESHOOTING.md +19 -0
- package/.agents/core/skills/performance/VALIDATION.json +12 -0
- package/.agents/core/skills/performance/performance.md +52 -0
- package/.agents/core/skills/performance/skill.yaml +10 -0
- package/.agents/core/skills/ponytail-mindset/EXAMPLES.md +45 -0
- package/.agents/core/skills/ponytail-mindset/SKILL.md +193 -0
- package/.agents/core/skills/ponytail-mindset/TROUBLESHOOTING.md +19 -0
- package/.agents/core/skills/ponytail-mindset/VALIDATION.json +12 -0
- package/.agents/core/skills/ponytail-mindset/skill.yaml +14 -0
- package/.agents/core/skills/react/EXAMPLES.md +79 -0
- package/.agents/core/skills/react/SKILL.md +132 -0
- package/.agents/core/skills/react/TROUBLESHOOTING.md +19 -0
- package/.agents/core/skills/react/VALIDATION.json +12 -0
- package/.agents/core/skills/react/react.md +93 -0
- package/.agents/core/skills/react/skill.yaml +10 -0
- package/.agents/core/skills/react-best-practices/SKILL.md +155 -0
- package/.agents/core/skills/react-best-practices/VALIDATION.json +12 -0
- package/.agents/core/skills/react-best-practices/skill.yaml +10 -0
- package/.agents/core/skills/redesign-audit/SKILL.md +117 -0
- package/.agents/core/skills/redesign-audit/VALIDATION.json +12 -0
- package/.agents/core/skills/redesign-audit/skill.yaml +8 -0
- package/.agents/core/skills/security/EXAMPLES.md +64 -0
- package/.agents/core/skills/security/SKILL.md +158 -0
- package/.agents/core/skills/security/TROUBLESHOOTING.md +19 -0
- package/.agents/core/skills/security/VALIDATION.json +12 -0
- package/.agents/core/skills/security/security.md +106 -0
- package/.agents/core/skills/security/skill.yaml +10 -0
- package/.agents/core/skills/soft-design/SKILL.md +108 -0
- package/.agents/core/skills/soft-design/VALIDATION.json +12 -0
- package/.agents/core/skills/soft-design/skill.yaml +8 -0
- package/.agents/core/skills/state-management/EXAMPLES.md +56 -0
- package/.agents/core/skills/state-management/SKILL.md +48 -0
- package/.agents/core/skills/state-management/TROUBLESHOOTING.md +18 -0
- package/.agents/core/skills/state-management/VALIDATION.json +11 -0
- package/.agents/core/skills/state-management/skill.yaml +22 -0
- package/.agents/core/skills/subagent-orchestrator/SKILL.md +100 -0
- package/.agents/core/skills/subagent-orchestrator/VALIDATION.json +12 -0
- package/.agents/core/skills/subagent-orchestrator/skill.yaml +8 -0
- package/.agents/core/skills/system-design/EXAMPLES.md +75 -0
- package/.agents/core/skills/system-design/SKILL.md +419 -0
- package/.agents/core/skills/system-design/TROUBLESHOOTING.md +19 -0
- package/.agents/core/skills/system-design/VALIDATION.json +12 -0
- package/.agents/core/skills/system-design/skill.yaml +13 -0
- package/.agents/core/skills/system-design/system-design.md +112 -0
- package/.agents/core/skills/testing/EXAMPLES.md +71 -0
- package/.agents/core/skills/testing/SKILL.md +70 -0
- package/.agents/core/skills/testing/TROUBLESHOOTING.md +18 -0
- package/.agents/core/skills/testing/VALIDATION.json +11 -0
- package/.agents/core/skills/testing/skill.yaml +26 -0
- package/.agents/core/skills/typescript/EXAMPLES.md +64 -0
- package/.agents/core/skills/typescript/SKILL.md +112 -0
- package/.agents/core/skills/typescript/TROUBLESHOOTING.md +19 -0
- package/.agents/core/skills/typescript/VALIDATION.json +12 -0
- package/.agents/core/skills/typescript/skill.yaml +10 -0
- package/.agents/core/skills/typescript/typescript.md +71 -0
- package/.agents/core/skills/ui-design/EXAMPLES.md +21 -0
- package/.agents/core/skills/ui-design/SKILL.md +124 -0
- package/.agents/core/skills/ui-design/TROUBLESHOOTING.md +19 -0
- package/.agents/core/skills/ui-design/VALIDATION.json +12 -0
- package/.agents/core/skills/ui-design/skill.yaml +10 -0
- package/.agents/core/skills/ui-design/ui.md +88 -0
- package/.agents/core/skills/ui-ux-pro/EXAMPLES.md +62 -0
- package/.agents/core/skills/ui-ux-pro/SKILL.md +375 -0
- package/.agents/core/skills/ui-ux-pro/TROUBLESHOOTING.md +19 -0
- package/.agents/core/skills/ui-ux-pro/VALIDATION.json +12 -0
- package/.agents/core/skills/ui-ux-pro/skill.yaml +13 -0
- package/.agents/core/skills/ux-design/EXAMPLES.md +36 -0
- package/.agents/core/skills/ux-design/SKILL.md +116 -0
- package/.agents/core/skills/ux-design/TROUBLESHOOTING.md +19 -0
- package/.agents/core/skills/ux-design/VALIDATION.json +12 -0
- package/.agents/core/skills/ux-design/skill.yaml +10 -0
- package/.agents/core/skills/ux-design/ux.md +80 -0
- package/.agents/core/skills/vercel-optimize/SKILL.md +83 -0
- package/.agents/core/skills/vercel-optimize/VALIDATION.json +12 -0
- package/.agents/core/skills/vercel-optimize/skill.yaml +10 -0
- package/.agents/core/skills/web-accessibility/EXAMPLES.md +39 -0
- package/.agents/core/skills/web-accessibility/SKILL.md +170 -0
- package/.agents/core/skills/web-accessibility/TROUBLESHOOTING.md +19 -0
- package/.agents/core/skills/web-accessibility/VALIDATION.json +12 -0
- package/.agents/core/skills/web-accessibility/accessibility.md +63 -0
- package/.agents/core/skills/web-accessibility/skill.yaml +10 -0
- package/.agents/ctx.js +370 -0
- package/.agents/generated/claude/skills/adapters/SKILL.md +126 -0
- package/.agents/generated/claude/skills/architecture-diagrams/SKILL.md +101 -0
- package/.agents/generated/claude/skills/brutalist-design/SKILL.md +145 -0
- package/.agents/generated/claude/skills/context-manager/SKILL.md +147 -0
- package/.agents/generated/claude/skills/context-os/SKILL.md +191 -0
- package/.agents/generated/claude/skills/database/SKILL.md +191 -0
- package/.agents/generated/claude/skills/ddd/SKILL.md +305 -0
- package/.agents/generated/claude/skills/decisions/SKILL.md +134 -0
- package/.agents/generated/claude/skills/docker/SKILL.md +135 -0
- package/.agents/generated/claude/skills/engineering-workflow/SKILL.md +414 -0
- package/.agents/generated/claude/skills/fastapi/SKILL.md +200 -0
- package/.agents/generated/claude/skills/gemini-precision/SKILL.md +161 -0
- package/.agents/generated/claude/skills/generators/SKILL.md +133 -0
- package/.agents/generated/claude/skills/graphify/SKILL.md +198 -0
- package/.agents/generated/claude/skills/gstack-roles/SKILL.md +184 -0
- package/.agents/generated/claude/skills/impeccable-design/SKILL.md +241 -0
- package/.agents/generated/claude/skills/interview-me/SKILL.md +90 -0
- package/.agents/generated/claude/skills/microservices/SKILL.md +218 -0
- package/.agents/generated/claude/skills/minimalist-design/SKILL.md +108 -0
- package/.agents/generated/claude/skills/nestjs/SKILL.md +195 -0
- package/.agents/generated/claude/skills/nextjs/SKILL.md +219 -0
- package/.agents/generated/claude/skills/node/SKILL.md +224 -0
- package/.agents/generated/claude/skills/performance/SKILL.md +121 -0
- package/.agents/generated/claude/skills/ponytail-mindset/SKILL.md +252 -0
- package/.agents/generated/claude/skills/react/SKILL.md +227 -0
- package/.agents/generated/claude/skills/react-best-practices/SKILL.md +146 -0
- package/.agents/generated/claude/skills/redesign-audit/SKILL.md +112 -0
- package/.agents/generated/claude/skills/security/SKILL.md +237 -0
- package/.agents/generated/claude/skills/soft-design/SKILL.md +103 -0
- package/.agents/generated/claude/skills/state-management/SKILL.md +120 -0
- package/.agents/generated/claude/skills/subagent-orchestrator/SKILL.md +93 -0
- package/.agents/generated/claude/skills/system-design/SKILL.md +507 -0
- package/.agents/generated/claude/skills/testing/SKILL.md +157 -0
- package/.agents/generated/claude/skills/typescript/SKILL.md +192 -0
- package/.agents/generated/claude/skills/ui-design/SKILL.md +161 -0
- package/.agents/generated/claude/skills/ui-ux-pro/SKILL.md +451 -0
- package/.agents/generated/claude/skills/ux-design/SKILL.md +168 -0
- package/.agents/generated/claude/skills/vercel-optimize/SKILL.md +76 -0
- package/.agents/generated/claude/skills/web-accessibility/SKILL.md +225 -0
- package/.agents/generated/gemini/skills/adapters/SKILL.md +135 -0
- package/.agents/generated/gemini/skills/architecture-diagrams/SKILL.md +107 -0
- package/.agents/generated/gemini/skills/brutalist-design/SKILL.md +151 -0
- package/.agents/generated/gemini/skills/context-manager/SKILL.md +156 -0
- package/.agents/generated/gemini/skills/context-os/SKILL.md +200 -0
- package/.agents/generated/gemini/skills/database/SKILL.md +200 -0
- package/.agents/generated/gemini/skills/ddd/SKILL.md +314 -0
- package/.agents/generated/gemini/skills/decisions/SKILL.md +143 -0
- package/.agents/generated/gemini/skills/docker/SKILL.md +144 -0
- package/.agents/generated/gemini/skills/engineering-workflow/SKILL.md +423 -0
- package/.agents/generated/gemini/skills/fastapi/SKILL.md +209 -0
- package/.agents/generated/gemini/skills/gemini-precision/SKILL.md +167 -0
- package/.agents/generated/gemini/skills/generators/SKILL.md +142 -0
- package/.agents/generated/gemini/skills/graphify/SKILL.md +205 -0
- package/.agents/generated/gemini/skills/gstack-roles/SKILL.md +193 -0
- package/.agents/generated/gemini/skills/impeccable-design/SKILL.md +250 -0
- package/.agents/generated/gemini/skills/interview-me/SKILL.md +96 -0
- package/.agents/generated/gemini/skills/microservices/SKILL.md +227 -0
- package/.agents/generated/gemini/skills/minimalist-design/SKILL.md +114 -0
- package/.agents/generated/gemini/skills/nestjs/SKILL.md +204 -0
- package/.agents/generated/gemini/skills/nextjs/SKILL.md +298 -0
- package/.agents/generated/gemini/skills/node/SKILL.md +323 -0
- package/.agents/generated/gemini/skills/performance/SKILL.md +185 -0
- package/.agents/generated/gemini/skills/ponytail-mindset/SKILL.md +261 -0
- package/.agents/generated/gemini/skills/react/SKILL.md +332 -0
- package/.agents/generated/gemini/skills/react-best-practices/SKILL.md +152 -0
- package/.agents/generated/gemini/skills/redesign-audit/SKILL.md +118 -0
- package/.agents/generated/gemini/skills/security/SKILL.md +355 -0
- package/.agents/generated/gemini/skills/soft-design/SKILL.md +109 -0
- package/.agents/generated/gemini/skills/state-management/SKILL.md +129 -0
- package/.agents/generated/gemini/skills/subagent-orchestrator/SKILL.md +99 -0
- package/.agents/generated/gemini/skills/system-design/SKILL.md +631 -0
- package/.agents/generated/gemini/skills/testing/SKILL.md +166 -0
- package/.agents/generated/gemini/skills/typescript/SKILL.md +275 -0
- package/.agents/generated/gemini/skills/ui-design/SKILL.md +170 -0
- package/.agents/generated/gemini/skills/ui-ux-pro/SKILL.md +460 -0
- package/.agents/generated/gemini/skills/ux-design/SKILL.md +177 -0
- package/.agents/generated/gemini/skills/vercel-optimize/SKILL.md +82 -0
- package/.agents/generated/gemini/skills/web-accessibility/SKILL.md +300 -0
- package/.agents/mcp/runtime.py +454 -0
- package/.agents/mcp/server.mjs +189373 -0
- package/.agents/plugins.js +574 -0
- package/.agents/profiles.js +267 -0
- package/.agents/resolver.js +336 -0
- package/.agents/skills-index.json +200 -0
- package/.agents/skills.json +6 -0
- package/.agents/validate.js +500 -0
- package/LICENSE +21 -0
- package/README.md +415 -0
- package/benchmarks/gemini-issues.js +533 -0
- package/bin/index.js +458 -0
- package/package.json +70 -0
- package/registry.json +53 -0
- package/registry.schema.json +32 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: vercel-optimize
|
|
3
|
+
description: >
|
|
4
|
+
Observability-first Vercel performance and cost reduction optimization skill.
|
|
5
|
+
---
|
|
6
|
+
# Vercel Optimize
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
Observability-first Vercel performance and cost reduction optimization skill. Evaluates deployed Next.js, SvelteKit, Nuxt, and Astro projects using production telemetry signals (`signals.json`), deterministic candidate gating, and code scanning to deliver ranked, verified architectural recommendations.
|
|
11
|
+
|
|
12
|
+
## When to Use
|
|
13
|
+
|
|
14
|
+
- When tasked with reducing Vercel bills, Function Invocations, Fast Data Transfer, or Build Minutes.
|
|
15
|
+
- When diagnosing slow serverless routes, cold starts, or Edge vs Node runtime mismatches.
|
|
16
|
+
- When evaluating caching opportunities (`stale-while-revalidate`, ISR, CDN edge caching) or Core Web Vitals degradation.
|
|
17
|
+
|
|
18
|
+
## Rules & Patterns
|
|
19
|
+
|
|
20
|
+
### 1. Prerequisites & Framework Support
|
|
21
|
+
|
|
22
|
+
- Vercel CLI v53+ with `vercel metrics`, `vercel usage`, `vercel contract`, and `vercel api`.
|
|
23
|
+
- Authenticated CLI session (`vercel login`) and linked app directory (`vercel link`).
|
|
24
|
+
- Framework support: Next.js App Router (Full), Pages Router (Supported), SvelteKit (Supported), Nuxt (Supported), Astro (Limited).
|
|
25
|
+
- Security rule: Never put auth tokens in shell commands (`VERCEL_TOKEN=...` is banned in chat/logs).
|
|
26
|
+
|
|
27
|
+
### 2. Core Doctrine & Gating Pipeline
|
|
28
|
+
|
|
29
|
+
- **Metrics First:** Recommendations start from Vercel production signals (14-day window), not repo-wide grep.
|
|
30
|
+
- **Deterministic Gates:** `scripts/gate-investigations.mjs` selects code-scope and platform-scope candidates.
|
|
31
|
+
- **Candidate-Bound Scope:** Inspect only files named by a candidate or a route-local import chain.
|
|
32
|
+
- **Version-Aware Citations:** Use only verified citations matching the target framework version.
|
|
33
|
+
- **Specific Cache Policies:** When recommending caching, state the exact cache policy and headers; keep auth-sensitive and error responses dynamic.
|
|
34
|
+
|
|
35
|
+
### 3. Recommendation Rules
|
|
36
|
+
|
|
37
|
+
- Every recommendation must trace to a launched candidate and include observed metric evidence.
|
|
38
|
+
- Cite verified files with line numbers when code changes are proposed.
|
|
39
|
+
- Use precise observed performance numbers; avoid customer-facing speculative `$N` savings formulas.
|
|
40
|
+
- Do not recommend duration reductions for Vercel Workflow runtime endpoints (`/.well-known/workflow/v1/*`).
|
|
41
|
+
|
|
42
|
+
## Code Examples
|
|
43
|
+
|
|
44
|
+
```typescript
|
|
45
|
+
// [GOOD] Next.js Route Segment Config for Caching & Edge Runtime
|
|
46
|
+
export const dynamic = 'force-static';
|
|
47
|
+
export const revalidate = 3600; // Cache at Edge for 1 hour
|
|
48
|
+
|
|
49
|
+
export default async function CachedCatalogPage() {
|
|
50
|
+
const products = await getCatalogData();
|
|
51
|
+
return <CatalogGrid items={products} />;
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
# Running the signals collection and gate
|
|
57
|
+
node scripts/collect-signals.mjs [projectId] > "$RUN_DIR/vercel-signals.json"
|
|
58
|
+
node scripts/scan-codebase.mjs <repo-root> > "$RUN_DIR/codebase.json"
|
|
59
|
+
node scripts/merge-signals.mjs "$RUN_DIR/vercel-signals.json" "$RUN_DIR/codebase.json" --out "$RUN_DIR/signals.json"
|
|
60
|
+
node scripts/gate-investigations.mjs "$RUN_DIR/signals.json" > "$RUN_DIR/gate.json"
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Validation Checklist
|
|
64
|
+
|
|
65
|
+
- [ ] Project is properly linked with valid team/personal scope (`vercel link`).
|
|
66
|
+
- [ ] Production metrics signals collected across 14-day window before inspecting code.
|
|
67
|
+
- [ ] No secrets or tokens passed in command line arguments.
|
|
68
|
+
- [ ] Recommendations grounded in specific verified file paths and line numbers.
|
|
69
|
+
- [ ] Unsafe or auth-sensitive paths kept strictly dynamic.
|
|
70
|
+
|
|
71
|
+
## Common Mistakes
|
|
72
|
+
|
|
73
|
+
- Inspecting repository source code before metric signals exist.
|
|
74
|
+
- Hardcoding `VERCEL_TOKEN` into terminal commands or prompt logs.
|
|
75
|
+
- Recommending duration reductions on long-lived streaming routes or workflow runners.
|
|
76
|
+
- Applying static caching to user-specific or authenticated routes.
|
|
77
|
+
|
|
78
|
+
## Integration Notes
|
|
79
|
+
|
|
80
|
+
- Complements `nextjs` and `react-best-practices` for server-side optimization.
|
|
81
|
+
- Pairs with `performance` and `security` skills.
|
|
82
|
+
|
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Web Accessibility
|
|
3
|
+
description: >
|
|
4
|
+
ContextOS skill for Web Accessibility
|
|
5
|
+
---
|
|
6
|
+
# Web Accessibility & Interface Guidelines
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
Enforces universal accessibility compliance (WCAG 2.1 AA / AAA), rigorous semantic markup, keyboard navigability with focus traps, screen reader live regions, and Web Interface Guidelines standards.
|
|
11
|
+
|
|
12
|
+
## When to Use
|
|
13
|
+
|
|
14
|
+
Activate whenever building, styling, or reviewing user interfaces, forms, modals, menus, navigation drawers, custom interactive widgets, or media elements.
|
|
15
|
+
|
|
16
|
+
## Negative Constraints (What NOT to Do)
|
|
17
|
+
|
|
18
|
+
1. **NEVER use `outline: none` without a custom `:focus-visible` replacement**: Keyboard users must always have a distinct, high-contrast visual focus ring.
|
|
19
|
+
2. **NEVER use non-semantic elements (`<div onClick>`) for interactive triggers**: Always use native `<button>` or `<a href>`.
|
|
20
|
+
3. **NEVER create modals or dialogs without keyboard focus traps**: Focus must remain trapped inside open dialogs during Tab / Shift-Tab navigation and restore to trigger on close.
|
|
21
|
+
4. **NEVER rely exclusively on color to indicate state or errors**: Always pair colors with text labels, icons, or ARIA attributes (`aria-invalid="true"`).
|
|
22
|
+
5. **NEVER trap screen readers with missing form labels or error associations**: Every input must link to `<label htmlFor="id">` and errors via `aria-describedby`.
|
|
23
|
+
6. **NEVER play animations without honoring `prefers-reduced-motion`**: Respect user OS motion reduction preferences.
|
|
24
|
+
|
|
25
|
+
## Rules & Patterns
|
|
26
|
+
|
|
27
|
+
### 1. Focus Visible & High-Contrast Focus Rings
|
|
28
|
+
|
|
29
|
+
```css
|
|
30
|
+
button:focus-visible,
|
|
31
|
+
a:focus-visible,
|
|
32
|
+
input:focus-visible {
|
|
33
|
+
outline: 2px solid #6366f1;
|
|
34
|
+
outline-offset: 2px;
|
|
35
|
+
border-radius: 4px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
button:focus:not(:focus-visible) {
|
|
39
|
+
outline: none;
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### 2. Accessible Modal & Focus Trap Contract
|
|
44
|
+
|
|
45
|
+
```tsx
|
|
46
|
+
import React, { useEffect, useRef } from 'react';
|
|
47
|
+
import { createPortal } from 'react-dom';
|
|
48
|
+
|
|
49
|
+
interface ModalProps {
|
|
50
|
+
isOpen: boolean;
|
|
51
|
+
onClose: () => void;
|
|
52
|
+
titleId: string;
|
|
53
|
+
children: React.ReactNode;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export function AccessibleModal({ isOpen, onClose, titleId, children }: ModalProps) {
|
|
57
|
+
const dialogRef = useRef<HTMLDivElement>(null);
|
|
58
|
+
const triggerRef = useRef<HTMLElement | null>(null);
|
|
59
|
+
|
|
60
|
+
useEffect(() => {
|
|
61
|
+
if (!isOpen) return;
|
|
62
|
+
triggerRef.current = document.activeElement as HTMLElement;
|
|
63
|
+
|
|
64
|
+
const handleKeyDown = (e: KeyboardEvent) => {
|
|
65
|
+
if (e.key === 'Escape') {
|
|
66
|
+
e.preventDefault();
|
|
67
|
+
onClose();
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if (e.key === 'Tab') {
|
|
71
|
+
const focusables = dialogRef.current?.querySelectorAll<HTMLElement>(
|
|
72
|
+
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
|
73
|
+
) || [];
|
|
74
|
+
if (!focusables.length) return;
|
|
75
|
+
|
|
76
|
+
const first = focusables[0];
|
|
77
|
+
const last = focusables[focusables.length - 1];
|
|
78
|
+
|
|
79
|
+
if (e.shiftKey && document.activeElement === first) {
|
|
80
|
+
e.preventDefault();
|
|
81
|
+
last.focus();
|
|
82
|
+
} else if (!e.shiftKey && document.activeElement === last) {
|
|
83
|
+
e.preventDefault();
|
|
84
|
+
first.focus();
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
document.addEventListener('keydown', handleKeyDown);
|
|
90
|
+
return () => {
|
|
91
|
+
document.removeEventListener('keydown', handleKeyDown);
|
|
92
|
+
triggerRef.current?.focus();
|
|
93
|
+
};
|
|
94
|
+
}, [isOpen, onClose]);
|
|
95
|
+
|
|
96
|
+
if (!isOpen) return null;
|
|
97
|
+
|
|
98
|
+
return createPortal(
|
|
99
|
+
<div className="fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-4">
|
|
100
|
+
<div
|
|
101
|
+
ref={dialogRef}
|
|
102
|
+
role="dialog"
|
|
103
|
+
aria-modal="true"
|
|
104
|
+
aria-labelledby={titleId}
|
|
105
|
+
className="w-full max-w-lg rounded-xl bg-background p-6 shadow-2xl border"
|
|
106
|
+
>
|
|
107
|
+
{children}
|
|
108
|
+
</div>
|
|
109
|
+
</div>,
|
|
110
|
+
document.body
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### 3. Accessible Forms & Error Association
|
|
116
|
+
|
|
117
|
+
```tsx
|
|
118
|
+
export function EmailInput({ error, ...props }: { error?: string } & React.InputHTMLAttributes<HTMLInputElement>) {
|
|
119
|
+
const inputId = 'user-email';
|
|
120
|
+
const errorId = 'user-email-error';
|
|
121
|
+
|
|
122
|
+
return (
|
|
123
|
+
<div className="flex flex-col gap-1.5">
|
|
124
|
+
<label htmlFor={inputId} className="text-sm font-medium">
|
|
125
|
+
Email Address <span aria-hidden="true" className="text-destructive">*</span>
|
|
126
|
+
</label>
|
|
127
|
+
<input
|
|
128
|
+
id={inputId}
|
|
129
|
+
type="email"
|
|
130
|
+
autoComplete="email"
|
|
131
|
+
required
|
|
132
|
+
aria-invalid={Boolean(error)}
|
|
133
|
+
aria-describedby={error ? errorId : undefined}
|
|
134
|
+
className="rounded-md border p-2 text-sm focus-visible:ring-2"
|
|
135
|
+
{...props}
|
|
136
|
+
/>
|
|
137
|
+
{error && (
|
|
138
|
+
<p id={errorId} role="alert" className="text-xs text-destructive">
|
|
139
|
+
{error}
|
|
140
|
+
</p>
|
|
141
|
+
)}
|
|
142
|
+
</div>
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
## Code Examples
|
|
148
|
+
|
|
149
|
+
See `EXAMPLES.md` for detailed dialog, menu, and form examples.
|
|
150
|
+
|
|
151
|
+
## Validation Checklist
|
|
152
|
+
|
|
153
|
+
- [ ] All interactive elements are fully operable via Keyboard (`Tab`, `Enter`, `Space`, `Escape`).
|
|
154
|
+
- [ ] Visual `:focus-visible` styling is distinct and high contrast (≥ 3:1).
|
|
155
|
+
- [ ] Modals use `role="dialog"`, `aria-modal="true"`, focus trap, and restore focus on close.
|
|
156
|
+
- [ ] Text contrast ratios satisfy WCAG AA (≥ 4.5:1 for normal text, ≥ 3:1 for large text).
|
|
157
|
+
- [ ] Forms pair inputs with `<label htmlFor>`, valid `autocomplete` tokens, and `aria-invalid`.
|
|
158
|
+
- [ ] Non-text media contains descriptive `alt` attributes or `aria-hidden="true"` for decorative icons.
|
|
159
|
+
|
|
160
|
+
## Common Mistakes
|
|
161
|
+
|
|
162
|
+
- Hiding outline focus indicators globally without `:focus-visible` fallback.
|
|
163
|
+
- Forgetting to trap focus in modal dialogs or not returning focus to trigger when modal closes.
|
|
164
|
+
- Missing `aria-expanded` attributes on disclosure buttons and dropdown toggles.
|
|
165
|
+
|
|
166
|
+
## Integration Notes
|
|
167
|
+
|
|
168
|
+
- Pairs with `ui-ux-pro` and `impeccable-design` for visual contrast and component standards.
|
|
169
|
+
- Pairs with `react` and `nextjs` for accessible dialogs and focus restoration across route transitions.
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
<!-- Source: accessibility.md -->
|
|
173
|
+
|
|
174
|
+
# Web Accessibility — WCAG 2.1 Compliance
|
|
175
|
+
|
|
176
|
+
## Principles (POUR)
|
|
177
|
+
|
|
178
|
+
1. **Perceivable** — content can be perceived by all users
|
|
179
|
+
2. **Operable** — interface can be operated by all users
|
|
180
|
+
3. **Understandable** — content and interface are understandable
|
|
181
|
+
4. **Robust** — content works across assistive technologies
|
|
182
|
+
|
|
183
|
+
## Keyboard Navigation
|
|
184
|
+
|
|
185
|
+
- All interactive elements must be reachable with Tab
|
|
186
|
+
- Focus order must be logical (DOM order)
|
|
187
|
+
- Custom widgets need keyboard handlers (Enter, Space, Escape, Arrow keys)
|
|
188
|
+
- Visible focus indicator on all interactive elements (never `outline: none` without replacement)
|
|
189
|
+
- Skip navigation link for repeated content
|
|
190
|
+
|
|
191
|
+
## Semantic HTML
|
|
192
|
+
|
|
193
|
+
- Use `<button>` not `<div onClick>` for actions
|
|
194
|
+
- Use `<a href>` for navigation
|
|
195
|
+
- Use heading hierarchy (`<h1>` → `<h2>` → `<h3>`)
|
|
196
|
+
- Use `<nav>`, `<main>`, `<article>`, `<aside>` landmarks
|
|
197
|
+
- Use `<label>` with every form input
|
|
198
|
+
|
|
199
|
+
## ARIA (when HTML alone isn't enough)
|
|
200
|
+
|
|
201
|
+
- `aria-label` — label for screen readers when no visible text
|
|
202
|
+
- `aria-labelledby` — reference to existing visible text
|
|
203
|
+
- `aria-describedby` — additional description
|
|
204
|
+
- `aria-live="polite"` — announce dynamic changes
|
|
205
|
+
- `aria-expanded` — for collapsible sections
|
|
206
|
+
- `aria-hidden="true"` — hide decorative elements
|
|
207
|
+
|
|
208
|
+
**Rule: no ARIA is better than bad ARIA.** Use semantic HTML first.
|
|
209
|
+
|
|
210
|
+
## Color and Contrast
|
|
211
|
+
|
|
212
|
+
- Text contrast: 4.5:1 minimum (AA), 7:1 (AAA)
|
|
213
|
+
- Large text (18px+ bold, 24px+ regular): 3:1 minimum
|
|
214
|
+
- Never use color alone to convey information
|
|
215
|
+
- Test with grayscale filter
|
|
216
|
+
|
|
217
|
+
## Images
|
|
218
|
+
|
|
219
|
+
- All images need `alt` text
|
|
220
|
+
- Decorative images: `alt=""`
|
|
221
|
+
- Complex images: `aria-describedby` with longer description
|
|
222
|
+
- SVG icons: `role="img"` + `aria-label`
|
|
223
|
+
|
|
224
|
+
## Forms
|
|
225
|
+
|
|
226
|
+
- Every input needs a visible `<label>`
|
|
227
|
+
- Error messages linked with `aria-describedby`
|
|
228
|
+
- Required fields marked with `aria-required="true"`
|
|
229
|
+
- Group related fields with `<fieldset>` + `<legend>`
|
|
230
|
+
|
|
231
|
+
## Testing
|
|
232
|
+
|
|
233
|
+
- Automated: axe-core, Lighthouse accessibility audit
|
|
234
|
+
- Manual: keyboard-only navigation test
|
|
235
|
+
- Screen reader: test with NVDA (Windows), VoiceOver (Mac)
|
|
236
|
+
- Zoom: test at 200% and 400% zoom
|
|
237
|
+
|
|
238
|
+
<!-- Source: EXAMPLES.md -->
|
|
239
|
+
|
|
240
|
+
# web-accessibility Examples — Anti-patterns vs ContextOS Standard
|
|
241
|
+
|
|
242
|
+
## Example 1: Semantic Buttons vs Clickable Divs
|
|
243
|
+
|
|
244
|
+
### Anti-pattern: Clickable Div
|
|
245
|
+
|
|
246
|
+
```tsx
|
|
247
|
+
// BAD: Cannot be focused with Tab, does not respond to Enter or Space, silent to screen readers
|
|
248
|
+
<div className="button" onClick={handleSubmit}>Submit</div>
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
### Best practice: ContextOS Standard (Semantic Button Element)
|
|
252
|
+
|
|
253
|
+
```tsx
|
|
254
|
+
// GOOD: Keyboard focusable, native Enter/Space handling, properly announced by assistive tech
|
|
255
|
+
<button type="button" onClick={handleSubmit} className="btn btn-primary">
|
|
256
|
+
Submit
|
|
257
|
+
</button>
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
---
|
|
261
|
+
|
|
262
|
+
## Example 2: Icon-only Buttons
|
|
263
|
+
|
|
264
|
+
### Anti-pattern: Unlabelled Icon Button
|
|
265
|
+
|
|
266
|
+
```tsx
|
|
267
|
+
// BAD: Screen reader announces "button", user has zero idea what it does
|
|
268
|
+
<button onClick={onClose}><XIcon /></button>
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
### Best practice: ContextOS Standard (Accessible Label)
|
|
272
|
+
|
|
273
|
+
```tsx
|
|
274
|
+
// GOOD: Explicit aria-label and hidden decorative icon
|
|
275
|
+
<button type="button" onClick={onClose} aria-label="Close modal window">
|
|
276
|
+
<XIcon aria-hidden="true" />
|
|
277
|
+
</button>
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
<!-- Source: TROUBLESHOOTING.md -->
|
|
281
|
+
|
|
282
|
+
# web-accessibility Troubleshooting & Common Mistakes
|
|
283
|
+
|
|
284
|
+
## 1. Trapping Keyboard Users in Inactive Elements
|
|
285
|
+
|
|
286
|
+
- **Symptom**: Tab key moves focus into invisible elements hidden offscreen.
|
|
287
|
+
- **Root Cause**: Using display: none vs opacity: 0 or left: -9999px.
|
|
288
|
+
- **Fix**: Always apply display: none / hidden or inert attribute to elements that are currently not visible.
|
|
289
|
+
|
|
290
|
+
## 2. Color Contrast Violations
|
|
291
|
+
|
|
292
|
+
- **Symptom**: Text is unreadable for users with low vision or in bright sunlight.
|
|
293
|
+
- **Root Cause**: Contrast ratio between text and background color is below WCAG AA thresholds.
|
|
294
|
+
- **Fix**: Ensure contrast ratio is at least 4.5:1 for body text and 3:1 for large text / graphical controls.
|
|
295
|
+
|
|
296
|
+
## 3. Silent Dynamic Updates
|
|
297
|
+
|
|
298
|
+
- **Symptom**: Asynchronous error messages or notifications appear on screen without screen reader announcement.
|
|
299
|
+
- **Root Cause**: Missing ARIA live region.
|
|
300
|
+
- **Fix**: Wrap notification banners in aria-live="polite" and role="status".
|