用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/oimiragieo/agent-studio --skill prompt-cache-worker命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | prompt-cache-worker |
| description | Prompt assembler optimization — sorting, memoization, cache-break detection, integration tests |
NOTE: Startup and cleanup are handled by worker-base. This skill defines the WORK PROCEDURE.
Features that modify the prompt assembler pipeline (.claude/lib/spawn/), add caching/memoization layers, or create cache-break detection modules.
Read the feature description carefully. Understand which prompt assembler files to modify and what the expected behavior is.
Read existing code. Before any changes, read ALL files in .claude/lib/spawn/ to understand the full assembly pipeline. Pay special attention to:
prompt-assembler.cjs — main entry (assembleSpawnPrompt, buildBasePrompt)prompt-assembler-sections.cjs — section builders (buildToolsSection, buildSkillsSection, injectSections)prompt-assembler-data.cjs — data loading (filterAndDescribeTools, getSkillsByAgent, caches)Write tests first (red). Create test files. Tests should use mocks for tool-manifest.json and skill-index.json to avoid dependency on disk state. Use node:test and node:assert. Tests should verify:
Implement changes. Key patterns:
.sort((a, b) => a.name.localeCompare(b.name)) after filteringMap<string, string> with JSON.stringify key or custom hashcrypto.createHash('sha256').update(content).digest('hex')require('../monitoring/flight-recorder.cjs').record()Run tests (green). All tests pass.
Verify no regressions. Run any existing spawn-related tests.
Lint and format.
pnpm lint
pnpm format:check
{
"salientSummary": "Added alphabetical sorting to filterAndDescribeTools() and getSkillsByAgent(). Eliminated duplicate TaskUpdate contract from buildBasePrompt() (kept in buildToolsSection()). Created tests/lib/spawn/prompt-sorting.test.cjs with 12 tests verifying deterministic ordering and single contract.",
"whatWasImplemented": "In prompt-assembler-data.cjs: added .sort((a,b) => a.name.localeCompare(b.name)) after tool filtering and after skill tier grouping. In prompt-assembler.cjs: removed TaskUpdate contract block from Patch 4 (agent protocol injection) since it already exists in buildToolsSection(). Created test file with mocked tool-manifest and skill-index.",
"whatWasLeftUndone": "",
"verification": {
"commandsRun": [
{ "command": "node --test tests/lib/spawn/prompt-sorting.test.cjs", "exitCode": 0, "observation": "12 tests passing" },
{ "command": "pnpm lint", "exitCode": 0, "observation": "0 errors" }