跳到正文
cccskills
免费在 GitHub 公开

oc-cacheforge-setup

Set up CacheForge — register, configure upstream, get your API key in 30 seconds.

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(1)

  • SKILL.md4.2 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Cacheforge Setup

You are an expert python engineer. Set up CacheForge — register, configure upstream, get your API key in 30 seconds.

Before Starting

  1. Goal — what specific outcome do you need?
  2. Environment — versions, platform, existing setup?
  3. Constraints — performance, security, compatibility requirements?
  4. Integration — what systems does this connect to?
  5. Output format — code, config, script, or documentation?

Core Expertise Areas

  • Core implementation — full working code for Cacheforge Setup
  • Error handling — robust error recovery and logging
  • Performance — optimized patterns for production use
  • Testing — unit and integration test strategies
  • Configuration — environment-specific setup and tuning
  • Security — secure coding patterns and best practices
  • Documentation — clear API and usage documentation

Key Patterns & Code

Core Implementation

#!/usr/bin/env python3
"""
CacheforgeSetup — by luo-kai (Lous Creations)
Set up CacheForge — register, configure upstream, get your API key in 30 seconds
"""
from __future__ import annotations
import logging, sys
from pathlib import Path
from typing import Any

logging.basicConfig(level=logging.INFO, format='%(asctime)s [%(levelname)s] %(message)s')
logger = logging.getLogger("cacheforge-setup")

class CacheforgeSetup:
    """Main implementation of CacheforgeSetup."""

    def __init__(self, config: dict[str, Any] | None = None):
        self.config = config or {}
        self._ready = False

    def setup(self) -> None:
        logger.info("Setting up CacheforgeSetup...")
        self._ready = True

    def run(self, input_data: Any) -> dict[str, Any]:
        if not self._ready:
            self.setup()
        logger.info("Processing...")
        result = self._process(input_data)
        return {"success": True, "result": result, "author": "luo-kai"}

    def _process(self, data: Any) -> Any:
        return data  # Override with real logic

def main() -> int:
    tool = CacheforgeSetup()
    try:
        tool.setup()
        result = tool.run(sys.argv[1:])
        print(f"Done: {result['result']}")
        return 0
    except Exception as e:
        logger.error(f"Error: {e}")
        return 1

if __name__ == "__main__":
    sys.exit(main())

Configuration & Setup

# Cacheforge Setup — Configuration
# Author: luo-kai (Lous Creations)

config = {
    "name": "cacheforge-setup",
    "version": "1.0.0",
    "author": "luo-kai",
    "enabled": True,
    "debug": False,
    "timeout_seconds": 30,
    "max_retries": 3,
}

Error Handling

# Robust error handling pattern
import logging
logger = logging.getLogger("cacheforge-setup")

def safe_run(func, *args, **kwargs):
    try:
        return func(*args, **kwargs)
    except Exception as e:
        logger.error(f"cacheforge-setup error: {e}", exc_info=True)
        raise

Best Practices

  • Fail fast with clear errors — raise descriptive exceptions with context
  • Log at appropriate levels — DEBUG for dev, INFO for ops, ERROR for problems
  • Validate inputs — never trust external data without validation
  • Use type annotations — improves IDE support and catches bugs early
  • Handle cleanup — use context managers and finally blocks
  • Test edge cases — empty inputs, nulls, max values, concurrent access

Common Pitfalls

PitfallProblemFix
No error handlingSilent failures in productionWrap with try/except + logging
Hardcoded valuesNot portable across environmentsUse config/env vars
Missing timeoutsHangs indefinitelyAlways set timeout values
No retry logicSingle failure = broken workflowAdd exponential backoff
No cleanup on exitResource leaksUse context managers

Related Skills

  • python-expert
  • cacheforge-setup-advanced
  • performance-optimization
  • error-handling
  • testing-expert

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Expert-level abstract algebra knowledge. Use when working with groups, rings, fields, modules, Galois theory, representation theory, or algebraic structures. Also use when the user mentions 'group', 'ring', 'field', 'homomorphism', 'isomorphism', 'normal subgroup', 'quotient group', 'Sylow theorem', 'Galois theory', 'polynomial ring', 'ideal', 'module', 'vector space', or 'representation theory'.

中文简介正在准备中。当前显示原文说明。

luokai0/ai-agent-skills-by-luo-kai132026年5月6日 更新

Expert-level acoustics knowledge. Use when working with sound waves, acoustic propagation, resonance, standing waves, Doppler effect, room acoustics, ultrasound, noise control, musical acoustics, or architectural acoustics. Also use when the user mentions 'sound wave', 'decibel', 'frequency', 'resonance', 'standing wave', 'Doppler effect', 'acoustic impedance', 'reverberation', 'ultrasound', 'noise control', 'harmonics', or 'sound intensity'.

中文简介正在准备中。当前显示原文说明。

luokai0/ai-agent-skills-by-luo-kai132026年5月6日 更新

Expert-level aerodynamics covering subsonic and supersonic flow, lift and drag, airfoil theory, boundary layers, compressible flow, and CFD methods.

中文简介正在准备中。当前显示原文说明。

luokai0/ai-agent-skills-by-luo-kai132026年5月6日 更新

Expert-level air quality engineering covering pollutant sources, atmospheric dispersion, air quality standards, emission controls, and air quality modeling.

中文简介正在准备中。当前显示原文说明。

luokai0/ai-agent-skills-by-luo-kai132026年5月6日 更新

Expert-level aircraft structures covering structural design philosophy, wing and fuselage analysis, fatigue and damage tolerance, composite structures, and certification.

中文简介正在准备中。当前显示原文说明。

luokai0/ai-agent-skills-by-luo-kai132026年5月6日 更新

Expert-level algorithms and complexity theory covering sorting, searching, graph algorithms, dynamic programming, greedy algorithms, NP-completeness, and algorithm design paradigms.

中文简介正在准备中。当前显示原文说明。

luokai0/ai-agent-skills-by-luo-kai132026年5月6日 更新

查看 luokai0 的全部技能

报告此技能的问题