IbrahimSobh/AISkills / high-fidelity-summarizer
high-fidelity-summarizer
VerifiedCompress technical, legal, financial, or analytical text into a dense summary that keeps every named entity, number, claim, and the source's structural/chronological flow — but rewrites the prose. Wording is carried over literally by exception only (proper nouns, product names, acronyms, file names, terms of art), plus at most one verbatim quote under 15 words. No outside information, no simplification. Length targets 25% of the source word count. Use whenever the user asks to "summarize," "condense," "compress," or "shorten" a document, article, contract, report, paper, or transcript — especially where factual precision outranks readability and the summary must stand in as a proxy for the original. Do NOT use for making text easier to understand (that's the simplifier skill — it preserves length and reduces difficulty; this preserves difficulty and reduces length). Do NOT use when the user wants the original's shape and wording kept for study with no length target (that's content-highlighter).
| File | Kind | Size |
|---|---|---|
| README.md | markdown | 2.7 KB |
| SKILL.md | skill md | 10.5 KB |
| scripts/check_summary.py | script | 3.2 KB |
scripts/check_summary.py
View on GitHub#!/usr/bin/env python3
"""
Mechanical verification for high-fidelity-summarizer output.
Checks:
1. Word count vs. the 22%-28% compression band (target 25%)
2. Compression ratio (PASS only if 22% <= ratio <= 28%)
3. Capitalized terms/acronyms found in the source but missing from the summary
(a proxy for "did we drop a name, acronym, file name, or term of art")
This does not replace a human/model read-through for tone, structural order,
or hallucination checks -- it only catches what's mechanically countable.
"""
import argparse
import re
import sys
MIN_RATIO = 0.22
MAX_RATIO = 0.28
def word_count(text: str) -> int:
return len(text.split())
def extract_terms(text: str) -> set:
"""Pull out likely named entities / acronyms: capitalized words,
ALLCAPS acronyms, and numbers with units, deduplicated case-sensitively."""
# Capitalized words (not sentence-initial only -- this is a heuristic, not NLP)
caps = re.findall(r"\b[A-Z][a-zA-Z0-9\-]{1,}\b", text)
# Standalone acronyms (2+ uppercase letters)
acronyms = re.findall(r"\b[A-Z]{2,}\b", text)
# Numbers with a unit/percent attached, e.g. "20%", "3.5x", "$400M"
metrics = re.findall(r"\$?\d[\d,.]*\s?(?:%|x|k|K|M|B|bn|tn)\b", text)
return set(caps) | set(acronyms) | set(metrics)
def main():
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("--source", required=True, help="Path to source text file")
parser.add_argument("--summary", required=True, help="Path to summary text file")
args = parser.parse_args()
with open(args.source, "r", encoding="utf-8") as f:
source = f.read()
with open(args.summary, "r", encoding="utf-8") as f:
summary = f.read()
src_wc = word_count(source)
sum_wc = word_count(summary)
ratio = sum_wc / src_wc if src_wc else 0
low = round(src_wc * MIN_RATIO)
high = round(src_wc * MAX_RATIO)
print(f"Source words: {src_wc}")
print(f"Summary words: {sum_wc}")
print(f"Compression: {ratio:.1%} of source")
print(f"Allowed band: {low}-{high} words (22%-28%)")
if ratio < MIN_RATIO:
length_ok = False
print(f"LENGTH: FAIL too short -- add {low - sum_wc} word(s) of restored detail")
elif ratio > MAX_RATIO:
length_ok = False
print(f"LENGTH: FAIL too long -- cut {sum_wc - high} word(s)")
else:
length_ok = True
print("LENGTH: PASS inside the 22%-28% band")
src_terms = extract_terms(source)
sum_terms = extract_terms(summary)
missing = sorted(src_terms - sum_terms)
print(f"\nTerms/acronyms/metrics found in source: {len(src_terms)}")
if missing:
print(f"Present in source but NOT found verbatim in summary ({len(missing)}):")
for term in missing:
print(f" - {term}")
print("(Not all of these need to survive -- check against your extracted")
print(" 'core thesis + supporting pillars' from step 2. This just flags")
print(" candidates worth a second look.)")
else:
print("All detected source terms/acronyms/metrics appear in the summary.")
return 0 if length_ok else 1
if __name__ == "__main__":
sys.exit(main())
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |