Install
$ agentstack add skill-knoxops-agent-runbook-output ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Input Parameters
| Name | Type | Required | Description | |------|------|----------|-------------| | inventory | string | No | Path to Ansible inventory file, defaults to ansible/inventory.ini | | playbook | string | No | Path to health check playbook, defaults to ansible/health_check.yml |
Execution Flow
Task Context
Before starting execution, initialize task_context.json:
{
"task_id": "",
"current_step": 0,
"current_step_id": null,
"status": "running",
"steps": {
"inspect": "pending",
"fix_loop": "pending",
"generate_report": "pending"
},
"updated_at": ""
}
Update this file after each step completes. On error, set step status to "failed" and overall status to "failed".
Step 1: inspect
Type: script Description: Run Ansible playbook to inspect all hosts and generate an issue list
Execution
Execute the following command:
ansible-playbook -i {inventory} {playbook} 2>&1
mv /tmp/host_issues.json host_issues.json
Output
- Schema: schemas/host_issues.schema.json
- File: host_issues.json
Progress Tracking
After completing this step, update task_context.json:
- Set
current_step_idto"inspect" - Set
steps.inspectto"completed"
Step 2: fix_loop
Type: loop Description: Fix loop: each iteration picks the most critical issue, produces a remediation plan, waits for human approval on write operations, executes the fix, then re-inspects all hosts. Repeats until no issues remain or max iterations reached.
Iteration Loop
Goal: hostissues.json has totalissues equal to 0 (all hosts healthy, no issues found) Max Iterations: 10
> This step executes as a loop. The body steps repeat until the goal is met or max iterations reached.
Loop Body (repeats each iteration)
Body Step 1: select_issue
Type: inline Description: Select the single most critical issue from host_issues.json
Execution: Follow these instructions:
Read hostissues.json and schemas/selectedissue.schema.json.
Pick the SINGLE most critical issue using this priority order:
- critical disk (highest priority)
- critical service_down
- critical memory
- critical load
- warning disk
- warning service_down
- warning memory
- warning load (lowest priority)
Write the selected issue to selected_issue.json following the schema.
If hostissues.json has totalissues == 0, write {"done": true} instead.
Output Files
selected_issue.json
Body Step 2: plan_action
Type: agent Description: Analyze the selected issue and create a concrete remediation plan (no execution)
Execution: Launch an independent agent with the following prompt file:
Read selectedissue.json and schemas/pendingaction.schema.json.
STEP 1 — Investigate: SSH to the target host and check the actual situation. Understand the root cause before writing any plan. Do NOT guess or write generic commands.
STEP 2 — Plan: Based on your findings, write a concrete remediation plan to pending_action.json following the schema.
Do NOT execute anything. Only investigate and write the JSON file. If selectedissue.json contains {"done": true}, write {"done": true} to pendingaction.json instead.
Output Files
pending_action.json
Body Step 3: approve
Type: inline Description: Human approval gate — present the remediation plan and wait for confirmation before executing
Execution: Follow these instructions:
Read pending_action.json.
If it contains {"done": true}, skip this step.
Otherwise, PRESENT the remediation plan from pending_action.json to the human:
Awaiting Approval
Present the host, issue, risk level, and commands from pending_action.json.
Type "approve" to execute, or "reject" to skip this issue. ---
WAIT for the human to respond. Do NOT proceed without explicit approval. If approved, copy pendingaction.json to approvedaction.json. If rejected, write skip_action.json with {"status": "rejected", "reason": "rejected by human"}.
Body Step 4: execute
Type: agent Description: Execute the approved remediation
Execution: Launch an independent agent with the following prompt file:
Check for approved_action.json. If it exists, read it.
If skipaction.json exists instead, do NOT execute — write executeresult.json following schemas/execute_result.schema.json with status "skipped".
Execute the remediation: SSH into the target host and run the commands listed in approved_action.json.
Rules:
- Use the exact commands from the plan, do not improvise
- If a command fails, do NOT retry
- After execution, verify the result (e.g., check service status, check disk usage)
- Write executeresult.json following schemas/executeresult.schema.json
If pendingaction.json had {"done": true}, write {"status": "alldone"} to execute_result.json.
Output Files
execute_result.json
Body Step 5: re_inspect
Type: script Description: Re-run inspection to refresh the issue list
Execution: Execute the following command:
ansible-playbook -i {inventory} {playbook} 2>&1
mv /tmp/host_issues.json host_issues.json
Output Files
host_issues.json
Goal Evaluation
After all body steps complete, evaluate:
Goal: hostissues.json has totalissues equal to 0 (all hosts healthy, no issues found)
- If goal IS met → mark this step completed, proceed to next step.
- If goal NOT met and iterations remain → reset body steps, start next iteration.
- If max iterations reached → mark step completed with status "maxiterationsreached", report what remains.
Append a summary to iteration_history after each iteration.
Progress Tracking
After completing this step, update task_context.json:
- Set
current_step_idto"fix_loop" - Set
steps.fix_loopto"completed"
Step 3: generate_report
Type: agent Description: Generate a polished HTML inspection and remediation report
Execution
Launch an independent agent with the following prompt file:
Dispatch instruction:
Read the final hostissues.json to get the current health status. Also read all executeresult.json files from the workspace to understand what was fixed.
Generate a single, self-contained, beautiful HTML report: health_report.html
The report should include:
- Overall health status (ALL CLEAR or ISSUES REMAINING)
- Summary stats: hosts checked, total issues found & resolved
- Remediation timeline: each iteration with host, issue, investigation findings,
commands executed, and before/after comparison
- Final per-host status
Design requirements:
- Dark theme, modern dashboard style
- Use CSS grid/flexbox, no external dependencies
- Mobile-responsive
- Professional and visually impressive — this is a production report
- Include all CSS inline in a tag
Agent workflow:
- Prepare the execution environment
- Execute the agent with the prompt
- Complete execution
Progress Tracking
After completing this step, update task_context.json:
- Set
current_step_idto"generate_report" - Set
steps.generate_reportto"completed"
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: KnoxOps
- Source: KnoxOps/agent-runbook
- License: Apache-2.0
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.