bradliebs/ollama-agent-harness/testing
Claude Code and agent skill by bradliebs/ollama-agent-harness
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Testing conventions for the Ollama Agent Harness using Jest
Install
npx vskill@latest install bradliebs/ollama-agent-harness/testingSKILL.md
Context
Testing skill for the Ollama Agent Harness. Uses Jest with TypeScript. Tests cover the core subsystems: agent loop, tool dispatch, permission evaluation, context management, subagent delegation, and session persistence.
Patterns
Test File Naming
- Tests live alongside source files:
src/core/queryLoop.test.ts - Integration tests in
tests/integration/ - Test fixtures in
tests/fixtures/
Testing the Agent Loop
Mock the Ollama client to return controlled responses. Test the loop's behavior with:
- Text-only responses (should stop)
- Tool-call responses (should dispatch and continue)
- Multiple tool calls (should handle concurrency classification)
- Error responses (should trigger recovery)
Testing Permissions
Test deny-first rule ordering:
- A deny rule overrides a more specific allow rule
- Unrecognized actions escalate to ask/deny
- Permission modes cascade correctly
Testing Context Management
- Verify budget reduction truncates oversized tool results
- Verify compaction appends summary, never mutates history
- Verify context assembly includes all required sources
Testing Session Persistence
- Verify append-only writes to JSONL
- Verify resume rebuilds conversation from transcript
- Verify fork creates new session without inheriting permissions
Mocking Ollama
Assertion Style
- Use descriptive test names:
it('denies tool when deny rule matches before allow rule') - One assertion per logical concept
- Prefer
toEqualfor object comparison,toBefor primitives
Examples
Agent Loop Test
Permission Test
Anti-Patterns
- Testing implementation details instead of behavior.
- Depending on real Ollama API calls in unit tests — always mock.
- Skipping permission system tests when adding new tools.
- Not testing error/recovery paths in the agent loop.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryChecking.github/skills/testing/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/bradliebs/ollama-agent-harness/testing)