Index of every page on this site: llms.txt
All skills
chronoaiproject avatar

/text-summarizer

@88f2d78
Run it yourself

Summarise a chunk of text down to roughly `length` words using the agent's configured LLM provider. Input shape `{ text: string, length?: number }` on stdin, JSON; output shape `{ summary: string }` on stdout, JSON. Minimal: ~50 lines, no streaming, no retries — a deliberate baseline so the wiring is visible. For a production summariser, fork this and add retries, prompt-injection sanitisation, length validation, and per-model cost tracking.

  • 4 files
  • 4.5 KB
  • MIT
  • Updated 6 months ago
  • GitHub
Use this Skill: https://skilld.dev/gh/chronoaiproject/ornn/text-summarizer

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈116 tokens for metadata: the name and description. ≈308 when used: this file. ≈197 more on demand in 2 files.

Description uses 5.8% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈463 characters, or 5.8%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

text-summarizer

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.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at 88f2d78. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 5 days ago.

Activeupdated 6 months ago
version
1.0

README badge

README badge for chronoaiproject/ornn/text-summarizer