Auto-Sync <instructions Mode Detection EXECUTE using Bash tool (args: ): Parse output: . If exit code non-zero → report error, EXIT. | Mode | Trigger | Scope | |------|---------|-------| | STATUS | | Report INDEX state → EXIT | | INIT | | Tag file + add to INDEX → EXIT | | GLOBAL | | (excludes managed dirs) | | PROJECT | empty | (excludes managed dirs) | | FILE | file path | Single file | | FOLDER | folder path | All .md in folder | Managed directories (excluded from auto-scan, explicit path required): - — sync via - — sync via - — sync via INDEX Format | Field | Description | |-------|------…

; then\n echo \"FILE|$CLEAN_ARGS|$FLAGS\"\n exit 0\nfi\n\n# Check if it's a folder path\nif [ -d \"$CLEAN_ARGS\" ]; then\n echo \"FOLDER|$CLEAN_ARGS|$FLAGS\"\n exit 0\nfi\n\n# Check if path looks like a folder (contains / but no .md)\nif echo \"$CLEAN_ARGS\" | grep -qE '^[./~]' && ! echo \"$CLEAN_ARGS\" | grep -qE '\\.md

Auto-Sync <instructions Mode Detection EXECUTE using Bash tool (args: ): Parse output: . If exit code non-zero → report error, EXIT. | Mode | Trigger | Scope | |------|---------|-------| | STATUS | | Report INDEX state → EXIT | | INIT | | Tag file + add to INDEX → EXIT | | GLOBAL | | (excludes managed dirs) | | PROJECT | empty | (excludes managed dirs) | | FILE | file path | Single file | | FOLDER | folder path | All .md in folder | Managed directories (excluded from auto-scan, explicit path required): - — sync via - — sync via - — sync via INDEX Format | Field | Description | |-------|------…

