[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7ATDSZ92HC52BS48B15VDJS":3,"skill-same:01M7ATDSZ92HC52BS48B15VDJS":90},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":26,"repositoryHtmlUrl":27,"repositoryHomepageUrl":28,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":30,"updatedAt":31,"install":32,"resources":45},"01M7ATDSZ92HC52BS48B15VDJS","hook-development",null,"This skill should be used when the user asks to \"create a hook\", \"add a PreToolUse\u002FPostToolUse\u002FStop hook\", \"validate tool use\", \"wire command hooks\", \"use ${PLUGIN_ROOT}\", \"set up event-driven automation\", \"block dangerous commands\", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStart, SubagentStop, SessionStart, UserPromptSubmit). Provides comprehensive guidance for creating and implementing DeepSeek Harness plugin hooks with focus on the command-hook contract and the matcher model.","Sivan757\u002Fdsh-agent-plugins-market","Sivan757","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F29885829?v=4","01M7AT8RD4ZDR4ACB02GX7X3GT","01M7AT8RDRG2YFMMYBW0DXAT68",21,"MIT","https:\u002F\u002Fgithub.com\u002FSivan757\u002Fdsh-agent-plugins-market\u002Fblob\u002Fmain\u002Fplugins\u002Fplugin-dev\u002Fskills\u002Fhook-development\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: hook-development\ndescription: This skill should be used when the user asks to \"create a hook\", \"add a PreToolUse\u002FPostToolUse\u002FStop hook\", \"validate tool use\", \"wire command hooks\", \"use ${PLUGIN_ROOT}\", \"set up event-driven automation\", \"block dangerous commands\", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStart, SubagentStop, SessionStart, UserPromptSubmit). Provides comprehensive guidance for creating and implementing DeepSeek Harness plugin hooks with focus on the command-hook contract and the matcher model.\n---\n\n# Hook Development for DeepSeek Harness Plugins\n\n## Overview\n\nHooks are event-driven automation scripts that execute in response to DeepSeek Harness events. Use hooks to validate operations, enforce policies, add context, and integrate external tools into workflows.\n\n**Key capabilities:**\n- Validate tool calls before execution (PreToolUse)\n- React to tool results (PostToolUse)\n- Enforce completion standards (Stop, SubagentStop)\n- Load project context (SessionStart)\n- Automate workflows across the development lifecycle\n\n## Hook Types\n\n### Command Hooks (The Supported Type)\n\nExecute bash commands for deterministic checks:\n\n```json\n{\n  \"type\": \"command\",\n  \"command\": \"bash ${PLUGIN_ROOT}\u002Fscripts\u002Fvalidate.sh\",\n  \"timeout\": 60\n}\n```\n\n**Use for:**\n- Fast deterministic validations\n- File system operations\n- External tool integrations\n- Performance-critical checks\n\n## Hook Configuration Formats\n\n### Plugin hooks.json Format\n\n**For plugin hooks** in `com.deepseek.harness\u002Fhooks\u002Fhooks.json`, use wrapper format:\n\n```json\n{\n  \"description\": \"Brief explanation of hooks (optional)\",\n  \"hooks\": {\n    \"PreToolUse\": [...],\n    \"Stop\": [...],\n    \"SessionStart\": [...]\n  }\n}\n```\n\n**Key points:**\n- `description` field is optional\n- `hooks` field is required wrapper containing actual hook events\n- This is the **plugin-specific format**\n\n**Example:**\n```json\n{\n  \"description\": \"Validation hooks for code quality\",\n  \"hooks\": {\n    \"PreToolUse\": [\n      {\n        \"matcher\": \"Write\",\n        \"hooks\": [\n          {\n            \"type\": \"command\",\n            \"command\": \"${PLUGIN_ROOT}\u002Fhooks\u002Fvalidate.sh\"\n          }\n        ]\n      }\n    ]\n  }\n}\n```\n\n### Settings Format (Direct)\n\n**For a standalone hook file** (for example a project `.agents\u002Fhooks\u002Fhooks.json`), use the bare event-table format:\n\n```json\n{\n  \"PreToolUse\": [...],\n  \"Stop\": [...],\n  \"SessionStart\": [...]\n}\n```\n\n**Key points:**\n- No wrapper - events directly at top level\n- No description field\n- This is the **settings format**\n\n**Important:** The examples below show the hook event structure that goes inside either format. For plugin hooks.json, wrap these in `{\"hooks\": {...}}`.\n\n## Hook Events\n\n### PreToolUse\n\nExecute before any tool runs. Use to approve, deny, or modify tool calls.\n\n**Example:**\n```json\n{\n  \"PreToolUse\": [\n    {\n      \"matcher\": \"Write|Edit\",\n      \"hooks\": [\n        {\n          \"type\": \"command\",\n          \"command\": \"bash ${PLUGIN_ROOT}\u002Fscripts\u002Fvalidate-write.sh\",\n          \"timeout\": 10\n        }\n      ]\n    }\n  ]\n}\n```\n\n**Output for PreToolUse:**\n```json\n{\n  \"hookSpecificOutput\": {\n    \"permissionDecision\": \"allow|deny|ask\",\n    \"updatedInput\": {\"field\": \"modified_value\"}\n  },\n  \"systemMessage\": \"Explanation for the agent\"\n}\n```\n\n### PostToolUse\n\nExecute after tool completes. Use to react to results, provide feedback, or log.\n\n**Example:**\n```json\n{\n  \"PostToolUse\": [\n    {\n      \"matcher\": \"Edit\",\n      \"hooks\": [\n        {\n          \"type\": \"command\",\n          \"command\": \"bash ${PLUGIN_ROOT}\u002Fscripts\u002Fcheck-edit-result.sh\",\n          \"timeout\": 10\n        }\n      ]\n    }\n  ]\n}\n```\n\n**Output behavior:**\n- Exit 0: stdout shown in transcript\n- Exit 2: stderr fed back to the agent\n- systemMessage included in context\n\n### Stop\n\nExecute when main agent considers stopping. Use to validate completeness.\n\n**Example:**\n```json\n{\n  \"Stop\": [\n    {\n      \"hooks\": [\n        {\n          \"type\": \"command\",\n          \"command\": \"bash ${PLUGIN_ROOT}\u002Fscripts\u002Fcheck-completeness.sh\",\n          \"timeout\": 30\n        }\n      ]\n    }\n  ]\n}\n```\n\n**Decision output:**\n```json\n{\n  \"decision\": \"approve|block\",\n  \"reason\": \"Explanation\",\n  \"systemMessage\": \"Additional context\"\n}\n```\n\n### SubagentStop\n\nExecute when subagent considers stopping. Use to ensure subagent completed its task.\n\nSimilar to Stop hook, but for subagents. Observe only — it cannot block or add context.\n\n### UserPromptSubmit\n\nExecute when user submits a prompt. Use to add context, validate, or block prompts. Takes no matcher.\n\n**Example:**\n```json\n{\n  \"UserPromptSubmit\": [\n    {\n      \"hooks\": [\n        {\n          \"type\": \"command\",\n          \"command\": \"bash ${PLUGIN_ROOT}\u002Fscripts\u002Fcheck-prompt.sh\",\n          \"timeout\": 10\n        }\n      ]\n    }\n  ]\n}\n```\n\n### SessionStart\n\nExecute when DeepSeek Harness session begins. Use to load context and set environment.\n\n**Example:**\n```json\n{\n  \"SessionStart\": [\n    {\n      \"matcher\": \"*\",\n      \"hooks\": [\n        {\n          \"type\": \"command\",\n          \"command\": \"bash ${PLUGIN_ROOT}\u002Fscripts\u002Fload-context.sh\"\n        }\n      ]\n    }\n  ]\n}\n```\n\n**Special capability:** Persist environment variables using `$DSH_ENV_FILE`:\n```bash\necho \"export PROJECT_TYPE=nodejs\" >> \"$DSH_ENV_FILE\"\n```\n\nSee `examples\u002Fload-context.sh` for complete example.\n\n### Events without a DeepSeek Harness counterpart\n\nThe runtime runs ten events: `SessionStart`, `UserPromptSubmit`, `PreToolUse`, `PostToolUse`, `PostToolUseFailure`, `Stop`, `SubagentStart`, `SubagentStop`, `PreCompact` and `SessionEnd`. `PostToolUse` fires when a tool call succeeds and `PostToolUseFailure` when it fails, matching the reference split. `PreCompact` runs but cannot veto a committed compaction, and `SessionEnd` runs from session teardown and discards its output. The source format also carries `PostCompact`, `Notification`, `PermissionRequest` and other events with no interception point here; those are skipped with a diagnostic, so do not build on them.\n\n## Hook Output Format\n\n### Standard Output (All Hooks)\n\n```json\n{\n  \"continue\": true,\n  \"suppressOutput\": false,\n  \"systemMessage\": \"Message for the agent\"\n}\n```\n\n- `continue`: If false, halt processing (default true)\n- `suppressOutput`: Hide output from transcript (default false)\n- `systemMessage`: Message shown to the agent\n\n### Exit Codes\n\n- `0` - Success (stdout shown in transcript)\n- `2` - Blocking error (stderr fed back to the agent)\n- Other - Non-blocking error\n\n## Hook Input Format\n\nAll hooks receive JSON via stdin with common fields:\n\n```json\n{\n  \"session_id\": \"abc123\",\n  \"transcript_path\": \"\u002Fpath\u002Fto\u002Ftranscript.txt\",\n  \"cwd\": \"\u002Fcurrent\u002Fworking\u002Fdir\",\n  \"permission_mode\": \"ask|allow\",\n  \"hook_event_name\": \"PreToolUse\"\n}\n```\n\n**Event-specific fields:**\n\n- **PreToolUse\u002FPostToolUse:** `tool_name`, `tool_input`, `tool_result`\n- **UserPromptSubmit:** `user_prompt`\n- **Stop\u002FSubagentStop:** `reason`\n\nAccess fields in prompts using `$TOOL_INPUT`, `$TOOL_RESULT`, `$USER_PROMPT`, etc.\n\n## Environment Variables\n\nAvailable in all command hooks:\n\n- `$DSH_PROJECT_DIR` - Project root path\n- `$PLUGIN_ROOT` - Plugin directory (use for portable paths)\n- `$DSH_ENV_FILE` - SessionStart only: persist env vars here\n- `$DSH_REMOTE` - Set if running in remote context\n\n**Always use ${PLUGIN_ROOT} in hook commands for portability:**\n\n```json\n{\n  \"type\": \"command\",\n  \"command\": \"bash ${PLUGIN_ROOT}\u002Fscripts\u002Fvalidate.sh\"\n}\n```\n\n## Plugin Hook Configuration\n\nIn plugins, define hooks in `com.deepseek.harness\u002Fhooks\u002Fhooks.json`, wrapped in a top-level `\"hooks\"` object:\n\n```json\n{\n  \"hooks\": {\n    \"PreToolUse\": [\n      {\n        \"matcher\": \"Write|Edit\",\n        \"hooks\": [\n          {\n            \"type\": \"command\",\n            \"command\": \"bash ${PLUGIN_ROOT}\u002Fscripts\u002Fvalidate-write.sh\",\n            \"timeout\": 10\n          }\n        ]\n      }\n    ],\n    \"SessionStart\": [\n      {\n        \"hooks\": [\n          {\n            \"type\": \"command\",\n            \"command\": \"bash ${PLUGIN_ROOT}\u002Fscripts\u002Fload-context.sh\",\n            \"timeout\": 10\n          }\n        ]\n      }\n    ]\n  }\n}\n```\n\nPlugin hooks merge with user's hooks and run in parallel.\n\n## Matchers\n\n### Tool Name Matching\n\n**Exact match:**\n```json\n\"matcher\": \"Write\"\n```\n\n**Multiple tools:**\n```json\n\"matcher\": \"Read|Write|Edit\"\n```\n\n**Wildcard (all tools):**\n```json\n\"matcher\": \"*\"\n```\n\n**Regex patterns:**\n```json\n\"matcher\": \"mcp__.*__delete.*\"  \u002F\u002F All MCP delete tools\n```\n\n**Note:** Matchers are case-sensitive.\n\n### Common Patterns\n\n```json\n\u002F\u002F All MCP tools\n\"matcher\": \"mcp__.*\"\n\n\u002F\u002F Specific plugin's MCP tools\n\"matcher\": \"mcp__plugin_asana_.*\"\n\n\u002F\u002F All file operations\n\"matcher\": \"Read|Write|Edit\"\n\n\u002F\u002F Bash commands only\n\"matcher\": \"Bash\"\n```\n\n## Security Best Practices\n\n### Input Validation\n\nAlways validate inputs in command hooks:\n\n```bash\n#!\u002Fbin\u002Fbash\nset -euo pipefail\n\ninput=$(cat)\ntool_name=$(echo \"$input\" | jq -r '.tool_name')\n\n# Validate tool name format\nif [[ ! \"$tool_name\" =~ ^[a-zA-Z0-9_]+$ ]]; then\n  echo '{\"decision\": \"deny\", \"reason\": \"Invalid tool name\"}' >&2\n  exit 2\nfi\n```\n\n### Path Safety\n\nCheck for path traversal and sensitive files:\n\n```bash\nfile_path=$(echo \"$input\" | jq -r '.tool_input.file_path')\n\n# Deny path traversal\nif [[ \"$file_path\" == *\"..\"* ]]; then\n  echo '{\"decision\": \"deny\", \"reason\": \"Path traversal detected\"}' >&2\n  exit 2\nfi\n\n# Deny sensitive files\nif [[ \"$file_path\" == *\".env\"* ]]; then\n  echo '{\"decision\": \"deny\", \"reason\": \"Sensitive file\"}' >&2\n  exit 2\nfi\n```\n\nSee `examples\u002Fvalidate-write.sh` and `examples\u002Fvalidate-bash.sh` for complete examples.\n\n### Quote All Variables\n\n```bash\n# GOOD: Quoted\necho \"$file_path\"\ncd \"$DSH_PROJECT_DIR\"\n\n# BAD: Unquoted (injection risk)\necho $file_path\ncd $DSH_PROJECT_DIR\n```\n\n### Set Appropriate Timeouts\n\n```json\n{\n  \"type\": \"command\",\n  \"command\": \"bash script.sh\",\n  \"timeout\": 10\n}\n```\n\n**Defaults:** 60s per hook when the hook sets no timeout\n\n## Performance Considerations\n\n### Parallel Execution\n\nAll matching hooks run **in parallel**:\n\n```json\n{\n  \"PreToolUse\": [\n    {\n      \"matcher\": \"Write\",\n      \"hooks\": [\n        {\"type\": \"command\", \"command\": \"check1.sh\"},\n        {\"type\": \"command\", \"command\": \"check2.sh\"}\n      ]\n    }\n  ]\n}\n```\n\n**Design implications:**\n- Hooks don't see each other's output\n- Non-deterministic ordering\n- Design for independence\n\n### Optimization\n\n1. Use command hooks for quick deterministic checks\n2. Keep hook commands small — heavy reasoning belongs in the session, where the model can delegate\n3. Cache validation results in temp files\n4. Minimize I\u002FO in hot paths\n\n## Temporarily Active Hooks\n\nCreate hooks that activate conditionally by checking for a flag file or configuration:\n\n**Pattern: Flag file activation**\n```bash\n#!\u002Fbin\u002Fbash\n# Only active when flag file exists\nFLAG_FILE=\"$DSH_PROJECT_DIR\u002F.enable-strict-validation\"\n\nif [ ! -f \"$FLAG_FILE\" ]; then\n  # Flag not present, skip validation\n  exit 0\nfi\n\n# Flag present, run validation\ninput=$(cat)\n# ... validation logic ...\n```\n\n**Pattern: Configuration-based activation**\n```bash\n#!\u002Fbin\u002Fbash\n# Check configuration for activation\nCONFIG_FILE=\"$DSH_PROJECT_DIR\u002F.agents\u002Fplugin-config.json\"\n\nif [ -f \"$CONFIG_FILE\" ]; then\n  enabled=$(jq -r '.strictMode \u002F\u002F false' \"$CONFIG_FILE\")\n  if [ \"$enabled\" != \"true\" ]; then\n    exit 0  # Not enabled, skip\n  fi\nfi\n\n# Enabled, run hook logic\ninput=$(cat)\n# ... hook logic ...\n```\n\n**Use cases:**\n- Enable strict validation only when needed\n- Temporary debugging hooks\n- Project-specific hook behavior\n- Feature flags for hooks\n\n**Best practice:** Document activation mechanism in plugin README so users know how to enable\u002Fdisable temporary hooks.\n\n## Hook Lifecycle and Limitations\n\n### Hooks Load at Session Start\n\n**Important:** Hooks are loaded when DeepSeek Harness session starts. Changes to hook configuration require restarting DeepSeek Harness.\n\n**Cannot hot-swap hooks:**\n- Editing `com.deepseek.harness\u002Fhooks\u002Fhooks.json` won't affect current session\n- Adding new hook scripts won't be recognized\n- Changing hook commands won't update\n- Must restart DeepSeek Harness: exit and run `dsh` again\n\n**To test hook changes:**\n1. Edit hook configuration or scripts\n2. Exit DeepSeek Harness session\n3. Restart: `dsh`\n4. New hook configuration loads\n5. Test hooks with `dsh --debug`\n\n### Hook Validation at Startup\n\nHooks are validated when DeepSeek Harness starts:\n- Invalid JSON in hooks.json causes loading failure\n- Missing scripts cause warnings\n- Syntax errors reported in debug mode\n\nUse `\u002Fhooks` command to review loaded hooks in current session.\n\n## Debugging Hooks\n\n### Enable Debug Mode\n\n```bash\ndsh --debug\n```\n\nLook for hook registration, execution logs, input\u002Foutput JSON, and timing information.\n\n### Test Hook Scripts\n\nTest command hooks directly:\n\n```bash\necho '{\"tool_name\": \"Write\", \"tool_input\": {\"file_path\": \"\u002Ftest\"}}' | \\\n  bash ${PLUGIN_ROOT}\u002Fscripts\u002Fvalidate.sh\n\necho \"Exit code: $?\"\n```\n\n### Validate JSON Output\n\nEnsure hooks output valid JSON:\n\n```bash\noutput=$(.\u002Fyour-hook.sh \u003C test-input.json)\necho \"$output\" | jq .\n```\n\n## Quick Reference\n\n### Hook Events Summary\n\n| Event | When | Use For |\n|-------|------|---------|\n| PreToolUse | Before tool | Validation, modification |\n| PostToolUse | After a tool succeeds | Feedback, logging |\n| PostToolUseFailure | After a tool fails | Failure alerts, corrective context |\n| UserPromptSubmit | User input | Context, validation |\n| Stop | Agent stopping | Completeness check |\n| SubagentStart | Subagent starts | Context injection |\n| SubagentStop | Subagent done | Task validation |\n| SessionStart | Session begins | Context loading |\n| PreCompact | Before compaction | Observation only, no veto |\n| SessionEnd | Session teardown | Cleanup, output discarded |\n\nA suite that declares `PostToolUse` and no `PostToolUseFailure` keeps seeing failed calls through its `PostToolUse` hooks, and the host log says so once. Declare `PostToolUseFailure` to take the reference split.\n\n`PostCompact`, `Notification` and `PermissionRequest` have no counterpart in the runtime and are skipped with a diagnostic.\n\n### Best Practices\n\n**DO:**\n- ✅ Keep hook commands deterministic and fast\n- ✅ Use ${PLUGIN_ROOT} for portability\n- ✅ Validate all inputs in command hooks\n- ✅ Quote all bash variables\n- ✅ Set appropriate timeouts\n- ✅ Return structured JSON output\n- ✅ Test hooks thoroughly\n\n**DON'T:**\n- ❌ Use hardcoded paths\n- ❌ Trust user input without validation\n- ❌ Create long-running hooks\n- ❌ Rely on hook execution order\n- ❌ Modify global state unpredictably\n- ❌ Log sensitive information\n\n## Additional Resources\n\n### Reference Files\n\nFor detailed patterns and advanced techniques, consult:\n\n- **`references\u002Fpatterns.md`** - Common hook patterns (8+ proven patterns)\n- **`references\u002Fmigration.md`** - Migrating from basic to advanced hooks\n- **`references\u002Fadvanced.md`** - Advanced use cases and techniques\n\n### Example Hook Scripts\n\nWorking examples in `examples\u002F`:\n\n- **`validate-write.sh`** - File write validation example\n- **`validate-bash.sh`** - Bash command validation example\n- **`load-context.sh`** - SessionStart context loading example\n\n### Utility Scripts\n\nDevelopment tools in `scripts\u002F`:\n\n- **`validate-hook-schema.sh`** - Validate hooks.json structure and syntax\n- **`test-hook.sh`** - Test hooks with sample input before deployment\n- **`hook-linter.sh`** - Check hook scripts for common issues and best practices\n\n### External Resources\n\n- **Official Docs**: the harness hooks documentation\n- **Examples**: See security-guidance plugin in marketplace\n- **Testing**: Use `dsh --debug` for detailed logs\n- **Validation**: Use `jq` to validate hook JSON output\n\n## Implementation Workflow\n\nTo implement hooks in a plugin:\n\n1. Identify events to hook into (PreToolUse, Stop, SessionStart, etc.)\n2. Decide which event the check belongs at\n3. Write hook configuration in `com.deepseek.harness\u002Fhooks\u002Fhooks.json`\n4. For command hooks, create hook scripts\n5. Use ${PLUGIN_ROOT} for all file references\n6. Validate configuration with `scripts\u002Fvalidate-hook-schema.sh com.deepseek.harness\u002Fhooks\u002Fhooks.json`\n7. Test hooks with `scripts\u002Ftest-hook.sh` before deployment\n8. Test in DeepSeek Harness with `dsh --debug`\n9. Document hooks in plugin README\n\nCommand hooks are the supported type here. Keep them deterministic, fast, and free of side effects.\n","# Hook Development for DeepSeek Harness Plugins\n\n## Overview\n\nHooks are event-driven automation scripts that execute in response to DeepSeek Harness events. Use hooks to validate operations, enforce policies, add context, and integrate external tools into workflows.\n\n**Key capabilities:**\n- Validate tool calls before execution (PreToolUse)\n- React to tool results (PostToolUse)\n- Enforce completion standards (Stop, SubagentStop)\n- Load project context (SessionStart)\n- Automate workflows across the development lifecycle\n\n## Hook Types\n\n### Command Hooks (The Supported Type)\n\nExecute bash commands for deterministic checks:\n\n```json\n{\n  \"type\": \"command\",\n  \"command\": \"bash ${PLUGIN_ROOT}\u002Fscripts\u002Fvalidate.sh\",\n  \"timeout\": 60\n}\n```\n\n**Use for:**\n- Fast deterministic validations\n- File system operations\n- External tool integrations\n- Performance-critical checks\n\n## Hook Configuration Formats\n\n### Plugin hooks.json Format\n\n**For plugin hooks** in `com.deepseek.harness\u002Fhooks\u002Fhooks.json`, use wrapper format:\n\n```json\n{\n  \"description\": \"Brief explanation of hooks (optional)\",\n  \"hooks\": {\n    \"PreToolUse\": [...],\n    \"Stop\": [...],\n    \"SessionStart\": [...]\n  }\n}\n```\n\n**Key points:**\n- `description` field is optional\n- `hooks` field is required wrapper containing actual hook events\n- This is the **plugin-specific format**\n\n**Example:**\n```json\n{\n  \"description\": \"Validation hooks for code quality\",\n  \"hooks\": {\n    \"PreToolUse\": [\n      {\n        \"matcher\": \"Write\",\n        \"hooks\": [\n          {\n            \"type\": \"command\",\n            \"command\": \"${PLUGIN_ROOT}\u002Fhooks\u002Fvalidate.sh\"\n          }\n        ]\n      }\n    ]\n  }\n}\n```\n\n### Settings Format (Direct)\n\n**For a standalone hook file** (for example a project `.agents\u002Fhooks\u002Fhooks.json`), use the bare event-table format:\n\n```json\n{\n  \"PreToolUse\": [...],\n  \"Stop\": [...],\n  \"SessionStart\": [...]\n}\n```\n\n**Key points:**\n- No wrapper - events directly at top level\n- No description field\n- This is the **settings format**\n\n**Important:** The examples below show the hook event structure that goes inside either format. For plugin hooks.json, wrap these in `{\"hooks\": {...}}`.\n\n## Hook Events\n\n### PreToolUse\n\nExecute before any tool runs. Use to approve, deny, or modify tool calls.\n\n**Example:**\n```json\n{\n  \"PreToolUse\": [\n    {\n      \"matcher\": \"Write|Edit\",\n      \"hooks\": [\n        {\n          \"type\": \"command\",\n          \"command\": \"bash ${PLUGIN_ROOT}\u002Fscripts\u002Fvalidate-write.sh\",\n          \"timeout\": 10\n        }\n      ]\n    }\n  ]\n}\n```\n\n**Output for PreToolUse:**\n```json\n{\n  \"hookSpecificOutput\": {\n    \"permissionDecision\": \"allow|deny|ask\",\n    \"updatedInput\": {\"field\": \"modified_value\"}\n  },\n  \"systemMessage\": \"Explanation for the agent\"\n}\n```\n\n### PostToolUse\n\nExecute after tool completes. Use to react to results, provide feedback, or log.\n\n**Example:**\n```json\n{\n  \"PostToolUse\": [\n    {\n      \"matcher\": \"Edit\",\n      \"hooks\": [\n        {\n          \"type\": \"command\",\n          \"command\": \"bash ${PLUGIN_ROOT}\u002Fscripts\u002Fcheck-edit-result.sh\",\n          \"timeout\": 10\n        }\n      ]\n    }\n  ]\n}\n```\n\n**Output behavior:**\n- Exit 0: stdout shown in transcript\n- Exit 2: stderr fed back to the agent\n- systemMessage included in context\n\n### Stop\n\nExecute when main agent considers stopping. Use to validate completeness.\n\n**Example:**\n```json\n{\n  \"Stop\": [\n    {\n      \"hooks\": [\n        {\n          \"type\": \"command\",\n          \"command\": \"bash ${PLUGIN_ROOT}\u002Fscripts\u002Fcheck-completeness.sh\",\n          \"timeout\": 30\n        }\n      ]\n    }\n  ]\n}\n```\n\n**Decision output:**\n```json\n{\n  \"decision\": \"approve|block\",\n  \"reason\": \"Explanation\",\n  \"systemMessage\": \"Additional context\"\n}\n```\n\n### SubagentStop\n\nExecute when subagent considers stopping. Use to ensure subagent completed its task.\n\nSimilar to Stop hook, but for subagents. Observe only — it cannot block or add context.\n\n### UserPromptSubmit\n\nExecute when user submits a prompt. Use to add context, validate, or block prompts. Takes no matcher.\n\n**Example:**\n```json\n{\n  \"UserPromptSubmit\": [\n    {\n      \"hooks\": [\n        {\n          \"type\": \"command\",\n          \"command\": \"bash ${PLUGIN_ROOT}\u002Fscripts\u002Fcheck-prompt.sh\",\n          \"timeout\": 10\n        }\n      ]\n    }\n  ]\n}\n```\n\n### SessionStart\n\nExecute when DeepSeek Harness session begins. Use to load context and set environment.\n\n**Example:**\n```json\n{\n  \"SessionStart\": [\n    {\n      \"matcher\": \"*\",\n      \"hooks\": [\n        {\n          \"type\": \"command\",\n          \"command\": \"bash ${PLUGIN_ROOT}\u002Fscripts\u002Fload-context.sh\"\n        }\n      ]\n    }\n  ]\n}\n```\n\n**Special capability:** Persist environment variables using `$DSH_ENV_FILE`:\n```bash\necho \"export PROJECT_TYPE=nodejs\" >> \"$DSH_ENV_FILE\"\n```\n\nSee `examples\u002Fload-context.sh` for complete example.\n\n### Events without a DeepSeek Harness counterpart\n\nThe runtime runs ten events: `SessionStart`, `UserPromptSubmit`, `PreToolUse`, `PostToolUse`, `PostToolUseFailure`, `Stop`, `SubagentStart`, `SubagentStop`, `PreCompact` and `SessionEnd`. `PostToolUse` fires when a tool call succeeds and `PostToolUseFailure` when it fails, matching the reference split. `PreCompact` runs but cannot veto a committed compaction, and `SessionEnd` runs from session teardown and discards its output. The source format also carries `PostCompact`, `Notification`, `PermissionRequest` and other events with no interception point here; those are skipped with a diagnostic, so do not build on them.\n\n## Hook Output Format\n\n### Standard Output (All Hooks)\n\n```json\n{\n  \"continue\": true,\n  \"suppressOutput\": false,\n  \"systemMessage\": \"Message for the agent\"\n}\n```\n\n- `continue`: If false, halt processing (default true)\n- `suppressOutput`: Hide output from transcript (default false)\n- `systemMessage`: Message shown to the agent\n\n### Exit Codes\n\n- `0` - Success (stdout shown in transcript)\n- `2` - Blocking error (stderr fed back to the agent)\n- Other - Non-blocking error\n\n## Hook Input Format\n\nAll hooks receive JSON via stdin with common fields:\n\n```json\n{\n  \"session_id\": \"abc123\",\n  \"transcript_path\": \"\u002Fpath\u002Fto\u002Ftranscript.txt\",\n  \"cwd\": \"\u002Fcurrent\u002Fworking\u002Fdir\",\n  \"permission_mode\": \"ask|allow\",\n  \"hook_event_name\": \"PreToolUse\"\n}\n```\n\n**Event-specific fields:**\n\n- **PreToolUse\u002FPostToolUse:** `tool_name`, `tool_input`, `tool_result`\n- **UserPromptSubmit:** `user_prompt`\n- **Stop\u002FSubagentStop:** `reason`\n\nAccess fields in prompts using `$TOOL_INPUT`, `$TOOL_RESULT`, `$USER_PROMPT`, etc.\n\n## Environment Variables\n\nAvailable in all command hooks:\n\n- `$DSH_PROJECT_DIR` - Project root path\n- `$PLUGIN_ROOT` - Plugin directory (use for portable paths)\n- `$DSH_ENV_FILE` - SessionStart only: persist env vars here\n- `$DSH_REMOTE` - Set if running in remote context\n\n**Always use ${PLUGIN_ROOT} in hook commands for portability:**\n\n```json\n{\n  \"type\": \"command\",\n  \"command\": \"bash ${PLUGIN_ROOT}\u002Fscripts\u002Fvalidate.sh\"\n}\n```\n\n## Plugin Hook Configuration\n\nIn plugins, define hooks in `com.deepseek.harness\u002Fhooks\u002Fhooks.json`, wrapped in a top-level `\"hooks\"` object:\n\n```json\n{\n  \"hooks\": {\n    \"PreToolUse\": [\n      {\n        \"matcher\": \"Write|Edit\",\n        \"hooks\": [\n          {\n            \"type\": \"command\",\n            \"command\": \"bash ${PLUGIN_ROOT}\u002Fscripts\u002Fvalidate-write.sh\",\n            \"timeout\": 10\n          }\n        ]\n      }\n    ],\n    \"SessionStart\": [\n      {\n        \"hooks\": [\n          {\n            \"type\": \"command\",\n            \"command\": \"bash ${PLUGIN_ROOT}\u002Fscripts\u002Fload-context.sh\",\n            \"timeout\": 10\n          }\n        ]\n      }\n    ]\n  }\n}\n```\n\nPlugin hooks merge with user's hooks and run in parallel.\n\n## Matchers\n\n### Tool Name Matching\n\n**Exact match:**\n```json\n\"matcher\": \"Write\"\n```\n\n**Multiple tools:**\n```json\n\"matcher\": \"Read|Write|Edit\"\n```\n\n**Wildcard (all tools):**\n```json\n\"matcher\": \"*\"\n```\n\n**Regex patterns:**\n```json\n\"matcher\": \"mcp__.*__delete.*\"  \u002F\u002F All MCP delete tools\n```\n\n**Note:** Matchers are case-sensitive.\n\n### Common Patterns\n\n```json\n\u002F\u002F All MCP tools\n\"matcher\": \"mcp__.*\"\n\n\u002F\u002F Specific plugin's MCP tools\n\"matcher\": \"mcp__plugin_asana_.*\"\n\n\u002F\u002F All file operations\n\"matcher\": \"Read|Write|Edit\"\n\n\u002F\u002F Bash commands only\n\"matcher\": \"Bash\"\n```\n\n## Security Best Practices\n\n### Input Validation\n\nAlways validate inputs in command hooks:\n\n```bash\n#!\u002Fbin\u002Fbash\nset -euo pipefail\n\ninput=$(cat)\ntool_name=$(echo \"$input\" | jq -r '.tool_name')\n\n# Validate tool name format\nif [[ ! \"$tool_name\" =~ ^[a-zA-Z0-9_]+$ ]]; then\n  echo '{\"decision\": \"deny\", \"reason\": \"Invalid tool name\"}' >&2\n  exit 2\nfi\n```\n\n### Path Safety\n\nCheck for path traversal and sensitive files:\n\n```bash\nfile_path=$(echo \"$input\" | jq -r '.tool_input.file_path')\n\n# Deny path traversal\nif [[ \"$file_path\" == *\"..\"* ]]; then\n  echo '{\"decision\": \"deny\", \"reason\": \"Path traversal detected\"}' >&2\n  exit 2\nfi\n\n# Deny sensitive files\nif [[ \"$file_path\" == *\".env\"* ]]; then\n  echo '{\"decision\": \"deny\", \"reason\": \"Sensitive file\"}' >&2\n  exit 2\nfi\n```\n\nSee `examples\u002Fvalidate-write.sh` and `examples\u002Fvalidate-bash.sh` for complete examples.\n\n### Quote All Variables\n\n```bash\n# GOOD: Quoted\necho \"$file_path\"\ncd \"$DSH_PROJECT_DIR\"\n\n# BAD: Unquoted (injection risk)\necho $file_path\ncd $DSH_PROJECT_DIR\n```\n\n### Set Appropriate Timeouts\n\n```json\n{\n  \"type\": \"command\",\n  \"command\": \"bash script.sh\",\n  \"timeout\": 10\n}\n```\n\n**Defaults:** 60s per hook when the hook sets no timeout\n\n## Performance Considerations\n\n### Parallel Execution\n\nAll matching hooks run **in parallel**:\n\n```json\n{\n  \"PreToolUse\": [\n    {\n      \"matcher\": \"Write\",\n      \"hooks\": [\n        {\"type\": \"command\", \"command\": \"check1.sh\"},\n        {\"type\": \"command\", \"command\": \"check2.sh\"}\n      ]\n    }\n  ]\n}\n```\n\n**Design implications:**\n- Hooks don't see each other's output\n- Non-deterministic ordering\n- Design for independence\n\n### Optimization\n\n1. Use command hooks for quick deterministic checks\n2. Keep hook commands small — heavy reasoning belongs in the session, where the model can delegate\n3. Cache validation results in temp files\n4. Minimize I\u002FO in hot paths\n\n## Temporarily Active Hooks\n\nCreate hooks that activate conditionally by checking for a flag file or configuration:\n\n**Pattern: Flag file activation**\n```bash\n#!\u002Fbin\u002Fbash\n# Only active when flag file exists\nFLAG_FILE=\"$DSH_PROJECT_DIR\u002F.enable-strict-validation\"\n\nif [ ! -f \"$FLAG_FILE\" ]; then\n  # Flag not present, skip validation\n  exit 0\nfi\n\n# Flag present, run validation\ninput=$(cat)\n# ... validation logic ...\n```\n\n**Pattern: Configuration-based activation**\n```bash\n#!\u002Fbin\u002Fbash\n# Check configuration for activation\nCONFIG_FILE=\"$DSH_PROJECT_DIR\u002F.agents\u002Fplugin-config.json\"\n\nif [ -f \"$CONFIG_FILE\" ]; then\n  enabled=$(jq -r '.strictMode \u002F\u002F false' \"$CONFIG_FILE\")\n  if [ \"$enabled\" != \"true\" ]; then\n    exit 0  # Not enabled, skip\n  fi\nfi\n\n# Enabled, run hook logic\ninput=$(cat)\n# ... hook logic ...\n```\n\n**Use cases:**\n- Enable strict validation only when needed\n- Temporary debugging hooks\n- Project-specific hook behavior\n- Feature flags for hooks\n\n**Best practice:** Document activation mechanism in plugin README so users know how to enable\u002Fdisable temporary hooks.\n\n## Hook Lifecycle and Limitations\n\n### Hooks Load at Session Start\n\n**Important:** Hooks are loaded when DeepSeek Harness session starts. Changes to hook configuration require restarting DeepSeek Harness.\n\n**Cannot hot-swap hooks:**\n- Editing `com.deepseek.harness\u002Fhooks\u002Fhooks.json` won't affect current session\n- Adding new hook scripts won't be recognized\n- Changing hook commands won't update\n- Must restart DeepSeek Harness: exit and run `dsh` again\n\n**To test hook changes:**\n1. Edit hook configuration or scripts\n2. Exit DeepSeek Harness session\n3. Restart: `dsh`\n4. New hook configuration loads\n5. Test hooks with `dsh --debug`\n\n### Hook Validation at Startup\n\nHooks are validated when DeepSeek Harness starts:\n- Invalid JSON in hooks.json causes loading failure\n- Missing scripts cause warnings\n- Syntax errors reported in debug mode\n\nUse `\u002Fhooks` command to review loaded hooks in current session.\n\n## Debugging Hooks\n\n### Enable Debug Mode\n\n```bash\ndsh --debug\n```\n\nLook for hook registration, execution logs, input\u002Foutput JSON, and timing information.\n\n### Test Hook Scripts\n\nTest command hooks directly:\n\n```bash\necho '{\"tool_name\": \"Write\", \"tool_input\": {\"file_path\": \"\u002Ftest\"}}' | \\\n  bash ${PLUGIN_ROOT}\u002Fscripts\u002Fvalidate.sh\n\necho \"Exit code: $?\"\n```\n\n### Validate JSON Output\n\nEnsure hooks output valid JSON:\n\n```bash\noutput=$(.\u002Fyour-hook.sh \u003C test-input.json)\necho \"$output\" | jq .\n```\n\n## Quick Reference\n\n### Hook Events Summary\n\n| Event | When | Use For |\n|-------|------|---------|\n| PreToolUse | Before tool | Validation, modification |\n| PostToolUse | After a tool succeeds | Feedback, logging |\n| PostToolUseFailure | After a tool fails | Failure alerts, corrective context |\n| UserPromptSubmit | User input | Context, validation |\n| Stop | Agent stopping | Completeness check |\n| SubagentStart | Subagent starts | Context injection |\n| SubagentStop | Subagent done | Task validation |\n| SessionStart | Session begins | Context loading |\n| PreCompact | Before compaction | Observation only, no veto |\n| SessionEnd | Session teardown | Cleanup, output discarded |\n\nA suite that declares `PostToolUse` and no `PostToolUseFailure` keeps seeing failed calls through its `PostToolUse` hooks, and the host log says so once. Declare `PostToolUseFailure` to take the reference split.\n\n`PostCompact`, `Notification` and `PermissionRequest` have no counterpart in the runtime and are skipped with a diagnostic.\n\n### Best Practices\n\n**DO:**\n- ✅ Keep hook commands deterministic and fast\n- ✅ Use ${PLUGIN_ROOT} for portability\n- ✅ Validate all inputs in command hooks\n- ✅ Quote all bash variables\n- ✅ Set appropriate timeouts\n- ✅ Return structured JSON output\n- ✅ Test hooks thoroughly\n\n**DON'T:**\n- ❌ Use hardcoded paths\n- ❌ Trust user input without validation\n- ❌ Create long-running hooks\n- ❌ Rely on hook execution order\n- ❌ Modify global state unpredictably\n- ❌ Log sensitive information\n\n## Additional Resources\n\n### Reference Files\n\nFor detailed patterns and advanced techniques, consult:\n\n- **`references\u002Fpatterns.md`** - Common hook patterns (8+ proven patterns)\n- **`references\u002Fmigration.md`** - Migrating from basic to advanced hooks\n- **`references\u002Fadvanced.md`** - Advanced use cases and techniques\n\n### Example Hook Scripts\n\nWorking examples in `examples\u002F`:\n\n- **`validate-write.sh`** - File write validation example\n- **`validate-bash.sh`** - Bash command validation example\n- **`load-context.sh`** - SessionStart context loading example\n\n### Utility Scripts\n\nDevelopment tools in `scripts\u002F`:\n\n- **`validate-hook-schema.sh`** - Validate hooks.json structure and syntax\n- **`test-hook.sh`** - Test hooks with sample input before deployment\n- **`hook-linter.sh`** - Check hook scripts for common issues and best practices\n\n### External Resources\n\n- **Official Docs**: the harness hooks documentation\n- **Examples**: See security-guidance plugin in marketplace\n- **Testing**: Use `dsh --debug` for detailed logs\n- **Validation**: Use `jq` to validate hook JSON output\n\n## Implementation Workflow\n\nTo implement hooks in a plugin:\n\n1. Identify events to hook into (PreToolUse, Stop, SessionStart, etc.)\n2. Decide which event the check belongs at\n3. Write hook configuration in `com.deepseek.harness\u002Fhooks\u002Fhooks.json`\n4. For command hooks, create hook scripts\n5. Use ${PLUGIN_ROOT} for all file references\n6. Validate configuration with `scripts\u002Fvalidate-hook-schema.sh com.deepseek.harness\u002Fhooks\u002Fhooks.json`\n7. Test hooks with `scripts\u002Ftest-hook.sh` before deployment\n8. Test in DeepSeek Harness with `dsh --debug`\n9. Document hooks in plugin README\n\nCommand hooks are the supported type here. Keep them deterministic, fast, and free of side effects.\n",{"name":5,"description":7},"main","8279d7eebf12240ce77d350399cef4923e1338b5","plugins\u002Fplugin-dev\u002Fskills\u002Fhook-development",2,"https:\u002F\u002Fgithub.com\u002FSivan757\u002Fdsh-agent-plugins-market","https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fdsh-agent-plugins-market","https:\u002F\u002Fgithub.com\u002FSivan757","It seems like everything is getting better.","2026-11-14 02:00:01",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add Sivan757\u002Fdsh-agent-plugins-market --skill hook-development",{"tool":38,"command":39},"bunx","bunx skills add Sivan757\u002Fdsh-agent-plugins-market --skill hook-development",{"tool":41,"command":42},"pnpm","pnpm dlx skills add Sivan757\u002Fdsh-agent-plugins-market --skill hook-development","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FSivan757\u002Fdsh-agent-plugins-market\u002Fblob\u002Fmain\u002Fplugins\u002Fplugin-dev\u002Fskills\u002Fhook-development\u002FSKILL.md",true,[46,52,56,60,66,70,74,78,82,86],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"examples\u002Fload-context.sh","SCRIPT","脚本",1654,"https:\u002F\u002Fgithub.com\u002FSivan757\u002Fdsh-agent-plugins-market\u002Fblob\u002Fmain\u002Fplugins\u002Fplugin-dev\u002Fskills\u002Fhook-development\u002Fexamples\u002Fload-context.sh",{"path":53,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":54,"sourceHtmlUrl":55},"examples\u002Fvalidate-bash.sh",1304,"https:\u002F\u002Fgithub.com\u002FSivan757\u002Fdsh-agent-plugins-market\u002Fblob\u002Fmain\u002Fplugins\u002Fplugin-dev\u002Fskills\u002Fhook-development\u002Fexamples\u002Fvalidate-bash.sh",{"path":57,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":58,"sourceHtmlUrl":59},"examples\u002Fvalidate-write.sh",1222,"https:\u002F\u002Fgithub.com\u002FSivan757\u002Fdsh-agent-plugins-market\u002Fblob\u002Fmain\u002Fplugins\u002Fplugin-dev\u002Fskills\u002Fhook-development\u002Fexamples\u002Fvalidate-write.sh",{"path":61,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":64,"sourceHtmlUrl":65},"references\u002Fadvanced.md","REFERENCE","参考文档",9894,"https:\u002F\u002Fgithub.com\u002FSivan757\u002Fdsh-agent-plugins-market\u002Fblob\u002Fmain\u002Fplugins\u002Fplugin-dev\u002Fskills\u002Fhook-development\u002Freferences\u002Fadvanced.md",{"path":67,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":68,"sourceHtmlUrl":69},"references\u002Fmigration.md",7636,"https:\u002F\u002Fgithub.com\u002FSivan757\u002Fdsh-agent-plugins-market\u002Fblob\u002Fmain\u002Fplugins\u002Fplugin-dev\u002Fskills\u002Fhook-development\u002Freferences\u002Fmigration.md",{"path":71,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":72,"sourceHtmlUrl":73},"references\u002Fpatterns.md",6278,"https:\u002F\u002Fgithub.com\u002FSivan757\u002Fdsh-agent-plugins-market\u002Fblob\u002Fmain\u002Fplugins\u002Fplugin-dev\u002Fskills\u002Fhook-development\u002Freferences\u002Fpatterns.md",{"path":75,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":76,"sourceHtmlUrl":77},"scripts\u002Fhook-linter.sh",4166,"https:\u002F\u002Fgithub.com\u002FSivan757\u002Fdsh-agent-plugins-market\u002Fblob\u002Fmain\u002Fplugins\u002Fplugin-dev\u002Fskills\u002Fhook-development\u002Fscripts\u002Fhook-linter.sh",{"path":79,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":80,"sourceHtmlUrl":81},"scripts\u002FREADME.md",3730,"https:\u002F\u002Fgithub.com\u002FSivan757\u002Fdsh-agent-plugins-market\u002Fblob\u002Fmain\u002Fplugins\u002Fplugin-dev\u002Fskills\u002Fhook-development\u002Fscripts\u002FREADME.md",{"path":83,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":84,"sourceHtmlUrl":85},"scripts\u002Ftest-hook.sh",5275,"https:\u002F\u002Fgithub.com\u002FSivan757\u002Fdsh-agent-plugins-market\u002Fblob\u002Fmain\u002Fplugins\u002Fplugin-dev\u002Fskills\u002Fhook-development\u002Fscripts\u002Ftest-hook.sh",{"path":87,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":88,"sourceHtmlUrl":89},"scripts\u002Fvalidate-hook-schema.sh",4354,"https:\u002F\u002Fgithub.com\u002FSivan757\u002Fdsh-agent-plugins-market\u002Fblob\u002Fmain\u002Fplugins\u002Fplugin-dev\u002Fskills\u002Fhook-development\u002Fscripts\u002Fvalidate-hook-schema.sh",[91,98,105,113,120,127],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":18},"01M7ATFYMAYZDJENQA7NK1DS6Q","verify","Verify that a code change actually does what it's supposed to by running the app and observing behavior. Use when asked to verify a PR, confirm a fix works, test a change manually, check that a feature works, or validate local changes before pushing.","https:\u002F\u002Fgithub.com\u002FSivan757\u002Fdsh-agent-plugins-market\u002Fblob\u002Fmain\u002Fplugins\u002Ftoolkit\u002Fskills\u002Fverify\u002FSKILL.md",[],[],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":18},"01M7ATFVE6NHZ1J2R2DJF07GCD","simplify","Review changed code for reuse, quality, and efficiency, then fix any issues found. Use when the user asks to \"simplify the code\", \"clean up the diff\", \"reduce duplication in my changes\", or after finishing a feature before committing.","https:\u002F\u002Fgithub.com\u002FSivan757\u002Fdsh-agent-plugins-market\u002Fblob\u002Fmain\u002Fplugins\u002Ftoolkit\u002Fskills\u002Fsimplify\u002FSKILL.md",[],[],{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":109,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":18},"01M7ATFR42EZW03GMFJ9C5ZXW7","insight","Analyze this machine's DeepSeek Harness session history and report how sessions actually go — operating style, what works, friction points, and what to try next. Use when the user asks \"how have I been using this\", \"analyze my sessions\", \"make an insight report\", or wants a retrospective.","https:\u002F\u002Fgithub.com\u002FSivan757\u002Fdsh-agent-plugins-market\u002Fblob\u002Fmain\u002Fplugins\u002Ftoolkit\u002Fskills\u002Finsight\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FSivan757\u002Fdsh-agent-plugins-market\u002Fblob\u002Fmain\u002Fplugins\u002Ftoolkit\u002Fskills\u002Finsight\u002FSKILL.md",[],[],{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":117,"categories":118,"keywords":119,"publishedAt":18},"01M7ATFHC1A2XTHYYFYCEBFDPA","init","Set up a minimal AGENTS.md (and optionally skills and hooks) for this repo. Use when the user asks to \"initialize the project\", \"generate AGENTS.md\", \"set up project instructions\", or runs \u002Finit.","https:\u002F\u002Fgithub.com\u002FSivan757\u002Fdsh-agent-plugins-market\u002Fblob\u002Fmain\u002Fplugins\u002Ftoolkit\u002Fskills\u002Finit\u002FSKILL.md",[],[],{"skillNo":121,"name":122,"nameZh":6,"description":123,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":124,"categories":125,"keywords":126,"publishedAt":18},"01M7ATFCNSJKCZG98P0N2CX15J","explore","Fast read-only codebase exploration that returns a report instead of filling the main context. Use when the user asks to \"explore the codebase\", \"find where X is handled\", \"how does Y work\", or when a search would take many reads to answer.","https:\u002F\u002Fgithub.com\u002FSivan757\u002Fdsh-agent-plugins-market\u002Fblob\u002Fmain\u002Fplugins\u002Ftoolkit\u002Fskills\u002Fexplore\u002FSKILL.md",[],[],{"skillNo":128,"name":129,"nameZh":6,"description":130,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":131,"categories":132,"keywords":133,"publishedAt":18},"01M7ATF7X3WV2XSAB8X0GY7XHA","automation-recommender","Analyze a codebase and recommend DeepSeek Harness automations (hooks, subagents, skills, plugins, MCP servers). Use when user asks for automation recommendations, wants to optimize their DeepSeek Harness setup, mentions improving DeepSeek Harness workflows, asks how to first set up DeepSeek Harness for a project, or wants to know what DeepSeek Harness features they should use.","https:\u002F\u002Fgithub.com\u002FSivan757\u002Fdsh-agent-plugins-market\u002Fblob\u002Fmain\u002Fplugins\u002Ftoolkit\u002Fskills\u002Fautomation-recommender\u002FSKILL.md",[],[]]