ad-tdg

An implementation-planning method that starts with the desired result and tests possible ways to reach it. It uses a known technique, a target example, and a map of which parts need checking.

In plain words
What is it for?
Use it to plan and implement changes with multiple plausible strategies, compare three approaches, define expected output, and record the reasoning in a commit or task log.
Why use it?
It helps when the goal is clear but several implementation choices could work. The checks make it easier to choose one approach and verify the finished result.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/corridortech/posecap/ad-tdg
Any agent
npx skills add CorridorTech/PoseCap --skill ad-tdg
Clone the repo
git clone --depth 1 https://github.com/CorridorTech/PoseCap

Made for: Claude Code, Codex.

Per session 136 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,889 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00136 $0.01889
Opus 5 $0.00068 $0.00945
Sonnet 5 $0.00027 $0.00378
Haiku 4.5 $0.00014 $0.00189

Measured 3d ago against content hash fedda0a23ca6, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

ad-tdg scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agents/skills/ad-tdg/SKILL.md · 111 lines

How it starts

The opening of the file, as written. The whole thing — 111 lines — stays where its author put it; the contents beside it link to each section on GitHub.

<background_information> Implements WORKFLOW.md §9 (Outcome-Based Prompting / Test Dependency Map) end-to-end. The skill is for the implementation phase when the canonical technique is known and multiple implementation strategies are plausible. WORKFLOW §14 (ad-spike) covers the technique-unknown regime; §9 (this skill) covers the implementation-strategy-uncertain regime.

No file is written. The output of the skill is the verified implementation that lands in the repo through normal commits. The ground-truth pair, candidate set, selection criterion, and TDM list go into the commit message body — or the task's Notes log when one exists — not into a separate doc/ artifact.

Codex auto-trigger on description keywords is less mature than Claude Code's. If auto-invocation does not fire when the user mentions outcome-based prompting, ground truth, three approaches, or a Test Dependency Map, invoke this skill manually. </background_information>

Route elsewhere when:

  • The technique itself is uncertain across multiple plausible approaches → ad-spike (WORKFLOW §14). Spike validates technique with golden fixture + per-stage debug; TDG validates implementation with ground-truth pair + TDM.
  • The path is fully obvious (one-line fix, mechanical refactor, byte-for-byte port) → TDG is overkill; proceed directly without the skill.
  • No tests cover the surface and the project does not yet have a test runner wired → consider ad-hooks for project gates first; TDG depends on a verifiable green baseline.

Step 1 — ground truth pair. State raw input + exact expected output before any code is written. Concrete, not aspirational. The pair is the contract the implementation must satisfy.

Format depends on the surface:

  • For pure functions: input arguments + expected return value, as code-block or JSON.
  • For data transformations: source data + transformed data, side-by-side.
  • For CLI / API surfaces: request payload + response payload, as paste-ready examples.
  • For UI changes: pre-state DOM / screenshot + post-state DOM / screenshot.

Example (pure function):

Input: parse('--agent claude-code --yes')
Expected output: { agent: 'claude-code', yes: true, dryRun: false, force: false }

The pair is small, explicit, and verifiable. Aspirational language ("loads fast", "handles all edge cases") is not ground truth — concrete examples are.

Step 2 — Test Dependency Map (TDM). List the tests covering the file(s) the change will touch. Run them to establish the green baseline. If no tests cover the surface, write one first that exercises the current behavior before any modification.

Process:

  1. Grep for tests referencing the file by import path: grep -r 'from.*<file>' test/ tests/.
  2. Grep for tests referencing the function or symbol: grep -r '<symbol>' test/ tests/.
  3. Run the matched tests in isolation to confirm green: npx node --test test/<matched>.test.js or equivalent for the language.
  4. If empty: write a test that asserts the current behavior. Run. Confirm green. Then proceed to Step 3.

The TDM is the verification surface — Step 5's "implement + verify" loop runs these tests, not the full suite, so the feedback loop stays under a few seconds. Full-suite runs happen at commit-time via the project's pre-push hook (ad-hooks).

Step 3 — three approaches. Generate three implementation candidates that produce the ground-truth pair. Each candidate names trade-offs along the §9 axes:

Approach A: <name / one-line description>
  - readability: <high / medium / low + reason>
  - performance: <O(...), bytes allocated, etc.>
  - testability: <surface area, mockability, isolation>

Approach B: <name / one-line description>
  - readability: ...
  - performance: ...
  - testability: ...

Approach C: <name / one-line description>
  - readability: ...
  - performance: ...
  - testability: ...

Read the full file on GitHub · 111 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 111 lines · 136 tokens per session scan A fedda0a23ca6

Subscribe to this mod's changes

ad-tdg is a skill published in the GitHub repository CorridorTech/PoseCap (190 stars, last pushed 11d ago), licensed Apache-2.0. It adds 136 tokens to every session and 1,889 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation.

obra/superpowers · 37 tokens

auto-perf-optimize

Run agent-driven VS Code performance or memory investigations. Use when asked to launch Code OSS, automate a VS Code scenario, run the Chat memory smoke runner, capture renderer heap snapshots, take workflow screenshots, compare run summaries, or drive a repeatable scenario before heap-snapshot analysis.

microsoft/vscode · 62 tokens

chat-perf

Run chat perf benchmarks and memory leak checks against the local dev build or any published VS Code version. Use when investigating chat rendering regressions, validating perf-sensitive changes to chat UI, or checking for memory leaks in the chat response pipeline.

microsoft/vscode · 51 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens