coder-xieshijie/dev-skills / skills/repo-readiness
repo-readiness
Verified| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 8.8 KB |
| agents/openai.yaml | config | 171 B |
| assets/feature-map.template.md | markdown | 1.5 KB |
| references/adapters/README.md | markdown | 1.7 KB |
| references/adapters/_page.mjs | script | 3.1 KB |
| references/adapters/_process.mjs | script | 8.3 KB |
| references/adapters/cli.mjs | script | 13.4 KB |
| references/adapters/http-service.mjs | script | 11.1 KB |
| references/adapters/test/cli.test.mjs | script | 9.3 KB |
| references/adapters/test/contract.test.mjs | script | 2.2 KB |
| references/adapters/test/fixture/toy-app.mjs | script | 2.3 KB |
| references/adapters/test/fixture/toy-cli.mjs | script | 2.6 KB |
| references/adapters/test/http-service.test.mjs | script | 6.2 KB |
| references/adapters/test/page.test.mjs | script | 6.7 KB |
| references/control-contract.md | markdown | 14.6 KB |
| references/counterexamples.md | markdown | 2.7 KB |
| references/lessons.md | markdown | 7.5 KB |
| references/levels.md | markdown | 4.0 KB |
| references/map-audit.md | markdown | 2.7 KB |
| references/route.md | markdown | 4.8 KB |
references/adapters/test/fixture/toy-app.mjs
View on GitHub// A tiny notes service for the HTTP adapter's tests. It takes its port, data directory and run ID
// from the environment (PORT, DATA_DIR, RUN_ID) or from arguments (--port, --data, --token).
// BUG=1 makes POST /notes answer 201 without storing the note: the counterexample a scenario must
// catch. With --token, every request without `authorization: Bearer <token>` answers 401.
// GET /env/<NAME> answers what the instance sees of one environment variable; health answers the
// run ID and the pid.
import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
import http from 'node:http';
import path from 'node:path';
const arg = (name) => {
const index = process.argv.indexOf(`--${name}`);
return index > 0 ? process.argv[index + 1] : undefined;
};
const PORT = arg('port') ?? process.env.PORT;
const DATA_DIR = arg('data') ?? process.env.DATA_DIR;
const TOKEN = arg('token');
const { RUN_ID, BUG } = process.env;
mkdirSync(DATA_DIR, { recursive: true });
const file = path.join(DATA_DIR, 'notes.json');
const load = () => (existsSync(file) ? JSON.parse(readFileSync(file, 'utf8')) : []);
const send = (res, status, body) => {
res.writeHead(status, { 'content-type': 'application/json' });
res.end(JSON.stringify(body));
};
http
.createServer((req, res) => {
if (TOKEN && req.headers.authorization !== `Bearer ${TOKEN}`) return send(res, 401, { error: 'token_required' });
if (req.method === 'GET' && req.url === '/health') return send(res, 200, { runId: RUN_ID, pid: process.pid });
if (req.method === 'GET' && req.url === '/notes') return send(res, 200, { notes: load() });
if (req.method === 'GET' && req.url.startsWith('/env/'))
return send(res, 200, { value: process.env[req.url.slice('/env/'.length)] ?? null });
if (req.method === 'POST' && req.url === '/notes') {
let raw = '';
req.on('data', (chunk) => {
raw += chunk;
});
req.on('end', () => {
const { title } = JSON.parse(raw || '{}');
if (!title) return send(res, 400, { error: 'title_required' });
const id = `n${Date.now()}`;
if (BUG !== '1') writeFileSync(file, JSON.stringify([...load(), { id, title }]));
return send(res, 201, { id });
});
return undefined;
}
return send(res, 404, { error: 'not_found' });
})
.listen(Number(PORT), '127.0.0.1');
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 |