一键导入
context-worker
Context management — pre-compact persistence, threshold alignment, microcompact/circuit breaker detection
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Context management — pre-compact persistence, threshold alignment, microcompact/circuit breaker detection
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Agent frontmatter enhancements — disallowedTools, mcpServers scoping, fork_eligible field
Hook enhancements — updatedInput for bash safety prefixes, suppressOutput for verbose blocks, denial-based routing feedback
Hook system optimization — async conversion, consolidation, deduplication, new hook events
Memory index discipline — cap enforcement, pruning, archival, health reporting
Prompt assembler optimization — sorting, memoization, cache-break detection, integration tests
Compresses and merges CLAUDE.md and rules files to fit under the 40K character cap
| name | context-worker |
| description | Context management — pre-compact persistence, threshold alignment, microcompact/circuit breaker detection |
NOTE: Startup and cleanup are handled by worker-base. This skill defines the WORK PROCEDURE.
Features that modify context management hooks, memory consolidation, daily log infrastructure, mtime-based locking, or session-counting triggers.
Read the feature description carefully. Understand the exact behavior changes and how they integrate with existing memory infrastructure.
Read source files. Before modifying:
AGENTS.md for CC patterns reference and key file locationsWrite tests first (red). Create test file at tests/lib/memory/<descriptive-name>.test.cjs or tests/hooks/<name>.test.cjs. Tests must cover:
Implement changes.
path.join() for all paths (Windows compatibility)fs.appendFileSync for daily log appendsatomicWriteSync for critical file updatesRun tests (green). All tests pass.
Run lint and format.
pnpm lint
npx prettier --check <modified-files>
Run related existing tests for regression.
{
"salientSummary": "Created daily log writer with UTC timestamped entries, recursive dir creation, and fail-open behavior. Integrated into session-end hook. 18 tests.",
"whatWasImplemented": "appendDailyLog() in memory-daily-log.cjs creates logs/YYYY/MM/YYYY-MM-DD.md directories recursively, appends timestamped bullets, sanitizes content. Session-end hook calls appendDailyLog after STM→MTM promotion.",
"whatWasLeftUndone": "",
"verification": {
"commandsRun": [
{ "command": "node --test tests/lib/memory/daily-log.test.cjs", "exitCode": 0, "observation": "18 tests passing" },
{ "command": "pnpm lint", "exitCode": 0, "observation": "0 errors" }
]
}
}