Agent skill

Generalize

by swyxio in swyxio/skills

Generalize a concrete fix, example, correction, or recurring failure into evidence-backed broader solutions and durable prevention.

MITAuto-check passed

Install Generalize

skills CLI
$ npx skills add swyxio/skills --skill generalize -a claude-code

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

GitHub CLI
$ gh skill install swyxio/skills generalize --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/swyxio/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/generalize .claude/skills/generalize && 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
generalize
GitHub stars
175
Token cost
~639 tokens
SKILL.md length
303 words
Files
2
Skills in repo
89
Repo updated
First seen
Licence
MIT

At a glance

Generalize a concrete fix, example, correction, or recurring failure into evidence-backed broader solutions and durable prevention.

  • Works in 6 steps: Establish the user's actual goal,… → Inspect the current conversation,… → Find sibling cases and counterexamples.… → …
  • Explicitly asked to broaden
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Extract transferable lessons

What it does

Generalize is an agent skill from swyxio/skills. Generalize a concrete fix, example, correction, or recurring failure into evidence-backed broader solutions and durable prevention. Use when explicitly asked to broaden, systematize, or extract transferable lessons.

Its SKILL.md is about 640 tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `agents/openai.yaml`).

The repository describes itself as: Agent skills for Claude Code and other AI agents. The licence is MIT.

When your agent uses it

  • Explicitly asked to broaden
  • Extract transferable lessons

Example prompts

  • “/generalize”

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Establish the user's actual goal, authorized scope, observed examples, and underlying failure mechanism.
  2. Inspect the current conversation, established workflow, and relevant code, data, tests, or logs. Reuse existing parsers, contracts, and…
  3. Find sibling cases and counterexamples. Generalize only the verified cause; do not turn a local defect into new policy, requirements, or…
  4. Offer only useful levels of intervention
  5. Compare expected impact, confidence, effort, risk, reversibility, and dependencies. Recommend based on the user's overall intent; favor…
  6. Distinguish ambitious recommendations from authorized implementation. When implementation is authorized, complete the smallest shared…

What it can do on your machine

Read from SKILL.md and the folder at commit 038ef34. 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.

    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

Generalize loads about 639 tokens when it runs. Until then it costs about 57 tokens; SKILL.md has 303 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~57
When it runs · the whole SKILL.md, loaded when a task matches
~639

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 swyxio/skills at commit 038ef34, republished under its MIT licence (© swyxio). 303 words, ~639 tokens.

Download SKILL.mdSave it as .claude/skills/generalize/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
generalize
description
Generalize a concrete fix, example, correction, or recurring failure into evidence-backed broader solutions and durable prevention. Use when explicitly asked to broaden, systematize, or extract transferable lessons.

Generalize

Surface meaningful improvements at multiple levels and recommend the option that best fits the user's intent and impact-versus-effort tradeoff.

  1. Establish the user's actual goal, authorized scope, observed examples, and underlying failure mechanism.
  2. Inspect the current conversation, established workflow, and relevant code, data, tests, or logs. Reuse existing parsers, contracts, and resume mechanisms before proposing another path. Search available agent session history only when past decisions or recurrence could change the conclusion; target exact repository names, errors, or phrases, bound the search, and avoid secrets or unrelated private content.
  3. Find sibling cases and counterexamples. Generalize only the verified cause; do not turn a local defect into new policy, requirements, or architecture without supporting evidence. Distinguish a one-off symptom, repeated pattern, missing invariant, unreliable input, and architectural constraint; quantify affected cases when practical.
  4. Offer only useful levels of intervention:
    • Fix the immediate instance.
    • Repair other cases sharing the same verified cause.
    • Correct the shared data, contract, abstraction, or workflow.
    • Add a test, guardrail, monitoring, or safe automation.
    • Capture a reusable process, skill, or architectural improvement.
  5. Compare expected impact, confidence, effort, risk, reversibility, and dependencies. Recommend based on the user's overall intent; favor simplicity when outcomes are comparable, but surface higher-impact options that become worthwhile with broader scope or authorization. Mark speculation and unresolved cases explicitly.
  6. Distinguish ambitious recommendations from authorized implementation. When implementation is authorized, complete the smallest shared repair rather than merely offering options. Verify the original failure, a representative sibling case, and a counterexample or regression; report measured outcomes and stop when the shared fix is sufficiently verified. Do not turn every repair into infrastructure or another skill.

Mention broader scope only when a concrete unresolved risk warrants it. Do not assume permission to expand scope, inspect broad transcript archives, introduce infrastructure, or create permanent artifacts.

© swyxio, 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 1 other file in generalize of swyxio/skills.

  • SKILL.md
  • agents/openai.yaml

Open the folder on GitHubat commit 038ef34

Compare with similar skills

Generalize 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.

