Logo Ops Deploy Fix

Ops Deploy Fix

Tổ chức
Lifecycle-Innovations-Limited
ops-deploy-fix

OPS on-demand: Dùng kỹ năng này khi người dùng yêu cầu “tự động sửa lỗi triển khai”, “triển khai thất bại” hoặc…

Add to TypingMind

Tổng quan

Nhà phát hànhLifecycle-Innovations-Limited
Kho mãclaude-ops
Tên kỹ năngops-deploy-fix
Sao
543
Bản fork
64
Tệp đi kèm
Chỉ có hướng dẫn
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Hướng dẫn có đủ mọi thứ cần thiết

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được Lifecycle-Innovations-Limited công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Ops Deploy Fix trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/Lifecycle-Innovations-Limited/claude-ops/tree/main/claude-ops/skills/ops-deploy-fix
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Lifecycle-Innovations-Limited/claude-ops.git /tmp/claude-ops
mkdir -p .claude/skills
cp -r /tmp/claude-ops/claude-ops/skills/ops-deploy-fix .claude/skills/ops-deploy-fix
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Ops Deploy Fix trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Ops Deploy Fix ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Ops Deploy Fix với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

/ops:deploy-fix — Auto-fix subsystem control surface

Load ops-rules before acting. Public repo (no personal data). Outbound: one draft → one approval → one send. If AskUserQuestion / Workflow are missing, follow Rule 10 in ops-rules (Hermes: numbered options / two-turn Telegram card; delegate_task).

This skill is the operator console for the post-merge + build-failure auto-fix loop installed by /ops:setup Step 6.5a. The underlying daemons, hooks, and prompts live in ${CLAUDE_PLUGIN_ROOT}/scripts/, ${CLAUDE_PLUGIN_ROOT}/hooks/, and ${CLAUDE_PLUGIN_ROOT}/prompts/. State lives in ~/.claude/state/ops-deploy-fix/. Logs live in ~/.claude/logs/ops-deploy-fix/.

Plugin rules apply (see claude-ops/CLAUDE.md). In particular:

  • Rule 0 — never echo personal data (slugs are fine, but redact tokens, webhooks, emails)
  • Rule 1 — max 4 options per AskUserQuestion
  • Rule 4 — background by default during configure
  • Rule 5 — destructive ops (clearing locks, wiping state) require explicit per-action confirmation
  • Rule 6 — this skill never sends outbound comms; if a future flow needs to, use the universal send gate

Arguments

The first positional argument selects the subcommand. If absent, present:

/ops:deploy-fix — what do you want to do?
  [status]
  [tail]
  [configure]
  [test]

Subcommands:

SubcommandPurpose
statusDashboard of recent monitor runs, fixer dispatches, locks, budget
tailFollow the latest fixer log live
configureRe-run the wizard from /ops:setup Step 6.5a
testSend a synthetic failure through the pipeline (dry-run, no real fix)

Subcommand: status

Print a compact dashboard. Read all data via Bash; favor parallel reads.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 OPS ► DEPLOY-FIX STATUS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 Master switch:    <on|off>          (deploy_fix_enabled)
 Auto-dispatch:    <on|off>          (auto_dispatch_fixer)
 Danger flag:      <on|off>          (allow_dangerous)
 Budget cap:       <N>/hour/repo     (max_fixes_per_hour)
 Notify channel:   <macos|ntfy|discord|none>
 Fix model:        <haiku|sonnet|opus>

 Last 5 monitor runs:
   2026-04-26T08:14Z  owner/repo-a:dev   merge-watch         deploy-success
   2026-04-26T08:11Z  owner/repo-b:main  build-watch         transient → rerun
   ...

 Last 5 fixer dispatches:
   2026-04-26T08:09Z  owner/repo-b:main  build-fix.md   in-flight   pid 41123
   2026-04-26T07:42Z  owner/repo-a:dev   deploy-fix.md  done        log:fix-...log

 Active locks:
   owner/repo-b:main:build  pid=41123 (alive)

 Hourly budget remaining (this hour, <YYYYMMDD-HH>):
   owner/repo-a   2 / 3
   owner/repo-b   1 / 3
──────────────────────────────────────────────────────

Data sources:

bash
PREFS=~/.claude/plugins/data/ops-ops-marketplace/preferences.json
STATE=~/.claude/state/ops-deploy-fix
LOGS=~/.claude/logs/ops-deploy-fix

