@cubis/foundry 0.3.71 → 0.3.72
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/CHANGELOG.md +15 -0
- package/dist/cli/core.js +4 -18
- package/dist/cli/core.js.map +1 -1
- package/package.json +1 -1
- package/src/cli/core.ts +4 -18
- package/workflows/powers/accessibility/POWER.md +83 -94
- package/workflows/powers/accessibility/SKILL.md +82 -94
- package/workflows/powers/agent-design/POWER.md +201 -0
- package/workflows/powers/agent-design/SKILL.md +198 -0
- package/workflows/powers/agent-design/references/clarification-patterns.md +153 -0
- package/workflows/powers/agent-design/references/skill-testing.md +164 -0
- package/workflows/powers/agent-design/references/workflow-patterns.md +226 -0
- package/workflows/powers/agentic-eval/POWER.md +62 -0
- package/workflows/powers/agentic-eval/SKILL.md +59 -0
- package/workflows/powers/agentic-eval/references/rubric-and-regression-checklist.md +11 -0
- package/workflows/powers/api-designer/POWER.md +43 -71
- package/workflows/powers/api-designer/SKILL.md +43 -71
- package/workflows/powers/api-patterns/POWER.md +42 -56
- package/workflows/powers/api-patterns/SKILL.md +42 -57
- package/workflows/powers/architecture-designer/POWER.md +43 -60
- package/workflows/powers/architecture-designer/SKILL.md +43 -60
- package/workflows/powers/ask-questions-if-underspecified/POWER.md +51 -3
- package/workflows/powers/auth-architect/POWER.md +69 -0
- package/workflows/powers/auth-architect/SKILL.md +66 -0
- package/workflows/powers/auth-architect/references/session-token-policy-checklist.md +45 -0
- package/workflows/powers/behavioral-modes/POWER.md +100 -9
- package/workflows/powers/c-pro/POWER.md +105 -0
- package/workflows/powers/c-pro/SKILL.md +102 -0
- package/workflows/powers/c-pro/references/build-systems-and-toolchains.md +148 -0
- package/workflows/powers/c-pro/references/common-ub-and-portability.md +166 -0
- package/workflows/powers/c-pro/references/debugging-with-sanitizers.md +205 -0
- package/workflows/powers/c-pro/references/memory-safety-and-build-checklist.md +60 -0
- package/workflows/powers/c-pro/references/posix-and-platform-apis.md +244 -0
- package/workflows/powers/changelog-generator/POWER.md +127 -63
- package/workflows/powers/changelog-generator/SKILL.md +126 -63
- package/workflows/powers/ci-cd-pipelines/POWER.md +156 -0
- package/workflows/powers/ci-cd-pipelines/SKILL.md +153 -0
- package/workflows/powers/ci-cd-pipelines/references/github-actions-patterns.md +160 -0
- package/workflows/powers/ci-cd-pipelines/references/pipeline-security-checklist.md +57 -0
- package/workflows/powers/cli-developer/POWER.md +152 -95
- package/workflows/powers/cli-developer/SKILL.md +152 -95
- package/workflows/powers/cpp-pro/POWER.md +111 -0
- package/workflows/powers/cpp-pro/SKILL.md +108 -0
- package/workflows/powers/cpp-pro/references/concurrency-primitives.md +266 -0
- package/workflows/powers/cpp-pro/references/move-semantics-and-value-types.md +149 -0
- package/workflows/powers/cpp-pro/references/performance-and-profiling.md +191 -0
- package/workflows/powers/cpp-pro/references/raii-and-modern-cpp-checklist.md +87 -0
- package/workflows/powers/cpp-pro/references/template-and-concepts-patterns.md +205 -0
- package/workflows/powers/csharp-pro/POWER.md +47 -22
- package/workflows/powers/csharp-pro/SKILL.md +47 -22
- package/workflows/powers/dart-pro/POWER.md +68 -0
- package/workflows/powers/dart-pro/SKILL.md +65 -0
- package/workflows/powers/dart-pro/references/isolate-and-concurrency.md +180 -0
- package/workflows/powers/dart-pro/references/null-safety-and-async-patterns.md +133 -0
- package/workflows/powers/dart-pro/references/package-structure-and-linting.md +193 -0
- package/workflows/powers/dart-pro/references/sealed-records-patterns.md +173 -0
- package/workflows/powers/dart-pro/references/testing-and-mocking.md +235 -0
- package/workflows/powers/database-design/POWER.md +47 -33
- package/workflows/powers/database-design/SKILL.md +47 -33
- package/workflows/powers/database-optimizer/POWER.md +43 -64
- package/workflows/powers/database-optimizer/SKILL.md +43 -64
- package/workflows/powers/database-skills/POWER.md +59 -93
- package/workflows/powers/database-skills/SKILL.md +59 -93
- package/workflows/powers/debugging-strategies/POWER.md +69 -0
- package/workflows/powers/debugging-strategies/SKILL.md +66 -0
- package/workflows/powers/debugging-strategies/references/reproduce-isolate-verify-checklist.md +42 -0
- package/workflows/powers/deep-research/POWER.md +67 -0
- package/workflows/powers/deep-research/SKILL.md +64 -0
- package/workflows/powers/deep-research/references/multi-round-research-loop.md +80 -0
- package/workflows/powers/design-system-builder/POWER.md +130 -116
- package/workflows/powers/design-system-builder/SKILL.md +130 -116
- package/workflows/powers/devops-engineer/POWER.md +120 -57
- package/workflows/powers/devops-engineer/SKILL.md +120 -57
- package/workflows/powers/docker-kubernetes/POWER.md +94 -0
- package/workflows/powers/docker-kubernetes/SKILL.md +91 -0
- package/workflows/powers/docker-kubernetes/references/dockerfile-optimization-checklist.md +35 -0
- package/workflows/powers/docker-kubernetes/references/kubernetes-deployment-patterns.md +59 -0
- package/workflows/powers/documentation-templates/POWER.md +158 -127
- package/workflows/powers/documentation-templates/SKILL.md +158 -127
- package/workflows/powers/drizzle-expert/POWER.md +66 -0
- package/workflows/powers/drizzle-expert/SKILL.md +63 -0
- package/workflows/powers/drizzle-expert/references/runtime-pairing-matrix.md +16 -0
- package/workflows/powers/drizzle-expert/references/schema-and-migration-playbook.md +18 -0
- package/workflows/powers/error-ux-observability/POWER.md +144 -131
- package/workflows/powers/error-ux-observability/SKILL.md +143 -131
- package/workflows/powers/fastapi-expert/POWER.md +46 -60
- package/workflows/powers/fastapi-expert/SKILL.md +46 -60
- package/workflows/powers/firebase/POWER.md +65 -0
- package/workflows/powers/firebase/SKILL.md +62 -0
- package/workflows/powers/firebase/references/platform-routing.md +16 -0
- package/workflows/powers/firebase/references/rules-and-indexes-checklist.md +11 -0
- package/workflows/powers/flutter-design-system/POWER.md +63 -0
- package/workflows/powers/flutter-design-system/SKILL.md +60 -0
- package/workflows/powers/flutter-design-system/references/shared-widgets.md +29 -0
- package/workflows/powers/flutter-design-system/references/tokens-and-theme.md +34 -0
- package/workflows/powers/flutter-drift/POWER.md +65 -0
- package/workflows/powers/flutter-drift/SKILL.md +62 -0
- package/workflows/powers/flutter-drift/references/migrations.md +22 -0
- package/workflows/powers/flutter-drift/references/query-patterns.md +26 -0
- package/workflows/powers/flutter-feature/POWER.md +65 -0
- package/workflows/powers/flutter-feature/SKILL.md +62 -0
- package/workflows/powers/flutter-feature/references/architecture-rules.md +85 -0
- package/workflows/powers/flutter-feature/references/composite-provider.md +58 -0
- package/workflows/powers/flutter-feature/references/outbox-pattern.md +87 -0
- package/workflows/powers/flutter-feature/references/testing-patterns.md +218 -0
- package/workflows/powers/flutter-go-router/POWER.md +64 -0
- package/workflows/powers/flutter-go-router/SKILL.md +61 -0
- package/workflows/powers/flutter-go-router/references/guards-and-deeplinks.md +20 -0
- package/workflows/powers/flutter-go-router/references/typed-routes.md +27 -0
- package/workflows/powers/flutter-offline-sync/POWER.md +62 -0
- package/workflows/powers/flutter-offline-sync/SKILL.md +59 -0
- package/workflows/powers/flutter-offline-sync/references/outbox-full.md +44 -0
- package/workflows/powers/flutter-repository/POWER.md +64 -0
- package/workflows/powers/flutter-repository/SKILL.md +61 -0
- package/workflows/powers/flutter-repository/references/drift-patterns.md +21 -0
- package/workflows/powers/flutter-repository/references/retrofit-patterns.md +20 -0
- package/workflows/powers/flutter-riverpod/POWER.md +70 -0
- package/workflows/powers/flutter-riverpod/SKILL.md +67 -0
- package/workflows/powers/flutter-riverpod/references/async-and-mutations.md +19 -0
- package/workflows/powers/flutter-riverpod/references/async-lifecycle.md +19 -0
- package/workflows/powers/flutter-riverpod/references/provider-selection.md +20 -0
- package/workflows/powers/flutter-riverpod/references/testing.md +21 -0
- package/workflows/powers/flutter-riverpod/references/version-matrix.md +24 -0
- package/workflows/powers/flutter-state-machine/POWER.md +62 -0
- package/workflows/powers/flutter-state-machine/SKILL.md +59 -0
- package/workflows/powers/flutter-state-machine/references/app-state-contract.md +23 -0
- package/workflows/powers/flutter-state-machine/references/ui-rendering.md +14 -0
- package/workflows/powers/flutter-testing/POWER.md +64 -0
- package/workflows/powers/flutter-testing/SKILL.md +61 -0
- package/workflows/powers/flutter-testing/references/offline-sync-tests.md +16 -0
- package/workflows/powers/flutter-testing/references/test-layers.md +33 -0
- package/workflows/powers/frontend-code-review/POWER.md +137 -0
- package/workflows/powers/frontend-code-review/SKILL.md +134 -0
- package/workflows/powers/frontend-code-review/references/common-antipatterns.md +86 -0
- package/workflows/powers/frontend-code-review/references/performance-budgets.md +56 -0
- package/workflows/powers/frontend-code-review/references/review-checklists.md +47 -0
- package/workflows/powers/frontend-design/POWER.md +163 -362
- package/workflows/powers/frontend-design/SKILL.md +163 -362
- package/workflows/powers/game-development/POWER.md +57 -140
- package/workflows/powers/game-development/SKILL.md +57 -140
- package/workflows/powers/geo-fundamentals/POWER.md +64 -126
- package/workflows/powers/geo-fundamentals/SKILL.md +64 -127
- package/workflows/powers/git-workflow/POWER.md +135 -0
- package/workflows/powers/git-workflow/SKILL.md +132 -0
- package/workflows/powers/git-workflow/references/pr-review-checklist.md +63 -0
- package/workflows/powers/golang-pro/POWER.md +46 -35
- package/workflows/powers/golang-pro/SKILL.md +46 -35
- package/workflows/powers/graphql-architect/POWER.md +44 -62
- package/workflows/powers/graphql-architect/SKILL.md +44 -62
- package/workflows/powers/i18n-localization/POWER.md +118 -103
- package/workflows/powers/i18n-localization/SKILL.md +118 -103
- package/workflows/powers/java-pro/POWER.md +47 -22
- package/workflows/powers/java-pro/SKILL.md +47 -22
- package/workflows/powers/javascript-pro/POWER.md +47 -34
- package/workflows/powers/javascript-pro/SKILL.md +47 -34
- package/workflows/powers/kotlin-pro/POWER.md +46 -23
- package/workflows/powers/kotlin-pro/SKILL.md +46 -23
- package/workflows/powers/legacy-modernizer/POWER.md +43 -60
- package/workflows/powers/legacy-modernizer/SKILL.md +43 -60
- package/workflows/powers/mcp-builder/POWER.md +65 -0
- package/workflows/powers/mcp-builder/SKILL.md +62 -0
- package/workflows/powers/mcp-builder/references/testing-and-evals.md +17 -0
- package/workflows/powers/mcp-builder/references/transport-and-tool-design.md +17 -0
- package/workflows/powers/microservices-architect/POWER.md +43 -70
- package/workflows/powers/microservices-architect/SKILL.md +43 -70
- package/workflows/powers/mobile-design/POWER.md +110 -345
- package/workflows/powers/mobile-design/SKILL.md +110 -345
- package/workflows/powers/mongodb/POWER.md +67 -0
- package/workflows/powers/mongodb/SKILL.md +64 -0
- package/workflows/powers/mongodb/references/mongodb-checklist.md +20 -0
- package/workflows/powers/mysql/POWER.md +67 -0
- package/workflows/powers/mysql/SKILL.md +64 -0
- package/workflows/powers/mysql/references/mysql-checklist.md +20 -0
- package/workflows/powers/neki/POWER.md +67 -0
- package/workflows/powers/neki/SKILL.md +64 -0
- package/workflows/powers/neki/references/neki-checklist.md +18 -0
- package/workflows/powers/nestjs-expert/POWER.md +45 -91
- package/workflows/powers/nestjs-expert/SKILL.md +45 -91
- package/workflows/powers/nextjs-developer/POWER.md +51 -44
- package/workflows/powers/nextjs-developer/SKILL.md +51 -44
- package/workflows/powers/nodejs-best-practices/POWER.md +48 -29
- package/workflows/powers/nodejs-best-practices/SKILL.md +48 -29
- package/workflows/powers/observability/POWER.md +109 -0
- package/workflows/powers/observability/SKILL.md +106 -0
- package/workflows/powers/observability/references/alerting-and-slo-checklist.md +87 -0
- package/workflows/powers/observability/references/opentelemetry-setup-guide.md +121 -0
- package/workflows/powers/openai-docs/POWER.md +61 -0
- package/workflows/powers/openai-docs/SKILL.md +58 -0
- package/workflows/powers/openai-docs/references/official-source-playbook.md +10 -0
- package/workflows/powers/performance-profiling/POWER.md +61 -114
- package/workflows/powers/performance-profiling/SKILL.md +61 -114
- package/workflows/powers/php-pro/POWER.md +116 -0
- package/workflows/powers/php-pro/SKILL.md +113 -0
- package/workflows/powers/php-pro/references/architecture-and-di.md +239 -0
- package/workflows/powers/php-pro/references/modern-php-features.md +189 -0
- package/workflows/powers/php-pro/references/performance-and-deployment.md +197 -0
- package/workflows/powers/php-pro/references/php84-strict-typing-checklist.md +161 -0
- package/workflows/powers/php-pro/references/testing-and-static-analysis.md +235 -0
- package/workflows/powers/playwright-e2e/POWER.md +85 -0
- package/workflows/powers/playwright-e2e/SKILL.md +82 -0
- package/workflows/powers/playwright-e2e/references/locator-trace-flake-checklist.md +80 -0
- package/workflows/powers/postgres/POWER.md +67 -0
- package/workflows/powers/postgres/SKILL.md +64 -0
- package/workflows/powers/postgres/references/postgres-checklist.md +20 -0
- package/workflows/powers/prompt-engineer/POWER.md +47 -30
- package/workflows/powers/prompt-engineer/SKILL.md +47 -30
- package/workflows/powers/python-pro/POWER.md +47 -36
- package/workflows/powers/python-pro/SKILL.md +47 -36
- package/workflows/powers/react-best-practices/POWER.md +56 -33
- package/workflows/powers/react-best-practices/SKILL.md +56 -33
- package/workflows/powers/react-expert/POWER.md +47 -37
- package/workflows/powers/react-expert/SKILL.md +47 -37
- package/workflows/powers/redis/POWER.md +67 -0
- package/workflows/powers/redis/SKILL.md +64 -0
- package/workflows/powers/redis/references/redis-checklist.md +19 -0
- package/workflows/powers/ruby-pro/POWER.md +118 -0
- package/workflows/powers/ruby-pro/SKILL.md +115 -0
- package/workflows/powers/ruby-pro/references/modern-ruby-features.md +189 -0
- package/workflows/powers/ruby-pro/references/object-design-patterns.md +220 -0
- package/workflows/powers/ruby-pro/references/performance-and-profiling.md +224 -0
- package/workflows/powers/ruby-pro/references/ruby-concurrency-and-testing.md +190 -0
- package/workflows/powers/ruby-pro/references/testing-and-rspec.md +236 -0
- package/workflows/powers/rust-pro/POWER.md +45 -31
- package/workflows/powers/rust-pro/SKILL.md +45 -31
- package/workflows/powers/security-engineer/POWER.md +129 -0
- package/workflows/powers/security-engineer/SKILL.md +126 -0
- package/workflows/powers/seo-fundamentals/POWER.md +59 -102
- package/workflows/powers/seo-fundamentals/SKILL.md +59 -102
- package/workflows/powers/serverless-patterns/POWER.md +171 -0
- package/workflows/powers/serverless-patterns/SKILL.md +168 -0
- package/workflows/powers/skill-creator/POWER.md +90 -0
- package/workflows/powers/skill-creator/SKILL.md +87 -0
- package/workflows/powers/skill-creator/references/platform-formats.md +181 -0
- package/workflows/powers/skill-creator/references/schemas.md +430 -0
- package/workflows/powers/spec-miner/POWER.md +49 -57
- package/workflows/powers/spec-miner/SKILL.md +49 -57
- package/workflows/powers/sqlite/POWER.md +67 -0
- package/workflows/powers/sqlite/SKILL.md +64 -0
- package/workflows/powers/sqlite/references/sqlite-checklist.md +19 -0
- package/workflows/powers/sre-engineer/POWER.md +123 -64
- package/workflows/powers/sre-engineer/SKILL.md +123 -64
- package/workflows/powers/static-analysis/POWER.md +121 -77
- package/workflows/powers/static-analysis/SKILL.md +121 -77
- package/workflows/powers/stripe-best-practices/POWER.md +140 -17
- package/workflows/powers/stripe-best-practices/SKILL.md +139 -17
- package/workflows/powers/supabase/POWER.md +67 -0
- package/workflows/powers/supabase/SKILL.md +64 -0
- package/workflows/powers/supabase/references/supabase-checklist.md +19 -0
- package/workflows/powers/swift-pro/POWER.md +118 -0
- package/workflows/powers/swift-pro/SKILL.md +115 -0
- package/workflows/powers/swift-pro/references/concurrency-patterns.md +165 -0
- package/workflows/powers/swift-pro/references/protocol-and-generics.md +172 -0
- package/workflows/powers/swift-pro/references/sendable-and-isolation.md +116 -0
- package/workflows/powers/swift-pro/references/swift-concurrency-and-protocols.md +260 -0
- package/workflows/powers/swift-pro/references/testing-and-packages.md +192 -0
- package/workflows/powers/tailwind-patterns/POWER.md +71 -240
- package/workflows/powers/tailwind-patterns/SKILL.md +71 -240
- package/workflows/powers/testing-patterns/POWER.md +155 -10
- package/workflows/powers/testing-patterns/SKILL.md +155 -10
- package/workflows/powers/typescript-pro/POWER.md +47 -38
- package/workflows/powers/typescript-pro/SKILL.md +47 -38
- package/workflows/powers/vitess/POWER.md +67 -0
- package/workflows/powers/vitess/SKILL.md +64 -0
- package/workflows/powers/vitess/references/vitess-checklist.md +19 -0
- package/workflows/powers/vulnerability-scanner/POWER.md +146 -10
- package/workflows/powers/vulnerability-scanner/SKILL.md +146 -10
- package/workflows/powers/web-perf/POWER.md +43 -170
- package/workflows/powers/web-perf/SKILL.md +43 -170
- package/workflows/powers/webapp-testing/POWER.md +43 -164
- package/workflows/powers/webapp-testing/SKILL.md +43 -164
|
@@ -1,45 +1,62 @@
|
|
|
1
1
|
````markdown
|
|
2
2
|
---
|
|
3
3
|
inclusion: manual
|
|
4
|
-
name:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
name: prompt-engineer
|
|
5
|
+
description: "Use when a prompt, instruction set, or agent/system message needs quality review: ambiguity, missing format constraints, unsafe assumptions, injection exposure, weak trigger wording, or brittle task framing."
|
|
6
|
+
license: MIT
|
|
7
|
+
metadata:
|
|
8
|
+
author: cubis-foundry
|
|
9
|
+
version: "1.0"
|
|
10
|
+
compatibility: Claude Code, Codex, GitHub Copilot
|
|
8
11
|
---
|
|
9
12
|
|
|
10
13
|
# Prompt Engineer
|
|
11
14
|
|
|
12
|
-
##
|
|
15
|
+
## Purpose
|
|
13
16
|
|
|
14
|
-
|
|
15
|
-
- Optimization techniques → `prompt-optimization.md`
|
|
16
|
-
- Evaluation frameworks → `evaluation-frameworks.md`
|
|
17
|
-
- Structured outputs (JSON, function calling) → `structured-outputs.md`
|
|
18
|
-
- System prompt design → `system-prompts.md`
|
|
17
|
+
You are the specialist for prompt and instruction quality.
|
|
19
18
|
|
|
20
|
-
|
|
19
|
+
Your job is to catch ambiguity, missing constraints, unsafe prompt surfaces, and fragile output framing before they turn into agent failures.
|
|
21
20
|
|
|
22
|
-
|
|
23
|
-
2. **Design** - Choose pattern, write clear instructions
|
|
24
|
-
3. **Test** - Run diverse test cases
|
|
25
|
-
4. **Iterate** - Refine based on failures
|
|
26
|
-
5. **Document** - Version and monitor
|
|
21
|
+
## When to Use
|
|
27
22
|
|
|
28
|
-
|
|
23
|
+
- Reviewing or rewriting prompts, agent instructions, rules, or skill descriptions.
|
|
24
|
+
- The prompt output shape is brittle, vague, or unsafe.
|
|
25
|
+
- The task needs clearer formatting constraints, boundaries, or injection resistance.
|
|
29
26
|
|
|
30
|
-
|
|
31
|
-
<role/persona>
|
|
32
|
-
<task description>
|
|
33
|
-
<constraints>
|
|
34
|
-
<output format>
|
|
35
|
-
<examples if few-shot>
|
|
36
|
-
```
|
|
27
|
+
## Instructions
|
|
37
28
|
|
|
38
|
-
|
|
29
|
+
### STANDARD OPERATING PROCEDURE (SOP)
|
|
39
30
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
-
|
|
44
|
-
|
|
31
|
+
1. Identify the actual task, output contract, and failure mode.
|
|
32
|
+
2. Check for ambiguity, hidden assumptions, and missing constraints.
|
|
33
|
+
3. Tighten boundaries, structure, and formatting expectations.
|
|
34
|
+
4. Flag injection or context-poisoning risks when external text is involved.
|
|
35
|
+
5. Keep the final wording short, explicit, and testable.
|
|
36
|
+
|
|
37
|
+
### Constraints
|
|
38
|
+
|
|
39
|
+
- Do not drift into generic copywriting advice.
|
|
40
|
+
- Do not treat evaluation or prompt review as the same skill.
|
|
41
|
+
- Do not add complexity when the real fix is clearer task framing.
|
|
42
|
+
- Do not ignore prompt-injection and boundary language when tool use or browsing is involved.
|
|
43
|
+
|
|
44
|
+
## Output Format
|
|
45
|
+
|
|
46
|
+
Provide implementation guidance, code examples, and configuration as appropriate to the task.
|
|
47
|
+
|
|
48
|
+
## References
|
|
49
|
+
|
|
50
|
+
| File | Load when |
|
|
51
|
+
| --------------------------------------- | ------------------------------------------------------------------------------------------------------- |
|
|
52
|
+
| `references/prompt-review-checklist.md` | You need a systematic checklist for ambiguity, output constraints, injection risk, and trigger wording. |
|
|
53
|
+
|
|
54
|
+
## Scripts
|
|
55
|
+
|
|
56
|
+
No helper scripts are required for this skill right now. Keep execution in `SKILL.md` and `references/` unless repeated automation becomes necessary.
|
|
57
|
+
|
|
58
|
+
## Examples
|
|
59
|
+
|
|
60
|
+
- "Help me with prompt engineer best practices in this project"
|
|
61
|
+
- "Review my prompt engineer implementation for issues"
|
|
45
62
|
````
|
|
@@ -1,42 +1,59 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
name: prompt-engineer
|
|
3
|
+
description: "Use when a prompt, instruction set, or agent/system message needs quality review: ambiguity, missing format constraints, unsafe assumptions, injection exposure, weak trigger wording, or brittle task framing."
|
|
4
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
author: cubis-foundry
|
|
7
|
+
version: "1.0"
|
|
8
|
+
compatibility: Claude Code, Codex, GitHub Copilot
|
|
6
9
|
---
|
|
7
10
|
|
|
8
11
|
# Prompt Engineer
|
|
9
12
|
|
|
10
|
-
##
|
|
13
|
+
## Purpose
|
|
11
14
|
|
|
12
|
-
|
|
13
|
-
- Optimization techniques → `prompt-optimization.md`
|
|
14
|
-
- Evaluation frameworks → `evaluation-frameworks.md`
|
|
15
|
-
- Structured outputs (JSON, function calling) → `structured-outputs.md`
|
|
16
|
-
- System prompt design → `system-prompts.md`
|
|
15
|
+
You are the specialist for prompt and instruction quality.
|
|
17
16
|
|
|
18
|
-
|
|
17
|
+
Your job is to catch ambiguity, missing constraints, unsafe prompt surfaces, and fragile output framing before they turn into agent failures.
|
|
19
18
|
|
|
20
|
-
|
|
21
|
-
2. **Design** - Choose pattern, write clear instructions
|
|
22
|
-
3. **Test** - Run diverse test cases
|
|
23
|
-
4. **Iterate** - Refine based on failures
|
|
24
|
-
5. **Document** - Version and monitor
|
|
19
|
+
## When to Use
|
|
25
20
|
|
|
26
|
-
|
|
21
|
+
- Reviewing or rewriting prompts, agent instructions, rules, or skill descriptions.
|
|
22
|
+
- The prompt output shape is brittle, vague, or unsafe.
|
|
23
|
+
- The task needs clearer formatting constraints, boundaries, or injection resistance.
|
|
27
24
|
|
|
28
|
-
|
|
29
|
-
<role/persona>
|
|
30
|
-
<task description>
|
|
31
|
-
<constraints>
|
|
32
|
-
<output format>
|
|
33
|
-
<examples if few-shot>
|
|
34
|
-
```
|
|
25
|
+
## Instructions
|
|
35
26
|
|
|
36
|
-
|
|
27
|
+
### STANDARD OPERATING PROCEDURE (SOP)
|
|
37
28
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
-
|
|
42
|
-
|
|
29
|
+
1. Identify the actual task, output contract, and failure mode.
|
|
30
|
+
2. Check for ambiguity, hidden assumptions, and missing constraints.
|
|
31
|
+
3. Tighten boundaries, structure, and formatting expectations.
|
|
32
|
+
4. Flag injection or context-poisoning risks when external text is involved.
|
|
33
|
+
5. Keep the final wording short, explicit, and testable.
|
|
34
|
+
|
|
35
|
+
### Constraints
|
|
36
|
+
|
|
37
|
+
- Do not drift into generic copywriting advice.
|
|
38
|
+
- Do not treat evaluation or prompt review as the same skill.
|
|
39
|
+
- Do not add complexity when the real fix is clearer task framing.
|
|
40
|
+
- Do not ignore prompt-injection and boundary language when tool use or browsing is involved.
|
|
41
|
+
|
|
42
|
+
## Output Format
|
|
43
|
+
|
|
44
|
+
Provide implementation guidance, code examples, and configuration as appropriate to the task.
|
|
45
|
+
|
|
46
|
+
## References
|
|
47
|
+
|
|
48
|
+
| File | Load when |
|
|
49
|
+
| --------------------------------------- | ------------------------------------------------------------------------------------------------------- |
|
|
50
|
+
| `references/prompt-review-checklist.md` | You need a systematic checklist for ambiguity, output constraints, injection risk, and trigger wording. |
|
|
51
|
+
|
|
52
|
+
## Scripts
|
|
53
|
+
|
|
54
|
+
No helper scripts are required for this skill right now. Keep execution in `SKILL.md` and `references/` unless repeated automation becomes necessary.
|
|
55
|
+
|
|
56
|
+
## Examples
|
|
57
|
+
|
|
58
|
+
- "Help me with prompt engineer best practices in this project"
|
|
59
|
+
- "Review my prompt engineer implementation for issues"
|
|
@@ -1,59 +1,70 @@
|
|
|
1
1
|
````markdown
|
|
2
2
|
---
|
|
3
3
|
inclusion: manual
|
|
4
|
-
name:
|
|
5
|
-
description: "Use for production Python with 3.14-era typing, async, packaging, and testing standards."
|
|
4
|
+
name: python-pro
|
|
5
|
+
description: "Use for production Python with 3.14-era typing, async, packaging, and testing standards. Use when building Python backend services, migrating legacy Python to typed architecture, implementing async I/O, or setting up pytest and packaging workflows."
|
|
6
6
|
license: MIT
|
|
7
7
|
metadata:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
stack: "python"
|
|
12
|
-
baseline: "Python 3.14"
|
|
8
|
+
author: cubis-foundry
|
|
9
|
+
version: "3.0"
|
|
10
|
+
compatibility: Claude Code, Codex, GitHub Copilot
|
|
13
11
|
---
|
|
14
12
|
|
|
15
13
|
# Python Pro
|
|
16
14
|
|
|
17
|
-
##
|
|
15
|
+
## Purpose
|
|
16
|
+
|
|
17
|
+
Provide language-layer guidance for production Python — type annotations, async patterns, packaging, testing, and ecosystem tooling. Acts as the foundation before framework skills like `fastapi-expert` are loaded.
|
|
18
|
+
|
|
19
|
+
## When to Use
|
|
18
20
|
|
|
19
21
|
- Building backend services, automation, or data pipelines in Python.
|
|
20
22
|
- Migrating legacy Python to typed and testable architecture.
|
|
21
|
-
- Implementing async I/O with
|
|
23
|
+
- Implementing async I/O with structured concurrency.
|
|
24
|
+
- Setting up pytest, packaging, or toolchain workflows.
|
|
25
|
+
- Serving as the language-layer baseline before loading framework-specific skills.
|
|
22
26
|
|
|
23
|
-
##
|
|
27
|
+
## Instructions
|
|
24
28
|
|
|
25
|
-
1. Establish interpreter
|
|
26
|
-
2.
|
|
27
|
-
3.
|
|
28
|
-
4.
|
|
29
|
+
1. Establish interpreter and runtime constraints before writing code, because Python version determines which typing and async features are available.
|
|
30
|
+
2. Type annotate public functions and critical internal APIs using `Protocol` for structural subtyping and `TypeVar`/`ParamSpec` for generic boundaries. Use `object` over `Any` at public boundaries because `Any` silences the type checker.
|
|
31
|
+
3. Use `pyproject.toml`-first packaging with `hatchling`, `setuptools`, or `flit` as build backend. Do not use `setup.py` for new projects because `pyproject.toml` is the current standard.
|
|
32
|
+
4. Use `dataclass(frozen=True, slots=True)` for plain value objects and Pydantic `BaseModel` for external data validation (API input, config files) because Pydantic provides runtime schema enforcement.
|
|
33
|
+
5. Use `TaskGroup` (3.11+) for structured concurrency — child tasks are automatically cancelled if any raises. Use `asyncio.timeout` instead of `asyncio.wait_for` for cleaner timeout handling.
|
|
34
|
+
6. Keep sync and async call paths separate. Do not call `asyncio.run()` inside an already-running loop. Use `asyncio.to_thread()` to bridge sync-blocking code into async context.
|
|
35
|
+
7. Set explicit timeout and concurrency limits on external I/O because unbounded fan-out is the most common async performance bug.
|
|
36
|
+
8. Use `pytest` for tests with `@pytest.mark.parametrize` for edge cases. Use `hypothesis` for property-based testing when input domains are large.
|
|
37
|
+
9. Use `ruff` for all-in-one linting and formatting. Use `mypy` for strict type checking in CI and `pyright` for IDE feedback.
|
|
38
|
+
10. Use `uv` for fast dependency resolution and virtual environment management. Fall back to `pip` + `venv` when `uv` is unavailable.
|
|
39
|
+
11. Preserve exception context at service boundaries — do not swallow root causes. Keep business logic separate from framework glue.
|
|
40
|
+
12. Do not use untyped public APIs in shared modules because they propagate type uncertainty to consumers.
|
|
41
|
+
13. Do not use hidden global state in request paths because it creates unpredictable concurrency behavior.
|
|
42
|
+
14. Do not mix sync and async call graphs without clear adapters because it leads to blocking the event loop.
|
|
29
43
|
|
|
30
|
-
##
|
|
44
|
+
## Output Format
|
|
31
45
|
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
-
|
|
36
|
-
- Prefer stdlib clarity before adding dependencies.
|
|
46
|
+
- Python source files with type annotations on public APIs.
|
|
47
|
+
- `pyproject.toml` for packaging configuration.
|
|
48
|
+
- Test files under `tests/` using pytest conventions.
|
|
49
|
+
- Structured as modules with explicit `__init__.py` exports.
|
|
37
50
|
|
|
38
|
-
##
|
|
51
|
+
## References
|
|
39
52
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
-
|
|
43
|
-
-
|
|
44
|
-
|
|
53
|
+
| File | Load when |
|
|
54
|
+
| -------------------------------- | ----------------------------------------------------------------------- |
|
|
55
|
+
| `references/type-system.md` | Typing strategy, protocols, generics, or boundary models need detail. |
|
|
56
|
+
| `references/async-patterns.md` | Async I/O, task groups, or cancellation semantics need detail. |
|
|
57
|
+
| `references/testing.md` | Pytest strategy, fixtures, or concurrency-safe tests are needed. |
|
|
58
|
+
| `references/packaging.md` | Packaging, dependency layout, or toolchain reproducibility is in scope. |
|
|
59
|
+
| `references/standard-library.md` | Standard-library-first options need review before adding dependencies. |
|
|
45
60
|
|
|
46
|
-
##
|
|
61
|
+
## Scripts
|
|
47
62
|
|
|
48
|
-
|
|
49
|
-
- Hidden global state in request paths.
|
|
50
|
-
- Mixed sync/async call graphs without clear adapters.
|
|
63
|
+
No helper scripts are required for this skill right now. Keep execution in `SKILL.md` and `references/` unless repeated automation becomes necessary.
|
|
51
64
|
|
|
52
|
-
##
|
|
65
|
+
## Examples
|
|
53
66
|
|
|
54
|
-
-
|
|
55
|
-
-
|
|
56
|
-
-
|
|
57
|
-
- `references/packaging.md`
|
|
58
|
-
- `references/standard-library.md`
|
|
67
|
+
- "Set up a Python FastAPI project with proper typing and async patterns"
|
|
68
|
+
- "Migrate this legacy Python module to use dataclasses and type annotations"
|
|
69
|
+
- "Configure pytest with parametrize for this validation function"
|
|
59
70
|
````
|
|
@@ -1,56 +1,67 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
description: "Use for production Python with 3.14-era typing, async, packaging, and testing standards."
|
|
2
|
+
name: python-pro
|
|
3
|
+
description: "Use for production Python with 3.14-era typing, async, packaging, and testing standards. Use when building Python backend services, migrating legacy Python to typed architecture, implementing async I/O, or setting up pytest and packaging workflows."
|
|
4
4
|
license: MIT
|
|
5
5
|
metadata:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
stack: "python"
|
|
10
|
-
baseline: "Python 3.14"
|
|
6
|
+
author: cubis-foundry
|
|
7
|
+
version: "3.0"
|
|
8
|
+
compatibility: Claude Code, Codex, GitHub Copilot
|
|
11
9
|
---
|
|
12
10
|
|
|
13
11
|
# Python Pro
|
|
14
12
|
|
|
15
|
-
##
|
|
13
|
+
## Purpose
|
|
14
|
+
|
|
15
|
+
Provide language-layer guidance for production Python — type annotations, async patterns, packaging, testing, and ecosystem tooling. Acts as the foundation before framework skills like `fastapi-expert` are loaded.
|
|
16
|
+
|
|
17
|
+
## When to Use
|
|
16
18
|
|
|
17
19
|
- Building backend services, automation, or data pipelines in Python.
|
|
18
20
|
- Migrating legacy Python to typed and testable architecture.
|
|
19
|
-
- Implementing async I/O with
|
|
21
|
+
- Implementing async I/O with structured concurrency.
|
|
22
|
+
- Setting up pytest, packaging, or toolchain workflows.
|
|
23
|
+
- Serving as the language-layer baseline before loading framework-specific skills.
|
|
20
24
|
|
|
21
|
-
##
|
|
25
|
+
## Instructions
|
|
22
26
|
|
|
23
|
-
1. Establish interpreter
|
|
24
|
-
2.
|
|
25
|
-
3.
|
|
26
|
-
4.
|
|
27
|
+
1. Establish interpreter and runtime constraints before writing code, because Python version determines which typing and async features are available.
|
|
28
|
+
2. Type annotate public functions and critical internal APIs using `Protocol` for structural subtyping and `TypeVar`/`ParamSpec` for generic boundaries. Use `object` over `Any` at public boundaries because `Any` silences the type checker.
|
|
29
|
+
3. Use `pyproject.toml`-first packaging with `hatchling`, `setuptools`, or `flit` as build backend. Do not use `setup.py` for new projects because `pyproject.toml` is the current standard.
|
|
30
|
+
4. Use `dataclass(frozen=True, slots=True)` for plain value objects and Pydantic `BaseModel` for external data validation (API input, config files) because Pydantic provides runtime schema enforcement.
|
|
31
|
+
5. Use `TaskGroup` (3.11+) for structured concurrency — child tasks are automatically cancelled if any raises. Use `asyncio.timeout` instead of `asyncio.wait_for` for cleaner timeout handling.
|
|
32
|
+
6. Keep sync and async call paths separate. Do not call `asyncio.run()` inside an already-running loop. Use `asyncio.to_thread()` to bridge sync-blocking code into async context.
|
|
33
|
+
7. Set explicit timeout and concurrency limits on external I/O because unbounded fan-out is the most common async performance bug.
|
|
34
|
+
8. Use `pytest` for tests with `@pytest.mark.parametrize` for edge cases. Use `hypothesis` for property-based testing when input domains are large.
|
|
35
|
+
9. Use `ruff` for all-in-one linting and formatting. Use `mypy` for strict type checking in CI and `pyright` for IDE feedback.
|
|
36
|
+
10. Use `uv` for fast dependency resolution and virtual environment management. Fall back to `pip` + `venv` when `uv` is unavailable.
|
|
37
|
+
11. Preserve exception context at service boundaries — do not swallow root causes. Keep business logic separate from framework glue.
|
|
38
|
+
12. Do not use untyped public APIs in shared modules because they propagate type uncertainty to consumers.
|
|
39
|
+
13. Do not use hidden global state in request paths because it creates unpredictable concurrency behavior.
|
|
40
|
+
14. Do not mix sync and async call graphs without clear adapters because it leads to blocking the event loop.
|
|
27
41
|
|
|
28
|
-
##
|
|
42
|
+
## Output Format
|
|
29
43
|
|
|
30
|
-
-
|
|
31
|
-
-
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
- Prefer stdlib clarity before adding dependencies.
|
|
44
|
+
- Python source files with type annotations on public APIs.
|
|
45
|
+
- `pyproject.toml` for packaging configuration.
|
|
46
|
+
- Test files under `tests/` using pytest conventions.
|
|
47
|
+
- Structured as modules with explicit `__init__.py` exports.
|
|
35
48
|
|
|
36
|
-
##
|
|
49
|
+
## References
|
|
37
50
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
-
|
|
41
|
-
-
|
|
42
|
-
|
|
51
|
+
| File | Load when |
|
|
52
|
+
| -------------------------------- | ----------------------------------------------------------------------- |
|
|
53
|
+
| `references/type-system.md` | Typing strategy, protocols, generics, or boundary models need detail. |
|
|
54
|
+
| `references/async-patterns.md` | Async I/O, task groups, or cancellation semantics need detail. |
|
|
55
|
+
| `references/testing.md` | Pytest strategy, fixtures, or concurrency-safe tests are needed. |
|
|
56
|
+
| `references/packaging.md` | Packaging, dependency layout, or toolchain reproducibility is in scope. |
|
|
57
|
+
| `references/standard-library.md` | Standard-library-first options need review before adding dependencies. |
|
|
43
58
|
|
|
44
|
-
##
|
|
59
|
+
## Scripts
|
|
45
60
|
|
|
46
|
-
|
|
47
|
-
- Hidden global state in request paths.
|
|
48
|
-
- Mixed sync/async call graphs without clear adapters.
|
|
61
|
+
No helper scripts are required for this skill right now. Keep execution in `SKILL.md` and `references/` unless repeated automation becomes necessary.
|
|
49
62
|
|
|
50
|
-
##
|
|
63
|
+
## Examples
|
|
51
64
|
|
|
52
|
-
-
|
|
53
|
-
-
|
|
54
|
-
-
|
|
55
|
-
- `references/packaging.md`
|
|
56
|
-
- `references/standard-library.md`
|
|
65
|
+
- "Set up a Python FastAPI project with proper typing and async patterns"
|
|
66
|
+
- "Migrate this legacy Python module to use dataclasses and type annotations"
|
|
67
|
+
- "Configure pytest with parametrize for this validation function"
|
|
@@ -1,56 +1,79 @@
|
|
|
1
1
|
````markdown
|
|
2
2
|
---
|
|
3
3
|
inclusion: manual
|
|
4
|
-
name:
|
|
5
|
-
description: "
|
|
4
|
+
name: react-best-practices
|
|
5
|
+
description: "Use for performance-focused React and Next.js optimization audits, rerender analysis, bundle reduction, and server-rendering efficiency reviews."
|
|
6
6
|
license: MIT
|
|
7
7
|
metadata:
|
|
8
|
-
author:
|
|
8
|
+
author: cubis-foundry
|
|
9
9
|
version: "2.0.0"
|
|
10
|
-
|
|
11
|
-
role: "review-checklist"
|
|
10
|
+
compatibility: Claude Code, Codex, GitHub Copilot
|
|
12
11
|
---
|
|
13
12
|
|
|
14
13
|
# React Best Practices
|
|
15
14
|
|
|
16
15
|
## Purpose
|
|
17
16
|
|
|
18
|
-
|
|
17
|
+
Structured optimization review checklist for React and Next.js code. Pair with implementation skills (`react-expert`, `nextjs-developer`) when code changes are required — this skill focuses on identifying performance issues and recommending minimal safe fixes.
|
|
19
18
|
|
|
20
|
-
##
|
|
19
|
+
## When to Use
|
|
21
20
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
- Running structured performance audits on React or Next.js applications.
|
|
22
|
+
- Identifying async waterfalls, bundle bloat, or hydration overhead.
|
|
23
|
+
- Reviewing rerender churn, unstable props, or server-to-client payload size.
|
|
24
|
+
- Prioritizing optimization work by measurable impact.
|
|
25
|
+
- Validating that recent changes haven't introduced rendering regressions.
|
|
27
26
|
|
|
28
|
-
##
|
|
27
|
+
## Instructions
|
|
29
28
|
|
|
30
|
-
|
|
31
|
-
- Eliminate unnecessary client components.
|
|
32
|
-
- Remove heavy modules from critical path.
|
|
33
|
-
- Avoid unstable props that trigger deep rerenders.
|
|
34
|
-
- Keep server-to-client payloads minimal.
|
|
29
|
+
1. **Start with async waterfalls and request parallelization.** Identify sequential data fetches that could run in parallel. Async waterfalls are usually the highest-impact performance issue.
|
|
35
30
|
|
|
36
|
-
|
|
31
|
+
2. **Audit bundle and hydration footprint.** Identify unnecessary client components, heavy modules in the critical path, and components that could remain server-rendered. Eliminate unnecessary client hydration.
|
|
37
32
|
|
|
38
|
-
|
|
33
|
+
3. **Review server rendering and serialization overhead.** Check for oversized server-to-client payloads, redundant data serialization, and components that fetch more data than they render.
|
|
39
34
|
|
|
40
|
-
|
|
41
|
-
2. Minimal safe change.
|
|
42
|
-
3. Verification method (profile metric or test).
|
|
35
|
+
4. **Analyze client data-fetching and rerender churn.** Look for unstable props that trigger deep rerenders, derived-state duplication, and effect-driven state loops. Verify that memoization is applied only where profiling shows benefit.
|
|
43
36
|
|
|
44
|
-
|
|
37
|
+
5. **Profile JS/runtime hot paths.** Identify expensive computations in render paths, unnecessary object/array allocations per render, and heavy event handlers that block the main thread.
|
|
45
38
|
|
|
46
|
-
|
|
39
|
+
6. **For each finding, assess impact before recommending a fix.** Prioritize by user-visible latency and interaction responsiveness. Small measured gains on hot paths outweigh large theoretical gains on cold paths.
|
|
47
40
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
41
|
+
7. **Recommend minimal safe changes.** Each fix should be the smallest change that addresses the issue. Avoid cascading refactors when a targeted fix suffices.
|
|
42
|
+
|
|
43
|
+
8. **Specify a verification method for every recommendation.** Each finding needs a concrete way to confirm the fix worked — a profile metric, a bundle-size diff, a Lighthouse score change, or a specific test.
|
|
44
|
+
|
|
45
|
+
## Output Format
|
|
46
|
+
|
|
47
|
+
Return a prioritized list of findings. Each finding includes:
|
|
48
|
+
|
|
49
|
+
1. **Issue** — what the problem is and its performance impact.
|
|
50
|
+
2. **Fix** — the minimal safe change to resolve it.
|
|
51
|
+
3. **Verification** — the profile metric, test, or measurement that confirms the fix.
|
|
52
|
+
|
|
53
|
+
Group findings by category: async/network, bundle/hydration, server rendering, client rerenders, runtime hot paths.
|
|
54
|
+
|
|
55
|
+
## References
|
|
56
|
+
|
|
57
|
+
Detailed rules are organized under `rules/` by prefix:
|
|
58
|
+
|
|
59
|
+
| Prefix | Coverage |
|
|
60
|
+
| ------------- | -------------------------------------------- |
|
|
61
|
+
| `async-*` | Async waterfalls and request parallelization |
|
|
62
|
+
| `bundle-*` | Bundle size and tree-shaking |
|
|
63
|
+
| `server-*` | Server rendering and serialization |
|
|
64
|
+
| `client-*` | Client data-fetching patterns |
|
|
65
|
+
| `rerender-*` | Rerender churn and prop stability |
|
|
66
|
+
| `rendering-*` | Rendering pipeline efficiency |
|
|
67
|
+
| `js-*` | JavaScript runtime hot paths |
|
|
68
|
+
| `advanced-*` | Advanced optimization patterns |
|
|
69
|
+
|
|
70
|
+
## Scripts
|
|
71
|
+
|
|
72
|
+
No helper scripts are required for this skill right now. Keep execution in `SKILL.md` and `references/` unless repeated automation becomes necessary.
|
|
73
|
+
|
|
74
|
+
## Examples
|
|
75
|
+
|
|
76
|
+
- "Run a performance audit on this Next.js app — focus on async waterfalls and bundle size."
|
|
77
|
+
- "Review this component tree for rerender churn and unstable prop patterns."
|
|
78
|
+
- "Identify server-to-client serialization overhead in these Server Components."
|
|
56
79
|
````
|
|
@@ -1,53 +1,76 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
description: "
|
|
2
|
+
name: react-best-practices
|
|
3
|
+
description: "Use for performance-focused React and Next.js optimization audits, rerender analysis, bundle reduction, and server-rendering efficiency reviews."
|
|
4
4
|
license: MIT
|
|
5
5
|
metadata:
|
|
6
|
-
author:
|
|
6
|
+
author: cubis-foundry
|
|
7
7
|
version: "2.0.0"
|
|
8
|
-
|
|
9
|
-
role: "review-checklist"
|
|
8
|
+
compatibility: Claude Code, Codex, GitHub Copilot
|
|
10
9
|
---
|
|
11
10
|
|
|
12
11
|
# React Best Practices
|
|
13
12
|
|
|
14
13
|
## Purpose
|
|
15
14
|
|
|
16
|
-
|
|
15
|
+
Structured optimization review checklist for React and Next.js code. Pair with implementation skills (`react-expert`, `nextjs-developer`) when code changes are required — this skill focuses on identifying performance issues and recommending minimal safe fixes.
|
|
17
16
|
|
|
18
|
-
##
|
|
17
|
+
## When to Use
|
|
19
18
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
- Running structured performance audits on React or Next.js applications.
|
|
20
|
+
- Identifying async waterfalls, bundle bloat, or hydration overhead.
|
|
21
|
+
- Reviewing rerender churn, unstable props, or server-to-client payload size.
|
|
22
|
+
- Prioritizing optimization work by measurable impact.
|
|
23
|
+
- Validating that recent changes haven't introduced rendering regressions.
|
|
25
24
|
|
|
26
|
-
##
|
|
25
|
+
## Instructions
|
|
27
26
|
|
|
28
|
-
|
|
29
|
-
- Eliminate unnecessary client components.
|
|
30
|
-
- Remove heavy modules from critical path.
|
|
31
|
-
- Avoid unstable props that trigger deep rerenders.
|
|
32
|
-
- Keep server-to-client payloads minimal.
|
|
27
|
+
1. **Start with async waterfalls and request parallelization.** Identify sequential data fetches that could run in parallel. Async waterfalls are usually the highest-impact performance issue.
|
|
33
28
|
|
|
34
|
-
|
|
29
|
+
2. **Audit bundle and hydration footprint.** Identify unnecessary client components, heavy modules in the critical path, and components that could remain server-rendered. Eliminate unnecessary client hydration.
|
|
35
30
|
|
|
36
|
-
|
|
31
|
+
3. **Review server rendering and serialization overhead.** Check for oversized server-to-client payloads, redundant data serialization, and components that fetch more data than they render.
|
|
37
32
|
|
|
38
|
-
|
|
39
|
-
2. Minimal safe change.
|
|
40
|
-
3. Verification method (profile metric or test).
|
|
33
|
+
4. **Analyze client data-fetching and rerender churn.** Look for unstable props that trigger deep rerenders, derived-state duplication, and effect-driven state loops. Verify that memoization is applied only where profiling shows benefit.
|
|
41
34
|
|
|
42
|
-
|
|
35
|
+
5. **Profile JS/runtime hot paths.** Identify expensive computations in render paths, unnecessary object/array allocations per render, and heavy event handlers that block the main thread.
|
|
43
36
|
|
|
44
|
-
|
|
37
|
+
6. **For each finding, assess impact before recommending a fix.** Prioritize by user-visible latency and interaction responsiveness. Small measured gains on hot paths outweigh large theoretical gains on cold paths.
|
|
45
38
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
39
|
+
7. **Recommend minimal safe changes.** Each fix should be the smallest change that addresses the issue. Avoid cascading refactors when a targeted fix suffices.
|
|
40
|
+
|
|
41
|
+
8. **Specify a verification method for every recommendation.** Each finding needs a concrete way to confirm the fix worked — a profile metric, a bundle-size diff, a Lighthouse score change, or a specific test.
|
|
42
|
+
|
|
43
|
+
## Output Format
|
|
44
|
+
|
|
45
|
+
Return a prioritized list of findings. Each finding includes:
|
|
46
|
+
|
|
47
|
+
1. **Issue** — what the problem is and its performance impact.
|
|
48
|
+
2. **Fix** — the minimal safe change to resolve it.
|
|
49
|
+
3. **Verification** — the profile metric, test, or measurement that confirms the fix.
|
|
50
|
+
|
|
51
|
+
Group findings by category: async/network, bundle/hydration, server rendering, client rerenders, runtime hot paths.
|
|
52
|
+
|
|
53
|
+
## References
|
|
54
|
+
|
|
55
|
+
Detailed rules are organized under `rules/` by prefix:
|
|
56
|
+
|
|
57
|
+
| Prefix | Coverage |
|
|
58
|
+
| ------------- | -------------------------------------------- |
|
|
59
|
+
| `async-*` | Async waterfalls and request parallelization |
|
|
60
|
+
| `bundle-*` | Bundle size and tree-shaking |
|
|
61
|
+
| `server-*` | Server rendering and serialization |
|
|
62
|
+
| `client-*` | Client data-fetching patterns |
|
|
63
|
+
| `rerender-*` | Rerender churn and prop stability |
|
|
64
|
+
| `rendering-*` | Rendering pipeline efficiency |
|
|
65
|
+
| `js-*` | JavaScript runtime hot paths |
|
|
66
|
+
| `advanced-*` | Advanced optimization patterns |
|
|
67
|
+
|
|
68
|
+
## Scripts
|
|
69
|
+
|
|
70
|
+
No helper scripts are required for this skill right now. Keep execution in `SKILL.md` and `references/` unless repeated automation becomes necessary.
|
|
71
|
+
|
|
72
|
+
## Examples
|
|
73
|
+
|
|
74
|
+
- "Run a performance audit on this Next.js app — focus on async waterfalls and bundle size."
|
|
75
|
+
- "Review this component tree for rerender churn and unstable prop patterns."
|
|
76
|
+
- "Identify server-to-client serialization overhead in these Server Components."
|