Agent skill

Algo Rec Cf

by asgard-ai-platform in asgard-ai-platform/skills

Implement collaborative filtering for recommendations based on user behavior patterns.

MITAuto-check passed

Install Algo Rec Cf

skills CLI
$ npx skills add asgard-ai-platform/skills --skill algo-rec-cf -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install asgard-ai-platform/skills algo-rec-cf --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/asgard-ai-platform/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/algo-rec-cf .claude/skills/algo-rec-cf && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
algo-rec-cf
GitHub stars
242
Token cost
~1k tokens
SKILL.md length
388 words
Files
4 (incl. references)
Skills in repo
207
Repo updated
First seen
Licence
MIT

At a glance

Implement collaborative filtering for recommendations based on user behavior patterns.

  • Works in 4 steps: Input Validation → Core Algorithm → Verification → …
  • The user needs to build a recommendation engine from user-item interaction data
  • SKILL.md covers Overview, When to Use, Algorithm and Output Format, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Algo Rec Cf is an agent skill from asgard-ai-platform/skills. Implement collaborative filtering for recommendations based on user behavior patterns. Use this skill when the user needs to build a recommendation engine from user-item interaction data, find similar users or items, or predict ratings — even if they say 'users who bought this also bought', 'similar users', or 'recommend based on behavior'.

Its SKILL.md is about 1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files, including reference files (for example `examples/sample_scenario.md`, `references/implicit-feedback.md` and `references/matrix-factorization.md`).

The repository describes itself as: 301 open-source coding agent skills across 22 domains — methodology, judgment & gotchas packaged as Claude Agent Skills for the Asgard AI Platform. The licence is MIT.

When your agent uses it

  • The user needs to build a recommendation engine from user-item interaction data
  • Find similar users
  • Predict ratings — even if they say users who bought this also bought
  • Recommend based on behavior

Example prompts

  • “users who bought this also bought”
  • “similar users”
  • “recommend based on behavior”
  • “/algo-rec-cf”

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Input Validation
  2. Core Algorithm
  3. Verification
  4. Output

What it can do on your machine

Read from SKILL.md and the folder at commit 4e7f4f8. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are json).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Algo Rec Cf loads about 1k tokens when it runs, and up to ~5.8k if it reads all its reference files. Until then it costs about 89 tokens; SKILL.md has 388 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~89
When it runs · the whole SKILL.md, loaded when a task matches
~1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~5.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from asgard-ai-platform/skills at commit 4e7f4f8, republished under its MIT licence (© asgard-ai-platform). 388 words, ~1,005 tokens.

Download SKILL.mdSave it as .claude/skills/algo-rec-cf/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
algo-rec-cf
description
Implement collaborative filtering for recommendations based on user behavior patterns. Use this skill when the user needs to build a recommendation engine from user-item interaction data, find similar users or items, or predict ratings — even if they say 'users who bought this also bought', 'similar users', or 'recommend based on behavior'.
metadata.category
WP-36 推薦系統
metadata.tags
recommendation, collaborative-filtering, similarity

Collaborative Filtering

Overview

Collaborative filtering recommends items based on collective user behavior patterns. User-based CF finds similar users; item-based CF finds similar items. Computes in O(U² × I) for user-based or O(I² × U) for item-based where U=users, I=items.

When to Use

Trigger conditions:

  • Building recommendations from user-item interaction data (ratings, clicks, purchases)
  • Finding "users like you also liked" or "frequently bought together" patterns

When NOT to use:

  • When you have no interaction data (cold start — use content-based filtering)
  • When item features matter more than behavior patterns (use content-based)

Algorithm

IRON LAW: CF Requires SUFFICIENT Interaction Data
With sparse matrices (< 1% fill rate), similarity computation is
unreliable. Minimum viable: each user has rated 5+ items, each item
has 5+ ratings. Below this, fallback to content-based or popularity.
Phase 1: Input Validation

Load user-item interaction matrix. Check sparsity level and filter users/items below minimum interaction threshold. Gate: Matrix sparsity < 99%, minimum interaction thresholds met.

Phase 2: Core Algorithm

User-based CF:

  1. Compute pairwise user similarity (cosine or Pearson correlation)
  2. For target user, find top-K most similar users
  3. Predict rating: weighted average of similar users' ratings

