用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/outfitter-dev/outfitter --skill library-worker命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 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.
正在显示 SKILL.md
| 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"
bun run test or bun run typecheck fails on unrelated code and you cannot proceed