coder-xieshijie/dev-skills / skills/repo-readiness/assets/verify-skill
verify-<app>
FlaggedStarts isolated <app> instances, drives them through <entry points> and reports one result per sub-feature and entry with evidence. Use when verifying a change, reproducing a bug, or running, writing or checking feature maps and their scenario scripts.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 6.7 KB |
| features/README.md | markdown | 1.4 KB |
| references/maps.md | markdown | 11.4 KB |
| scripts/config.mjs | script | 5.2 KB |
| scripts/contract.mjs | script | 16.6 KB |
| scripts/map-check.mjs | script | 22.2 KB |
| scripts/primitives.mjs | script | 7.2 KB |
| scripts/runner.mjs | script | 24.0 KB |
| scripts/test/contract-check.test.mjs | script | 3.7 KB |
| scripts/test/contract.test.mjs | script | 1.4 KB |
| scripts/test/fixture/notes-entry.mjs | script | 3.5 KB |
| scripts/test/fixture/proc-app.mjs | script | 1.3 KB |
| scripts/test/fixture/proc-entry.mjs | script | 5.5 KB |
| scripts/test/fixture/web-entry.mjs | script | 535 B |
| scripts/test/helpers.mjs | script | 5.0 KB |
| scripts/test/map-check.test.mjs | script | 9.5 KB |
| scripts/test/primitives.test.mjs | script | 4.1 KB |
| scripts/test/runner.test.mjs | script | 17.3 KB |
| scripts/verify.mjs | script | 9.7 KB |
| verify.config.json | config | 1016 B |
scripts/test/fixture/notes-entry.mjs
View on GitHub// A stand-in entry adapter for the runner's and check's own tests: a notes "app" kept in a file in
// the instance's data directory, so the tests need no process and keep passing when a repository
// deletes a kit adapter it does not use. The real adapters have their own tests.
// launch.env: BUG=1 answers 201 without storing the note (the counterexample a scenario must catch);
// LOGIN_LOST=<marker file> voids the first instance's run and not later ones.
// launch: { failUp: true } makes up throw; { failTools: true } makes tools() throw; { failDown: true }
// makes down report a process it could not stop.
import { appendFileSync, existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from 'node:fs';
import path from 'node:path';
import { EvidenceError } from '../../primitives.mjs';
export async function up({ runId, runDir, launch = {}, root }) {
if (launch.failUp) throw new Error('failUp was set');
const dataDir = path.join(runDir, 'data');
mkdirSync(dataDir, { recursive: true });
const logFile = path.join(runDir, 'app.log');
appendFileSync(logFile, `started ${runId}\n`);
const marker = launch.env?.LOGIN_LOST;
if (marker && !existsSync(marker)) {
writeFileSync(marker, '1');
appendFileSync(logFile, 'LOGIN LOST\n');
}
writeFileSync(path.join(dataDir, 'notes.json'), '[]');
return { dataDir, logFile, runDir, root, bug: launch.env?.BUG === '1', failTools: Boolean(launch.failTools), failDown: Boolean(launch.failDown) };
}
export async function doctor(instance) {
const checks = [{ name: 'data directory exists', ok: existsSync(instance.dataDir), fix: 'up again' }];
return { ok: checks.every((check) => check.ok), checks };
}
export async function down(instance, { options = {}, keepData = false } = {}) {
if (instance.failDown) return { ok: false, kept: [instance.logFile], left: ['a stand-in process'] };
if (!keepData) rmSync(instance.dataDir, { recursive: true, force: true });
const log = existsSync(instance.logFile) ? readFileSync(instance.logFile, 'utf8') : '';
const hit = options.invalidWhen && new RegExp(options.invalidWhen, 'm').exec(log);
return { ok: true, kept: [instance.logFile], ...(hit ? { invalid: `app log: ${hit[0]}` } : {}) };
}
export function sideEffect(what) {
return what.endsWith('(side effect)') ? 'listed in options.sideEffectReads' : undefined;
}
export function tools(instance, { read, options = {} }) {
if (instance.failTools) throw new Error('failTools was set');
const file = path.join(instance.dataDir, 'notes.json');
const effects = (options.sideEffectReads ?? []).map((pattern) => new RegExp(pattern));
return {
async api(method, apiPath, body) {
if (method === 'POST' && apiPath === '/notes') {
if (!body?.title) return { status: 400, body: { error: 'title_required' } };
const id = `n${Date.now()}`;
if (!instance.bug) writeFileSync(file, JSON.stringify([...JSON.parse(readFileSync(file, 'utf8')), { id, title: body.title }]));
return { status: 201, body: { id } };
}
return { status: 404, body: { error: 'not_found' } };
},
async read(apiPath) {
const effect = effects.some((pattern) => pattern.test(apiPath));
return read(effect ? `GET ${apiPath} (side effect)` : `GET ${apiPath}`, async () => {
if (apiPath !== '/notes') throw new EvidenceError(`GET ${apiPath} returned HTTP 404`);
return { notes: JSON.parse(readFileSync(file, 'utf8')) };
});
},
async echo(...args) {
return args;
},
};
}
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |