Skip to content
Agentmart
Submit a tool

follow-test-patterns

Use when writing tests to ensure they follow project conventions.

Skill by eveld

IndexedMIT★ 10
Write a review

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/eveld-follow-test-patterns

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.

We use your email only for this newsletter. Privacy

About

Use when writing tests to ensure they follow project conventions. References patterns from thoughts/notes/testing.md.

Use cases: testing, writing, productivity

No 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. 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/follow-test-patterns

What's inside

Skill name
follow-test-patterns
Description
Use when writing tests to ensure they follow project conventions. References patterns from thoughts/notes/testing.md.
License
MIT
Instructions
131 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Follow Test Patterns

Reference discovered test patterns when writing tests to ensure consistency with project conventions.

## When to Use

- Before writing any test file
- When implementing test-related phases in plans
- When user asks you to add tests

## Workflow

### 1. Check for Pattern Document
```bash
if [ -f thoughts/notes/testing.md ]; then
  # Read and follow patterns
else
  # Prompt user to run discover-test-patterns first
  echo "No test patterns found. Run discover-test-patterns skill first."
fi
```

### 2. Read Pattern Document

Read `thoughts/notes/testing.md` fully to understand:
- File naming conventions
- Testing framework and imports
- Test structure (table-driven, etc.)
- Assertion style
- Mocking approach

### 3. Apply Patterns to New Tests

Use the discovered patterns for:

**File Naming**:
- Follow the pattern (e.g., `*_test.go`, `*.test.ts`)
- Place alongside source or in test directory as per convention

**Imports**:
- Use same testing framework (testify, jest, pytest)
- Import same assertion libraries

**Test Structure**:
- If codebase uses table-driven tests, use that pattern
- If codebase uses describe/it blocks, use that pattern
- Match indentation and formatting

**Assertions**:
- Use same assertion style (require.Equal vs assert.Equal)
- Follow error message conventions

**Mocking**:
- Use same mocking library (mockery, jest.mock, unittest.mock)
- Follow interface/class mocking patterns found in codebase

## Alternative: Use Test-Writer Agent

For complex test generation, spawn the test-writer agent:

```markdown
Task(subagent_type="workflows:test-writer",
     prompt="Generate tests for [functions] following patterns in testing.md.
     Expected behavior: [describe].
     Return test code only.")
```

**Benefits**:
- Conserves main agent context (3k instead of 20k+)
- Agent reads testing.md and examples in isolation
- Returns only the test code you need
- Follows project patterns automatically

**When to use**:
- Generating multiple test files
- Complex table-driven tests
- During phased implementation (see `spawn-implementation-agents`)

### 4. Verify Consistency

After writing tests, verify:
- File name matches convention
- Framework imports are correct
- Test structure matches examples
- Assertions use same style
- Tests are in correct location

## Example

If `thoughts/notes/testing.md` shows:
```
## Go Test Patterns
- File: `*_test.go` alongside source
- Framework: testify/require
- Pattern: Table-driven tests
```

Then write:
```go
package handlers

import (
    "testing"
    "github.com/stretchr/testify/require"
)

func TestNewFeature(t *testing.T) {
    tests := []struct {
        name string
        input FeatureInput
        want FeatureOutput
    }{
        {name: "valid case", input: ..., want: ...},
    }
    for _, tt := range tests {
        t.Run(tt.name, func(t *testing.T) {
            got := NewFeature(tt.input)
            require.Equal(t, tt.want, got)
        })

From eveld/claude, MIT.

More from eveld/claude

Signals

Stars
10
Forks
2
Open issues
0
Last commit (this folder)
Feb 4, 2026 (8 months ago)
Last release
Dec 29, 2025 (10 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from eveld

Cite this page

follow-test-patterns skill. Agent Mart. https://agentmart.dev/skills/eveld-follow-test-patterns (last updated 2026-10-24)