Item-based CF:

  1. Compute pairwise item similarity from co-rating patterns
  2. For target item, find top-K most similar items
  3. Predict: weighted average of user's ratings on similar items
Phase 3: Verification

Hold out 20% of interactions for testing. Compute RMSE, MAE, or precision@K / recall@K. Gate: RMSE below baseline (global mean predictor).

Phase 4: Output

Return top-N recommendations with predicted scores.

Output Format

json
{
  "recommendations": [{"item_id": "123", "predicted_score": 4.2, "similar_items_used": 5}],
  "metadata": {"method": "item-based", "similarity": "cosine", "k_neighbors": 20, "sparsity": 0.97}
}

Examples

Sample I/O

Input: 5 users × 5 items rating matrix, target: user1, item5 Expected: Predicted rating based on weighted similarity of user1's rated items similar to item5

Show full SKILL.md (151 more words)Show less
Edge Cases
InputExpectedWhy
New user, no ratingsCannot recommendCold start — fallback to popularity
Item rated by all usersLow differentiationHigh popularity ≠ personalized match
Single shared itemUnreliable similarityNeed multiple co-ratings for stable similarity

Gotchas

  • Scalability: User-based CF with millions of users is O(U²). Use approximate nearest neighbors (LSH) or switch to item-based CF (item catalog is usually smaller).
  • Popularity bias: Popular items have more co-ratings, inflating their similarity scores. Normalize by inverse popularity.
  • Implicit vs explicit feedback: Clicks/views (implicit) need different treatment than ratings (explicit). Use confidence weighting for implicit data.
  • Similarity metric matters: Cosine similarity ignores rating scale differences; Pearson correlation accounts for user rating biases. Choose based on data characteristics.
  • Gray sheep: Users with unusual taste patterns have no similar peers. CF fails for them — consider hybrid approaches.

References

  • For matrix factorization as a scalable alternative, see references/matrix-factorization.md
  • For implicit feedback handling, see references/implicit-feedback.md

© asgard-ai-platform, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (references) in algo-rec-cf of asgard-ai-platform/skills.

  • SKILL.md
  • examples/sample_scenario.md
  • references/implicit-feedback.md
  • references/matrix-factorization.md

Open the folder on GitHubat commit 4e7f4f8

Compare with similar skills

Algo Rec Cf next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Algo Rec Cf compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Algo Rec Cf this skillasgard-ai-platform/skills242—~1kAutomated safety check: PassMIT
Implementsickn33/agentic-awesome-skills47k5 repos~306Automated safety check: PassMIT
Implementcodewhale-hq/Codewhale41k—~190Automated safety check: PassMIT
Incremental Implementationaddyosmani/agent-skills105k1 repos~2.3kAutomated safety check: PassMIT
Filterzalando/skipper3.3k—~527Automated safety check: PassMIT
Implementbestofjs/bestofjs3.1k18 repos~109Automated safety check: PassMIT

Similar skills

  • Implement

    sickn33/agentic-awesome-skills

    Implement a piece of work based on a PRD or set of issues. An agent skill from sickn33/agentic-awesome-skills.

    47k GitHub starsUsed in 5 repos~306 tokens
    Product & Project ManagementAuto-check passed
  • Implement

    codewhale-hq/Codewhale

    Carry an authorized, defined request or approved plan through scoped edits and proportionate verification.

    41k GitHub stars~190 tokensUpdated today
    Auto-check passed
  • Incremental Implementation

    addyosmani/agent-skills

    Delivers a change in thin vertical slices, each implemented, tested, verified and committed before the next, using vertical, contract-first or risk-first slicing.

    105k GitHub starsUsed in 1 repo~2.3k tokens
    Agent WorkflowsAuto-check passed
  • Filter

    zalando/skipper

    Create or modify code in the filters package and all its sub-folders

    3.3k GitHub stars~527 tokensUpdated yesterday
    DevOps & CloudAuto-check passed
  • Implement

    bestofjs/bestofjs

    Implement a piece of work based on a spec or set of tickets.

    3.1k GitHub starsUsed in 18 repos~109 tokens
    Auto-check passed
  • Implementing Search Filter

    ancoleman/ai-design-components

    Implements search and filter interfaces for both frontend (React/TypeScript) and backend (Python) with debouncing, query management, and database integration.

    525 GitHub stars~1.6k tokensUpdated 10 mo ago
    Frontend & DesignAuto-check passed

