subagentceo/managed-coworkers/declare-enums

Claude Code and agent skill by subagentceo/managed-coworkers

Trust tier 1
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Codify an enum-of-options pattern (e.g. a userConfig connector category, a workflow state machine, a tier tag) as a typed string-union under src/domain/<domain>/. Use when the chassis adds a new dimension where the value space is closed and the type system should enforce membership. Mirrors the chassis's existing pattern (no `enum` keyword for new connector-style enums; `as const` tuple + `(typeof T)[number]`).

Install

npx vskill@latest install subagentceo/managed-coworkers/declare-enums

SKILL.md

The same SKILL.md was published earlier as subagentceo/managed-coworkers/declare-enums.

Declare Enums

First working data-engineering skill. Backed by scripts/declare-enum.ts (CLI) + scripts/lib/declare-enum.ts (pure function, unit-tested).

Workflow

  1. Pick a domain directory. New enums land under src/domain/<domain>/. Look at existing siblings (e.g. src/domain/coworkers/CoworkerSession.ts from ODEP2) to confirm the new enum fits.
  1. Pick a PascalCase type name that's singular (the script pluralizes for the as const constant name automatically: AnalyticsConnector → ANALYTICS_CONNECTORS).
  1. Provide options as comma-separated kebab- or snake-case literals: cf-analytics-engine,ga4.
  1. Invoke:

``bash tsx scripts/declare-enum.ts connectors AnalyticsConnector cf-analytics-engine,ga4 ODEP3 "Connector picks for the analytics userConfig category." ``

Writes src/domain/connectors/AnalyticsConnector.ts. Refuses to overwrite — safety-first; remove the file manually to regenerate.

  1. Wire downstream callers. Grep for the now-typed value: git grep '"cf-analytics-engine"' should turn up the userConfig + any places that need to validate. Replace stringly-typed parameters with the new type.

Pattern reference

The chassis prefers enum keyword for stable domain enums (see src/domain/enums.ts) and as const tuples for operator-mutable connector picks. This skill emits the latter; the operator can refactor to a typed enum later if the value set stabilizes.

Example output:

ts
/**
* Connector picks for the analytics userConfig category.
*
* Refs: ODEP3.
*/
export const ANALYTICS_CONNECTORS = [
"cf-analytics-engine",
"ga4",
] as const;
export type AnalyticsConnector = (typeof ANALYTICS_CONNECTORS)[number];

See also

  • ../../coworker-context.md — enum-of-options discipline + chassis grounding
  • scripts/lib/declare-enum.ts — pure-function implementation
  • scripts/lib/declare-enum.test.ts — 14 unit tests
  • scripts/declare-enum.ts — CLI wrapper
  • src/domain/coworkers/CoworkerSession.ts — example of the broader pattern in production

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
5

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/subagentceo/managed-coworkers/declare-enums/badge)](https://verified-skill.com/skills/subagentceo/managed-coworkers/declare-enums)

Something wrong with this skill or its page? Tell us.