# Config snapshot (all keys read with defaults from plugin.json userConfig)
jq -r '{
  deploy_fix_enabled, auto_dispatch_fixer, allow_dangerous,
  max_fixes_per_hour, notify_channel, fix_model
}' "$PREFS" 2>/dev/null

# Monitor runs — last 5 across all repos
ls -t "$LOGS"/monitor-*.log 2>/dev/null | head -5 | while read f; do
  printf '%s  %s\n' "$(stat -f '%Sm' -t '%FT%RZ' "$f" 2>/dev/null || stat --format='%y' "$f" 2>/dev/null | awk '{print $1"T"$2"Z"}')" "$(basename "$f")"
done

# Fixer dispatches — last 5
ls -t "$LOGS"/fix-*.log 2>/dev/null | head -5 | while read f; do
  pid_file="$STATE/lock-$(basename "$f" | sed 's/^fix-//; s/-[0-9]*\.log$//')"
  status="done"
  [ -f "$pid_file" ] && kill -0 "$(cat "$pid_file")" 2>/dev/null && status="in-flight"
  printf '%s  %s  %s\n' "$(stat -f '%Sm' -t '%FT%RZ' "$f" 2>/dev/null || stat --format='%y' "$f" 2>/dev/null | awk '{print $1"T"$2"Z"}')" "$status" "$(basename "$f")"
done

# Active locks
for f in "$STATE"/lock-*; do
  [ -f "$f" ] || continue
  pid=$(cat "$f")
  if kill -0 "$pid" 2>/dev/null; then
    echo "$(basename "$f" | sed 's/^lock-//')  pid=$pid (alive)"
  fi
done

# Hourly budget — read all budget files for current hour
hour=$(date +%Y%m%d-%H)
cap=$(jq -r '.max_fixes_per_hour // 3' "$PREFS")
for f in "$STATE"/budget-*-"$hour"; do
  [ -f "$f" ] || continue
  slug=$(basename "$f" | sed "s/^budget-//; s/-$hour\$//")
  used=$(cat "$f")
  echo "$slug  $((cap - used)) / $cap"
done

After the dashboard, if any lock is older than the configured watcher_timeout_seconds, surface a ⚠️ Stale lock: line and offer:

Stale lock detected for <repo>. Action?
  [Inspect log]
  [Clear lock (Rule 5 — destructive)]
  [Leave it]
  [Skip]

Only on Clear lock should you delete the file (per-action confirmation per Rule 5).


Subcommand: tail

Tail the most-recent fixer log. Resolve via ls -t:

bash
LATEST=$(ls -t ~/.claude/logs/ops-deploy-fix/fix-*.log 2>/dev/null | head -1)
if [ -z "$LATEST" ]; then
  echo "No fixer logs yet. Trigger one with /ops:deploy-fix test or wait for a real failure."
  exit 0
fi
echo "▸ Tailing $LATEST (Ctrl-C to stop)"
tail -f "$LATEST"

Run via Bash with run_in_background: true and a long timeout so the user can read the stream as it grows. Print the resolved log path and the spawned shell PID up-front so the user knows what's running.

If a second positional arg --lines N is passed, do tail -n N -f. If --no-follow, drop -f.


Subcommand: configure

Re-run the wizard from /ops:setup Step 6.5a, plus optionally 6.5b/c/d. Implementation: route into the setup skill with section filter.

Flow:

  1. Read current state from $PREFS_PATH. Print compact summary (same fields as status, no logs).
  2. Ask:
    What do you want to reconfigure?
      [Deploy auto-fix wizard (6.5a)]
      [Recap marquee (6.5b)]
      [Task* reminder (6.5c)]
      [Account rotation toggle (6.5d)]
  3. Execute the corresponding sub-flow inline by following Step 6.5 of skills/setup/SKILL.md — same questions, same persistence, same Rule-3 "never silently skip" semantics.
  4. After persistence, print:
    ✓ Reconfigured. Daemons & hooks pick up the new prefs on the next event — no restart required.

Use run_in_background: true (Rule 4) for any CLI install / brew / curl / tmux source-file triggered along the way.


Subcommand: test

Synthetic dry-run through the pipeline. No real fix dispatch — no agent runs. Confirms wiring: hooks fire → monitor classifies → notify channel pings → state files written → would-dispatch path logged.

