Skip to main content
Agent skill

Test Repo

Use this skill to test strategy changes against a fresh test repository. Invoke when the user asks to "test against a test repo", "validate the changes", or wants to verify session hooks, commits, and checkpoint creation work correctly.

Get started

Get the complete skill folder, including its scripts and reference files.

When to use this skill

Use Test Repo when an AI agent needs a reusable SKILL.md workflow for this job: Use this skill to test strategy changes against a fresh test repository. Invoke when the user asks to "test against a test repo", "validate the changes", or wants to verify session hooks, commits, and checkpoint creation work correctly.

When not to use it

Skip Test Repo when the task is outside the coding category, or when a more specific skill in this directory already covers the same workflow with clearer triggers.

How to install

Where will you use it?

Install scope
Claude Code folder setup
mkdir -p ~/.claude/skills/test-repo
# Save SKILL.md to ~/.claude/skills/test-repo/SKILL.md
  1. Claude Code personal install: place the skill and its bundled files at ~/.claude/skills/test-repo/SKILL.md. For a shared project, commit the folder at .claude/skills/test-repo/ instead.
  2. Current Claude Code detects SKILL.md changes in watched directories during the session. If you just created a top-level skills directory, run /reload-skills. Check that the skill is listed before testing its trigger.
  3. For Claude chat or Cowork in the Desktop app, manage uploaded skills in Customize > Skills; copying files into a local Claude Code folder is not a Desktop install. Other agents may use different install locations.

Full install guide for Claude, Cursor, and Codex →

Try a starter prompt

After installing the skill, paste this starter prompt into your agent to verify it triggers on a small task.

Starter prompt
Use the Test Repo skill for this task: User asks to "test against a test repo". Confirm any required inputs or files before making changes.

What supports this recommendation?

83/100 provisional content score. This measures documentation, practical detail and source signals. It is not a measured task success rate or a security certification.

Documentation
92/100
Practical detail
92/100
Source evidence
63/100
Source signals
72/100
Model compatibility evidence
  • claudeinferred

    The skill text mentions Claude or a closely associated term. This is keyword-derived compatibility; no hands-on model test is recorded.

  • chatgptuntested

    No model-specific signal or recorded compatibility test was found.

  • geminiuntested

    No model-specific signal or recorded compatibility test was found.

  • copilotuntested

    No model-specific signal or recorded compatibility test was found.

  • llamauntested

    No model-specific signal or recorded compatibility test was found.

  • perplexityuntested

    No model-specific signal or recorded compatibility test was found.

  • mistraluntested

    No model-specific signal or recorded compatibility test was found.

  • grokuntested

    No model-specific signal or recorded compatibility test was found.

Inferred compatibility is based on content signals. Check the app, its available tools and setup requirements before running a skill.

What this skill does

# Test Repository Skill

This skill validates the CLI's session management and checkpoint creation by running an end-to-end test against a fresh temporary repository.

## When to Use

- User asks to "test against a test repo" - User wants to validate strategy changes (manual-commit) - User asks to verify session hooks, commits, or checkpoint creation - After making changes to strategy code

## Testing Approaches

**Automated Testing (recommended for validation):** ```bash mise run test:integration ``` Run the comprehensive integration test suite. Best for verifying correctness after code changes.

**Manual Testing (this skill):** Use the test harness for: - Debugging specific strategy behaviors - Interactive exploration of the checkpoint workflow - Manual verification of edge cases - Understanding how the system works step-by-step

## Test Procedure

### Setup

**Step 1: Build the CLI**

```bash go build -o /tmp/entire-bin ./cmd/entire ```

**Step 2: Approve the test harness (one-time)**

Add this pattern to your Claude Code approved commands, or approve it once when prompted:

```json { "approvedBashCommands": [ ".claude/skills/test-repo/test-harness.sh*" ] } ```

**Optional: Set strategy** (defaults to `manual-commit`):

```bash export STRATEGY=manual-commit ```

### Test Steps

Execute these steps in order:

#### 1. Setup Test Environment

```bash .claude/skills/test-repo/test-harness.sh setup-repo .claude/skills/test-repo/test-harness.sh configure-strategy ```

#### 2. Simulate Session

```bash .claude/skills/test-repo/test-harness.sh start-session .claude/skills/test-repo/test-harness.sh create-files .claude/skills/test-repo/test-harness.sh create-transcript .claude/skills/test-repo/test-harness.sh stop-session ```

#### 3. Verify Results

```bash .claude/skills/test-repo/test-harness.sh verify-commit .claude/skills/test-repo/test-harness.sh verify-session-state .claude/skills/test-repo/test-harness.sh verify-no-shadow-branch .claude/skills/test-repo/test-harness.sh list-pending-checkpoints ```

Expected results:

| Check | Result | |-------|--------| | Active branch | Optional Entire-Checkpoint: trailer | | Session state | ✓ Exists, with the turn's files in `files_touched` | | Shadow branch | ✓ None (turn ends write nothing to git) | | Pending checkpoints | ✓ A next-checkpoint preview (`is_next_checkpoint: true`) | | Metadata branch | Written only when you commit (see "Test User Commits") |

