flowstate-flowstate-platform-epicdm-flowstate-api-core
Package-local agent skill for @epicdm/flowstate-api-core.
Tags
Publisher
Versions
1 version published — latest: 0.1.0
- 0.1.0publishedInvalid Date
Skill
flowstate-api-core Package Skill
Package: @epicdm/flowstate-api-core
Repository: flowstate-platform
Path: packages/flowstate-api-core
Version: 0.1.0
Use this published Dojo skill as the package-level entrypoint. For detailed workflows, use the package-local skills listed below.
Primary Package Workflow
FlowState API Core Worker Workflow
Status: Active
Purpose: Keep worker APIs consistent with the shared Hono/OpenAPI foundation.
Scope: packages/flowstate-api-core and worker packages importing it.
Trigger: A worker API needs shared app setup, auth, schemas, response helpers, or middleware debugging.
Input: Worker config, route modules, auth requirements, bindings, and response schema needs.
Output: Worker API code that composes with createApiApp and passes package-local tests.
Workflow
- Start from
src/factory.ts.createApiAppalready wires error handling, CORS, optional auth, usage metering,/health,/openapi.json, and/docs. - Use
ApiEnv<B>andBaseBindingsfromsrc/types.tsfor typed Hono contexts. Do not invent parallel env/context shapes unless a worker adds specific bindings. - For auth, configure
createAuthMiddlewarethroughcreateApiApp({ auth })unless the worker has a proven route-local need. PreservepublicPathsfor/health,/openapi.json, and/docs. - Return responses with
ok,created,paginated,noContent, anderrfromsrc/helpers/responses.tsso status/body conventions stay stable. - Put common route validation in
src/schemas/*only when multiple workers can reuse it. Keep worker-specific schemas in the worker package. - Before changing shared middleware, check downstream imports with
rg "@epicdm/flowstate-api-core" packages/worker-* packages --glob '!**/node_modules/**'.
Example
const app = createApiApp({
title: 'Marketplace API',
version: '0.1.0',
description: 'Marketplace worker',
auth: { jwt: true, internal: true },
})
Register worker routes after the factory call and use shared helpers inside handlers.
Verification
yarn workspace @epicdm/flowstate-api-core testyarn workspace @epicdm/flowstate-api-core typecheckyarn workspace @epicdm/flowstate-api-core lint
Composition
- Use package-local worker API skills for route-specific behavior.
- Use
gateway-specs-openapi-bundle-workflowwhen shared schema changes affect OpenAPI generation.
Package Skill Inventory
Skill Inventory: @epicdm/flowstate-api-core
Created Skills
| Skill | Type | Trigger |
|---|---|---|
flowstate-api-core-worker-api-workflow | Workflow | Use when creating or changing Hono worker APIs that rely on shared auth, schemas, responses, or app factory behavior. |
Candidate Future Skills
| Candidate | Reason to Split Later |
|---|---|
flowstate-api-core-auth-middleware | Auth has JWT, API-key, internal bearer, and JWKS cache behavior that may need a dedicated troubleshooting skill. |
flowstate-api-core-response-schemas | Shared route schemas can become a reference skill if more workers standardize on them. |
Source Evidence
src/factory.tsdefines the app assembly sequence.src/middleware/auth.tsdefines auth methods and Hono context population.src/helpers/responses.tsdefines response helper status/body contracts.src/__tests__/*covers the public contract.
Review Gate
Review: @epicdm/flowstate-api-core Skills
Result: Pass for source-backed package-local workflow guidance.
Checks
- The skill focuses on worker API construction and shared middleware contracts.
- It names exact source files, downstream package search patterns, and package-local verification commands.
- It avoids duplicating every schema field or route from worker packages.
- Generated
.flowstate/dojofiles and API package code were not touched.
Residual Risk
Auth middleware deserves a separate deeper skill if future work changes JWT verification or API-key semantics.
Usage
Start with this skill to understand the package purpose, then use the package-local focused skills for specific workflows. Keep this Dojo version aligned with packages/flowstate-api-core/package.json. Do not treat generated feature lists as lessons; use workflow evidence from CODE-REVIEW.md, SKILL-INVENTORY.md, and REVIEW.md.
Install
Run this in your project to install via CLI:
fscloud dojo skill install flowstate-flowstate-platform-epicdm-flowstate-api-core --target <target> --out ./skillsReplace <target> with your agent target identifier. See the CLI docs for details.