Steps:

  1. Pre-flight check:

    bash
    PLUGIN_ROOT="${CLAUDE_PLUGIN_ROOT:-}"
    [ -z "$PLUGIN_ROOT" ] && PLUGIN_ROOT=$(find ~/.claude -type d -name claude-ops 2>/dev/null | head -1)
    COMMON="$PLUGIN_ROOT/scripts/lib/deploy-fix-common.sh"
    [ -f "$COMMON" ] || { echo "✗ deploy-fix-common.sh missing — re-install the plugin"; exit 1; }
  2. Ask:

    What should the synthetic failure look like?
      [Build failure (npm run build:* exit 1)]
      [Deploy workflow failure (gh actions check_run)]
      [Health check failure (curl /health 503)]
      [Version mismatch (served SHA != merged SHA)]
  3. Generate a fake event payload matching the chosen kind. Set env var OPS_DEPLOY_FIX_DRY_RUN=1 and invoke the relevant trigger script:

    bash
    export OPS_DEPLOY_FIX_DRY_RUN=1
    export OPS_DEPLOY_FIX_TEST_REPO="your-org/your-repo"   # placeholder per Rule 0
    export OPS_DEPLOY_FIX_TEST_BASE="dev"
    case "$kind" in
      build)   bash "$PLUGIN_ROOT/bin/ops-deploy-fix-build-trigger" --synthetic ;;
      deploy)  bash "$PLUGIN_ROOT/bin/ops-deploy-fix-merge-trigger" --synthetic ;;
      health)  bash "$PLUGIN_ROOT/scripts/ops-deploy-monitor.sh" --synthetic-health ;;
      version) bash "$PLUGIN_ROOT/scripts/ops-deploy-monitor.sh" --synthetic-version ;;
    esac

    Trigger scripts must honor OPS_DEPLOY_FIX_DRY_RUN=1 by:

    • Skipping the actual claude -p ... dispatch in dispatch_fix_agent
    • Writing a would-dispatch-<id>-<ts>.log to $LOGS_DIR instead
    • Still incrementing the budget counter (so the test exercises the cap)
    • Logging [DRY-RUN] would notify <channel> instead of firing real notify (no actual outbound messages during test — Rule 6)

    If the trigger scripts don't yet support --synthetic / OPS_DEPLOY_FIX_DRY_RUN, surface that as a known TODO in the output and degrade to "would-have-dispatched" log-only.

  4. Print the resulting would-dispatch-*.log path and a one-line classification result (transient? dedup-hit? budget-exhausted? would-dispatch-template=<file>).

  5. Offer:

    Test complete. Next?
      [Tail the would-dispatch log]
      [Run another test]
      [Show status dashboard]
      [Done]

Failure modes / hand-offs

  • No prefs file → tell the user to run /ops:setup (or /ops:deploy-fix configure) first.
  • claude CLI missing (status / test) → instruct via output, do not auto-install.
  • jq missing → run brew install jq in background (Rule 4) and retry.
  • Stale lock detection → see status flow above, requires Rule-5 confirmation to clear.
  • Notify channel mis-set (e.g. discord selected but no webhook) → on status, surface as ⚠️ notify_channel=discord but no webhook URL configured and offer [Reconfigure now].

Files this skill reads / writes

  • Read-only: ~/.claude/plugins/data/ops-ops-marketplace/preferences.json, ~/.claude/state/ops-deploy-fix/*, ~/.claude/logs/ops-deploy-fix/*, ${CLAUDE_PLUGIN_ROOT}/scripts/lib/deploy-fix-common.sh, ${CLAUDE_PLUGIN_ROOT}/prompts/{build-fix,deploy-fix}.md
  • Write (with explicit confirmation only): lock files in ~/.claude/state/ops-deploy-fix/lock-* (clear on stale)
  • Write (via configure subcommand): the prefs file, via the merge pattern in Step 6.5

Câu hỏi thường gặp

Kỹ năng AI Ops Deploy Fix làm được gì?

OPS on-demand: Dùng kỹ năng này khi người dùng yêu cầu “tự động sửa lỗi triển khai”, “triển khai thất bại” hoặc…

Vì sao nên dùng Ops Deploy Fix trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Ops Deploy Fix là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Ops Deploy Fix trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/Lifecycle-Innovations-Limited/claude-ops/tree/main/claude-ops/skills/ops-deploy-fix. TypingMind đọc tệp SKILL.md rồi cài đặt kỹ năng để bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Ops Deploy Fix?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Ops Deploy Fix với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Ops Deploy Fix với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Ops Deploy Fix có miễn phí không?

Có. Kỹ năng này được Lifecycle-Innovations-Limited phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