Token导航 LogoToken导航

Agent Skill · 研究检索

cascade-workflow(级联工作流程)

cascade-workflow 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

cascade-workflow 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为调用外部服务;许可证为 MIT,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 33,572。

总安装 2,345周安装 99GitHub Stars 55下载 784核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:cascade-workflow(级联工作流程)
来源仓库:https://github.com/rysweet/amplihack
仓库路径:skills/cascade-workflow
安装命令:
npx skills add https://github.com/rysweet/amplihack --skill cascade-workflow
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/rysweet/amplihack --skill cascade-workflow

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

cascade-workflow 实现优雅降级的多级回退策略。当首选方案超时或失败时自动切换至简化模式。保证系统始终响应,适用于高可用关键业务场景。需明确定义降级阈值与各层替代方案的功能边界。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/cascade-workflow

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/rysweet/amplihack --skill cascade-workflow;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要调用外部服务,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

cascade-workflow 怎么安装?

在终端执行 npx skills add https://github.com/rysweet/amplihack --skill cascade-workflow。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

cascade-workflow 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

cascade-workflow 需要什么权限?

权限级别是调用外部服务。该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

cascade-workflow 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

cascade-workflow 用的人多吗?

公开数据是累计安装 2,345 次,近一周安装 99 次,下载 784 次,GitHub 55 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

cascade-workflow 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。
  • 需要许可证清楚、并且有第三方扫描结果的团队项目。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
cascade-workflow

级联工作流程 · 本页

2,34555调用外部服务MIT通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Cascade Workflow with Graceful Degradation Skill

Purpose

Implement graceful degradation through cascading fallback strategies. When optimal approaches fail or timeout, the system automatically falls back to simpler, more reliable alternatives while maintaining acceptable functionality.

When to Use This Skill

USE FOR:

  • External service dependencies (APIs, databases)
  • Time-sensitive operations with acceptable degraded modes
  • Operations where partial results are better than no results
  • High-availability requirements (system must always respond)
  • Scenarios where waiting for perfect solution is worse than good-enough solution

AVOID FOR:

  • Operations requiring exact correctness (no acceptable degradation)
  • Security-critical operations (authentication, authorization)
  • Financial transactions (no room for "approximate")
  • When failures must surface to user (diagnostic operations)
  • Simple operations with no meaningful fallback

Configuration

Core Parameters

Timeout Strategy:

  • aggressive - Fast failures, quick degradation (5s / 2s / 1s)
  • balanced - Reasonable attempts (30s / 10s / 5s) - DEFAULT
  • patient - Thorough attempts before fallback (120s / 30s / 10s)
  • custom - Define your own timeouts

Fallback Types:

  • service - External API → Cached data → Static defaults
  • quality - Comprehensive → Standard → Minimal analysis
  • freshness - Real-time → Recent → Historical data
  • completeness - Full dataset → Sample → Summary
  • accuracy - Precise → Approximate → Estimate

Degradation Notification:

  • silent - Log only, no user notification
  • warning - Inform user of degradation
  • explicit - Detailed explanation of what degraded and why

Cascade Level Requirements

PRIMARY (Optimal):

  • Best possible outcome
  • May depend on external services
  • May be slow or resource-intensive
  • Can fail or timeout

SECONDARY (Acceptable):

  • Reduced quality but functional
  • More reliable than primary
  • Faster or fewer dependencies
  • Acceptable for users

TERTIARY (Guaranteed):

  • Always succeeds, never fails
  • No external dependencies
  • Fast and reliable
  • Minimal but functional
  • CRITICAL: Must be designed to never fail

Execution Process

Step 1: Define Cascade Levels

  • Use architect agent to identify cascade levels
  • Define PRIMARY approach (optimal solution)
  • Define SECONDARY approach (acceptable degradation)
  • Define TERTIARY approach (guaranteed completion)
  • Set timeout for each level
  • Document what degrades at each level
  • CRITICAL: Ensure tertiary ALWAYS succeeds

Example Cascade Definitions:

