Tutorial 4: Focused Checks

March 31, 2026 · View on GitHub

This tutorial teaches you how to use individual verification skills for faster, targeted feedback. You'll learn when to use each skill and how to combine them for custom workflows.

Time: ~10 minutes
Prerequisites: Completed Tutorial 3


What You'll Learn

  1. When to use focused vs full verification
  2. Each verification skill and what it checks
  3. How to combine skills for custom workflows
  4. Tips for efficient verification

Part 1: Full vs Focused Verification

Full verification ("verify agent")

Runs all four check categories:

  • Security → Patterns → Quality → Language

Use when:

  • Starting a new project audit
  • Before major releases
  • Comprehensive code reviews
  • First-time verification of a codebase

Trade-off: More complete, but slower

Focused verification ("verify agent [category]")

Runs only one check category.

Use when:

  • You know what you're looking for
  • Quick feedback during development
  • Following up on specific findings
  • CI/CD pipelines with time constraints

Trade-off: Faster, but may miss issues in other categories


Part 2: The Four Verification Skills

Security: "verify agent security"

What it checks:

CheckSeverityExample
Hardcoded secrets❌ IssueAPI_KEY = "sk-abc123..."
Unpinned dependencies❌ Issuerequests>=2.0 without upper bound
Missing input validation⚠️ WarningUser input passed directly to API
Error message exposure⚠️ WarningStack traces in production responses
Insecure defaults⚠️ Warningverify=False in requests

When to use:

  • Before committing API integration code
  • Reviewing authentication flows
  • Checking dependency updates
  • Security-focused code reviews

Example output:

## Security

- [x] No hardcoded secrets
- [ ] ❌ `[P]` Unpinned dependency: anthropic>=0.18 in requirements.txt
  - **Fix:** Pin to specific version: anthropic==0.18.1
- [ ] ⚠️ `[H]` Input validation: Consider validating user_query at handlers.py:45

Patterns: "verify agent patterns"

What it checks:

CheckSeverityExample
Unbounded loops⚠️ Warningwhile True: without break
Missing retry limits❌ Issue@retry without stop=
Hallucinated tools❌ IssuePrompt references execute_sql but no tool exists
Large system prompts⚠️/❌> 4K tokens (warn), > 8K tokens (issue)
LangGraph infinite cycles❌ IssueCycle with no path to END

When to use:

  • Building new agent workflows
  • Adding retry logic
  • Modifying prompts or tools
  • Debugging agent behavior issues

Example output:

## Agent Patterns

### Loop Safety
- [x] All loops have termination conditions

### Retry Limits
- [ ] ❌ `[P]` Missing retry limit at services/llm.py:34
  - **Pattern:** `@retry` decorator without stop parameter
  - **Fix:** Add `stop=stop_after_attempt(3)`

### Tool Consistency
- [x] Tool registry: 5 tools defined
- [x] All prompt tool references found in registry

### Context Size
- [x] System prompt: 2.4K tokens (within limits)
- [ ] ⚠️ `[P]` Tool descriptions: 3.8K tokens (approaching 4K warning)

Quality: "verify agent quality"

What it checks:

CheckSeverityExample
Naming inconsistencies⚠️ WarningMix of camelCase and snake_case
Poor organization⚠️ Warning500+ line files, mixed concerns
Magic numbers⚠️ Warningif retries > 5 without named constant
Missing documentation⚠️ WarningPublic functions without docstrings
Error handling❌ IssueBare except: clauses

When to use:

  • Code reviews
  • Refactoring sprints
  • Onboarding new team members
  • Enforcing team standards

Example output:

## Quality

### Naming
- [x] Consistent snake_case in Python files

### Organization
- [ ] ⚠️ `[H]` Large module: agent/graph.py (420 lines)
  - **Suggestion:** Consider extracting node definitions

### Documentation
- [x] All public functions have docstrings
- [ ] ⚠️ `[H]` Module docstring missing: utils/helpers.py

### Error Handling
- [x] No bare except clauses

