用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/oimiragieo/agent-studio --skill security-worker命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Agent frontmatter enhancements — disallowedTools, mcpServers scoping, fork_eligible field
Context management — pre-compact persistence, threshold alignment, microcompact/circuit breaker detection
Hook enhancements — updatedInput for bash safety prefixes, suppressOutput for verbose blocks, denial-based routing feedback
基于 SOC 职业分类
正在显示 SKILL.md
| name | security-worker |
| description | Security hardening — path normalization, UNC blocking, pattern alignment with Claude Code |
NOTE: Startup and cleanup are handled by worker-base. This skill defines the WORK PROCEDURE.
Features that harden security hooks: case-normalized path comparison, UNC path blocking, pattern alignment with Claude Code source, path traversal defenses.
Read the feature description carefully. Understand exactly which security patterns to add/modify and which CC patterns to align with.
Read source files. Before modifying:
.claude/hooks/safety/unified-pre-write-hook.cjs).factory/library/claude-code-internals.md for CC patterns referenceAGENTS.md for CC protected paths and dangerous patterns listsWrite tests first (red). Create test file at tests/hooks/<descriptive-name>.test.cjs. Security tests must cover:
Implement changes.
.toLowerCase() before ALL regex/string comparisons on paths.\\ and // prefixes. Block both.\b) for command patterns to avoid over-blocking.Run tests (green). All tests pass. Fix failures.
Run lint.
pnpm lint
npx prettier --check <modified-files>
Manual verification. Run the hook with sample malicious inputs to verify blocking behavior. Run with safe inputs to verify no over-blocking.
{
"salientSummary": "Added case-normalized path comparison to unified-pre-write-hook.cjs. All path comparisons now use .toLowerCase(). UNC paths (\\\\server and //server) blocked with descriptive error. 28 tests.",
"whatWasImplemented": "Case normalization in checkProtectedPaths() and checkTraversal(). UNC check function added before path matching. All CC-protected paths added to pattern list.",
"whatWasLeftUndone": "",
"verification": {
"commandsRun": [
{ "command": "node --test tests/hooks/case-norm-unc.test.cjs", "exitCode": 0, "observation": "28 tests passing" },
{ "command": "pnpm lint", "exitCode": 0, "observation": "0 errors" }
]
}
}