Code Analysis with AI:

  • PRIMARY: GPT-4 comprehensive analysis (timeout: 30s)
  • SECONDARY: GPT-3.5 standard analysis (timeout: 10s)
  • TERTIARY: Static analysis with regex (timeout: 5s)

External API Data Fetch:

  • PRIMARY: Live API call (timeout: 10s)
  • SECONDARY: Cached data (timeout: 2s)
  • TERTIARY: Default values (timeout: 0s)

Test Execution:

  • PRIMARY: Full test suite (timeout: 120s)
  • SECONDARY: Critical tests only (timeout: 30s)
  • TERTIARY: Smoke tests (timeout: 10s)

Step 2: Attempt Primary Approach

  • Execute optimal solution
  • Set timeout based on strategy configuration
  • Monitor execution progress
  • If completes successfully: DONE (best outcome)
  • If fails or times out: Continue to Step 3
  • Log attempt and reason for failure
# Pseudocode for primary attempt
try:
    result = execute_primary_approach(timeout=PRIMARY_TIMEOUT)
    log_success(level="PRIMARY", result=result)
    return result  # DONE - best outcome achieved
except TimeoutError:
    log_failure(level="PRIMARY", reason="timeout")
    # Continue to Step 3
except ExternalServiceError as e:
    log_failure(level="PRIMARY", reason=f"service_error: {e}")
    # Continue to Step 3

Step 3: Attempt Secondary Approach

  • Log degradation to secondary level
  • Execute acceptable fallback solution
  • Set shorter timeout (typically 1/3 of primary)
  • Monitor execution progress
  • If completes successfully: DONE (acceptable outcome)
  • If fails or times out: Continue to Step 4
  • Log attempt and reason for failure
# Pseudocode for secondary attempt
log_degradation(from_level="PRIMARY", to_level="SECONDARY")
try:
    result = execute_secondary_approach(timeout=SECONDARY_TIMEOUT)
    log_success(level="SECONDARY", result=result, degraded=True)
    return result  # DONE - acceptable outcome
except TimeoutError:
    log_failure(level="SECONDARY", reason="timeout")
    # Continue to Step 4

Step 4: Attempt Tertiary Approach

  • Log degradation to tertiary level
  • Execute guaranteed completion approach
  • Set minimal timeout (typically 1s)
  • MUST succeed - no failures allowed
  • Return minimal but functional result
  • Log success (degraded but functional)
  • DONE (guaranteed completion)
# Pseudocode for tertiary attempt
log_degradation(from_level="SECONDARY", to_level="TERTIARY")
try:
    result = execute_tertiary_approach(timeout=TERTIARY_TIMEOUT)
    log_success(level="TERTIARY", result=result, heavily_degraded=True)
    return result  # DONE - minimal but functional
except Exception as e:
    # THIS SHOULD NEVER HAPPEN
    log_critical_failure("TERTIARY approach failed - this is a bug!")
    raise SystemError("Cascade safety violation: tertiary failed")

Step 5: Report Degradation

  • Determine notification level from configuration
  • Silent: Log only, no user message
  • Warning: Brief notification to user
  • Explicit: Detailed degradation explanation
  • Document which level succeeded
  • Explain impact of degradation
  • Log cascade path taken for analysis

Degradation Reporting Templates:

Silent Mode:

[LOG] CASCADE: PRIMARY timeout (30s) → SECONDARY success (6s)
Result: standard_analysis (degraded from comprehensive)

Warning Mode:

⚠️  Using cached data (less than 1 hour old)
Current real-time data unavailable.

Explicit Mode:

ℹ️  Analysis Quality Notice

We attempted to provide comprehensive code analysis using GPT-4,
but encountered slow response times (>30s timeout).

Fallback Applied:
- Used: GPT-3.5 standard analysis (completed in 6s)
- Quality: Standard (vs. Comprehensive)
- Impact: Advanced semantic insights not included

What You're Getting:
✓ Basic pattern detection
✓ Standard recommendations
✓ Code quality assessment

What's Missing:
✗ Complex architectural insights
✗ Deep semantic analysis
✗ Advanced refactoring suggestions

