@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
|
@@ -2,86 +2,72 @@
|
|
|
2
2
|
---
|
|
3
3
|
inclusion: manual
|
|
4
4
|
name: fastapi-expert
|
|
5
|
-
description: Use when building
|
|
5
|
+
description: "Use when building FastAPI services with async Python, Pydantic v2, lifespan-managed resources, dependency-based auth, background task boundaries, and OpenAPI-safe request handling."
|
|
6
6
|
license: MIT
|
|
7
7
|
metadata:
|
|
8
|
-
author:
|
|
9
|
-
version: "
|
|
10
|
-
|
|
11
|
-
triggers: FastAPI, Pydantic, async Python, Python API, REST API Python, SQLAlchemy async, JWT authentication, OpenAPI, Swagger Python
|
|
12
|
-
role: specialist
|
|
13
|
-
scope: implementation
|
|
14
|
-
output-format: code
|
|
15
|
-
related-skills: fullstack-guardian, django-expert, test-master
|
|
8
|
+
author: cubis-foundry
|
|
9
|
+
version: "3.0"
|
|
10
|
+
compatibility: Claude Code, Codex, GitHub Copilot
|
|
16
11
|
---
|
|
17
12
|
|
|
18
13
|
# FastAPI Expert
|
|
19
14
|
|
|
20
|
-
|
|
15
|
+
## Purpose
|
|
21
16
|
|
|
22
|
-
|
|
17
|
+
Use when building FastAPI services with async Python, Pydantic v2, lifespan-managed resources, dependency-based auth, background task boundaries, and OpenAPI-safe request handling.
|
|
23
18
|
|
|
24
|
-
|
|
19
|
+
## When to Use
|
|
25
20
|
|
|
26
|
-
|
|
21
|
+
- Building or refactoring FastAPI REST or internal service APIs.
|
|
22
|
+
- Defining Pydantic v2 models and request/response validation boundaries.
|
|
23
|
+
- Designing dependency-based auth, async database access, lifespan-managed resources, and OpenAPI-safe endpoints.
|
|
24
|
+
- Reviewing FastAPI code for async correctness, background task safety, and operational behavior.
|
|
27
25
|
|
|
28
|
-
|
|
29
|
-
- Implementing Pydantic V2 validation schemas
|
|
30
|
-
- Setting up async database operations
|
|
31
|
-
- Implementing JWT authentication/authorization
|
|
32
|
-
- Creating WebSocket endpoints
|
|
33
|
-
- Optimizing API performance
|
|
26
|
+
## Instructions
|
|
34
27
|
|
|
35
|
-
|
|
28
|
+
1. Model request, response, and error boundaries first with Pydantic v2.
|
|
29
|
+
2. Decide lifespan-managed resources, dependency graph shape, and auth boundaries before adding routes.
|
|
30
|
+
3. Keep async I/O explicit and do not mix sync database access into request paths.
|
|
31
|
+
4. Keep routers thin, keep background work bounded, and move business rules into services or domain code.
|
|
32
|
+
5. Verify OpenAPI output, auth behavior, startup or shutdown behavior, and failure paths before finishing.
|
|
36
33
|
|
|
37
|
-
|
|
38
|
-
2. **Design schemas** - Create Pydantic V2 models for validation
|
|
39
|
-
3. **Implement** - Write async endpoints with proper dependency injection
|
|
40
|
-
4. **Secure** - Add authentication, authorization, rate limiting
|
|
41
|
-
5. **Test** - Write async tests with pytest and httpx
|
|
34
|
+
### Baseline standards
|
|
42
35
|
|
|
43
|
-
|
|
36
|
+
- Use explicit type hints and Pydantic v2 patterns.
|
|
37
|
+
- Keep request validation and response shaping at the boundary.
|
|
38
|
+
- Use lifespan hooks for startup and teardown resources instead of ad hoc globals.
|
|
39
|
+
- Prefer async database and network paths consistently.
|
|
40
|
+
- Use dependency injection for shared auth/config logic.
|
|
41
|
+
- Keep background tasks lightweight unless a durable queue owns the work.
|
|
42
|
+
- Treat generated OpenAPI as a contract to keep clean.
|
|
44
43
|
|
|
45
|
-
|
|
44
|
+
### Constraints
|
|
46
45
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
| Testing | `references/testing-async.md` | pytest-asyncio, httpx, fixtures |
|
|
54
|
-
| Django Migration | `references/migration-from-django.md` | Migrating from Django/DRF to FastAPI |
|
|
46
|
+
- Avoid mixing sync and async code casually in request handlers.
|
|
47
|
+
- Avoid leaking ORM models directly as public response contracts.
|
|
48
|
+
- Avoid hiding resource lifecycle in module import side effects.
|
|
49
|
+
- Avoid using in-process background tasks for work that needs durable retries.
|
|
50
|
+
- Avoid hiding auth or validation behavior in ad hoc helpers.
|
|
51
|
+
- Avoid treating FastAPI convenience as a substitute for service boundaries.
|
|
55
52
|
|
|
56
|
-
##
|
|
53
|
+
## Output Format
|
|
57
54
|
|
|
58
|
-
|
|
59
|
-
- Use type hints everywhere (FastAPI requires them)
|
|
60
|
-
- Use Pydantic V2 syntax (`field_validator`, `model_validator`, `model_config`)
|
|
61
|
-
- Use `Annotated` pattern for dependency injection
|
|
62
|
-
- Use async/await for all I/O operations
|
|
63
|
-
- Use `X | None` instead of `Optional[X]`
|
|
64
|
-
- Return proper HTTP status codes
|
|
65
|
-
- Document endpoints (auto-generated OpenAPI)
|
|
55
|
+
Provide implementation guidance, code examples, and configuration as appropriate to the task.
|
|
66
56
|
|
|
67
|
-
|
|
68
|
-
- Use synchronous database operations
|
|
69
|
-
- Skip Pydantic validation
|
|
70
|
-
- Store passwords in plain text
|
|
71
|
-
- Expose sensitive data in responses
|
|
72
|
-
- Use Pydantic V1 syntax (`@validator`, `class Config`)
|
|
73
|
-
- Mix sync and async code improperly
|
|
74
|
-
- Hardcode configuration values
|
|
57
|
+
## References
|
|
75
58
|
|
|
76
|
-
|
|
59
|
+
Load on demand. Do not preload all reference files.
|
|
77
60
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
3. CRUD operations if database involved
|
|
82
|
-
4. Brief explanation of key decisions
|
|
61
|
+
| File | Load when |
|
|
62
|
+
| --- | --- |
|
|
63
|
+
| `references/pydantic-async-playbook.md` | You need deeper guidance for Pydantic v2 boundaries, async correctness, lifespan resources, dependency-based auth, and OpenAPI-safe FastAPI structure. |
|
|
83
64
|
|
|
84
|
-
##
|
|
65
|
+
## Scripts
|
|
85
66
|
|
|
86
|
-
|
|
67
|
+
No helper scripts are required for this skill right now. Keep execution in `SKILL.md` and `references/` unless repeated automation becomes necessary.
|
|
68
|
+
|
|
69
|
+
## Examples
|
|
70
|
+
|
|
71
|
+
- "Help me with fastapi expert best practices in this project"
|
|
72
|
+
- "Review my fastapi expert implementation for issues"
|
|
87
73
|
````
|
|
@@ -1,84 +1,70 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: fastapi-expert
|
|
3
|
-
description: Use when building
|
|
3
|
+
description: "Use when building FastAPI services with async Python, Pydantic v2, lifespan-managed resources, dependency-based auth, background task boundaries, and OpenAPI-safe request handling."
|
|
4
4
|
license: MIT
|
|
5
5
|
metadata:
|
|
6
|
-
author:
|
|
7
|
-
version: "
|
|
8
|
-
|
|
9
|
-
triggers: FastAPI, Pydantic, async Python, Python API, REST API Python, SQLAlchemy async, JWT authentication, OpenAPI, Swagger Python
|
|
10
|
-
role: specialist
|
|
11
|
-
scope: implementation
|
|
12
|
-
output-format: code
|
|
13
|
-
related-skills: fullstack-guardian, django-expert, test-master
|
|
6
|
+
author: cubis-foundry
|
|
7
|
+
version: "3.0"
|
|
8
|
+
compatibility: Claude Code, Codex, GitHub Copilot
|
|
14
9
|
---
|
|
15
10
|
|
|
16
11
|
# FastAPI Expert
|
|
17
12
|
|
|
18
|
-
|
|
13
|
+
## Purpose
|
|
19
14
|
|
|
20
|
-
|
|
15
|
+
Use when building FastAPI services with async Python, Pydantic v2, lifespan-managed resources, dependency-based auth, background task boundaries, and OpenAPI-safe request handling.
|
|
21
16
|
|
|
22
|
-
|
|
17
|
+
## When to Use
|
|
23
18
|
|
|
24
|
-
|
|
19
|
+
- Building or refactoring FastAPI REST or internal service APIs.
|
|
20
|
+
- Defining Pydantic v2 models and request/response validation boundaries.
|
|
21
|
+
- Designing dependency-based auth, async database access, lifespan-managed resources, and OpenAPI-safe endpoints.
|
|
22
|
+
- Reviewing FastAPI code for async correctness, background task safety, and operational behavior.
|
|
25
23
|
|
|
26
|
-
|
|
27
|
-
- Implementing Pydantic V2 validation schemas
|
|
28
|
-
- Setting up async database operations
|
|
29
|
-
- Implementing JWT authentication/authorization
|
|
30
|
-
- Creating WebSocket endpoints
|
|
31
|
-
- Optimizing API performance
|
|
24
|
+
## Instructions
|
|
32
25
|
|
|
33
|
-
|
|
26
|
+
1. Model request, response, and error boundaries first with Pydantic v2.
|
|
27
|
+
2. Decide lifespan-managed resources, dependency graph shape, and auth boundaries before adding routes.
|
|
28
|
+
3. Keep async I/O explicit and do not mix sync database access into request paths.
|
|
29
|
+
4. Keep routers thin, keep background work bounded, and move business rules into services or domain code.
|
|
30
|
+
5. Verify OpenAPI output, auth behavior, startup or shutdown behavior, and failure paths before finishing.
|
|
34
31
|
|
|
35
|
-
|
|
36
|
-
2. **Design schemas** - Create Pydantic V2 models for validation
|
|
37
|
-
3. **Implement** - Write async endpoints with proper dependency injection
|
|
38
|
-
4. **Secure** - Add authentication, authorization, rate limiting
|
|
39
|
-
5. **Test** - Write async tests with pytest and httpx
|
|
32
|
+
### Baseline standards
|
|
40
33
|
|
|
41
|
-
|
|
34
|
+
- Use explicit type hints and Pydantic v2 patterns.
|
|
35
|
+
- Keep request validation and response shaping at the boundary.
|
|
36
|
+
- Use lifespan hooks for startup and teardown resources instead of ad hoc globals.
|
|
37
|
+
- Prefer async database and network paths consistently.
|
|
38
|
+
- Use dependency injection for shared auth/config logic.
|
|
39
|
+
- Keep background tasks lightweight unless a durable queue owns the work.
|
|
40
|
+
- Treat generated OpenAPI as a contract to keep clean.
|
|
42
41
|
|
|
43
|
-
|
|
42
|
+
### Constraints
|
|
44
43
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
| Testing | `references/testing-async.md` | pytest-asyncio, httpx, fixtures |
|
|
52
|
-
| Django Migration | `references/migration-from-django.md` | Migrating from Django/DRF to FastAPI |
|
|
44
|
+
- Avoid mixing sync and async code casually in request handlers.
|
|
45
|
+
- Avoid leaking ORM models directly as public response contracts.
|
|
46
|
+
- Avoid hiding resource lifecycle in module import side effects.
|
|
47
|
+
- Avoid using in-process background tasks for work that needs durable retries.
|
|
48
|
+
- Avoid hiding auth or validation behavior in ad hoc helpers.
|
|
49
|
+
- Avoid treating FastAPI convenience as a substitute for service boundaries.
|
|
53
50
|
|
|
54
|
-
##
|
|
51
|
+
## Output Format
|
|
55
52
|
|
|
56
|
-
|
|
57
|
-
- Use type hints everywhere (FastAPI requires them)
|
|
58
|
-
- Use Pydantic V2 syntax (`field_validator`, `model_validator`, `model_config`)
|
|
59
|
-
- Use `Annotated` pattern for dependency injection
|
|
60
|
-
- Use async/await for all I/O operations
|
|
61
|
-
- Use `X | None` instead of `Optional[X]`
|
|
62
|
-
- Return proper HTTP status codes
|
|
63
|
-
- Document endpoints (auto-generated OpenAPI)
|
|
53
|
+
Provide implementation guidance, code examples, and configuration as appropriate to the task.
|
|
64
54
|
|
|
65
|
-
|
|
66
|
-
- Use synchronous database operations
|
|
67
|
-
- Skip Pydantic validation
|
|
68
|
-
- Store passwords in plain text
|
|
69
|
-
- Expose sensitive data in responses
|
|
70
|
-
- Use Pydantic V1 syntax (`@validator`, `class Config`)
|
|
71
|
-
- Mix sync and async code improperly
|
|
72
|
-
- Hardcode configuration values
|
|
55
|
+
## References
|
|
73
56
|
|
|
74
|
-
|
|
57
|
+
Load on demand. Do not preload all reference files.
|
|
75
58
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
3. CRUD operations if database involved
|
|
80
|
-
4. Brief explanation of key decisions
|
|
59
|
+
| File | Load when |
|
|
60
|
+
| --- | --- |
|
|
61
|
+
| `references/pydantic-async-playbook.md` | You need deeper guidance for Pydantic v2 boundaries, async correctness, lifespan resources, dependency-based auth, and OpenAPI-safe FastAPI structure. |
|
|
81
62
|
|
|
82
|
-
##
|
|
63
|
+
## Scripts
|
|
83
64
|
|
|
84
|
-
|
|
65
|
+
No helper scripts are required for this skill right now. Keep execution in `SKILL.md` and `references/` unless repeated automation becomes necessary.
|
|
66
|
+
|
|
67
|
+
## Examples
|
|
68
|
+
|
|
69
|
+
- "Help me with fastapi expert best practices in this project"
|
|
70
|
+
- "Review my fastapi expert implementation for issues"
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
````markdown
|
|
2
|
+
---
|
|
3
|
+
inclusion: manual
|
|
4
|
+
name: firebase
|
|
5
|
+
description: "Use when the task is specifically Firebase: Firestore or Realtime Database choice, security rules, indexes, auth, storage, cloud functions, hosting, emulator workflows, or platform-coupled rollout decisions."
|
|
6
|
+
license: MIT
|
|
7
|
+
metadata:
|
|
8
|
+
author: cubis-foundry
|
|
9
|
+
version: "1.0"
|
|
10
|
+
compatibility: Claude Code, Codex, GitHub Copilot
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Firebase
|
|
14
|
+
|
|
15
|
+
## Purpose
|
|
16
|
+
|
|
17
|
+
You are the platform specialist for Firebase application backends.
|
|
18
|
+
|
|
19
|
+
Your job is to keep product-surface coupling explicit across Firestore or Realtime Database, security rules, indexes, auth, storage, functions, hosting, and emulator-driven local workflows.
|
|
20
|
+
|
|
21
|
+
## When to Use
|
|
22
|
+
|
|
23
|
+
- The task is specifically about Firebase or a Firebase-backed application.
|
|
24
|
+
- Firestore, Realtime Database, security rules, indexes, auth, storage, functions, hosting, or emulator workflow materially changes the answer.
|
|
25
|
+
- The real decision is platform coupling, local emulation, or rules-plus-index behavior.
|
|
26
|
+
|
|
27
|
+
## Instructions
|
|
28
|
+
|
|
29
|
+
### STANDARD OPERATING PROCEDURE (SOP)
|
|
30
|
+
|
|
31
|
+
1. Confirm which Firebase products are actually in use.
|
|
32
|
+
2. Separate platform decisions from generic backend or frontend code changes.
|
|
33
|
+
3. Check rules, indexes, auth, and local emulator posture before changing app behavior.
|
|
34
|
+
4. Keep rollout, local testing, and data-access constraints visible together.
|
|
35
|
+
5. Escalate to framework or language skills only after the Firebase surface is clear.
|
|
36
|
+
|
|
37
|
+
### Constraints
|
|
38
|
+
|
|
39
|
+
- Do not treat Firebase as only a database choice.
|
|
40
|
+
- Do not answer Firestore, rules, or auth questions as generic NoSQL advice.
|
|
41
|
+
- Do not recommend platform features without checking local emulator and deployment implications.
|
|
42
|
+
- Do not hide security-rule risk behind client convenience.
|
|
43
|
+
|
|
44
|
+
## Output Format
|
|
45
|
+
|
|
46
|
+
Provide implementation guidance, code examples, and configuration as appropriate to the task.
|
|
47
|
+
|
|
48
|
+
## References
|
|
49
|
+
|
|
50
|
+
Load on demand. Do not preload all reference files.
|
|
51
|
+
|
|
52
|
+
| File | Load when |
|
|
53
|
+
| ------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
|
|
54
|
+
| `references/platform-routing.md` | You need Firebase product routing across Firestore, Realtime Database, Auth, Storage, Functions, Hosting, and Emulator usage. |
|
|
55
|
+
| `references/rules-and-indexes-checklist.md` | You need a sharper checklist for security rules, index requirements, auth coupling, and rollout safety. |
|
|
56
|
+
|
|
57
|
+
## Scripts
|
|
58
|
+
|
|
59
|
+
No helper scripts are required for this skill right now. Keep execution in `SKILL.md` and `references/` unless repeated automation becomes necessary.
|
|
60
|
+
|
|
61
|
+
## Examples
|
|
62
|
+
|
|
63
|
+
- "Help me with firebase best practices in this project"
|
|
64
|
+
- "Review my firebase implementation for issues"
|
|
65
|
+
````
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: firebase
|
|
3
|
+
description: "Use when the task is specifically Firebase: Firestore or Realtime Database choice, security rules, indexes, auth, storage, cloud functions, hosting, emulator workflows, or platform-coupled rollout decisions."
|
|
4
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
author: cubis-foundry
|
|
7
|
+
version: "1.0"
|
|
8
|
+
compatibility: Claude Code, Codex, GitHub Copilot
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Firebase
|
|
12
|
+
|
|
13
|
+
## Purpose
|
|
14
|
+
|
|
15
|
+
You are the platform specialist for Firebase application backends.
|
|
16
|
+
|
|
17
|
+
Your job is to keep product-surface coupling explicit across Firestore or Realtime Database, security rules, indexes, auth, storage, functions, hosting, and emulator-driven local workflows.
|
|
18
|
+
|
|
19
|
+
## When to Use
|
|
20
|
+
|
|
21
|
+
- The task is specifically about Firebase or a Firebase-backed application.
|
|
22
|
+
- Firestore, Realtime Database, security rules, indexes, auth, storage, functions, hosting, or emulator workflow materially changes the answer.
|
|
23
|
+
- The real decision is platform coupling, local emulation, or rules-plus-index behavior.
|
|
24
|
+
|
|
25
|
+
## Instructions
|
|
26
|
+
|
|
27
|
+
### STANDARD OPERATING PROCEDURE (SOP)
|
|
28
|
+
|
|
29
|
+
1. Confirm which Firebase products are actually in use.
|
|
30
|
+
2. Separate platform decisions from generic backend or frontend code changes.
|
|
31
|
+
3. Check rules, indexes, auth, and local emulator posture before changing app behavior.
|
|
32
|
+
4. Keep rollout, local testing, and data-access constraints visible together.
|
|
33
|
+
5. Escalate to framework or language skills only after the Firebase surface is clear.
|
|
34
|
+
|
|
35
|
+
### Constraints
|
|
36
|
+
|
|
37
|
+
- Do not treat Firebase as only a database choice.
|
|
38
|
+
- Do not answer Firestore, rules, or auth questions as generic NoSQL advice.
|
|
39
|
+
- Do not recommend platform features without checking local emulator and deployment implications.
|
|
40
|
+
- Do not hide security-rule risk behind client convenience.
|
|
41
|
+
|
|
42
|
+
## Output Format
|
|
43
|
+
|
|
44
|
+
Provide implementation guidance, code examples, and configuration as appropriate to the task.
|
|
45
|
+
|
|
46
|
+
## References
|
|
47
|
+
|
|
48
|
+
Load on demand. Do not preload all reference files.
|
|
49
|
+
|
|
50
|
+
| File | Load when |
|
|
51
|
+
| ------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
|
|
52
|
+
| `references/platform-routing.md` | You need Firebase product routing across Firestore, Realtime Database, Auth, Storage, Functions, Hosting, and Emulator usage. |
|
|
53
|
+
| `references/rules-and-indexes-checklist.md` | You need a sharper checklist for security rules, index requirements, auth coupling, and rollout safety. |
|
|
54
|
+
|
|
55
|
+
## Scripts
|
|
56
|
+
|
|
57
|
+
No helper scripts are required for this skill right now. Keep execution in `SKILL.md` and `references/` unless repeated automation becomes necessary.
|
|
58
|
+
|
|
59
|
+
## Examples
|
|
60
|
+
|
|
61
|
+
- "Help me with firebase best practices in this project"
|
|
62
|
+
- "Review my firebase implementation for issues"
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Firebase Platform Routing
|
|
2
|
+
|
|
3
|
+
Load this when the task is Firebase-specific but the exact product surface is still unclear.
|
|
4
|
+
|
|
5
|
+
## Routing
|
|
6
|
+
|
|
7
|
+
- Firestore: document modeling, composite indexes, query limits, and rules coupling.
|
|
8
|
+
- Realtime Database: tree shape, fan-out, listener behavior, and simpler realtime synchronization.
|
|
9
|
+
- Auth: sign-in providers, session flow, user identity, and backend policy coupling.
|
|
10
|
+
- Storage: object lifecycle, access rules, uploads, and media-heavy workloads.
|
|
11
|
+
- Cloud Functions: backend triggers, scheduled jobs, and server-side integration points.
|
|
12
|
+
- Hosting and Emulator Suite: local confidence, preview flow, and safe rollout checks.
|
|
13
|
+
|
|
14
|
+
## Rule
|
|
15
|
+
|
|
16
|
+
Keep Firebase product boundaries explicit. Do not answer a Firestore problem as if it were only a generic database problem.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Firebase Rules And Indexes Checklist
|
|
2
|
+
|
|
3
|
+
Load this when security rules, index requirements, or rollout safety are the main risk.
|
|
4
|
+
|
|
5
|
+
## Checklist
|
|
6
|
+
|
|
7
|
+
- Confirm which Firebase product owns the access rule.
|
|
8
|
+
- Review auth assumptions before changing client reads or writes.
|
|
9
|
+
- Check whether query changes need index updates or new composite indexes.
|
|
10
|
+
- Keep emulator validation in the plan before shipping rule or index changes.
|
|
11
|
+
- Do not widen reads or writes without stating the blast radius.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
````markdown
|
|
2
|
+
---
|
|
3
|
+
inclusion: manual
|
|
4
|
+
name: flutter-design-system
|
|
5
|
+
description: "Use when creating, auditing, or extending shared Flutter theme tokens, ThemeData, and reusable cross-feature UI primitives such as loading, error, empty, dead-letter, and sync-status components. Do not use for one-off screen styling that should remain local."
|
|
6
|
+
license: MIT
|
|
7
|
+
metadata:
|
|
8
|
+
author: cubis-foundry
|
|
9
|
+
version: "1.0"
|
|
10
|
+
compatibility: Claude Code, Codex, GitHub Copilot
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Flutter Design System
|
|
14
|
+
|
|
15
|
+
## Purpose
|
|
16
|
+
|
|
17
|
+
Keep shared Flutter visual decisions centralized in theme tokens and reusable
|
|
18
|
+
UI primitives instead of repeating feature-specific styling.
|
|
19
|
+
|
|
20
|
+
## When to Use
|
|
21
|
+
|
|
22
|
+
- Adding or changing colors, spacing, radius, typography, or elevations
|
|
23
|
+
- Wiring or refactoring app-wide `ThemeData`
|
|
24
|
+
- Creating shared widgets used across multiple screens
|
|
25
|
+
- Replacing hard-coded visual values with design-system tokens
|
|
26
|
+
- Auditing feature UI for token compliance
|
|
27
|
+
|
|
28
|
+
## Instructions
|
|
29
|
+
|
|
30
|
+
1. Inspect the existing theme contract before adding new tokens.
|
|
31
|
+
2. Reuse an existing token or shared widget when possible.
|
|
32
|
+
3. Add a new token only when the concept is reusable across features.
|
|
33
|
+
4. Keep shared widgets generic and free of feature repositories, notifiers, or routes.
|
|
34
|
+
5. Prefer Material 3 theming through `ThemeData` before per-widget overrides.
|
|
35
|
+
6. Replace hard-coded values in consuming widgets after updating the shared system.
|
|
36
|
+
|
|
37
|
+
## Output Format
|
|
38
|
+
|
|
39
|
+
Produce Flutter guidance or code that:
|
|
40
|
+
|
|
41
|
+
- uses `AppColors`, `AppSpacing`, `AppTypography`, and `AppRadius` consistently,
|
|
42
|
+
- keeps shared widgets generic and token-driven,
|
|
43
|
+
- identifies which changes belong in theme files versus shared widgets,
|
|
44
|
+
- includes audit notes when replacing hard-coded values.
|
|
45
|
+
|
|
46
|
+
## References
|
|
47
|
+
|
|
48
|
+
Load only what the current step needs.
|
|
49
|
+
|
|
50
|
+
| File | Load when |
|
|
51
|
+
| --- | --- |
|
|
52
|
+
| `references/tokens-and-theme.md` | Adding tokens, changing `ThemeData`, or reviewing shared theme file organization. |
|
|
53
|
+
| `references/shared-widgets.md` | Creating or auditing shared widgets such as loading, error, empty, dead-letter, or sync-status components. |
|
|
54
|
+
|
|
55
|
+
## Scripts
|
|
56
|
+
|
|
57
|
+
No helper scripts are required for this skill right now.
|
|
58
|
+
|
|
59
|
+
## Examples
|
|
60
|
+
|
|
61
|
+
- "Replace hard-coded spacing and colors in this Flutter module with shared tokens."
|
|
62
|
+
- "Set up a reusable `ErrorView` and `LoadingView` for the app shell."
|
|
63
|
+
````
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: flutter-design-system
|
|
3
|
+
description: "Use when creating, auditing, or extending shared Flutter theme tokens, ThemeData, and reusable cross-feature UI primitives such as loading, error, empty, dead-letter, and sync-status components. Do not use for one-off screen styling that should remain local."
|
|
4
|
+
license: MIT
|
|
5
|
+
metadata:
|
|
6
|
+
author: cubis-foundry
|
|
7
|
+
version: "1.0"
|
|
8
|
+
compatibility: Claude Code, Codex, GitHub Copilot
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Flutter Design System
|
|
12
|
+
|
|
13
|
+
## Purpose
|
|
14
|
+
|
|
15
|
+
Keep shared Flutter visual decisions centralized in theme tokens and reusable
|
|
16
|
+
UI primitives instead of repeating feature-specific styling.
|
|
17
|
+
|
|
18
|
+
## When to Use
|
|
19
|
+
|
|
20
|
+
- Adding or changing colors, spacing, radius, typography, or elevations
|
|
21
|
+
- Wiring or refactoring app-wide `ThemeData`
|
|
22
|
+
- Creating shared widgets used across multiple screens
|
|
23
|
+
- Replacing hard-coded visual values with design-system tokens
|
|
24
|
+
- Auditing feature UI for token compliance
|
|
25
|
+
|
|
26
|
+
## Instructions
|
|
27
|
+
|
|
28
|
+
1. Inspect the existing theme contract before adding new tokens.
|
|
29
|
+
2. Reuse an existing token or shared widget when possible.
|
|
30
|
+
3. Add a new token only when the concept is reusable across features.
|
|
31
|
+
4. Keep shared widgets generic and free of feature repositories, notifiers, or routes.
|
|
32
|
+
5. Prefer Material 3 theming through `ThemeData` before per-widget overrides.
|
|
33
|
+
6. Replace hard-coded values in consuming widgets after updating the shared system.
|
|
34
|
+
|
|
35
|
+
## Output Format
|
|
36
|
+
|
|
37
|
+
Produce Flutter guidance or code that:
|
|
38
|
+
|
|
39
|
+
- uses `AppColors`, `AppSpacing`, `AppTypography`, and `AppRadius` consistently,
|
|
40
|
+
- keeps shared widgets generic and token-driven,
|
|
41
|
+
- identifies which changes belong in theme files versus shared widgets,
|
|
42
|
+
- includes audit notes when replacing hard-coded values.
|
|
43
|
+
|
|
44
|
+
## References
|
|
45
|
+
|
|
46
|
+
Load only what the current step needs.
|
|
47
|
+
|
|
48
|
+
| File | Load when |
|
|
49
|
+
| --- | --- |
|
|
50
|
+
| `references/tokens-and-theme.md` | Adding tokens, changing `ThemeData`, or reviewing shared theme file organization. |
|
|
51
|
+
| `references/shared-widgets.md` | Creating or auditing shared widgets such as loading, error, empty, dead-letter, or sync-status components. |
|
|
52
|
+
|
|
53
|
+
## Scripts
|
|
54
|
+
|
|
55
|
+
No helper scripts are required for this skill right now.
|
|
56
|
+
|
|
57
|
+
## Examples
|
|
58
|
+
|
|
59
|
+
- "Replace hard-coded spacing and colors in this Flutter module with shared tokens."
|
|
60
|
+
- "Set up a reusable `ErrorView` and `LoadingView` for the app shell."
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Shared Widgets
|
|
2
|
+
|
|
3
|
+
## Create a Shared Widget When
|
|
4
|
+
|
|
5
|
+
- the widget appears in multiple features,
|
|
6
|
+
- the behavior is generic,
|
|
7
|
+
- the visual contract should stay consistent across the app.
|
|
8
|
+
|
|
9
|
+
## Keep It Out of Shared
|
|
10
|
+
|
|
11
|
+
- feature-specific business copy,
|
|
12
|
+
- repository or notifier logic,
|
|
13
|
+
- route-specific navigation decisions,
|
|
14
|
+
- domain models that only one feature understands.
|
|
15
|
+
|
|
16
|
+
## Expected Shared State Widgets
|
|
17
|
+
|
|
18
|
+
- `LoadingView`: generic loading skeleton or progress state
|
|
19
|
+
- `ErrorView`: user-facing error with retry affordance and visible request ID when available
|
|
20
|
+
- `EmptyView`: empty-state illustration/message with optional CTA
|
|
21
|
+
- `DeadLetterView`: permanent failure state for sync or outbox issues
|
|
22
|
+
- `SyncStatusBadge`: normalized badge for `pendingSync`, `synced`, `failed`, `dead`, or `conflict`
|
|
23
|
+
|
|
24
|
+
## Widget Contract
|
|
25
|
+
|
|
26
|
+
- Accept data and callbacks through constructor parameters.
|
|
27
|
+
- Use design-system tokens only.
|
|
28
|
+
- Keep public APIs small and predictable.
|
|
29
|
+
- Prefer composition over large configurable mega-widgets.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Tokens and Theme
|
|
2
|
+
|
|
3
|
+
## Shared Theme Contract
|
|
4
|
+
|
|
5
|
+
Keep app-wide visual tokens under `shared/theme/`:
|
|
6
|
+
|
|
7
|
+
- `app_colors.dart`
|
|
8
|
+
- `app_spacing.dart`
|
|
9
|
+
- `app_radius.dart`
|
|
10
|
+
- `app_typography.dart`
|
|
11
|
+
- `app_theme.dart`
|
|
12
|
+
|
|
13
|
+
## Token Rules
|
|
14
|
+
|
|
15
|
+
- Add a token only when it represents a reusable design concept.
|
|
16
|
+
- Do not add screen-specific names such as `salesCardBlue`.
|
|
17
|
+
- Prefer semantic names (`success`, `warning`, `surfaceMuted`) over raw hue names when the token has product meaning.
|
|
18
|
+
- Keep spacing on a small fixed scale unless the design system already supports a larger one.
|
|
19
|
+
|
|
20
|
+
## ThemeData Checklist
|
|
21
|
+
|
|
22
|
+
- `useMaterial3: true`
|
|
23
|
+
- `colorScheme` derived from the shared token palette
|
|
24
|
+
- text theme mapped from `AppTypography`
|
|
25
|
+
- input, card, dialog, app bar, and button themes aligned to the same token set
|
|
26
|
+
- dark theme derived intentionally instead of default inversion
|
|
27
|
+
|
|
28
|
+
## Audit Checklist
|
|
29
|
+
|
|
30
|
+
- No `Color(...)` literals in feature widgets unless bridging external APIs
|
|
31
|
+
- No raw `EdgeInsets` numbers when a spacing token exists
|
|
32
|
+
- No raw `BorderRadius.circular(...)` when a radius token exists
|
|
33
|
+
- No raw `TextStyle(...)` when a typography token exists
|
|
34
|
+
- Loading, error, empty, and sync-status visuals use shared widgets
|