; then\n echo \"FOLDER|$CLEAN_ARGS|$FLAGS\"\n exit 0\nfi\n\n# Default: treat as PROJECT mode with the args as context\necho \"WARN: unrecognized argument '$CLEAN_ARGS', defaulting to PROJECT mode\" >&2\necho \"PROJECT|$CLEAN_ARGS|$FLAGS\"\n","content_type":"application/x-sh; charset=utf-8","language":"bash","size":2319,"content_sha256":"5dc79f6ffbd357d48548034be8283451fee30e7f5c58d224b84e295ff9aebba8"},{"filename":"scripts/discover.sh","content":"#!/bin/sh\n# Discovers files with auto-sync enabled\n# Usage: discover.sh [search_path] [output_format]\n# search_path - Directory to search (default: .)\n# output_format - paths (default) | json | typed\n\nset -e\n\nSEARCH_PATH=\"${1:-.}\"\nOUTPUT_FORMAT=\"${2:-paths}\"\nMAX_FILES=\"${MAX_FILES:-50}\"\n\n# Explicit path detection: if path contains rules/, agents/, skills/ - user explicitly requested it\nis_explicit_managed_path() {\n case \"$SEARCH_PATH\" in\n */rules|*/rules/*|*/agents|*/agents/*|*/skills|*/skills/*) return 0 ;;\n *) return 1 ;;\n esac\n}\n\n# Build exclusion args for managed directories (only when auto-scanning)\nbuild_exclusions() {\n if is_explicit_managed_path; then\n echo \"\" # No exclusions for explicit paths\n else\n # Exclude rules/, agents/, skills/ from auto-scan (only by explicit request)\n echo \"-not -path */rules/* -not -path */agents/* -not -path */skills/*\"\n fi\n}\n\n# Find files with auto-sync: enabled (YAML frontmatter only)\nfind_autosync_files() {\n _exclusions=$(build_exclusions)\n # shellcheck disable=SC2086\n _all=$(find \"$SEARCH_PATH\" -name \"*.md\" \\\n -not -path '*/.git/*' \\\n -not -path '*/node_modules/*' \\\n -not -path '*/.claude/tasks/*' \\\n $_exclusions \\\n -exec grep -lE '^auto-sync:[[:space:]]*enabled' {} + \\\n 2>/dev/null | sort -u || true)\n _count=$(echo \"$_all\" | grep -c . || true)\n if [ \"$_count\" -gt \"$MAX_FILES\" ]; then\n echo \"WARN: found $_count files, capped to $MAX_FILES (set MAX_FILES to override)\" >&2\n echo \"$_all\" | head -n \"$MAX_FILES\"\n else\n echo \"$_all\"\n fi\n}\n\n# Detect type from file path\ndetect_type() {\n _path=\"$1\"\n _base=$(basename \"$_path\")\n\n if [ \"$_base\" = \"CLAUDE.md\" ]; then\n echo \"config\"\n elif echo \"$_path\" | grep -qE '(^|/)skills/'; then\n echo \"skill\"\n elif echo \"$_path\" | grep -qE '(^|/)agents/'; then\n echo \"agent\"\n elif echo \"$_path\" | grep -qE '(^|/)rules/'; then\n echo \"rule\"\n else\n echo \"doc\"\n fi\n}\n\n# Output as paths (one per line)\noutput_paths() {\n find_autosync_files\n}\n\n# Output as JSON array\noutput_json() {\n FILES=$(find_autosync_files)\n if [ -z \"$FILES\" ]; then\n echo \"[]\"\n return\n fi\n echo \"[\"\n echo \"$FILES\" | sed 's/.*/ \"&\"/' | sed '$!s/$/,/'\n echo \"]\"\n}\n\n# Output as typed (TYPE|PATH per line)\noutput_typed() {\n FILES=$(find_autosync_files)\n if [ -z \"$FILES\" ]; then\n return\n fi\n echo \"$FILES\" | while IFS= read -r file; do\n _type=$(detect_type \"$file\")\n echo \"${_type}|${file}\"\n done\n}\n\n# Main\ncase \"$OUTPUT_FORMAT\" in\n paths)\n output_paths\n ;;\n json)\n output_json\n ;;\n typed)\n output_typed\n ;;\n *)\n echo \"Usage: discover.sh [search_path] [output_format]\" >&2\n echo \" search_path - Directory to search (default: .)\" >&2\n echo \" output_format - paths (default) | json | typed\" >&2\n exit 1\n ;;\nesac\n","content_type":"application/x-sh; charset=utf-8","language":"bash","size":2820,"content_sha256":"4aaad1e719fd141419a5b1d5c9c8e8621f624fb6d043ab3cfb5537832bd2b488"},{"filename":"scripts/index-ops.sh","content":"#!/bin/sh\n# INDEX operations for auto-sync\n# Usage: index-ops.sh \u003ccommand> [args...]\n#\n# Format: {\"p\":\"path\",\"t\":\"type\",\"u\":\"YYYY-MM-DD\",\"pr\":\"default\"}\n# p = relative path (identity key)\n# t = type (skill/agent/rule/config/doc)\n# u = last sync date (YYYY-MM-DD)\n# pr = protocol (\"default\" or \"override\")\n#\n# Commands:\n# read \u003cindex_path> - Read and validate INDEX\n# add \u003cindex_path> \u003cjson_entry> - Add entry from JSON\n# add \u003cindex_path> \u003cpath> \u003ctype> [protocol] - Add entry from positional args (date=today)\n# update \u003cindex_path> \u003cpath> \u003cfield> \u003cval> - Update entry field by path\n# remove \u003cindex_path> \u003cpath> - Remove entry by path\n# stale \u003cindex_path> [days] - Find stale entries (default: 7)\n\nset -e\n\nCMD=\"${1:-help}\"\nshift 2>/dev/null || true\n\nrequire_jq() {\n if ! command -v jq >/dev/null 2>&1; then\n echo \"X jq is required but not installed\" >&2\n echo \" Install: brew install jq\" >&2\n exit 1\n fi\n}\n\nthreshold_date() {\n days=\"$1\"\n if date -v-1d +%Y-%m-%d >/dev/null 2>&1; then\n date -v-\"${days}\"d +%Y-%m-%d\n else\n date -d \"-${days} days\" +%Y-%m-%d\n fi\n}\n\ncmd_read() {\n index_path=\"${1:-}\"\n if [ -z \"$index_path\" ]; then\n echo \"X Missing index_path\" >&2\n echo \"Usage: index-ops.sh read \u003cindex_path>\" >&2\n exit 1\n fi\n if [ ! -f \"$index_path\" ]; then\n echo \"X INDEX not found: $index_path\" >&2\n exit 1\n fi\n require_jq\n grep -v \"^#\" \"$index_path\" | while IFS= read -r line; do\n if [ -n \"$line\" ]; then\n echo \"$line\" | jq -c '.' 2>/dev/null || echo \"X Invalid JSON: $line\" >&2\n fi\n done\n}\n\ncmd_add() {\n index_path=\"${1:-}\"\n arg2=\"${2:-}\"\n arg3=\"${3:-}\"\n arg4=\"${4:-default}\"\n if [ -z \"$index_path\" ] || [ -z \"$arg2\" ]; then\n echo \"X Missing arguments\" >&2\n echo \"Usage: index-ops.sh add \u003cindex_path> \u003cjson_entry>\" >&2\n echo \" index-ops.sh add \u003cindex_path> \u003cpath> \u003ctype> [protocol]\" >&2\n exit 1\n fi\n require_jq\n # Detect format: JSON (starts with {) or positional args\n case \"$arg2\" in\n \\{*)\n # JSON format\n entry=\"$arg2\"\n if ! echo \"$entry\" | jq -e '.' >/dev/null 2>&1; then\n echo \"X Invalid JSON entry\" >&2\n exit 1\n fi\n ;;\n *)\n # Positional format: \u003cpath> \u003ctype> [protocol]\n if [ -z \"$arg3\" ]; then\n echo \"X Missing type argument\" >&2\n echo \"Usage: index-ops.sh add \u003cindex_path> \u003cpath> \u003ctype> [protocol]\" >&2\n exit 1\n fi\n today=$(date +%Y-%m-%d)\n entry=$(jq -nc --arg p \"$arg2\" --arg t \"$arg3\" --arg u \"$today\" --arg pr \"$arg4\" \\\n '{p:$p, t:$t, u:$u, pr:$pr}')\n ;;\n esac\n path=$(echo \"$entry\" | jq -r '.p')\n if [ -f \"$index_path\" ] && grep -v \"^#\" \"$index_path\" 2>/dev/null | jq -r '.p' 2>/dev/null | grep -qxF \"$path\"; then\n echo \"X Entry already exists: $path\" >&2\n echo \" Use 'update' to modify existing entries\" >&2\n exit 1\n fi\n echo \"$entry\" >> \"$index_path\"\n echo \"V Added: $path\"\n}\n\ncmd_update() {\n # NOTE: read-modify-write is NOT atomic. Callers must invoke sequentially (SKILL.md guarantees this).\n index_path=\"${1:-}\"\n path=\"${2:-}\"\n field=\"${3:-}\"\n value=\"${4:-}\"\n if [ -z \"$index_path\" ] || [ -z \"$path\" ] || [ -z \"$field\" ] || [ -z \"$value\" ]; then\n echo \"X Missing arguments\" >&2\n echo \"Usage: index-ops.sh update \u003cindex_path> \u003cpath> \u003cfield> \u003cvalue>\" >&2\n exit 1\n fi\n case \"$field\" in\n p|t|u|pr) ;;\n *) echo \"X Invalid field: $field (allowed: p, t, u, pr)\" >&2; exit 1 ;;\n esac\n require_jq\n tmp_file=$(mktemp)\n trap 'rm -f \"$tmp_file\"' EXIT\n found=false\n while IFS= read -r line; do\n case \"$line\" in\n \\#*) echo \"$line\" ;;\n \"\") ;; # Empty lines dropped intentionally — JSONL has no empty-line semantics\n *)\n entry_path=$(echo \"$line\" | jq -r '.p' 2>/dev/null)\n if [ \"$entry_path\" = \"$path\" ]; then\n echo \"$line\" | jq -c --arg v \"$value\" \".${field} = \\$v\"\n found=true\n else\n echo \"$line\"\n fi\n ;;\n esac\n done \u003c \"$index_path\" > \"$tmp_file\"\n if [ \"$found\" = true ]; then\n mv \"$tmp_file\" \"$index_path\"\n echo \"V Updated: $path.$field = $value\"\n else\n rm \"$tmp_file\"\n echo \"X Entry not found: $path\" >&2\n exit 1\n fi\n}\n\ncmd_remove() {\n index_path=\"${1:-}\"\n path=\"${2:-}\"\n if [ -z \"$index_path\" ] || [ -z \"$path\" ]; then\n echo \"X Missing arguments\" >&2\n echo \"Usage: index-ops.sh remove \u003cindex_path> \u003cpath>\" >&2\n exit 1\n fi\n require_jq\n tmp_file=$(mktemp)\n trap 'rm -f \"$tmp_file\"' EXIT\n found=false\n while IFS= read -r line; do\n case \"$line\" in\n \\#*) echo \"$line\" ;;\n \"\") ;; # Empty lines dropped intentionally — JSONL has no empty-line semantics\n *)\n entry_path=$(echo \"$line\" | jq -r '.p' 2>/dev/null)\n if [ \"$entry_path\" = \"$path\" ]; then\n found=true\n else\n echo \"$line\"\n fi\n ;;\n esac\n done \u003c \"$index_path\" > \"$tmp_file\"\n if [ \"$found\" = true ]; then\n mv \"$tmp_file\" \"$index_path\"\n echo \"V Removed: $path\"\n else\n rm \"$tmp_file\"\n echo \"X Entry not found: $path\" >&2\n exit 1\n fi\n}\n\ncmd_stale() {\n index_path=\"${1:-}\"\n days=\"${2:-7}\"\n if [ -z \"$index_path\" ]; then\n echo \"X Missing index_path\" >&2\n echo \"Usage: index-ops.sh stale \u003cindex_path> [days]\" >&2\n exit 1\n fi\n case \"$days\" in\n ''|*[!0-9]*) echo \"X days must be a positive integer, got: $days\" >&2; exit 1 ;;\n 0) echo \"X days must be > 0, got: 0\" >&2; exit 1 ;;\n esac\n if [ ! -f \"$index_path\" ]; then\n echo \"X INDEX not found: $index_path\" >&2\n exit 1\n fi\n require_jq\n cutoff=$(threshold_date \"$days\")\n grep -v \"^#\" \"$index_path\" 2>/dev/null | while IFS= read -r line; do\n if [ -n \"$line\" ]; then\n entry_date=$(echo \"$line\" | jq -r '.u // empty' 2>/dev/null)\n if [ -z \"$entry_date\" ]; then\n echo \"$line\"\n elif expr \"$entry_date\" \\\u003c \"$cutoff\" > /dev/null 2>&1; then\n echo \"$line\"\n fi\n fi\n done\n}\n\ncmd_help() {\n echo \"INDEX operations for auto-sync\"\n echo \"\"\n echo \"Usage: index-ops.sh \u003ccommand> [args...]\"\n echo \"\"\n echo \"Format: {\\\"p\\\":\\\"path\\\",\\\"t\\\":\\\"type\\\",\\\"u\\\":\\\"YYYY-MM-DD\\\",\\\"pr\\\":\\\"default\\\"}\"\n echo \"\"\n echo \"Commands:\"\n echo \" read \u003cindex_path> - Read and validate INDEX\"\n echo \" add \u003cindex_path> \u003cjson_entry> - Add entry from JSON\"\n echo \" add \u003cindex_path> \u003cpath> \u003ctype> [protocol] - Add entry (date=today, protocol=default)\"\n echo \" update \u003cindex_path> \u003cpath> \u003cfield> \u003cval> - Update entry field by path\"\n echo \" remove \u003cindex_path> \u003cpath> - Remove entry by path\"\n echo \" stale \u003cindex_path> [days] - Find stale entries (default: 7)\"\n echo \"\"\n echo \"Examples:\"\n echo \" index-ops.sh add idx.jsonl '{\\\"p\\\":\\\"file.md\\\",\\\"t\\\":\\\"doc\\\",\\\"u\\\":\\\"2026-02-11\\\",\\\"pr\\\":\\\"default\\\"}'\"\n echo \" index-ops.sh add idx.jsonl file.md doc\"\n echo \" index-ops.sh add idx.jsonl file.md skill override\"\n}\n\ncase \"$CMD\" in\n read) cmd_read \"$@\" ;;\n add) cmd_add \"$@\" ;;\n update) cmd_update \"$@\" ;;\n remove) cmd_remove \"$@\" ;;\n stale) cmd_stale \"$@\" ;;\n help|--help|-h)\n cmd_help\n ;;\n *)\n echo \"X Unknown command: $CMD\" >&2\n cmd_help >&2\n exit 1\n ;;\nesac\n","content_type":"application/x-sh; charset=utf-8","language":"bash","size":7243,"content_sha256":"c4c29e76e25e3b5841a321abf43af30294fe81855fd39a108c554c22128f07e0"}],"content_json":{"type":"doc","content":[{"type":"heading","attrs":{"level":1},"content":[{"text":"Auto-Sync","type":"text"}]},{"type":"paragraph","content":[{"text":"\u003cinstructions>","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Mode Detection","type":"text"}]},{"type":"paragraph","content":[{"text":"EXECUTE","type":"text","marks":[{"type":"strong"}]},{"text":" using Bash tool (args: ","type":"text"},{"text":"$ARGUMENTS","type":"text","marks":[{"type":"code_inline"}]},{"text":"):","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"bash \"${CLAUDE_SKILL_DIR}/scripts/detect-mode.sh\" $ARGUMENTS","type":"text"}]},{"type":"paragraph","content":[{"text":"Parse output: ","type":"text"},{"text":"MODE|ARG|FLAGS","type":"text","marks":[{"type":"code_inline"}]},{"text":". If exit code non-zero → report error, EXIT.","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Mode","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Trigger","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Scope","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"STATUS","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"status","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Report INDEX state → EXIT","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"INIT","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"init \u003cpath>","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Tag file + add to INDEX → EXIT","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"GLOBAL","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"global","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"~/.claude/**","type":"text","marks":[{"type":"code_inline"}]},{"text":" (excludes managed dirs)","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"PROJECT","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"empty","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":".claude/**","type":"text","marks":[{"type":"code_inline"}]},{"text":" (excludes managed dirs)","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"FILE","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"file path","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Single file","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"FOLDER","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"folder path","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"All .md in folder","type":"text"}]}]}]}]},{"type":"paragraph","content":[{"text":"Managed directories","type":"text","marks":[{"type":"strong"}]},{"text":" (excluded from auto-scan, explicit path required):","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"rules/","type":"text","marks":[{"type":"code_inline"}]},{"text":" — sync via ","type":"text"},{"text":"/brewdoc:auto-sync .claude/rules","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"agents/","type":"text","marks":[{"type":"code_inline"}]},{"text":" — sync via ","type":"text"},{"text":"/brewdoc:auto-sync .claude/agents","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"skills/","type":"text","marks":[{"type":"code_inline"}]},{"text":" — sync via ","type":"text"},{"text":"/brewdoc:auto-sync .claude/skills","type":"text","marks":[{"type":"code_inline"}]}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"INDEX Format","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"jsonl"},"content":[{"text":"{\"p\":\"skills/auth/SKILL.md\",\"t\":\"skill\",\"u\":\"2026-02-05\",\"pr\":\"default\"}","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Field","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Description","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"p","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Relative path","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"t","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Type: ","type":"text"},{"text":"skill","type":"text","marks":[{"type":"code_inline"}]},{"text":"/","type":"text"},{"text":"agent","type":"text","marks":[{"type":"code_inline"}]},{"text":"/","type":"text"},{"text":"rule","type":"text","marks":[{"type":"code_inline"}]},{"text":"/","type":"text"},{"text":"config","type":"text","marks":[{"type":"code_inline"}]},{"text":"/","type":"text"},{"text":"doc","type":"text","marks":[{"type":"code_inline"}]}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"u","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Last sync date (YYYY-MM-DD)","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"pr","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Protocol: ","type":"text"},{"text":"default","type":"text","marks":[{"type":"code_inline"}]},{"text":"/","type":"text"},{"text":"override","type":"text","marks":[{"type":"code_inline"}]}]}]}]}]},{"type":"paragraph","content":[{"text":"Paths:","type":"text","marks":[{"type":"strong"}]},{"text":" Project ","type":"text"},{"text":".claude/auto-sync/INDEX.jsonl","type":"text","marks":[{"type":"code_inline"}]},{"text":" (primary) | Global ","type":"text"},{"text":"${BD_PLUGIN_DATA}/auto-sync/INDEX.jsonl","type":"text","marks":[{"type":"code_inline"}]},{"text":" (plugin data dir — used for GLOBAL mode because ","type":"text"},{"text":"~/.claude/*","type":"text","marks":[{"type":"code_inline"}]},{"text":" is blocked by protected-path policy)","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Frontmatter Fields","type":"text"}]},{"type":"paragraph","content":[{"text":"Required (3):","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"yaml"},"content":[{"text":"auto-sync: enabled\nauto-sync-date: 2026-02-05\nauto-sync-type: skill","type":"text"}]},{"type":"paragraph","content":[{"text":"Optional override (multiline YAML):","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"yaml"},"content":[{"text":"auto-sync-override: |\n sources: src/**/*.ts, .claude/agents/*.md\n focus: API endpoints, error handling\n preserve: ## User Notes, ## Custom Config","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Override Field","type":"text"}]},{"type":"paragraph","content":[{"text":"When ","type":"text"},{"text":"auto-sync-override:","type":"text","marks":[{"type":"code_inline"}]},{"text":" present in frontmatter → INDEX gets ","type":"text"},{"text":"pr: \"override\"","type":"text","marks":[{"type":"code_inline"}]},{"text":".","type":"text"}]},{"type":"paragraph","content":[{"text":"Stored in frontmatter only — ","type":"text"},{"text":"never in document body","type":"text","marks":[{"type":"strong"}]},{"text":".","type":"text"}]},{"type":"paragraph","content":[{"text":"\u003c/instructions>","type":"text"}]},{"type":"paragraph","content":[{"text":"\u003cphase name=\"status\">","type":"text"}]},{"type":"ordered_list","attrs":{"order":1,"listStyle":"number"},"content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Read INDEX.jsonl, verify indexed files exist","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Find all ","type":"text"},{"text":".md","type":"text","marks":[{"type":"code_inline"}]},{"text":" files in scope","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Compare indexed vs found → identify non-indexed","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Detect type for non-indexed (","type":"text"},{"text":"discover.sh typed","type":"text","marks":[{"type":"code_inline"}]},{"text":") — output: ","type":"text"},{"text":"TYPE|PATH","type":"text","marks":[{"type":"code_inline"}]},{"text":" per line","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Output report: Indexed (path, type, protocol, last sync, stale), Non-Indexed (path, detected type, reason), Summary (counts)","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"EXIT","type":"text"}]}]}]},{"type":"paragraph","content":[{"text":"\u003c/phase>","type":"text"}]},{"type":"paragraph","content":[{"text":"\u003cphase name=\"init\">","type":"text"}]},{"type":"paragraph","content":[{"text":"Input: ","type":"text"},{"text":"init \u003cpath>","type":"text","marks":[{"type":"code_inline"}]}]},{"type":"ordered_list","attrs":{"order":1,"listStyle":"number"},"content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Read ","type":"text"},{"text":"\u003cpath>","type":"text","marks":[{"type":"code_inline"}]},{"text":" — if NOT found → error, EXIT","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"If has ","type":"text"},{"text":"auto-sync: enabled","type":"text","marks":[{"type":"code_inline"}]},{"text":" → \"Already tagged\", EXIT","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Detect type via discover.sh","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Add frontmatter: ","type":"text"},{"text":"auto-sync: enabled","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"auto-sync-date: {today}","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"auto-sync-type: {type}","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Check frontmatter ","type":"text"},{"text":"auto-sync-override:","type":"text","marks":[{"type":"code_inline"}]},{"text":" → set ","type":"text"},{"text":"pr: override|default","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Add to INDEX.jsonl","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Output: path, type, protocol; EXIT","type":"text"}]}]}]},{"type":"paragraph","content":[{"text":"\u003c/phase>","type":"text"}]},{"type":"paragraph","content":[{"text":"\u003cphase name=\"sync\">","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Sync Mode (PROJECT/GLOBAL/FILE/FOLDER)","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Phase 1: Setup INDEX","type":"text"}]},{"type":"paragraph","content":[{"text":"EXECUTE","type":"text","marks":[{"type":"strong"}]},{"text":" using Bash tool:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"SCOPE=\"project\" # or \"global\"\n# Primary: project-relative .claude/auto-sync/ (required — ~/.claude/* is\n# blocked by Claude Code's protected-path policy in headless sessions).\nINDEX_DIR=\".claude/auto-sync\"\nif [ \"$SCOPE\" = \"global\" ]; then\n # GLOBAL mode scans ~/.claude/** (read-only) but writes its INDEX to\n # the plugin data dir, NOT to ~/.claude/auto-sync (blocked path).\n INDEX_DIR=\"${BD_PLUGIN_DATA:-$HOME/.claude/brewdoc}/auto-sync\"\nfi\nmkdir -p \"$INDEX_DIR\" && INDEX_FILE=\"$INDEX_DIR/INDEX.jsonl\" && touch \"$INDEX_FILE\"\necho \"INDEX=$INDEX_FILE\"","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Phase 2: Discover + Queue (load config: ","type":"text"},{"text":"INTERVAL_DAYS","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"PARALLEL_AGENTS","type":"text","marks":[{"type":"code_inline"}]},{"text":" from ","type":"text"},{"text":".claude/tasks/cfg/brewdoc.config.json","type":"text","marks":[{"type":"code_inline"}]},{"text":")","type":"text"}]},{"type":"ordered_list","attrs":{"order":1,"listStyle":"number"},"content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Find tagged files — ","type":"text"},{"text":"EXECUTE","type":"text","marks":[{"type":"strong"}]},{"text":" using Bash tool:","type":"text"}]}]}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"bash \"${CLAUDE_SKILL_DIR}/scripts/discover.sh\" \"$SCOPE_PATH\" typed","type":"text"}]},{"type":"paragraph","content":[{"text":"Output: ","type":"text"},{"text":"TYPE|PATH","type":"text","marks":[{"type":"code_inline"}]},{"text":" per line (types: ","type":"text"},{"text":"skill","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"agent","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"rule","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"config","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"doc","type":"text","marks":[{"type":"code_inline"}]},{"text":"). Capped at ","type":"text"},{"text":"MAX_FILES","type":"text","marks":[{"type":"code_inline"}]},{"text":" (default 50).","type":"text"}]},{"type":"ordered_list","attrs":{"order":2,"listStyle":"number"},"content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"For each file not in INDEX → auto-add:","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Read file, use type from discover output","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"If no frontmatter → add ","type":"text"},{"text":"auto-sync: enabled","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"auto-sync-date","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"auto-sync-type","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Check ","type":"text"},{"text":"\u003cauto-sync-override>","type":"text","marks":[{"type":"code_inline"}]},{"text":" → set ","type":"text"},{"text":"pr","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Add to INDEX (","type":"text"},{"text":"index-ops.sh add","type":"text","marks":[{"type":"code_inline"}]},{"text":")","type":"text"}]}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Find stale entries — ","type":"text"},{"text":"EXECUTE","type":"text","marks":[{"type":"strong"}]},{"text":" using Bash tool:","type":"text"}]}]}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"bash \"${CLAUDE_SKILL_DIR}/scripts/index-ops.sh\" stale \"$INDEX_FILE\" \"$INTERVAL_DAYS\"","type":"text"}]},{"type":"ordered_list","attrs":{"order":4,"listStyle":"number"},"content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Queue: new + stale files","type":"text"}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Phase 3: Process + Report","type":"text"}]},{"type":"ordered_list","attrs":{"order":1,"listStyle":"number"},"content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Launch ","type":"text"},{"text":"bd-auto-sync-processor","type":"text","marks":[{"type":"code_inline"}]},{"text":" agents (max ","type":"text"},{"text":"PARALLEL_AGENTS","type":"text","marks":[{"type":"code_inline"}]},{"text":" batches, model=\"sonnet\"):","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":""},"content":[{"text":"Task(subagent_type=\"brewdoc:bd-auto-sync-processor\",\n prompt=\"PATH: {path} | TYPE: {type} | FLAGS: {flags}\")","type":"text"}]},{"type":"blockquote","content":[{"type":"paragraph","content":[{"text":"Context:","type":"text","marks":[{"type":"strong"}]},{"text":" BD_PLUGIN_ROOT is injected into agent prompt by pre-task.mjs hook.","type":"text"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"For each result:","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"If status = ","type":"text"},{"text":"updated","type":"text","marks":[{"type":"code_inline"}]},{"text":" or ","type":"text"},{"text":"unchanged","type":"text","marks":[{"type":"code_inline"}]},{"text":" → update INDEX ","type":"text"},{"text":"u","type":"text","marks":[{"type":"code_inline"}]},{"text":" to today (","type":"text"},{"text":"index-ops.sh update","type":"text","marks":[{"type":"code_inline"}]},{"text":")","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"If status = ","type":"text"},{"text":"error","type":"text","marks":[{"type":"code_inline"}]},{"text":" → log to Errors table, do NOT update INDEX (file remains stale for retry)","type":"text"}]}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Output report:","type":"text"}]}]}]},{"type":"code_block","attrs":{"wrap":false,"language":"markdown"},"content":[{"text":"## Auto-Sync Complete\n\n| Metric | Count |\n|--------|-------|\n| Discovered | {N} |\n| Queued (stale/new) | {N} |\n| Updated | {N} |\n| Unchanged | {N} |\n| Errors | {N} |\n\n### Updated\n| Path | Type | Changes |\n|------|------|---------|\n\n### Errors\n| Path | Error |\n|------|-------|","type":"text"}]},{"type":"paragraph","content":[{"text":"\u003c/phase>","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Error Handling","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Error","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Action","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"INDEX corrupt","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Rebuild from discovery","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"File not found","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Skip, add to errors","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Agent timeout","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Retry once","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"No tagged files","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Report \"0 found\"","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"/brewdoc:doc","type":"text","marks":[{"type":"code_inline"}]},{"text":" called","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"\"Use /brewdoc:auto-sync\"","type":"text"}]}]}]}]},{"type":"hr","attrs":{"markup":"---"}}]},"metadata":{"date":"2026-06-05","name":"brewdoc:auto-sync","model":"opus","author":"@skillopedia","source":{"stars":27,"repo_name":"claude-brewcode","origin_url":"https://github.com/kochetkov-ma/claude-brewcode/blob/HEAD/brewdoc/skills/auto-sync/SKILL.md","repo_owner":"kochetkov-ma","body_sha256":"b5dd6e8373cc59349515c2c7917215e62f38a7b1196ce35556ae6bfe2dcacef2","cluster_key":"1cc4735aab29bb8947f6662db02c75c2d3e30a241e702caf1028577ac2831233","clean_bundle":{"format":"clean-skill-bundle-v1","source":"kochetkov-ma/claude-brewcode/brewdoc/skills/auto-sync/SKILL.md","attachments":[{"id":"0c31c67c-2619-5681-82ca-9c094a85d4af","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/0c31c67c-2619-5681-82ca-9c094a85d4af/attachment.md","path":"README.md","size":4345,"sha256":"bb51f1a46c292bf7d0efe740c26e10c8524127e33397e4ef9094f700297ff999","contentType":"text/markdown; charset=utf-8"},{"id":"ae18ade5-37fc-5dd8-9ba9-0d7e7745c5f1","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/ae18ade5-37fc-5dd8-9ba9-0d7e7745c5f1/attachment.md","path":"instructions/llm-text-rules.md","size":999,"sha256":"0c8e2ed5abc3e52484639f7d2c8f926dd083eb78fdba445499e3370c866a233b","contentType":"text/markdown; charset=utf-8"},{"id":"a1146e27-8af8-56fe-9cec-7d9bfbfc9330","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/a1146e27-8af8-56fe-9cec-7d9bfbfc9330/attachment.md","path":"instructions/sync-agent.md","size":1340,"sha256":"8429dddad0339c0a444c78de091c4c3451b812b3ec57cb90eff3d07825d1c030","contentType":"text/markdown; charset=utf-8"},{"id":"799a856f-415c-5448-a862-5474a157b4f2","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/799a856f-415c-5448-a862-5474a157b4f2/attachment.md","path":"instructions/sync-config.md","size":1317,"sha256":"70888b8e77b7835dc052180c6e48fb03e498bdc463ee109c3443c671cc12082e","contentType":"text/markdown; charset=utf-8"},{"id":"c96c9a15-ebf4-5fb1-8dff-4b3480679219","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/c96c9a15-ebf4-5fb1-8dff-4b3480679219/attachment.md","path":"instructions/sync-doc.md","size":1295,"sha256":"fcb45150fcef69188946ee189f4dd010a282f5b3b95ddfe33911a7d4fd8d2c67","contentType":"text/markdown; charset=utf-8"},{"id":"7c95449f-efda-57d9-a8d8-217af7176a50","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/7c95449f-efda-57d9-a8d8-217af7176a50/attachment.md","path":"instructions/sync-rule.md","size":1186,"sha256":"d9d11a0d1feb1b0fadbc7d86c7f080db64421e5712b2cf217a7c78dcf67f207f","contentType":"text/markdown; charset=utf-8"},{"id":"422d0fe5-d993-5e44-8dd6-bcfb77161697","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/422d0fe5-d993-5e44-8dd6-bcfb77161697/attachment.md","path":"instructions/sync-skill.md","size":1334,"sha256":"2279f3997da889d420f035e149d6cf213df61ad1100524c557bfe6c966af7620","contentType":"text/markdown; charset=utf-8"},{"id":"bd84b47e-a9d8-517b-b415-0d5d04f3f6de","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/bd84b47e-a9d8-517b-b415-0d5d04f3f6de/attachment.sh","path":"scripts/detect-mode.sh","size":2319,"sha256":"5dc79f6ffbd357d48548034be8283451fee30e7f5c58d224b84e295ff9aebba8","contentType":"application/x-sh; charset=utf-8"},{"id":"32b1a836-af87-55d8-8379-4356d3bd322a","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/32b1a836-af87-55d8-8379-4356d3bd322a/attachment.sh","path":"scripts/discover.sh","size":2820,"sha256":"4aaad1e719fd141419a5b1d5c9c8e8621f624fb6d043ab3cfb5537832bd2b488","contentType":"application/x-sh; charset=utf-8"},{"id":"221575c7-d4b1-5908-b17c-844b38f26a64","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/221575c7-d4b1-5908-b17c-844b38f26a64/attachment.sh","path":"scripts/index-ops.sh","size":7243,"sha256":"c4c29e76e25e3b5841a321abf43af30294fe81855fd39a108c554c22128f07e0","contentType":"application/x-sh; charset=utf-8"}],"bundle_sha256":"6eb83dbd89e31e879a87f507e2c61d46af01e1b28e05bfdd686e0a2163d5238e","attachment_count":10,"text_attachments":7,"attachment_storage":"skillopedia-attachments-v1","binary_attachments":3,"excluded_attachments":[]},"cluster_size":1,"skill_md_path":"brewdoc/skills/auto-sync/SKILL.md","import_metadata":{"date":"2026-06-05","author":"@skillopedia","version":"v1","category":"testing-qa","category_label":"Testing"},"exact_dupes_collapsed_into_this":0},"version":"v1","category":"testing-qa","auto-sync":"enabled","import_tag":"clean-skills-v1","description":"Universal documentation sync for skills, agents, and markdown files. Pulls latest docs from official sources and updates files in place. Modes: status, init \u003cpath>, global, file, folder. Triggers: sync docs, auto-sync, update documentation, refresh skill docs, sync agent docs, documentation sync, pull latest docs.","allowed-tools":"Read, Write, Edit, Glob, Grep, Bash, Task, WebFetch, Skill","argument-hint":"[status] | [init \u003cpath>] | [global] | [path]","auto-sync-date":"2026-02-11T00:00:00.000Z","auto-sync-type":"skill","user-invocable":true}},"renderedAt":1782979500725}

Auto-Sync <instructions Mode Detection EXECUTE using Bash tool (args: ): Parse output: . If exit code non-zero → report error, EXIT. | Mode | Trigger | Scope | |------|---------|-------| | STATUS | | Report INDEX state → EXIT | | INIT | | Tag file + add to INDEX → EXIT | | GLOBAL | | (excludes managed dirs) | | PROJECT | empty | (excludes managed dirs) | | FILE | file path | Single file | | FOLDER | folder path | All .md in folder | Managed directories (excluded from auto-scan, explicit path required): - — sync via - — sync via - — sync via INDEX Format | Field | Description | |-------|------…