# CodeTour File Builder

CodeTour File Builder is a tested SKILL.md that turns a code tour described in words, plus the list of files with their line counts, into one valid CodeTour file (JSON with a title and steps, each step holding a file, a line and a description) and nothing else; an agent buys it once for $0.01 over x402.

- Page: https://aiskills402.com/skills/codetour-file
- Category: Code & Engineering (https://aiskills402.com/categories/code)
- Price: $0.01 once, USD-priced, paid in USDC on Base over x402. Price as loaded on this page. The 402 response your agent receives is authoritative.
- Version: 1.0.0
- Card (JSON): https://api.aiskills402.com/v1/skills/codetour-file

## Use it when

Turns a code tour described in words, plus the list of files with their line counts, into one valid CodeTour file (JSON with a title and steps, each step holding a file, a line and a description) and nothing else. It keeps file paths relative and exactly as listed, checks every line number against the length of its file, and leaves out a step whose file is not in the list or whose line lies past the end, naming each skipped step in the description of the tour in one fixed form. A tour with only valid steps carries no mention of skipping. Use to turn a walkthrough of a code base into a tour file for the CodeTour editor extension, to draft onboarding tours, or to rebuild a tour after files were renamed.

## Not for

Reading the code to write better step text, tour options such as a branch reference or a primary flag, and multi-root workspaces. It sees only the request and the file list, so every step text comes from the request.

## Tested, honestly

Tested 2026-10-19.

- Strong model (claude-sonnet-5-5 (Claude Code alias "sonnet")): Right on all 3 cases, read by hand. On a login walkthrough it kept three steps, left out the stop whose file is not in the list without guessing the similar logger file, and named it in the description in the fixed form. On a billing walkthrough it cleaned the leading dot and the backslashes, kept the steps in order and skipped only the line past the end. On a clean tour it kept the step on the last line, left out the line for the step that had none and added no description. Every answer was bare JSON.
- Weak model (claude-haiku-5-5 (Claude Code alias "haiku")): Right on all 3 cases, read by hand. Its three answers were identical in content to the strong model: the missing file named in the fixed form, the path spellings cleaned, the last line kept and no description on the clean tour. Bare JSON each time. The inputs resemble the example inside the skill, so this is a light confirmation, not a hard test.

Note: Light test: three cases (two planted, one clean), one run per model; no comparison without the skill. The three inputs were written by us; each planted one carries a safe look-alike and neither planted case has a comment pointing at the defect. Facts come from public documentation, read on 19 October 2026; there are no owner-measured facts.

Full summary: https://aiskills402.com/skills/codetour-file/tests

## Example

### English (claude-sonnet-5-5)

Before:

> Request: Make a tour called "How login works" with four stops, in this order. 1. src/routes/login.ts, line 12: the login route receives the form and calls the verifier. 2. src/auth/verify.ts, line 40: the password hash is compared here. 3. src/auth/session.ts, line 77: a session id is stored here. 4. src/audit/log.ts, line 5: every login attempt is written to the audit log. File list:…

After:

> {"title": "How login works", "description": "Skipped: src/audit/log.ts:5 (missing file)", "steps": [{"file": "src/routes/login.ts", "line": 12, "description": "The login route receives the form and calls the verifier."}, {"file": "src/auth/verify.ts", "line": 40, "description": "The password hash is compared here."}, {"file": "src/auth/session.ts", "line": 77, "description": "A session id is…

## What is in the file

- The input
- The answer
- Skipped stops
- Rules
- Work in this order
- Short example

## Languages

English

## How to buy

Agent (HTTP):

1. GET https://api.aiskills402.com/v1/skills/codetour-file/file without a payment header. The answer is 402 with a PAYMENT-REQUIRED header (x402 v2): exact amount, asset, network, recipient.
2. Sign `accepts[0]` with an x402 client (for example @x402/core + @x402/evm).
3. Repeat the GET with the signature in the PAYMENT-SIGNATURE header. The answer is 200 with the file, its sha256 and a re-download token.

Agent (MCP): https://mcp.aiskills402.com/mcp — free tools search_skills, get_skill, redownload_skill. Buying itself is over HTTP.

Full flow: https://aiskills402.com/docs

## The file

- Version: 1.0.0
- Size: 5.2 KB (5361 bytes)
- SHA-256: 8e813a3d543bb2c417b9e2b6a4a0bdaa3d9fb41110fdd05d2d5bfee7c27e12d2
- Updated: 2026-10-19
- New versions are free through your re-download token.

## Versions

### 1.0.0 (2026-10-19)

First release, written in the light-test batch of 19 October 2026 (three cases, price $0.01). The idea is ours; no foreign skill was opened, facts come from public documentation (see notes/ideas.md). Output: see the skill description.

Test: three cases written by hand (two planted, each with a safe look-alike, one clean control), one run on Claude Sonnet and one on Claude Haiku, no run without the skill, no iteration on the skill text after the runs. `test/control.mjs` shows that the checks pass on the ideal answers and fail on realistic wrong ones. See `test-summary.json` for the verdicts read by hand.

## License

Perpetual, non-exclusive; use and modify for yourself incl. paid work; no resale or republishing. Holder: Georgi Kalchev, aiskills402.com. Terms: https://aiskills402.com/docs#license

## FAQ

### Missing file in the list: what happens to that stop?

A stop whose file is not in your list would open an error in the editor, so the skill leaves it out of the steps and names it in the tour description in one fixed form, for example Skipped: src/audit/log.ts:5 (missing file). It never swaps in a similar name from the list, and a tour with no skipped stops has no description key at all.

### Is a step on the very last line of a file kept?

Yes. Lines count from 1 and the last line is valid, so line 77 of a 77-line file is a good target, while line 240 of a 200-line file is skipped as a line past the end. A stop that gives no line gets no line key.

### Which requests went into the test?

The test used a login walkthrough with one file absent from the list, a billing walkthrough whose paths carry a leading dot and backslashes and whose tax stop lies past the end of its file, and a clean start-up tour with a step on the last line. Each request went once to Claude Sonnet and once to Claude Haiku; read by hand, both models matched every expectation.

### What does the reply look like?

A single JSON object with no fence, no greeting and no closing remark, so a script can write it to disk unchanged. Keys of a step follow a fixed order, and the only optional top-level key is the description that lists skipped stops.

## Measurement limits

- Models other than the two named above were not run.
- Each verdict comes from the test run on the date shown; the skill may have changed since (check the version).
- Full test inputs are not published here, only short excerpts of our own text.
- Results on your own texts, languages and domains can differ.

Offer note: Paid in USDC (USD-pegged) over x402 by an AI agent; one-time.
