agentic-loop-audit
Audit an agent's main loop for halting conditions, mutation budgets, loop breakers, sensitive-path guards, error recovery, and replayability.
Skill by ShaileshRawat1403
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/shaileshrawat1403-agentic-loop-audit
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: security, 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/agentic-loop-audit
What's inside
- Skill name
agentic-loop-audit- Description
- Audit an agent's main loop for halting conditions, mutation budgets, loop breakers, sensitive-path guards, error recovery, and replayability. Returns impact-ordered findings tables.
- License
- MIT
- Instructions
- 96 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Agentic Loop Audit
Use this skill when the task is to review the *control flow* that drives an AI agent — the loop that decides when to call a tool, when to think again, when to stop, and what to do when something goes wrong. Loops without halting conditions are how agents melt down a credit card or a database.
## Use when
- a new agentic loop is being designed
- an agent ran longer or did more than expected and the question is why
- a runaway-loop incident occurred
- the team is adding budget caps and wants to know whether the existing guards are enough
## Workflow
1. **Find the loop.** Locate the main agentic loop body. It usually looks like:
```
while not done:
plan / model call
execute tool(s)
observe
decide
```
Note the file, the entry point, and what counts as one iteration.
2. **Halting conditions.**
- Explicit success: the model signals done, or a goal predicate is satisfied
- Explicit failure: the model gives up, or a non-recoverable error occurs
- Budget exhaustion: iteration count, wall-clock time, token spend, dollar spend, mutation count
- At least one of these must be active at all times; flag missing or weak conditions
3. **Mutation budget.**
- Hard cap on number of file/shell mutations per session
- Hard cap on external side effects (PR creates, messages sent, deploys)
- Cap is enforced *before* the call, not detected after
4. **Loop breakers.**
- Detect repeated tool calls with identical arguments and stop
- Detect oscillation (A → B → A → B) and stop
- Detect "no progress" iterations (same plan, same outcome) and escalate or stop
5. **Sensitive-path guards.**
- Calls that touch `.env`, `.git/`, credential files, or system paths are routed through the approval path
- Guard runs *before* the call, not as a check on the result
- Guard cannot be bypassed by a creative path encoding (`../`, symlinks, case-folding)
6. **Approval and pause.**
- When a guard fires, the loop pauses cleanly — no partial state, no orphan listeners
- The user can resume, deny, or abort
- Timeouts expire pending approvals; listeners unsubscribe
7. **Error recovery.**
- Transient errors retried with backoff and jitter, bounded
- Permanent errors fail the loop with a clear message — no silent retry forever
- Errors do not leak secrets or stack traces to the model
8. **Idempotency and replay.**
- Each iteration's effect is captured in an append-only event log
- The session can be replayed from the log and reach the same state
- Replays do not re-trigger external side effects
9. **State boundary.**
- The agent's mutable state is well-defined: session-scoped, not process-global
- Concurrent sessions do not share mutable state
10. **Observability.**
- Each iteration emits a structured event (plan, tool call, result)
- Budget consumption is visible to the operator in real time
- The loop can be traced end-to-end by a session id
## Checks
- Distinguish "loop can run forever in pathological case" (High/Critical) from "loop has a high default budget" (Medium)
- A budget that the model can extend by itself is not a budget — flag self-raising caps
- For DAX specifically: `RELEASE_GATES.md` already names mutation budgets, loop breakers, sensitive-path guards, and rollback anchors — credit existing guards and focus on coverage gaps
## Output contract
Findings follow [docs/skills/OUTPUT_CONTRACT.md](../../docs/skills/OUTPUT_CONTRACT.md).
Return:
1. **Verdict** — one line + a small table:
- `Loop entry`, `Halting conditions`, `Mutation budget`, `Loop breakers`, `Replayable?`
2. **Counts** — Critical/High/Medium/Low/Info totals
3. **Findings** — one table per category, ordered by impact:
- Halting conditions
- Mutation and side-effect budgets
- Loop breakers and oscillation detection
- Sensitive-path guards
- Approval / pause correctness
- Error recovery
- Replay and idempotency
- Observability
4. **Open questions / assumptions** — intended budget caps, intended approval policy
5. **Residual risk** — properties only visible at runtime (real failure modes, real cost)
6. **Next actions** — concrete fixes ordered by impact
## Evidence to collect
- Loop entry file:line and a description of one iteration
- Halting predicate(s) and budget values verbatim
- Sensitive-path patterns enforced (regex / glob)
- Approval mechanism: where it fires, how it pauses, how it resumes
- Event log location and schemaFrom ShaileshRawat1403/dax, MIT.
More from ShaileshRawat1403/dax
- 0.619score
skill-builder
ShaileshRawat1403
Create and improve DAX skills.
SkillAFreshness: A★ 5Claude Code +9 - 0.619score
mcp-server
ShaileshRawat1403
Create high-quality MCP (Model Context Protocol) servers that extend DAX's tool capabilities.
SkillAFreshness: A★ 5Claude Code +9 - 0.616score
artifact-audit
ShaileshRawat1403
Inspect release artifacts, generated outputs, screenshots, and manifests for completeness, consistency, and operator value.
SkillAFreshness: A★ 5Claude Code +9 - 0.616score
ci-cd-audit
ShaileshRawat1403
Audit CI/CD workflows for correctness, caching, action pinning, secret hygiene, and job-graph health.
SkillAFreshness: A★ 5Claude Code +9 - 0.616score
db-migration-review
ShaileshRawat1403
Review a database schema migration for production safety: lock contention, backfill strategy, online vs offline, rollback path, foreign-key timing…
SkillAFreshness: A★ 5Claude Code +9 - 0.616score
deploy-readiness
ShaileshRawat1403
Production readiness audit for a service: health checks, rollback strategy, runbook presence, observability wiring, capacity, dependencies.
SkillAFreshness: A★ 5Claude Code +9 - 0.616score
eval-suite-audit
ShaileshRawat1403
Audit an AI eval suite for coverage, leakage between datasets, deterministic vs stochastic measurement, ladder correctness, and signal quality.
SkillAFreshness: A★ 5Claude Code +9 - 0.616score
gh-actions-security
ShaileshRawat1403
Security-focused review of GitHub Actions workflows: pull_request_target misuse, expression injection, privileged token misuse, supply-chain exposure.
SkillAFreshness: A★ 5Claude Code +9 - 0.616score
observability-audit
ShaileshRawat1403
Audit observability for a service or system: structured logging, metrics for golden signals, distributed tracing, dashboard quality, alert noise, SLO…
SkillAFreshness: A★ 5Claude Code +9 - 0.616score
prompt-audit
ShaileshRawat1403
Audit prompts and system instructions across a repo for hygiene: hardcoded model assumptions, secret leakage, drift between surfaces, length budget, injection…
SkillAFreshness: A★ 5Claude Code +9 - 0.616score
release-pipeline-audit
ShaileshRawat1403
Audit the tag-triggered release pipeline for reproducibility, provenance, signing, supply-chain integrity, and rollback.
SkillAFreshness: A★ 5Claude Code +9 - 0.616score
release-readiness
ShaileshRawat1403
Check whether a DAX release is coherent, verifiable, and safe to ship across package, docs, diagnostics, and release artifacts.
SkillAFreshness: A★ 5Claude Code +9
Signals
- Stars
- 5
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- May 16, 2026 (5 months ago)
- Last release
- Oct 8, 2026 (21 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/ShaileshRawat1403/dax
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from ShaileshRawat1403
- 0.619score
skill-builder
ShaileshRawat1403
Create and improve DAX skills.
SkillAFreshness: A★ 5Claude Code +9 - 0.619score
mcp-server
ShaileshRawat1403
Create high-quality MCP (Model Context Protocol) servers that extend DAX's tool capabilities.
SkillAFreshness: A★ 5Claude Code +9 - 0.616score
artifact-audit
ShaileshRawat1403
Inspect release artifacts, generated outputs, screenshots, and manifests for completeness, consistency, and operator value.
SkillAFreshness: A★ 5Claude Code +9 - 0.616score
db-migration-review
ShaileshRawat1403
Review a database schema migration for production safety: lock contention, backfill strategy, online vs offline, rollback path, foreign-key timing…
SkillAFreshness: A★ 5Claude Code +9 - 0.616score
deploy-readiness
ShaileshRawat1403
Production readiness audit for a service: health checks, rollback strategy, runbook presence, observability wiring, capacity, dependencies.
SkillAFreshness: A★ 5Claude Code +9 - 0.616score
ci-cd-audit
ShaileshRawat1403
Audit CI/CD workflows for correctness, caching, action pinning, secret hygiene, and job-graph health.
SkillAFreshness: A★ 5Claude Code +9
Cite this page
agentic-loop-audit skill. Agent Mart. https://agentmart.dev/skills/shaileshrawat1403-agentic-loop-audit (last updated 2026-10-24)