Chalk Labs
Need help deploying self-heal?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/irisworks-self-heal
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: agent-building
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/self-heal
What's inside
- Skill name
self-heal- Description
- Sub-agent self-diagnostic and escalation. Run when a sub-agent detects a failure it cannot recover from, to escalate to Iris or the human operator.
- License
- Apache-2.0
- Instructions
- 160 lines in SKILL.md · view on GitHub
Files (2)
- SKILL.md
- self-heal
SKILL.md (first lines)
# Skill: self-heal
Self-diagnostic and escalation skill for sub-agents.
When a sub-agent encounters a failure it cannot recover from (persistent errors, missing dependencies,
model failures, resource exhaustion), it should call this skill to:
1. Log a structured diagnostic event to Iris's event queue
2. Optionally send an email to the human operator
3. Optionally restart the current service
Iris monitors the event queue and will receive the escalation.
## Usage
```bash
# Escalate to Iris (writes event to Iris's events dir)
self-heal --reason "Weather API returning 503 for 10 minutes" --agent weather
# Escalate + email human
self-heal --reason "Model provider unreachable" --agent digest --email operator@example.com
# Escalate + attempt service restart
self-heal --reason "Memory leak detected" --agent weather --restart
# Full escalation path
self-heal \
--reason "Cannot connect to weather API after 5 retries" \
--agent weather \
--email operator@example.com \
--context "Last successful response: 2 hours ago. Error: ECONNREFUSED 142.250.80.35:443"
```
## Options
- `--reason` Human-readable description of the failure (required)
- `--agent` Name of the failing agent (default: value of `$AGENT_NAME` env var)
- `--email` If set, also send an alert email to this address
- `--restart` If set, attempt to restart the current agent's systemd service
- `--context` Additional diagnostic context (appended to the escalation event)
- `--severity` `warning` | `error` | `critical` (default: `error`)
## Escalation path
Two-path escalation (primary → fallback):
1. **HTTP API** (primary): `POST ${IRIS_API_URL}/escalate` — Iris's internal API running on port 3000,
reachable from Docker containers at `http://iris-host:3000` or `http://172.18.0.1:3000`.
Fast, reliable, returns acknowledgment.
2. **File queue** (fallback): Writes `ESCALATE-{agent}` event file to `$IRIS_EVENTS_DIR` on the
shared filesystem. Used when the API is unreachable (network partition, Iris restart).
Both paths produce the same result: an `ESCALATE-{agentname}` immediate event in Iris's queue.
## What happens after escalation
Iris receives the escalation event in her event queue. Based on severity:
- `warning`: Iris logs it and monitors
- `error`: Iris attempts to diagnose and fix (e.g., restart container, check API keys)
- `critical`: Iris pages the human operator via Telegram + email
## Implementation
```bash
#!/usr/bin/env bash
set -euo pipefail
REASON=""
AGENT="${AGENT_NAME:-unknown}"
EMAIL=""
RESTART=false
CONTEXT=""
SEVERITY="error"
IRIS_EVENTS_DIR="${IRIS_EVENTS_DIR:-/iris/data/events}"
while [[ $# -gt 0 ]]; do
case "$1" in
--reason) REASON="$2"; shift 2 ;;
--agent) AGENT="$2"; shift 2 ;;
--email) EMAIL="$2"; shift 2 ;;
--restart) RESTART=true; shift ;;
--context) CONTEXT="$2"; shift 2 ;;
--severity) SEVERITY="$2"; shift 2 ;;
*) echo "Unknown option: $1" >&2; exit 1 ;;
esac
done
[[ -z "$REASON" ]] && { echo "self-heal: --reason is required" >&2; exit 1; }
TIMESTAMP=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
EVENT_ID="selfheal-$(date +%s)-$(head -c4 /dev/urandom | xxd -p)"
# Write escalation event to Iris's event queue
EVENT_FILE="${IRIS_EVENTS_DIR}/${EVENT_ID}.json"
jq -n \
--arg type "immediate" \
--arg channelId "SELFHEAL-${AGENT}" \
--arg user "$AGENT" \
--arg reason "$REASON" \
--arg context "$CONTEXT" \
--arg severity "$SEVERITY" \
--arg timestamp "$TIMESTAMP" \
--arg agent "$AGENT" \
'{
type: $type,
channelId: $channelId,
user: $user,
text: ("🚨 Self-heal escalation from @" + $agent + " [" + $severity + "]: " + $reason + (if $context != "" then "\n\nContext: " + $context else "" end)),
meta: { severity: $severity, agent: $agent, reason: $reason, context: $context, timestamp: $timestamp }
}' > "$EVENT_FILE"
echo "[self-heal] Escalation event written: $EVENT_FILE"
# Send email if requested
if [[ -n "$EMAIL" ]]; then
SUBJECT="[Iris] Sub-agent ${AGENT} escalation: ${SEVERITY}"
BODY="Agent: ${AGENT}From irisworks/iris-core, Apache-2.0.
More from irisworks/iris-core
- 0.636score
send-email
irisworks
Send an email via Resend API from ${IRIS_EMAIL_FROM:-iris@example.com}.
SkillAFreshness: A★ 13Claude Code +9 - 0.636score
status
irisworks
Read-only health snapshot of this Iris install — service state, disk, sub-agent containers, recent errors, and message-processing check.
SkillAFreshness: A★ 13Claude Code +9 - 0.636score
schedule
irisworks
Create, list, and cancel reminders and recurring tasks via Iris's events queue.
SkillAFreshness: A★ 13Claude Code +9 - 0.636score
transcribe-audio
irisworks
Transcribe an audio file (m4a, mp3, wav, ogg, webm) to text using OpenAI Whisper API.
SkillAFreshness: A★ 13Claude Code +9 - 0.633score
set-secret
irisworks
Store a secret, or mint a one-time drop link so a user can share a secret without pasting it into chat.
SkillAFreshness: A★ 13Claude Code +9 - 0.633score
spawn-agent
irisworks
Create a new sub-agent — no Terraform, no Docker by default.
SkillAFreshness: A★ 13Claude Code +9 - 0.633score
mcp
irisworks
Add, remove, and test MCP (Model Context Protocol) servers by editing meta/mcp.json.
SkillAFreshness: A★ 13Claude Code +9 - 0.633score
serve-public
irisworks
Expose a local port as a public HTTPS subdomain under IRIS_BASE_DOMAIN.
SkillAFreshness: A★ 13Claude Code +9 - 0.632score
upgrade-iris
irisworks
Upgrade this Iris install to the latest (or a given) release tag.
SkillAFreshness: A★ 13Claude Code +9 - 0.630score
terraform
irisworks
Opt-in Azure/Terraform profile only — plan and apply Terraform changes using the safe Iris workflow.
SkillAFreshness: A★ 13Claude Code +9 - 0.630score
azure
irisworks
Opt-in Azure profile only — common Azure CLI patterns for auth, infrastructure, and operational checks.
SkillAFreshness: A★ 13Claude Code +9 - 0.630score
firecracker-agent
irisworks
Opt-in Firecracker profile only — provision, verify, reset, and destroy Firecracker microVM sub-agents.
SkillAFreshness: A★ 13Claude Code +9
Signals
- Stars
- 13
- Forks
- 3
- Open issues
- 7
- Last commit (this folder)
- Jul 20, 2026 (3 months ago)
- Last release
- Oct 14, 2026 (18 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- Apache-2.0
- Repository
- github.com/irisworks/iris-core
- Website
- irisflow.dev
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from irisworks
- 0.636score
status
irisworks
Read-only health snapshot of this Iris install — service state, disk, sub-agent containers, recent errors, and message-processing check.
SkillAFreshness: A★ 13Claude Code +9 - 0.636score
transcribe-audio
irisworks
Transcribe an audio file (m4a, mp3, wav, ogg, webm) to text using OpenAI Whisper API.
SkillAFreshness: A★ 13Claude Code +9 - 0.636score
schedule
irisworks
Create, list, and cancel reminders and recurring tasks via Iris's events queue.
SkillAFreshness: A★ 13Claude Code +9 - 0.636score
send-email
irisworks
Send an email via Resend API from ${IRIS_EMAIL_FROM:-iris@example.com}.
SkillAFreshness: A★ 13Claude Code +9 - 0.633score
mcp
irisworks
Add, remove, and test MCP (Model Context Protocol) servers by editing meta/mcp.json.
SkillAFreshness: A★ 13Claude Code +9 - 0.633score
set-secret
irisworks
Store a secret, or mint a one-time drop link so a user can share a secret without pasting it into chat.
SkillAFreshness: A★ 13Claude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get self-heal running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
self-heal skill. Agent Mart. https://agentmart.dev/skills/irisworks-self-heal (last updated 2026-10-24)