account-research
Research a company or person and get actionable sales intel. Works standalone with web search, supercharged when you connect…
\"Implement TF-IDF scoring to measure term importance relative to a document corpus. Use this skill when the user needs to rank documents by keyword relevance, extract important terms from text, or build a basic search relevance engine — even if they say 'find relevant
Claude Code
$ npx -y skills add charlieviettq/awesome-agent-skill --skill algo-seo-tfidf --agent claude-code
Codex
$ npx skills add charlieviettq/awesome-agent-skill --skill algo-seo-tfidf -a codex -y
Cursor
$ npx skills add charlieviettq/awesome-agent-skill --skill algo-seo-tfidf -a cursor -y
Gemini CLI
$ npx skills add charlieviettq/awesome-agent-skill --skill algo-seo-tfidf -a gemini-cli -y
GitHub Copilot
$ npx skills add charlieviettq/awesome-agent-skill --skill algo-seo-tfidf -a github-copilot -y
OpenCode
$ npx skills add charlieviettq/awesome-agent-skill --skill algo-seo-tfidf -a opencode -y
Windsurf
$ npx skills add charlieviettq/awesome-agent-skill --skill algo-seo-tfidf -a windsurf -y
name: "\"algo-seo-tfidf\"" description: "\"Implement TF-IDF scoring to measure term importance relative to a document corpus. Use this skill when the user needs to rank documents by keyword relevance, extract important terms from text, or build a basic search relevance engine — even if they say 'find relevant documents', 'keyword extraction', or 'term importance'.\"." allowed-tools: Bash, Read, Write, Edit, Glob, Grep
TF-IDF (Term Frequency–Inverse Document Frequency) scores term importance as TF(t,d) × IDF(t). High scores mean a term is frequent in a document but rare across the corpus. Computes in O(N × V) where N is documents and V is vocabulary size.
**Trigger conditions:**
**When NOT to use:**
IRON LAW: TF-IDF Measures RELATIVE Importance - A term with high TF but low IDF is common, NOT important - TF-IDF = TF(t,d) × log(N / DF(t)) - A term appearing in ALL documents has IDF = 0 → score = 0
Tokenize documents, apply lowercasing, remove stop words. Build vocabulary. **Gate:** All documents tokenized, vocabulary size reasonable.
1. Compute TF(t,d) for each term in each document (raw count, log-normalized, or boolean) 2. Compute IDF(t) = log(N / DF(t)) where DF(t) = number of documents containing term t 3. Compute TF-IDF(t,d) = TF(t,d) × IDF(t) 4. Optionally L2-normalize document vectors for cosine similarity
Check: terms appearing in all documents have IDF ≈ 0. Rare terms have high IDF. **Gate:** Score distribution is reasonable; common words score low.
Return scored terms per document or ranked documents per query.
{
"query_results": [{"document": "doc_id", "score": 0.73, "matching_terms": ["term1", "term2"]}],
"metadata": {"corpus_size": 1000, "vocabulary_size": 5000, "tf_variant": "log_normalized"}
}**Input:** Corpus: ["the cat sat", "the dog sat", "the cat played"], Query: "cat" **Expected:** TF("cat", doc1)=1/3, DF("cat")=2, IDF=log(3/2)=0.405. TF-IDF(doc1)=0.135, TF-IDF(doc3)=0.135, TF-IDF(doc2)=0
| Input | Expected | Why | |-------|----------|-----| | Term in all docs | Score = 0 | IDF = log(N/N) = 0 | | Term in one doc | Highest IDF | log(N/1) = log(N) | | Empty document | All scores = 0 | No terms to score |
| Script | Description | Usage | |--------|-------------|-------| | `scripts/tfidf.py` | Compute TF-IDF vectors, top terms per document, and query scoring | `python scripts/tfidf.py --help` |
Run `python scripts/tfidf.py --verify` to execute built-in sanity tests.
Curated skill pack for LLM agents in engineer and science workflow (Cursor & Claude ready).
Research a company or person and get actionable sales intel. Works standalone with web search, supercharged when you connect…
Evaluate LLM agents and tool-using workflows—task success, tool accuracy, latency/cost, safety, and regression suites. Use when…
Design agent tools and CLI surfaces—schemas, naming, errors, idempotency, and discoverability for LLM callers. Use when defining…
\"Implement and select ad bidding strategies from manual CPC to automated target-CPA and target-ROAS. Use this skill when the…
\"Optimize advertising budget allocation across campaigns using marginal returns analysis. Use this skill when the user needs to…
\"Build CTR prediction models for estimating ad click-through rates from features. Use this skill when the user needs to predict…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.