Generalize compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Generalize this skillswyxio/skills175—~639Automated safety check: PassMIT
CorrectionNxcoreAI/EverRoom3k—~290Automated safety check: PassCustom licence
Correctcursor/plugins10k3 repos~612Automated safety check: PassNone
Dart Log Failure Parserflutter/flutter179k—~489Automated safety check: PassBSD-3-Clause
Investigating CI FailuresPostHog/posthog40k—~2.9kAutomated safety check: PassCustom licence
Exploring AI FailuresPostHog/posthog40k—~2.9kAutomated safety check: WarnCustom licence

Similar skills

  • Correction

    NxcoreAI/EverRoom

    Compute Room overview corrections—citation corrections as per-claim edits and general corrections as a single proposal.

    3k GitHub stars~290 tokensUpdated today
    Research & ScienceAuto-check passed
  • Correct

    cursor/plugins

    Official

    Find the mistakes agents keep repeating in this repo and make each one impossible.

    10k GitHub starsUsed in 3 repos~612 tokens
    Auto-check passed
  • Parse failures from Dart and Flutter test logs. An agent skill from flutter/flutter.

    179k GitHub stars~489 tokensUpdated today
    MobileAuto-check passed
  • Official

    Investigates a specific CI failure to a verdict: whose fault, which commit, who wrote it, and whether it's fixed.

    40k GitHub stars~2.9k tokensUpdated today
    Testing & QAAuto-check passed
  • Exploring AI Failures

    PostHog/posthog

    Official

    Find where an AI/LLM application is failing in production and surface the failure patterns, working from real traces.

    40k GitHub stars~2.9k tokensUpdated today
    Auto-check: warnings
  • Traces a factual error the user points out back to its source (a brain page, a memory file, SOUL.md or USER.md, or a hallucination) and fixes that source instead of just noting the correction.

    31k GitHub stars~3.4k tokensUpdated today
    Agent WorkflowsAuto-check passed

More from swyxio/skills

All 89 skills in this repo
  • Programmatic Agents

    swyxio/skills

    Run a selected coding-agent CLI programmatically, with latency, error, usage, cost, and trace logging.

    175 GitHub stars~2.2k tokensUpdated 4 days ago
    Auto-check passed
  • Design, implement, audit, or refresh protected username and handle namespaces for public products.

    175 GitHub stars~1.1k tokensUpdated 4 days ago
    Auto-check passed
  • New Mac Setup

    swyxio/skills

    Fully automated new Mac setup for fullstack web developers and AI engineers.

    175 GitHub stars~4.3k tokensUpdated 4 days ago
    Auto-check passed
  • Youtube API

    swyxio/skills

    Manage YouTube videos programmatically via the YouTube Data API v3 — upload video files, upload custom thumbnails, update video metadata (titles, descriptions, tags), and query video/channel info…

    175 GitHub stars~2.2k tokensUpdated 4 days ago
    Auto-check passed
  • Batch YouTube Studio upload workflow for videos sourced from Airtable, Google Drive, Loom, YouTube, or local files.

    175 GitHub stars~1.5k tokensUpdated 4 days ago
    Auto-check: warnings
  • Reconstruct and visually analyze paired agent, game, or policy trajectories to determine whether changed actions produced their intended effects.

    175 GitHub stars~1.8k tokensUpdated 4 days ago
    Auto-check passed

Questions about Generalize

What does Generalize do?

Generalize a concrete fix, example, correction, or recurring failure into evidence-backed broader solutions and durable prevention. Generalize is an agent skill from swyxio/skills. Generalize a concrete fix, example, correction, or recurring failure into evidence-backed broader solutions and durable prevention.

When should I use Generalize?

Generalize fits situations like: explicitly asked to broaden; extract transferable lessons.

How do I install Generalize in Claude Code?

Run `npx skills add swyxio/skills --skill generalize -a claude-code`. Or copy the skill folder (generalize in swyxio/skills) into .claude/skills/generalize in your project. Claude Code loads it when a task matches its description.

How do I install Generalize in Codex?

Run `npx skills add swyxio/skills --skill generalize -a codex`. Or copy the skill folder (generalize in swyxio/skills) into .agents/skills/generalize in your project. Codex loads it when a task matches its description.

Can I use Generalize 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 swyxio/skills --skill generalize -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/generalize, .gemini/skills/generalize, .github/skills/generalize and .opencode/skills/generalize in your project.

What does Generalize need to run?

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

Does Generalize 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 Generalize 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 Generalize use?

Generalize 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 Generalize use?

About 639 tokens (SKILL.md is roughly 2.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Generalize?

Skills that share tags, products or a category with Generalize: Correction (NxcoreAI/EverRoom, 3k stars), Correct (cursor/plugins, 10k stars), Dart Log Failure Parser (flutter/flutter, 179k stars) and Investigating CI Failures (PostHog/posthog, 40k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Generalize?

swyxio (a GitHub user) maintains it in swyxio/skills, which has 175 GitHub stars. The repository holds 89 skills in this directory. The repository was last updated on October 5, 2026.

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