agent-readable-ts helps coding agents inspect the live public surface of a
TypeScript or JavaScript API before they write code against it.
Library authors can add agent-oriented usage rules next to a class, object, or
function. Consumers call agentHelp(target) or the agent-readable-ts CLI to get
compact Markdown with the real callable surface plus any author-supplied
behavioral notes.
To let your coding agent automatically call agentHelp() before using an
unfamiliar API, install the companion skill:
npx skills add zydo/skills --skill agent-readableimport { agentHelp } from "agent-readable-ts";
class Sensor {
calibrate(offset: number): void {}
read(): number {
return 0;
}
agentNotes(): string {
return "- Call `calibrate()` once during setup, before `read()`.";
}
}
console.log(agentHelp(new Sensor()));npm install agent-readable-tsFor one-off CLI use:
npx agent-readable-ts commander
npm exec -- agent-readable-ts commander:Command
pnpm dlx agent-readable-ts ./src/widget.ts:WidgetSee Getting Started for full install and CLI usage.
- Python: agent-readable provides the same idea for Python packages and classes.
MIT