원클릭으로
library-worker
Implements code changes in the Outfitter monorepo — bug fixes, utilities, testing primitives, refactors.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Implements code changes in the Outfitter monorepo — bug fixes, utilities, testing primitives, refactors.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Patterns for @outfitter/daemon including lifecycle management, IPC communication, health checks, and PID files. Use when building background services, daemons, or when "daemon", "IPC", "health check", "background service", or "@outfitter/daemon" are mentioned.
Creates handlers, CLI commands, MCP tools, and daemon services following Outfitter Dev Kit conventions. Use when adding new components to a project, scaffolding code, or when "create handler", "new command", "add tool", or "daemon service" are mentioned.
Deep patterns for @outfitter/mcp including tool registration, Zod schemas, resources, and server configuration. Use when building MCP servers, registering tools, defining resources, or when "MCP server", "MCP tool", "registerTool", or "@outfitter/mcp" are mentioned.
Generates patterns, templates, and guides for @outfitter/* packages. Covers transport-agnostic handler systems, Result types, error taxonomy, and package APIs. Use when working with @outfitter/*, Result types, Handler contract, error taxonomy, or when Result, Handler, ValidationError, NotFoundError, OutfitterError, or package names like contracts, cli, mcp, schema, tui, daemon, config, logging are mentioned.
Verify Outfitter compliance in a codebase. Scans for anti-patterns (throws, console, hardcoded paths) and produces a severity-ranked compliance report. Use for pre-commit checks, code review, or migration validation.
Submit feedback to the Outfitter team via GitHub issues. Use after discovering bugs, missing features, unclear docs, or improvement opportunities in @outfitter/* packages.
| name | library-worker |
| description | Implements code changes in the Outfitter monorepo — bug fixes, utilities, testing primitives, refactors. |
NOTE: Startup and cleanup are handled by worker-base. This skill defines the WORK PROCEDURE.
Use for features that involve writing or modifying TypeScript code in the monorepo:
AGENTS.md for mission boundaries, coding conventions, and key source files.preconditions to understand existing code..factory/library/architecture.md for cross-package patterns.src/__tests__/<feature>.test.ts in the relevant package.expectedBehavior.bun test in the package directory to confirm tests FAIL (red).import type in tests won't fail at runtime and package tsconfig excludes test files. Demonstrate the "red" phase by showing that importing the type from a non-test source file would fail typecheck, or write runtime assertion tests (e.g., verify type shape of objects conforming to the type).Result<T, E> from better-result, not exceptions.src/index.ts or relevant subpath export).Do not use bun run check, bun run format:check, or bun run format:fix for validation in this repo — the formatter has a pre-existing tokio panic. Use lint + typecheck instead. If you need to format specific touched files, run bun x oxfmt --write <path>... only on the files you changed and note the fallback in your handoff.
Run these commands and report EXACT output in your handoff:
# Package-level tests
cd packages/<pkg> && bun test
# Full suite (catches cross-package breakage)
bun run test
# Type safety
bun run typecheck
# Lint
bun run lint
Fix any failures before completing. If bun run test surfaces known unrelated failures (e.g., logging test failures from other packages), fall back to package-scoped cd packages/<pkg> && bun test and note the fallback in your handoff.
Verify the new API is importable. Run from the package directory (not repo root) since workspace resolution doesn't work from root with bun -e:
cd packages/<pkg> && bun -e "const m = await import('./src/index.ts'); console.log(typeof m.<newExport>)"
Or verify the built output:
cd packages/<pkg> && bun -e "const m = await import('./dist/index.js'); console.log(typeof m.<newExport>)"
This must print function (or object for runtime namespace/enum exports). TypeScript type and interface exports are compile-time only and will print undefined at runtime — that is expected. For type-only exports, verify via .d.ts output or typecheck instead of runtime import checks. See .factory/library/user-testing.md for more verification patterns.
If the change modifies a published package's runtime behavior or API:
# Interactive/local shells
bun changeset
Select the affected package(s), choose the appropriate bump level (patch for fixes, minor for new features), and write a concise description.
In non-interactive worker/exec mode, create the changeset file directly instead of invoking the prompt:
---
"@outfitter/<pkg>": <bump-level>
---
Describe the user-visible runtime or API change in one sentence.
Use patch for bug fixes, minor for new features, and major for breaking changes so the non-interactive flow matches the interactive prompt.
Save it as .changeset/<short-kebab-summary>.md, then validate the file with:
status=0
bun changeset status --output .changeset/.status-check.json || status=$?
rm -f .changeset/.status-check.json
(exit "$status")
Keep the interactive bun changeset flow for local/manual runs.
Commit with conventional commit format referencing the Linear issue:
feat(contracts): add parseInput() Zod-to-Result helper [OS-332]
{
"salientSummary": "Implemented parseInput<T>(schema, data) in @outfitter/contracts returning Result<T, ValidationError>. TDD: wrote 6 tests (valid input, invalid input, nested schema, optional fields, array schema, error message format), all passing. Verified export from @outfitter/contracts, full suite green (3280 pass), typecheck clean.",
"whatWasImplemented": "parseInput<T>(schema, data) function in packages/contracts/src/validation.ts. Wraps Zod safeParse into Result<T, ValidationError> with formatted error messages. Exported from @outfitter/contracts root and @outfitter/contracts/validation subpath. Added changeset (minor bump).",
"whatWasLeftUndone": "",
"verification": {
"commandsRun": [
{
"command": "cd packages/contracts && bun test",
"exitCode": 0,
"observation": "47 tests passed including 6 new parseInput tests"
},
{
"command": "bun run test",
"exitCode": 0,
"observation": "3280 tests passed, 0 failed"
},
{
"command": "bun run typecheck",
"exitCode": 0,
"observation": "No errors"
},
{ "command": "bun run lint", "exitCode": 0, "observation": "Clean" },
{
"command": "bun -e \"const m = await import('@outfitter/contracts'); console.log(typeof m.parseInput)\"",
"exitCode": 0,
"observation": "function"
}
],
"interactiveChecks": []
},
"tests": {
"added": [
{
"file": "packages/contracts/src/__tests__/parse-input.test.ts",
"cases": [
{
"name": "returns Ok with parsed value for valid input",
"verifies": "happy path"
},
{
"name": "returns Err with ValidationError for invalid input",
"verifies": "error case"
},
{
"name": "preserves Zod error details in ValidationError message",
"verifies": "error format"
},
{
"name": "infers generic T from schema",
"verifies": "type narrowing"
},
{
"name": "handles nested object schemas",
"verifies": "complex input"
},
{
"name": "handles optional fields correctly",
"verifies": "edge case"
}
]
}
]
},
"discoveredIssues": []
}
bun run test or bun run typecheck fails on unrelated code and you cannot proceed