Agent skill

Td Integration Test

by marcus in marcus/td

Write integration tests for the td-sync admin API using the TestHarness in internal/api/testharnesstest.go.

MITAuto-check passedTesting & QA

Install Td Integration Test

skills CLI
$ npx skills add marcus/td --skill td-integration-test -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install marcus/td td-integration-test --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/marcus/td.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/td-integration-test .claude/skills/td-integration-test && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
td-integration-test
GitHub stars
250
Token cost
~1.2k tokens
SKILL.md length
285 words
Files
2 (incl. references)
Skills in repo
2
Repo updated
First seen
Licence
MIT

At a glance

Write integration tests for the td-sync admin API using the TestHarness in internal/api/testharnesstest.go.

  • Works in 6 steps: Always t.Parallel() -- each harness is… → Test name prefix: TestIntegration_ → Config overrides via opts:… → …
  • Fix integration tests for admin API endpoints (server
  • SKILL.md covers Quick Start Pattern, Harness API, Admin Scopes and Response Types, plus 1 more section
  • Calls go; reaches x.com

What it does

Td Integration Test is an agent skill from marcus/td. Write integration tests for the td-sync admin API using the TestHarness in internal/api/testharnesstest.go. Use when asked to write, add, or fix integration tests for admin API endpoints (server, users, projects, events, snapshots, CORS, auth). The harness provides a real HTTP server, fluent state builder, and assertion helpers. Tests go in internal/api/adminintegrationtest.go.

Its SKILL.md is about 1.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/harness-api.md`).

It sits in Testing & QA, covering Integration testing. The repository describes itself as: A minimalist CLI for tracking tasks across AI coding sessions. The licence is MIT.

When your agent uses it

  • Fix integration tests for admin API endpoints (server
  • Tasks that involve Integration testing

Example prompts

  • “/td-integration-test”

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Always t.Parallel() -- each harness is isolated
  2. Test name prefix: TestIntegration_
  3. Config overrides via opts: newTestHarness(t, func(cfg *Config) { cfg.CORSAllowedOrigins = []string{"https://x.com"} })
  4. First user created is auto-admin; consume with h.CreateUser("first@test.com") when testing non-admin denial
  5. CORS tests need manual http.NewRequest since Do doesn't support custom headers
  6. Run tests: go test -v -run TestIntegration ./internal/api/

What it can do on your machine

Read from SKILL.md and the folder at commit b206bbf. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • go

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • x.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Td Integration Test loads about 1.2k tokens when it runs, and up to ~3.6k if it reads all its reference files. Until then it costs about 101 tokens; SKILL.md has 285 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~101
When it runs · the whole SKILL.md, loaded when a task matches
~1.2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from marcus/td at commit b206bbf, republished under its MIT licence (© marcus). 285 words, ~1,221 tokens.

Download SKILL.mdSave it as .claude/skills/td-integration-test/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
td-integration-test
description
Write integration tests for the td-sync admin API using the TestHarness in internal/api/testharness_test.go. Use when asked to write, add, or fix integration tests for admin API endpoints (server, users, projects, events, snapshots, CORS, auth). The harness provides a real HTTP server, fluent state builder, and assertion helpers. Tests go in internal/api/admin_integration_test.go.

td-sync Admin API Integration Tests

Write integration tests in internal/api/admin_integration_test.go using the harness in internal/api/testharness_test.go. Tests run against a real HTTP server on a random port with isolated temp databases.

Quick Start Pattern

go
func TestIntegration_DescriptiveName(t *testing.T) {
    t.Parallel()
    h := newTestHarness(t)
    state := h.Build().
        WithUser("user@test.com").
        WithAdmin("admin@test.com", "admin:read:server,sync").
        WithProject("proj1", "user@test.com").
        WithEvents("proj1", "user@test.com", 5).
        Done()

    token := state.AdminToken("admin@test.com")
    pid := state.ProjectID("proj1")

    var resp adminEventsResponse
    h.DoJSON("GET", fmt.Sprintf("/v1/admin/projects/%s/events", pid), token, nil, &resp)

    if len(resp.Data) != 5 {
        t.Fatalf("expected 5 events, got %d", len(resp.Data))
    }
}

Harness API

See references/harness-api.md for the complete API reference with all method signatures and detailed usage notes.

Core
  • newTestHarness(t, ...func(*Config)) *TestHarness -- real HTTP server, isolated DB, auto-cleanup
  • h.Do(method, path, token, body) *http.Response -- real HTTP request (caller closes body)
  • h.DoJSON(method, path, token, body, &out) *http.Response -- request + JSON decode (fatals on 4xx/5xx)
State Builder
go
h.Build().
    WithUser(email).                          // sync-scoped key
    WithAdmin(email, scopes).                 // admin key with scopes
    WithProject(name, ownerEmail).            // via API (owner must exist)
    WithMember(projectName, email, role).     // "owner"/"writer"/"reader"
    WithEvents(projectName, userEmail, count).// cycles issues/logs/comments
    WithSnapshot(projectName).                // triggers snapshot build
    WithAuthEvents(count).                    // inserts directly to DB
    WithRateLimitEvents(count).               // inserts directly to DB
    Done() // -> *TestState

Ordering matters: create users before projects, projects before members/events/snapshots.

State Accessors

state.UserToken(email), state.UserID(email), state.AdminToken(email), state.ProjectID(name), state.Harness()

Assertions
  • AssertStatus(t, resp, 200) -- checks status, prints body on failure
  • AssertErrorResponse(t, resp, 403, "insufficient_admin_scope") -- checks status + error code
  • ReadJSON[T](t, resp) T -- generic JSON decode
  • AssertPaginated[T](t, resp, count, hasMore) PaginatedResponse[T] -- checks paginated list
  • AssertCORSHeaders(t, resp, origin) / AssertNoCORSHeaders(t, resp)
  • h.AssertRequiresAdminScope(t, method, path, wrongToken) -- 403 + error code check

Admin Scopes

ScopeEndpoints
admin:read:serverserver/overview, server/config, rate-limit-violations, users, users/{id}, users/{id}/keys, auth/events
admin:read:projectsprojects, projects/{id}, projects/{id}/members, sync/status, sync/cursors
admin:read:eventsprojects/{id}/events, projects/{id}/events/{seq}, entity-types
admin:read:snapshotsprojects/{id}/snapshot/meta, projects/{id}/snapshot/query
admin:exportprojects/{id}/events/export

Response Types

Internal types accessible from test files in package api:

  • serverOverviewResponse -- server overview
  • serverConfigResponse -- server config
  • adminEventsResponse -- {Data []adminEvent, HasMore bool}
  • adminEvent -- single event: ServerSeq, EntityType, EntityID, ActionType, Payload
  • adminSyncStatusResponse -- {EventCount, LastServerSeq, LastEventTime}
  • adminCursorEntry -- {ClientID, LastEventID, LastSyncAt, DistanceFromHead}
  • serverdb.AdminProject -- project: ID, Name, MemberCount, EventCount
  • serverdb.AdminUser -- user: ID, Email, IsAdmin, ProjectCount
  • serverdb.AdminProjectMember -- {UserID, Email, Role}

Rules

  1. Always t.Parallel() -- each harness is isolated
  2. Test name prefix: TestIntegration_
  3. Config overrides via opts: newTestHarness(t, func(cfg *Config) { cfg.CORSAllowedOrigins = []string{"https://x.com"} })
  4. First user created is auto-admin; consume with h.CreateUser("first@test.com") when testing non-admin denial
  5. CORS tests need manual http.NewRequest since Do doesn't support custom headers
  6. Run tests: go test -v -run TestIntegration ./internal/api/

© marcus, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in .claude/skills/td-integration-test of marcus/td.

  • SKILL.md
  • references/harness-api.md

Open the folder on GitHubat commit b206bbf

Compare with similar skills

Td Integration Test next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Td Integration Test compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Td Integration Test this skillmarcus/td250—~1.2kAutomated safety check: PassMIT
Plugin Testingpolyipseity/obsidian-terminal948—~828Automated safety check: PassAGPL-3.0
Create Modulecartography-cncf/cartography4.1k—~2.5kAutomated safety check: PassApache-2.0
Integration E2E Testingshinpr/claude-code-workflows690—~3.5kAutomated safety check: PassMIT
JS-in-HTML Testingliaohch3/claude-tap3.3k—~924Automated safety check: PassMIT
Crosvm Testinggoogle/crosvm1.3k—~847Automated safety check: PassBSD-3-Clause

Similar skills

  • Plugin Testing

    polyipseity/obsidian-terminal

    Skill for testing Obsidian plugin features in this repository.

    948 GitHub stars~828 tokensUpdated 4 days ago
    Testing & QAAuto-check passed
  • Create Module

    cartography-cncf/cartography

    Author a new Cartography intel module end-to-end (entry point, sync GET/TRANSFORM/LOAD/CLEANUP, declarative data model, integration test, schema docs).

    4.1k GitHub stars~2.5k tokensUpdated today
    Testing & QAAuto-check passed
  • Integration E2E Testing

    shinpr/claude-code-workflows

    Integration and E2E test design principles, ROI calculation, test skeleton specification, and review criteria.

    690 GitHub stars~3.5k tokensUpdated 6 days ago
    Testing & QAAuto-check passed
  • JS-in-HTML Testing

    liaohch3/claude-tap

    Tests JavaScript embedded in an HTML file in two layers: pytest checks of the logic ported to Python, and Playwright runs in a real browser for the DOM.

    3.3k GitHub stars~924 tokensUpdated 15 days ago
    Testing & QAAuto-check passed
  • Crosvm Testing

    google/crosvm

    Official

    Skill to assist with running tests and managing test VMs in the crosvm repository.

    1.3k GitHub stars~847 tokensUpdated today
    Testing & QAAuto-check passed
  • Add Acceptance Test

    talkincode/toughradius

    Write CI-executable acceptance/integration tests for protocol or end-to-end changes (TR-F022).

    691 GitHub stars~827 tokensUpdated 4 days ago
    Testing & QAAuto-check passed

More from marcus/td

  • Task management for AI agents across context windows. An agent skill from marcus/td.

    250 GitHub stars~2k tokensUpdated 7 days ago
    Auto-check passed

Categories

Questions about Td Integration Test

What does Td Integration Test do?

Write integration tests for the td-sync admin API using the TestHarness in internal/api/testharnesstest.go. Td Integration Test is an agent skill from marcus/td.go.

When should I use Td Integration Test?

Td Integration Test fits situations like: fix integration tests for admin API endpoints (server; tasks that involve Integration testing.

How do I install Td Integration Test in Claude Code?

Run `npx skills add marcus/td --skill td-integration-test -a claude-code`. Or copy the skill folder (.claude/skills/td-integration-test in marcus/td) into .claude/skills/td-integration-test in your project. Claude Code loads it when a task matches its description.

How do I install Td Integration Test in Codex?

Run `npx skills add marcus/td --skill td-integration-test -a codex`. Or copy the skill folder (.claude/skills/td-integration-test in marcus/td) into .agents/skills/td-integration-test in your project. Codex loads it when a task matches its description.

Can I use Td Integration Test in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add marcus/td --skill td-integration-test -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/td-integration-test, .gemini/skills/td-integration-test, .github/skills/td-integration-test and .opencode/skills/td-integration-test in your project.

What does Td Integration Test need to run?

Going by SKILL.md and its folder, Td Integration Test needs the command-line tools its instructions call (go).

Does Td Integration Test access the network?

SKILL.md names 1 domain. In commands or code: x.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Td Integration Test safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Td Integration Test use?

Td Integration Test is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Td Integration Test use?

About 1.2k tokens (SKILL.md is roughly 4.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.4k tokens, read only when the agent opens those files.

What are the alternatives to Td Integration Test?

Skills that share tags, products or a category with Td Integration Test: Plugin Testing (polyipseity/obsidian-terminal, 948 stars), Create Module (cartography-cncf/cartography, 4.1k stars), Integration E2E Testing (shinpr/claude-code-workflows, 690 stars) and JS-in-HTML Testing (liaohch3/claude-tap, 3.3k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Td Integration Test?

marcus (a GitHub user) maintains it in marcus/td, which has 250 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on September 30, 2026.

Source: marcus/td on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.