agentleFS
dzivkovidzivkovi/agent-skills-on-databricks/skills/document-insights/SKILL.md

document-insights

Skill2 starsChanged 4 months agoMITView on GitHub

Analyze a text document and produce an insights report that pairs EXACT, code-computed metrics (word/character/sentence counts, reading time) with an LLM's interpretive read (sentiment, one-line summary, key themes). Use when you need a grounded document summary where the numbers must be correct, not estimated. Triggers: 'analyze this document', 'document insights', 'sentiment and word count', 'summarize with stats'.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Deterministic step: - run scripts/analyze.py <input-file>.

    line 17
  2. Distinctive:

    Non-deterministic step: - ask the model for an interpretive read of the document: overall sentiment (positive / neutral / negative) with a …

    line 21
  3. Distinctive:

    Use hyphens, not em-dashes.

    line 34

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Document Insights

This skill demonstrates the core idea of an Agent Skill: pair DETERMINISTIC code (exact facts an LLM cannot reliably compute) with NON-DETERMINISTIC LLM reasoning (judgment an LLM is good at), and keep the two clearly separated in the output.

How to run this skill

  1. Deterministic step - run scripts/analyze.py <input-file>. It returns a JSON object of exact metrics: word_count, char_count, char_count_no_spaces, line_count, sentence_count, avg_words_per_sentence, reading_time_min, longest_word. These numbers are ground truth. Never let the LLM recompute or "estimate" them.
  2. Non-deterministic step - ask the model for an interpretive read of the document: overall sentiment (positive / neutral / negative) with a one-phrase justification, a single-sentence summary, and 2-3 key themes. The model must ground its answer in the document text and may reference the exact metrics from step 1 (e.g. "a short 42-word note"), but must never invent or restate counts as if it computed them.

Output contract

Produce markdown with two clearly-labeled sections so a reader can see the seam:

  • Metrics (computed by code - exact) - a table of the numbers from analyze.py.
  • Reading (interpreted by the LLM) - sentiment, one-sentence summary, key themes.

Use hyphens, not em-dashes. Keep it concise.

Why this split matters

An LLM asked "how many words is this?" will guess, and often guess wrong. analyze.py counts them exactly. Conversely, code cannot judge tone; the LLM can. The skill gets the best of both by letting each do what it is good at - and by labeling which is which, the output never passes an LLM guess off as a hard fact.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.