[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M739AQ0GY41MZSD8WH95ZQP9":3,"skill-same:01M739AQ0GY41MZSD8WH95ZQP9":51},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":27,"commitSha":28,"skillDirectory":29,"forksCount":30,"repositoryHtmlUrl":31,"repositoryHomepageUrl":32,"ownerHtmlUrl":33,"ownerBlogUrl":34,"ownerDescription":35,"updatedAt":36,"install":37,"resources":50},"01M739AQ0GY41MZSD8WH95ZQP9","autonomous-patching-loop",null,"Closed-loop scan → isolate → repair → verify cycle. Agent detects code vulnerabilities or test failures, creates an isolated fix branch, applies auto-remediation, runs the full test gate, and merges only on pass. Inspired by darrenburns\u002Fcliche error capture + marionevra\u002Fawesome-ai-agents-security playbooks.","Horonomos-laps\u002FYana-AI","Horonomos-laps","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F355299122?v=4","01M76B3QPXE88ET2SQPDPVATZT"," Horonomos-laps","01M72ZQRJPCYPSSWT4D00VJR2A",13,"MIT","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fautonomous-patching-loop\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: autonomous-patching-loop\ndescription: Closed-loop scan → isolate → repair → verify cycle. Agent detects code vulnerabilities or test failures, creates an isolated fix branch, applies auto-remediation, runs the full test gate, and merges only on pass. Inspired by darrenburns\u002Fcliche error capture + marionevra\u002Fawesome-ai-agents-security playbooks.\norigin: darrenburns\u002Fcliche (MIT) + marionevra\u002Fawesome-ai-agents-security + yamtam feedback-loop.sh\nlicense: MIT\nversion: 1.0.0\ncompatibility: bash, git, any project with test suite\n---\n\n# autonomous-patching-loop\n\n## When to Use\n\n- A test gate fails and the error is deterministic (TypeError, import error, assertion failure)\n- Security scan detects a vulnerability that has a known fix pattern\n- CI returns a stack trace that can be mapped to a specific code location\n- Triggered by: \"auto-fix this\", \"run the patching loop\", \"self-heal\", \"scan and fix\", \"\u002Fsmart-fix with isolation\"\n\n## Do NOT use for\n\n- Ambiguous failures requiring human design judgment (\"make this look better\")\n- Authentication flows, permission changes, or database migrations — require human review\n- Any fix that touches > 5 files (complexity threshold — escalate to human instead)\n- Secrets or credential rotation\n\n---\n\n## 4-Phase Loop Architecture\n\n```\nPhase 1 — SCAN    Detect failure + extract error location\nPhase 2 — ISOLATE Create temporary fix branch (never touch main)\nPhase 3 — REPAIR  Apply targeted code fix\nPhase 4 — VERIFY  Run full test gate → merge on PASS, loop on FAIL\n```\n\n---\n\n## Phase 1: Scan & Error Extraction\n\n```bash\n# Capture stderr + stdout, extract actionable error\nextract_error() {\n  local output=\"$1\"\n  # Extract: file path + line number + error message\n  echo \"$output\" | grep -oE '([^[:space:]]+\\.(ts|js|py|sh)):([0-9]+)' | head -5\n  echo \"$output\" | grep -iE '(Error|Exception|TypeError|SyntaxError|FAIL|AssertionError).*' | head -10\n}\n\n# Run scan and capture\nSCAN_OUTPUT=$(bash core\u002Ftests\u002Fskills\u002Ftest-skill-triggering.sh 2>&1) || {\n  ERRORS=$(extract_error \"$SCAN_OUTPUT\")\n  echo \"SCAN FAILED:\"\n  echo \"$ERRORS\"\n}\n```\n\n---\n\n## Phase 2: Isolate (Temp Fix Branch)\n\n```bash\nisolate() {\n  local issue_id=\"${1:-auto-$(date +%s)}\"\n  local branch=\"fix\u002Ftemp-agent-patch-$issue_id\"\n\n  git stash push -m \"pre-patch stash $issue_id\" 2>\u002Fdev\u002Fnull || true\n  git checkout -b \"$branch\"\n  echo \"$branch\"\n}\n\n# Cleanup on exit\ncleanup_branch() {\n  local branch=\"$1\"\n  local merged=\"${2:-false}\"\n  if [[ \"$merged\" == \"true\" ]]; then\n    git branch -d \"$branch\" 2>\u002Fdev\u002Fnull || true\n  else\n    git checkout - && git branch -D \"$branch\" 2>\u002Fdev\u002Fnull || true\n    git stash pop 2>\u002Fdev\u002Fnull || true\n  fi\n}\n```\n\n---\n\n## Phase 3: Repair (Auto-Apply Fix)\n\n```python\n# Python: error → fix prompt → apply patch\nimport subprocess, re, json\n\ndef extract_fix_target(error_output: str) -> dict:\n    \"\"\"Extract file and line from stack trace.\"\"\"\n    match = re.search(r'([^\\s]+\\.(ts|js|py|sh)):(\\d+)', error_output)\n    if not match:\n        return {}\n    return {\"file\": match.group(1), \"line\": int(match.group(3))}\n\ndef apply_fix(file_path: str, error_msg: str, agent_fn) -> bool:\n    \"\"\"Ask agent to fix the file, return True if file changed.\"\"\"\n    with open(file_path) as f:\n        content = f.read()\n    fixed = agent_fn(f\"Fix this error in {file_path}:\\n{error_msg}\\n\\nFile:\\n{content}\")\n    if fixed and fixed != content:\n        with open(file_path, \"w\") as f:\n            f.write(fixed)\n        return True\n    return False\n```\n\n---\n\n## Phase 4: Verify + Merge Gate\n\n```bash\nMAX_ATTEMPTS=3\n\npatching_loop() {\n  local test_cmd=\"${1:-bash core\u002Ftests\u002Fskills\u002Ftest-skill-triggering.sh}\"\n  local attempt=0\n  local branch\n\n  branch=$(isolate \"auto-$(date +%s)\")\n\n  while [[ $attempt -lt $MAX_ATTEMPTS ]]; do\n    attempt=$((attempt+1))\n    echo \"[patch-loop] Attempt $attempt \u002F $MAX_ATTEMPTS\"\n\n    # Run repair (call agent\u002FAI fixer externally, results applied to files)\n    # ...repair logic here...\n\n    # Verify\n    if $test_cmd 2>&1; then\n      echo \"[patch-loop] PASS — merging fix into current branch\"\n      git add -A\n      git commit -m \"fix(auto-patch): attempt $attempt passed all gates\"\n      git checkout -\n      git merge --no-ff \"$branch\" -m \"merge: auto-patch loop #$attempt\"\n      cleanup_branch \"$branch\" \"true\"\n      bash core\u002Fscripts\u002Fsecure-logger.sh \"auto-patch\" \"PASS attempt=$attempt branch=$branch\"\n      return 0\n    fi\n\n    echo \"[patch-loop] FAIL — retrying...\"\n  done\n\n  echo \"[patch-loop] EXHAUSTED $MAX_ATTEMPTS attempts — escalating to human\"\n  cleanup_branch \"$branch\" \"false\"\n  bash core\u002Fscripts\u002Fsecure-logger.sh \"auto-patch\" \"ESCALATE attempts=$MAX_ATTEMPTS branch=$branch\"\n  return 1\n}\n```\n\n---\n\n## CLI Entry Point\n\n```bash\n# Run the full patching loop against the skill trigger test suite\nbash core\u002Fscripts\u002Ffeedback-loop.sh \"bash core\u002Ftests\u002Fskills\u002Ftest-skill-triggering.sh\" 3\n\n# Or with custom test command\nbash core\u002Fscripts\u002Ffeedback-loop.sh \"npm test\" 5\n```\n\n---\n\n## Escalation Triggers\n\nAgent MUST escalate to human (stop the loop) when:\n\n```\n□ > 3 consecutive FAIL cycles with the same error\n□ Fix touches > 5 files\n□ Error is \"permission denied\" or authentication failure\n□ Error involves a missing external dependency (npm package, env variable)\n□ Stack trace points to generated\u002Fvendor\u002Fnode_modules code\n```\n\n---\n\n## Anti-Fake-Pass Checklist\n\n- [ ] Fix branch created before any edits (never patch directly on main\u002Fcurrent branch)\n- [ ] Full test gate runs after each repair attempt — not just the failing test\n- [ ] Max attempt count enforced (default: 3) — no infinite loops\n- [ ] Every attempt logged via `secure-logger.sh` with attempt number + outcome\n- [ ] Human escalation fires when max attempts exceeded — agent does not silently give up\n- [ ] Branch cleaned up on both success and failure paths\n- [ ] Merge only happens after gate PASS — never on partial pass\n","# autonomous-patching-loop\n\n## When to Use\n\n- A test gate fails and the error is deterministic (TypeError, import error, assertion failure)\n- Security scan detects a vulnerability that has a known fix pattern\n- CI returns a stack trace that can be mapped to a specific code location\n- Triggered by: \"auto-fix this\", \"run the patching loop\", \"self-heal\", \"scan and fix\", \"\u002Fsmart-fix with isolation\"\n\n## Do NOT use for\n\n- Ambiguous failures requiring human design judgment (\"make this look better\")\n- Authentication flows, permission changes, or database migrations — require human review\n- Any fix that touches > 5 files (complexity threshold — escalate to human instead)\n- Secrets or credential rotation\n\n---\n\n## 4-Phase Loop Architecture\n\n```\nPhase 1 — SCAN    Detect failure + extract error location\nPhase 2 — ISOLATE Create temporary fix branch (never touch main)\nPhase 3 — REPAIR  Apply targeted code fix\nPhase 4 — VERIFY  Run full test gate → merge on PASS, loop on FAIL\n```\n\n---\n\n## Phase 1: Scan & Error Extraction\n\n```bash\n# Capture stderr + stdout, extract actionable error\nextract_error() {\n  local output=\"$1\"\n  # Extract: file path + line number + error message\n  echo \"$output\" | grep -oE '([^[:space:]]+\\.(ts|js|py|sh)):([0-9]+)' | head -5\n  echo \"$output\" | grep -iE '(Error|Exception|TypeError|SyntaxError|FAIL|AssertionError).*' | head -10\n}\n\n# Run scan and capture\nSCAN_OUTPUT=$(bash core\u002Ftests\u002Fskills\u002Ftest-skill-triggering.sh 2>&1) || {\n  ERRORS=$(extract_error \"$SCAN_OUTPUT\")\n  echo \"SCAN FAILED:\"\n  echo \"$ERRORS\"\n}\n```\n\n---\n\n## Phase 2: Isolate (Temp Fix Branch)\n\n```bash\nisolate() {\n  local issue_id=\"${1:-auto-$(date +%s)}\"\n  local branch=\"fix\u002Ftemp-agent-patch-$issue_id\"\n\n  git stash push -m \"pre-patch stash $issue_id\" 2>\u002Fdev\u002Fnull || true\n  git checkout -b \"$branch\"\n  echo \"$branch\"\n}\n\n# Cleanup on exit\ncleanup_branch() {\n  local branch=\"$1\"\n  local merged=\"${2:-false}\"\n  if [[ \"$merged\" == \"true\" ]]; then\n    git branch -d \"$branch\" 2>\u002Fdev\u002Fnull || true\n  else\n    git checkout - && git branch -D \"$branch\" 2>\u002Fdev\u002Fnull || true\n    git stash pop 2>\u002Fdev\u002Fnull || true\n  fi\n}\n```\n\n---\n\n## Phase 3: Repair (Auto-Apply Fix)\n\n```python\n# Python: error → fix prompt → apply patch\nimport subprocess, re, json\n\ndef extract_fix_target(error_output: str) -> dict:\n    \"\"\"Extract file and line from stack trace.\"\"\"\n    match = re.search(r'([^\\s]+\\.(ts|js|py|sh)):(\\d+)', error_output)\n    if not match:\n        return {}\n    return {\"file\": match.group(1), \"line\": int(match.group(3))}\n\ndef apply_fix(file_path: str, error_msg: str, agent_fn) -> bool:\n    \"\"\"Ask agent to fix the file, return True if file changed.\"\"\"\n    with open(file_path) as f:\n        content = f.read()\n    fixed = agent_fn(f\"Fix this error in {file_path}:\\n{error_msg}\\n\\nFile:\\n{content}\")\n    if fixed and fixed != content:\n        with open(file_path, \"w\") as f:\n            f.write(fixed)\n        return True\n    return False\n```\n\n---\n\n## Phase 4: Verify + Merge Gate\n\n```bash\nMAX_ATTEMPTS=3\n\npatching_loop() {\n  local test_cmd=\"${1:-bash core\u002Ftests\u002Fskills\u002Ftest-skill-triggering.sh}\"\n  local attempt=0\n  local branch\n\n  branch=$(isolate \"auto-$(date +%s)\")\n\n  while [[ $attempt -lt $MAX_ATTEMPTS ]]; do\n    attempt=$((attempt+1))\n    echo \"[patch-loop] Attempt $attempt \u002F $MAX_ATTEMPTS\"\n\n    # Run repair (call agent\u002FAI fixer externally, results applied to files)\n    # ...repair logic here...\n\n    # Verify\n    if $test_cmd 2>&1; then\n      echo \"[patch-loop] PASS — merging fix into current branch\"\n      git add -A\n      git commit -m \"fix(auto-patch): attempt $attempt passed all gates\"\n      git checkout -\n      git merge --no-ff \"$branch\" -m \"merge: auto-patch loop #$attempt\"\n      cleanup_branch \"$branch\" \"true\"\n      bash core\u002Fscripts\u002Fsecure-logger.sh \"auto-patch\" \"PASS attempt=$attempt branch=$branch\"\n      return 0\n    fi\n\n    echo \"[patch-loop] FAIL — retrying...\"\n  done\n\n  echo \"[patch-loop] EXHAUSTED $MAX_ATTEMPTS attempts — escalating to human\"\n  cleanup_branch \"$branch\" \"false\"\n  bash core\u002Fscripts\u002Fsecure-logger.sh \"auto-patch\" \"ESCALATE attempts=$MAX_ATTEMPTS branch=$branch\"\n  return 1\n}\n```\n\n---\n\n## CLI Entry Point\n\n```bash\n# Run the full patching loop against the skill trigger test suite\nbash core\u002Fscripts\u002Ffeedback-loop.sh \"bash core\u002Ftests\u002Fskills\u002Ftest-skill-triggering.sh\" 3\n\n# Or with custom test command\nbash core\u002Fscripts\u002Ffeedback-loop.sh \"npm test\" 5\n```\n\n---\n\n## Escalation Triggers\n\nAgent MUST escalate to human (stop the loop) when:\n\n```\n□ > 3 consecutive FAIL cycles with the same error\n□ Fix touches > 5 files\n□ Error is \"permission denied\" or authentication failure\n□ Error involves a missing external dependency (npm package, env variable)\n□ Stack trace points to generated\u002Fvendor\u002Fnode_modules code\n```\n\n---\n\n## Anti-Fake-Pass Checklist\n\n- [ ] Fix branch created before any edits (never patch directly on main\u002Fcurrent branch)\n- [ ] Full test gate runs after each repair attempt — not just the failing test\n- [ ] Max attempt count enforced (default: 3) — no infinite loops\n- [ ] Every attempt logged via `secure-logger.sh` with attempt number + outcome\n- [ ] Human escalation fires when max attempts exceeded — agent does not silently give up\n- [ ] Branch cleaned up on both success and failure paths\n- [ ] Merge only happens after gate PASS — never on partial pass\n",{"name":5,"origin":24,"license":15,"version":25,"description":7,"compatibility":26},"darrenburns\u002Fcliche (MIT) + marionevra\u002Fawesome-ai-agents-security + yamtam feedback-loop.sh","1.0.0","bash, git, any project with test suite","main","481dcd7dd2e288b9d627a2bd017db70e64e6c6fa","core\u002Fskills\u002Fautonomous-patching-loop",2,"https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI","https:\u002F\u002Fyana.vutam.link\u002F","https:\u002F\u002Fgithub.com\u002FHoronomos-laps","https:\u002F\u002Fyana.vutam.link","An open-source governed runtime & execution environment for multi-agent AI systems.","2026-11-14 13:24:09",{"source":8,"skillName":5,"commands":38,"prompt":48,"zipAvailable":49},[39,42,45],{"tool":40,"command":41},"npx","npx skills add Horonomos-laps\u002FYana-AI --skill autonomous-patching-loop",{"tool":43,"command":44},"bunx","bunx skills add Horonomos-laps\u002FYana-AI --skill autonomous-patching-loop",{"tool":46,"command":47},"pnpm","pnpm dlx skills add Horonomos-laps\u002FYana-AI --skill autonomous-patching-loop","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fautonomous-patching-loop\u002FSKILL.md",true,[],[52,59,67,75,83,91],{"skillNo":53,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":56,"categories":57,"keywords":58,"publishedAt":19},"01M735GKET5YVYKAY62W2P5YXB","openai--sentry--sentry","Use when the user asks to inspect Sentry issues or events, summarize recent production errors, or pull basic Sentry health data via the Sentry API; perform read-only queries with the bundled script and require `SENTRY_AUTH_TOKEN`.","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fopenai--sentry--sentry\u002FSKILL.md",[],[],{"skillNo":60,"name":61,"nameZh":6,"description":62,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":63,"licenseFileUrl":6,"sourceHtmlUrl":64,"categories":65,"keywords":66,"publishedAt":19},"01M73DCAP83T17HY7SMGK7MGFE","ito-basket-compare","Compare Itô prediction-market baskets against a user's knowledge base, portfolio notes, financial context, watchlist, or research thesis. Use for read-only basket comparison and gap analysis without investment advice or live trading.","Apache-2.0","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fito-basket-compare\u002FSKILL.md",[],[],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":63,"licenseFileUrl":71,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M734CYEMZFDR3KH6SW0JP8TD","implementing-network-traffic-baselining","Build network traffic baselines from NetFlow\u002FIPFIX data using Python pandas for statistical analysis, z-score anomaly detection, and hourly\u002Fdaily traffic pattern profiling","https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fimplementing-network-traffic-baselining\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fimplementing-network-traffic-baselining\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":63,"licenseFileUrl":79,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M73ASZ6NJRJM44Z2P84NGQ3Q","detecting-evasion-techniques-in-endpoint-logs","Detects defense evasion techniques used by adversaries in endpoint logs including log tampering, timestomping, process injection, and security tool disabling. Use when investigating suspicious endpoint behavior, building detection rules for evasion tactics, or conducting threat hunting for stealthy adversary activity. Activates for requests involving evasion detection, defense evasion analysis, log tampering detection, or MITRE ATT&CK TA0005.","https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fdetecting-evasion-techniques-in-endpoint-logs\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002Fcore\u002Fskills\u002Fdetecting-evasion-techniques-in-endpoint-logs\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":63,"licenseFileUrl":87,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M734AFNXD06Z78QRK0VKGT7Q","implementing-microsegmentation-with-guardicore","Implementing microsegmentation using Akamai Guardicore Segmentation to map application dependencies, create granular network policies, visualize east-west traffic flows, and enforce least-privilege communication between workloads across data centers and cloud.","https:\u002F\u002Fgithub.com\u002Fyanacuti1121\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fimplementing-microsegmentation-with-guardicore\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fimplementing-microsegmentation-with-guardicore\u002FSKILL.md",[],[],{"skillNo":92,"name":93,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":63,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":19},"01M736TK27QMCXK0DVCH25SJN5","ramdisk-tmpfs-patterns","https:\u002F\u002Fgithub.com\u002FHoronomos-laps\u002FYana-AI\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Framdisk-tmpfs-patterns\u002FSKILL.md",[],[]]