Skip to content
OpenAgentSkill
Browsing is open · Catalog captured 2026-11-21 · Automatic updates and account services are paused.
Browser & automation

verify-patterns

Verify AI agent patterns including loop safety, retry limits, tool consistency, context size, and graph cycle analysis. Use when asked to "verify agent patterns", "check loops", "verify tools", or "check retry limits".

Aurite-ai · Static checks on file

Installation

Read the source and dependencies before running a command. Copying does not install or execute anything.

npx skills add Aurite-ai/agent-verifier --skill verify-patterns

About this skill


name: verify-patterns version: "1.0.0" description: Verify AI agent patterns including loop safety, retry limits, tool consistency, context size, and graph cycle analysis. Use when asked to "verify agent patterns", "check loops", "verify tools", or "check retry limits".

Agent Pattern Verification

Purpose

Verify AI agent code for common anti-patterns that can cause infinite loops, runaway retries, tool mismatches, and context overflow. All analysis happens locally.

When to Use

Trigger this skill when the user asks to:

  • "verify agent patterns"
  • "check agent loops"
  • "verify tools"
  • "check retry limits"
  • "verify agent safety"

Note: For full verification including security, quality, and language-specific checks, tell the user to say "verify agent".

Process

Step 1: Detect Agent Framework

Identify the agent framework by checking imports in Python/TypeScript files:

Import PatternFramework
from langgraph or import langgraphLangGraph
from crewai or import crewaiCrewAI
from autogen or import autogenAutoGen
from langchain or import langchainLangChain
Direct openai/anthropic SDK onlyCustom

Also check for framework config files: langgraph.json, crew.yaml.

Step 2: Locate Agent Files

Find files to analyze:

Priority files:

  • graph.py, graph.ts - Agent workflow definitions
  • tools.py, tools.ts, tools/*.py, tools/*.ts - Tool implementations
  • state.py, state.ts - State schemas
  • prompts.py, prompts/*.md, system.md - Prompt templates
  • agent.py, agent.ts - Main agent logic

Directories to check:

  • src/agent/, agent/, src/, project root
  • lib/, app/, packages/

Exclude from analysis:

  • skills/ directory — these are skill definitions, not agent system prompts

Step 3: Run Pattern Checks

Check Tiers

  • [PATTERN] — Mechanical check. Apply exactly as written.
  • [HEURISTIC] — Judgment required. Mark findings clearly.

Tag every finding with [P] for pattern or [H] for heuristic.


3.1 [PATTERN] Loop Safety

Apply mechanically. Do not pass a loop because it "looks like it might terminate."

Pattern to findPass conditionSeverity
while True: in PythonA break statement exists within the same block scope⚠️ Warning if absent
for { } in GoA break or return exists within the block⚠️ Warning if absent
while (true) in TS/JSA break or return exists within the block⚠️ Warning if absent
Function calls itself recursivelyA non-recursive return path exists (base case), OR a depth/counter parameter is present⚠️ Warning if absent

[HEURISTIC] Fallback: Unrecognized Loop Patterns

After applying the pattern table, also scan for:

  • Loops where termination depends entirely on external/runtime state with no timeout
  • Generator functions that yield indefinitely without documented exit
  • Event/polling loops without timeout parameters
  • Recursive call chains across multiple functions without depth tracking

Flag as ⚠️ Warning: "Potential unbounded loop not matching known patterns — verify termination condition manually"


3.2 [PATTERN] Retry Limit Enforcement

Apply mechanically. If required parameter is absent, flag as ❌ Issue.

Python — Decorator-based:

Library/PatternRequired parameterFail condition
@retry (tenacity)stop=stop_after_attempt(n) or stop=stop_after_delay(n)stop= absent
@backoff.on_exceptionmax_tries=nmax_tries= absent

Python — HTTP client retry:

Library/PatternRequired parameterFail condition
urllib3.Retry(...)total=n where n > 0total= absent or total=0
HTTPAdapter(max_retries=Retry(...))Retry object must have total=ntotal= absent
httpx.HTTPTransport(retries=n)retries=n where n > 0retries= absent or retries=0

Python — AWS SDK (boto3):

Library/PatternRequired parameterFail condition
Config(retries={...})max_attempts > 1max_attempts absent or ≤ 1

Note: boto3 without explicit retry config uses SDK defaults (3 attempts) — do not flag absence.

JavaScript/TypeScript:

Library/PatternRequired parameterFail condition
retry(...) (async-retry)retries: n in optionsretries: absent
pRetry(...) (p-retry)retries: n in optionsretries: absent

Custom retry loops (all languages):

Pattern to findPass conditionFail condition
Loop + try/except + continueInteger counter with max checkNo counter → ❌ Issue

[HEURISTIC] Fallback: Unrecognized Retry Patterns

After applying pattern tables, scan for:

  • Functions/decorators with "retry" in name not in tables above
  • Imported modules with "retry" in package name (e.g. stamina, aiohttp_retry)
  • Loops with sleep + exception handling + re-invocation without visible counter
  • Config keys like max_retries, retry_count, attempts

Flag as ⚠️ Warning: "Potential retry pattern not matching known libraries — verify retry bounds manually"


3.3 [PATTERN] Tool Registry Consistency

Step 1: Collect defined tools

Scan tool definition files. A name found by any pattern counts as registered.

Python — decorator patterns:

PatternHow to extract name
@tool (LangChain) on defFunction name below decorator
@function_tool (OpenAI Agents SDK) on defFunction name below decorator
@tool(name="...")Use name= argument value

*Python — dict/list patter

Read the complete source ↗