flowstate-epic-flowstate-community-epicdm-flowstate-obs-middleware
Package-local agent skill for @epicdm/flowstate-obs-middleware.
Tags
Publisher
Versions
1 version published — latest: 1.0.7
- 1.0.7publishedInvalid Date
Skill
flowstate-obs-middleware Package Skill
Package: @epicdm/flowstate-obs-middleware
Repository: epic-flowstate-community
Path: packages/obs-middleware
Version: 1.0.7
Use this published Dojo skill as the package-level entrypoint. For detailed workflows, use the package-local skills listed below.
Primary Package Workflow
OBS Middleware Async Context And Request Logging
Status: Active
Purpose: Preserve request-scoped context and HTTP request logging behavior.
Scope: src/async-context.ts and src/request-logger.ts.
Trigger: A task touches request IDs, request context, response headers, request log data, skip paths, or status-based log levels.
Input: Express request/response behavior and logging expectations.
Output: Request logs with correct context and noise filtering.
Async Context
createAsyncContextMiddleware():
- Reads
x-request-id,x-trace-id,x-user-id, andx-domain-id. - Generates
req_<timestamp><random>when request ID is absent. - Sets response header
x-request-id. - Runs
next()insideAsyncLocalStorage.run().
Request Logger
createRequestLogger():
- Logs on response
finish. - Skips
/health,/healthz,/ready,/readyz, and/metrics. - Logs
method,path,statusCode,duration, andcontentLength. - Uses
infofor 2xx/3xx,warnfor 4xx,errorfor 5xx.
Verification
yarn workspace @epicdm/flowstate-obs-middleware test -- async-context
yarn workspace @epicdm/flowstate-obs-middleware test -- request-logger
Red Flags
| Red flag | Correction |
|---|---|
Calling next() outside AsyncLocalStorage.run() | Keep request context active for downstream async handlers. |
| Logging health endpoints | Preserve skip path filtering. |
Not using req.originalUrl fallback | Preserve fallback when req.path is absent. |
Created: 2026-06-29
Package Skill Inventory
@epicdm/flowstate-obs-middleware Skill Inventory
Inventory date: 2026-06-29
Package path: packages/obs-middleware
Dojo status: local skills authored; publication deferred until package skill review and repo-wide Dojo sync.
Skill Map
| Skill | Type | Use when |
|---|---|---|
flowstate-obs-middleware | workflow | An agent needs to use or change the middleware package and choose the right focused skill. |
flowstate-obs-middleware-configuration | workflow | A task changes options, env vars, log-level decisions, enablement, or client creation. |
flowstate-obs-middleware-async-request-logging | workflow | A task touches request context propagation or HTTP request logging. |
flowstate-obs-middleware-logger-batching | workflow | A task touches structured app logging, buffering, flushing, or obs-client log delivery. |
flowstate-obs-middleware-error-health | workflow | A task touches error handler behavior, health checks, custom checks, or status responses. |
flowstate-obs-middleware-consumer-integration | workflow | A task updates downstream packages that import middleware or logger helpers. |
flowstate-obs-middleware-maintenance | workflow | A task updates docs, tests, feature inventory, Dojo artifacts, package metadata, or release verification. |
Composition
Start with flowstate-obs-middleware. For full Express setup, compose:
flowstate-obs-middleware-configurationflowstate-obs-middleware-async-request-loggingflowstate-obs-middleware-logger-batchingflowstate-obs-middleware-error-healthflowstate-obs-middleware-consumer-integrationflowstate-obs-middleware-maintenance
Review Notes
The generated Dojo skillset under .flowstate/dojo/agent-skillset.md is not sufficient for publication as-is. It lists function names but does not teach Express ordering, disabled/no-key behavior, log batching, error ingestion TODOs, or health-check semantics.
Review Gate
@epicdm/flowstate-obs-middleware Skills Review
Review date: 2026-06-29 Reviewer: Codex Status: reviewed with verification notes
Evidence Used
packages/obs-middleware/package.jsonpackages/obs-middleware/README.mdpackages/obs-middleware/src/index.tspackages/obs-middleware/src/middleware.tspackages/obs-middleware/src/config.tspackages/obs-middleware/src/async-context.tspackages/obs-middleware/src/logger.tspackages/obs-middleware/src/request-logger.tspackages/obs-middleware/src/error-handler.tspackages/obs-middleware/src/health.tspackages/obs-middleware/src/types.tspackages/obs-middleware/tests/**/*.test.tspackages/obs-middleware/.flowstate/feature-matrix/inventory.mdpackages/obs-middleware/.flowstate/dojo/agent-skillset.md
Quality Gate
- Source-backed purpose: pass
- Public entry points captured: pass
- Package connections captured: pass
- Composable skill inventory: pass
- Skills formatted with
nameand trigger-focuseddescription: pass - Generated-skill replacement quality: pass
- Verification commands run: pass with warnings noted
Drift Findings
- Error handler source has a TODO: obs-server error ingestion is not implemented until
obs-clientsupportserrors.create(). OBS_LOG_LEVELis cast toLogLevelwithout runtime validation.- Existing lint warnings are mostly unsafe
any, floating promises, unbound methods, andrequire-await. .flowstate/docsuses an older flat package-docs shape without workflow/troubleshooting/maintenance sections.- Feature matrix contains duplicate
GET /healthroute entries. - Generated Dojo ID/publisher metadata drifts between
skill.yamlandsync-state.json. - Generated Dojo skillset is export-list oriented and not ready to publish.
Verification Results
- ASCII scan for package-local skills: passed.
- Skill frontmatter scan for all
SKILL.mdfiles: passed. yarn workspace @epicdm/flowstate-obs-middleware test --runInBand --no-cache: passed, 7 suites, 57 tests; logger test emits expected console warning.yarn workspace @epicdm/flowstate-obs-middleware typecheck: passed.yarn workspace @epicdm/flowstate-obs-middleware build: passed.yarn workspace @epicdm/flowstate-obs-middleware lint: passed with 67 existing warnings.yarn nx build @epicdm/flowstate-obs-middleware: passed withobs-clientdependency; Nx read outputs from local cache and reported setup notice.
Publication Decision
Do not publish the existing generated Dojo skilllets. Publish only after local package skill verification and the repo-wide Dojo sync step convert these reviewed skills into Dojo payloads.
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/obs-middleware/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-epic-flowstate-community-epicdm-flowstate-obs-middleware --target <target> --out ./skillsReplace <target> with your agent target identifier. See the CLI docs for details.