Step 6: Log Cascade Metrics

  • Record cascade path taken
  • Document level reached (primary/secondary/tertiary)
  • Log timing for each level attempted
  • Track degradation frequency
  • Identify patterns in failures
  • Update cascade strategy if needed

Metrics to Track:

  • Success rate by level
  • Average response times
  • Degradation frequency
  • User impact assessment

Step 7: Continuous Optimization

  • Use analyzer agent to review cascade metrics
  • Identify optimization opportunities
  • Adjust timeouts based on success rates
  • Improve secondary approaches if frequently used
  • Update tertiary if inadequate
  • Store learnings in memory using store_discovery() from amplihack.memory.discoveries

Optimization Criteria:

  • If PRIMARY succeeds < 50%: Timeout too aggressive → Increase timeout
  • If SECONDARY used > 40%: Secondary is really the "normal" case → Swap primary and secondary
  • If TERTIARY used > 10%: Secondary not reliable enough → Improve secondary

Trade-Offs

Benefit: System always completes, never fully fails Cost: Users may receive degraded responses Best For: User-facing features where responsiveness matters

Examples

Example 1: Weather API Integration

Configuration:

  • Strategy: Balanced (30s / 10s / 5s)
  • Type: Service fallback
  • Notification: Warning

Implementation:

async def get_weather(location: str) -> WeatherData:
    """Get weather data with cascade fallback"""

    # PRIMARY: Live weather API
    try:
        return await fetch_weather_api(location, timeout=30)
    except (TimeoutError, APIError):
        log.warning("PRIMARY weather API failed, trying cache")

    # SECONDARY: Cached weather data
    try:
        cached = await get_cached_weather(location, max_age=3600)
        if cached:
            notify_user("Using weather data from cache (< 1 hour old)")
            return cached
    except CacheError:
        log.warning("SECONDARY cache failed, using defaults")

    # TERTIARY: Default weather data
    return get_default_weather(location)  # Never fails

Outcome: System always returns weather data, quality degrades gracefully

Example 2: Code Review with AI

Configuration:

  • Strategy: Patient (120s / 30s / 10s)
  • Type: Quality fallback
  • Notification: Explicit

Cascade Path:

  1. PRIMARY: GPT-4 comprehensive review - TIMEOUT after 120s
  2. SECONDARY: GPT-3.5 standard review - SUCCESS in 18s
  3. TERTIARY: Not attempted

Example 3: Search Results Ranking

Configuration:

  • Strategy: Aggressive (5s / 2s / 1s)
  • Type: Accuracy fallback
  • Notification: Silent

Implementation:

def search_and_rank(query: str) -> List[Result]:
    """Search with ML ranking, fallback to simple ranking"""

    results = fetch_results(query)

    # PRIMARY: ML-based ranking (sophisticated)
    try:
        return ml_rank(results, timeout=5)
    except TimeoutError:
        pass  # Silent fallback

    # SECONDARY: Heuristic ranking (good enough)
    try:
        return heuristic_rank(results, timeout=2)
    except TimeoutError:
        pass

    # TERTIARY: Simple text match ranking (basic)
    return simple_rank(results)  # Always fast

Philosophy Alignment

This workflow enforces:

  • Resilience: System always completes, never completely fails
  • User Experience: Better degraded service than error message
  • Transparency: Users understand what they're getting (if explicit mode)
  • Progressive Enhancement: Optimal by default, degrade when necessary
  • Measurable Quality: Clear definition of what degrades at each level
  • Continuous Improvement: Metrics drive timeout optimization
  • Guaranteed Completion: Tertiary level must never fail

Key Principle

Better to deliver degraded service than no service

平台分布

Claude Code

27.03%
按下载量换算212

Antigravity

26.23%
按下载量换算206

OpenCode

17%
按下载量换算133

Gemini CLI

12.63%
按下载量换算99

windsurf

7.84%
按下载量换算61

Cursor

3.25%
按下载量换算25

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

调用外部服务

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

继续浏览同类 Skills