More from asgard-ai-platform/skills

All 207 skills in this repo
  • Algo Ecom Bm25

    asgard-ai-platform/skills

    Implement BM25 ranking function for e-commerce product search relevance scoring.

    242 GitHub stars~1.4k tokensUpdated 4 mo ago
    Auto-check passed
  • Algo Mfg Cpk

    asgard-ai-platform/skills

    Calculate Cpk process capability index to assess whether a process meets specification requirements.

    242 GitHub stars~1.1k tokensUpdated 4 mo ago
    Auto-check passed
  • Algo Price Elasticity

    asgard-ai-platform/skills

    Calculate price elasticity of demand to quantify how price changes affect sales volume.

    242 GitHub stars~1.1k tokensUpdated 4 mo ago
    Auto-check passed
  • Algo Rank Bayesian

    asgard-ai-platform/skills

    Apply Bayesian averaging to rank items by combining observed ratings with prior expectations.

    242 GitHub stars~1.1k tokensUpdated 4 mo ago
    Auto-check passed
  • Algo Rank Elo

    asgard-ai-platform/skills

    Implement Elo rating system to rank items or players from pairwise comparison outcomes.

    242 GitHub stars~1.1k tokensUpdated 4 mo ago
    Auto-check passed
  • Algo Rank Wilson

    asgard-ai-platform/skills

    Calculate Wilson Score confidence intervals for ranking items by positive proportion with sample size correction.

    242 GitHub stars~1.1k tokensUpdated 4 mo ago
    Auto-check passed

Questions about Algo Rec Cf

What does Algo Rec Cf do?

Implement collaborative filtering for recommendations based on user behavior patterns. Algo Rec Cf is an agent skill from asgard-ai-platform/skills. Implement collaborative filtering for recommendations based on user behavior patterns.

When should I use Algo Rec Cf?

Algo Rec Cf fits situations like: the user needs to build a recommendation engine from user-item interaction data; find similar users; predict ratings — even if they say users who bought this also bought; recommend based on behavior.

How do I install Algo Rec Cf in Claude Code?

Run `npx skills add asgard-ai-platform/skills --skill algo-rec-cf -a claude-code`. Or copy the skill folder (algo-rec-cf in asgard-ai-platform/skills) into .claude/skills/algo-rec-cf in your project. Claude Code loads it when a task matches its description.

How do I install Algo Rec Cf in Codex?

Run `npx skills add asgard-ai-platform/skills --skill algo-rec-cf -a codex`. Or copy the skill folder (algo-rec-cf in asgard-ai-platform/skills) into .agents/skills/algo-rec-cf in your project. Codex loads it when a task matches its description.

Can I use Algo Rec Cf in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add asgard-ai-platform/skills --skill algo-rec-cf -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/algo-rec-cf, .gemini/skills/algo-rec-cf, .github/skills/algo-rec-cf and .opencode/skills/algo-rec-cf in your project.

What does Algo Rec Cf need to run?

SKILL.md names no scripts, command-line tools or credentials: Algo Rec Cf is instructions for the agent only.

Does Algo Rec Cf access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Algo Rec Cf safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Algo Rec Cf use?

Algo Rec Cf is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Algo Rec Cf use?

About 1k tokens (SKILL.md is roughly 4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 4.8k tokens, read only when the agent opens those files.

What are the alternatives to Algo Rec Cf?

Skills that share tags, products or a category with Algo Rec Cf: Implement (sickn33/agentic-awesome-skills, 47k stars), Implement (codewhale-hq/Codewhale, 41k stars), Incremental Implementation (addyosmani/agent-skills, 105k stars) and Filter (zalando/skipper, 3.3k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Algo Rec Cf?

asgard-ai-platform (a GitHub organization) maintains it in asgard-ai-platform/skills, which has 242 GitHub stars. The repository holds 207 skills in this directory. The repository was last updated on June 6, 2026.

Source: asgard-ai-platform/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.