A minimum-viable LLM skill — the smallest amount of code that takes structured input, calls an LLM, and emits structured output.
Contract
Input (stdin, JSON):
{ "text": "...long input...", "length": 60 }
text (string, required) — what to summarise.
length (number, optional, default 60) — target word count for the summary.
Output (stdout, JSON):
{ "summary": "..." }
Errors — written to stderr as { "error": "...message..." } and exit code 1.
Required environment
Var
Purpose
ANTHROPIC_API_KEY
Talks to Claude. Swap the SDK call to point at OpenAI / Gemini / your own backend; nothing else changes.
Run locally
cd examples/text-summarizer
bun install
ANTHROPIC_API_KEY=sk-ant-... echo '{"text":"...","length":40}' | bun run src/index.ts
Adapt this
Different model vendor — replace Anthropic with the SDK of your choice; the I/O shape stays.
Stream output — emit one JSON line per token instead of one final blob.
Sanitise input — the current code passes text to the model verbatim; for untrusted callers, strip control characters and cap length before the API call.
1---2name: text-summarizer3description: text-summarizer4---56# text-summarizer78A minimum-viable LLM skill — the smallest amount of code that takes structured input, calls an LLM, and emits structured output.910## Contract1112**Input** (stdin, JSON):1314```json15{ "text": "...long input...", "length": 60 }16```1718- `text` (string, required) — what to summarise.19- `length` (number, optional, default 60) — target word count for the summary.2021**Output** (stdout, JSON):2223```json24{ "summary": "..." }25```2627**Errors** — written to stderr as `{ "error": "...message..." }` and exit code `1`.2829## Required environment3031| Var | Purpose |32|---|---|33| `ANTHROPIC_API_KEY` | Talks to Claude. Swap the SDK call to point at OpenAI / Gemini / your own backend; nothing else changes. |3435## Run locally3637```bash38cd examples/text-summarizer39bun install40ANTHROPIC_API_KEY=sk-ant-... echo '{"text":"...","length":40}' | bun run src/index.ts41```4243## Adapt this4445- **Different model vendor** — replace `Anthropic` with the SDK of your choice; the I/O shape stays.46- **Stream output** — emit one JSON line per token instead of one final blob.47- **Sanitise input** — the current code passes `text` to the model verbatim; for untrusted callers, strip control characters and cap length before the API call.
Run npx skillmds@latest add chronoaiproject/text-summarizer in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
text-summarizer It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
ChronoAIProject (@chronoaiproject) published this skill. Their other Agent Skills are listed on their SkillMD profile.