Language: "verify agent language"

Runs language-specific checks based on detected language.

Python checks

CheckSeverityExample
Missing type hints⚠️ Warningdef process(data): without annotations
Missing docstrings⚠️ WarningFunctions without """docstring"""
Unpinned requirements❌ Issuelangchain>=0.1 in requirements.txt

TypeScript/JavaScript checks

CheckSeverityExample
Using any type⚠️ Warningfunction process(data: any)
Strict mode disabled⚠️ Warningstrict: false in tsconfig.json
Unhandled promises⚠️ WarningfetchData() without await or .catch()

Go checks

CheckSeverityExample
Ignored errors❌ Issue_ = someFunc() where func returns error
Missing context⚠️ WarningFunctions not propagating context.Context

When to use:

  • Language-specific code reviews
  • Enforcing typing standards
  • Preparing for type checker integration
  • Learning language best practices

Example output (Python):

## Language (Python)

### Type Safety
- [x] Public functions have type hints
- [ ] ⚠️ `[P]` Missing return type: `process_message` at handlers.py:34

### Documentation
- [x] All modules have docstrings

### Dependencies
- [ ] ❌ `[P]` Unpinned: openai>=1.0 in pyproject.toml
  - **Fix:** Pin to openai==1.12.0

Part 3: Combining Skills

Sequential checks

Run multiple focused checks in order:

"verify agent security"

(review results)

"verify agent patterns"

(review results)

This is useful when you want to address one category at a time.

Comparison: Full vs Sequential

ApproachCommandUse case
Full"verify agent"Complete audit, consolidated report
SequentialRun each skill separatelyAddress categories one at a time
Single"verify agent [category]"Quick check of specific concern

Common workflows

Pre-commit check (fast)

"verify agent security"

Catches secrets and obvious security issues quickly.

Feature branch review

"verify agent patterns"

Then:

"verify agent quality"

Ensures new agent code follows patterns and quality standards.

Release readiness

"verify agent"

Full verification before shipping.

After adding retry logic

"verify agent patterns"

Confirms retry limits are properly configured.

After updating dependencies

"verify agent security"

Then:

"verify agent language"

Checks for vulnerabilities and pinning issues.


Part 4: Tips for Efficient Verification

1. Start narrow, expand if needed

"verify agent security"

If issues found, fix them. If clean, run the next category.

2. Use test fixtures for learning

cd tests/fixtures/retry_limits
"verify agent patterns"

See exactly what patterns are detected.

3. Save reports for comparison

After each verification:

"Save the report"

Compare reports over time to track improvement.

4. Know your priorities

SituationStart with
Security auditverify agent security
Debugging agent loopsverify agent patterns
Code reviewverify agent quality
Type safety pushverify agent language

5. Understand check limitations

Pattern-matched [P] checks are reliable but may have edge cases:

  • while True flagged even if termination is in called function
  • Retry limits must be in the decorator, not runtime config

Heuristic [H] checks require judgment:

  • "Large module" depends on context
  • "Poor organization" is subjective

Part 5: Quick Reference

All verification commands

CommandCategorySpeed
"verify agent"AllSlowest
"verify agent security"SecurityFast
"verify agent patterns"Agent patternsFast
"verify agent quality"Code qualityFast
"verify agent language"Language-specificFast

What each skill catches (summary)

SkillKey checks
securitySecrets, dependencies, input validation
patternsLoops, retries, tools, context size, LangGraph
qualityNaming, organization, docs, magic values
languageTypes, idioms, language-specific rules

Legacy trigger phrases

These run the full verification suite:

  • "audit this agent code"
  • "check compliance"
  • "validate against best practices"
  • "review this implementation"

Summary

You've learned how to:

  • ✅ Choose between full and focused verification
  • ✅ Use each of the four verification skills
  • ✅ Combine skills for custom workflows
  • ✅ Work efficiently with targeted checks

What's Next?

You've completed the core tutorials! Here are ways to continue:


Need Help?