#### 4. Check Listing After Further Changes

```bash .claude/skills/test-repo/test-harness.sh create-changes .claude/skills/test-repo/test-harness.sh list-pending-checkpoints ```

**Expected Behavior:** - The next-checkpoint preview from step 3 is still listed; the new uncommitted changes do not disturb it. There is no restore step: the CLI has no `rewind` command, and nothing writes a checkpoint back over the worktree.

#### 5. Cleanup

```bash .claude/skills/test-repo/test-harness.sh cleanup ```

### Quick Commands

Show environment info: ```bash .claude/skills/test-repo/test-harness.sh info ```

Run full test in one go: ```bash go build -o /tmp/entire-bin ./cmd/entire && \ .claude/skills/test-repo/test-harness.sh setup-repo && \ .claude/skills/test-repo/test-harness.sh configure-strategy && \ .claude/skills/test-repo/test-harness.sh start-session && \ .claude/skills/test-repo/test-harness.sh create-files && \ .claude/skills/test-repo/test-harness.sh create-transcript && \ .claude/skills/test-repo/test-harness.sh stop-session && \ .claude/skills/test-repo/test-harness.sh verify-no-shadow-branch && \ .claude/skills/test-repo/test-harness.sh list-pending-checkpoints ```

## Expected Results by Strategy

### Manual-Commit Strategy (default) - Active branch commits: **NO modifications** (no commits created by Entire) - Turn ends: recorded in session state only (`.git/entire-sessions/`); no shadow branch is written - Metadata: written to `entire/checkpoints/v1` (or per-checkpoint refs) when you commit - AllowsMainBranch: **true** (safe on main/master)

## Additional Testing (Optional)

### Test Subagent Checkpoints

For testing task checkpoints (subagent execution):

```bash # After user-prompt-submit, simulate a task execution TOOL_USE_ID="toolu_test123"

# Pre-task hook (before subagent starts) echo "{\"session_id\": \"$SESSION_ID\", \"transcript_path\": \"$TRANSCRIPT_DIR/transcript.jsonl\", \"tool_use_id\": \"$TOOL_USE_ID\", \"tool_input\": {\"subagent_type\": \"dev\", \"description\": \"Test task\"}}" | \ ENTIRE_TEST_CLAUDE_PROJECT_DIR="$TRANSCRIPT_DIR" \ /tmp/entire-bin hooks claude-code pre-task

# Create subagent transcript mkdir -p "$TRANSCRIPT_DIR/tasks/$TOOL_USE_ID" echo '{"type":"human","message":{"content":"Test task"}}' > "$TRANSCRIPT_DIR/tasks/$TOOL_USE_ID/agent-test.jsonl"

# Post-task hook (after subagent completes) echo "{\"session_id\": \"$SESSION_ID\", \"transcript_path\": \"$TRANSCRIPT_DIR/transcript.jsonl\", \"tool_use_id\": \"$TOOL_USE_ID\", \"tool_response\": {\"agentId\": \"test-agent\"}}" | \ ENTIRE_TEST_CLAUDE_PROJECT_DIR="$TRANSCRIPT_DIR" \ /tmp/entire-bin hooks claude-code post-task

# Verify the task record is pending (listed in this session's next-checkpoint preview) /tmp/entire-bin checkpoint list --pending --json | jq '.[] | select(.is_next_checkpoint == true) | .next_checkpoint.task_records' ```

### Test User Commits (Condensation)

For manual-commit, test log condensation:

```bash # Create a user commit (triggers post-commit hook) git add app.js git commit -m "Add greeting function"

# Verify logs condensed to entire/checkpoints/v1 git show entire/checkpoints/v1 --stat | grep -E "^[0-9a-f]{2}/[0-9a-f]" ```

## Available Claude Code Hooks

All hooks use the command: `entire hooks claude-code <hook-name>`

- `user-prompt-submit` - Called when user submits a prompt (before session starts) - `session-start` - Called when session starts - `stop` - Called when the agent's turn ends (records the turn in session state; the checkpoint is written at commit) - `pre-task` - Called before Task tool execution - `post-task` - Called after Task tool execution - `post-todo` - No longer installed; still accepted so configs written by older CLIs keep working, and records nothing

## Report Format

After running the test, report:

``` ## Test Results: [STRATEGY] Strategy

| Step | Result | |------|--------| | Build CLI | PASS/FAIL | | Create repo | PASS/FAIL | | Session hooks | PASS/FAIL | | Clean commits | PASS/FAIL | | Metadata branch | PASS/FAIL | | Pending checkpoints | PASS/FAIL |

**Overall: PASS/FAIL**

[Any errors or notes] ```

Intended uses

  • User asks to "test against a test repo"
  • User wants to validate strategy changes (manual-commit)
  • User asks to verify session hooks, commits, or checkpoint creation
  • After making changes to strategy code

Implementation notes

  • Review the source instructions and adapt inputs before running the workflow.

Try it, then tell us how it went

A copied prompt does not tell us whether the task worked. Report your result after checking the output. We collect your tool and outcome, never your files or prompt.