重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
npx skills add https://github.com/terrylica/cc-skills --skill impl-standards在实施过程中应用这些标准,以确保代码的一致性和可维护性。
/itp:go 第一阶段期间| 标准 | 规则 |
|---|---|
| 错误处理 | 抛出 + 传播;不使用回退/默认/重试/静默处理 |
| 常量管理 | 将魔法数字抽象为语义化、版本无关的动态常量 |
| SSoT/依赖注入 | 配置单例 → 非默认值 + 解析器 → 入口点验证 |
| 依赖项 | 优先使用开源库而非自定义代码;无需向后兼容 |
| 进度 | 操作超过1分钟:每15-60秒记录一次状态 |
| 日志 | logs/{adr-id}-YYYYMMDD_HHMMSS.log (nohup) |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
| 元数据 | 可选:用于服务发现的 catalog-info.yaml |
核心规则 : 抛出 + 传播;不使用回退/默认/重试/静默处理
# ✅ 正确 - 附带上下文抛出
def fetch_data(url: str) -> dict:
response = requests.get(url)
if response.status_code != 200:
raise APIError(f"Failed to fetch {url}: {response.status_code}")
return response.json()
# ❌ 错误 - 静默捕获
try:
result = fetch_data()
except Exception:
pass # 错误被隐藏
详细模式请参阅错误处理参考。
核心规则 : 将魔法数字抽象为语义化常量
# ✅ 正确 - 命名常量
DEFAULT_API_TIMEOUT_SECONDS = 30
response = requests.get(url, timeout=DEFAULT_API_TIMEOUT_SECONDS)
# ❌ 错误 - 魔法数字
response = requests.get(url, timeout=30)
模式请参阅常量管理参考。
对于耗时超过1分钟的操作,每15-60秒记录一次状态:
import logging
from datetime import datetime
logger = logging.getLogger(__name__)
def long_operation(items: list) -> None:
total = len(items)
last_log = datetime.now()
for i, item in enumerate(items):
process(item)
# 每30秒记录一次
if (datetime.now() - last_log).seconds >= 30:
logger.info(f"Progress: {i+1}/{total} ({100*(i+1)//total}%)")
last_log = datetime.now()
logger.info(f"Completed: {total} items processed")
将日志保存到:logs/{adr-id}-YYYYMMDD_HHMMSS.log
# 使用 nohup 运行
nohup python script.py > logs/2025-12-01-my-feature-20251201_143022.log 2>&1 &
核心规则 : 对于数据框操作,优先使用 Polars 而非 Pandas。
| 场景 | 推荐 |
|---|---|
| 新数据管道 | 使用 Polars(快30倍,惰性求值) |
| 机器学习特征工程 | Polars → Arrow → NumPy(零拷贝) |
| MLflow 日志记录 | 可使用 Pandas(添加异常注释) |
| 遗留代码修复 | 保持现有库 |
异常机制 : 在文件顶部添加:
# polars-exception: MLflow requires Pandas DataFrames
import pandas as pd
决策树和基准测试请参阅ml-data-pipeline-architecture。
| 技能 | 用途 |
|---|---|
adr-code-traceability | 向代码添加 ADR 引用 |
code-hardcode-audit | 发布前检测硬编码值 |
semantic-release | 版本管理和发布自动化 |
ml-data-pipeline-architecture | Polars/Arrow 效率模式 |
| 问题 | 原因 | 解决方案 |
|---|---|---|
| 静默失败 | 空的 except 块 | 捕获特定异常,记录日志或重新抛出 |
| 代码中的魔法数字 | 缺少常量 | 提取为带上下文的命名常量 |
| 错误被吞没 | except: pass 模式 | 继续前记录错误或重新抛出 |
| 运行时类型错误 | 缺少验证 | 在边界处添加输入验证 |
| 配置未加载 | 硬编码路径 | 使用带默认值的环境变量 |
每周安装次数
60
代码仓库
GitHub 星标数
24
首次出现
2026年1月24日
安全审计
安装于
opencode57
claude-code55
gemini-cli55
github-copilot54
codex54
cursor53
Apply these standards during implementation to ensure consistent, maintainable code.
/itp:go Phase 1| Standard | Rule |
|---|---|
| Errors | Raise + propagate; no fallback/default/retry/silent |
| Constants | Abstract magic numbers into semantic, version-agnostic dynamic constants |
| SSoT/DI | Config singleton → None-default + resolver → entry-point validation |
| Dependencies | Prefer OSS libs over custom code; no backward-compatibility needed |
| Progress | Operations >1min: log status every 15-60s |
| Logs | logs/{adr-id}-YYYYMMDD_HHMMSS.log (nohup) |
| Metadata | Optional: catalog-info.yaml for service discovery |
Core Rule : Raise + propagate; no fallback/default/retry/silent
# ✅ Correct - raise with context
def fetch_data(url: str) -> dict:
response = requests.get(url)
if response.status_code != 200:
raise APIError(f"Failed to fetch {url}: {response.status_code}")
return response.json()
# ❌ Wrong - silent catch
try:
result = fetch_data()
except Exception:
pass # Error hidden
See Error Handling Reference for detailed patterns.
Core Rule : Abstract magic numbers into semantic constants
# ✅ Correct - named constant
DEFAULT_API_TIMEOUT_SECONDS = 30
response = requests.get(url, timeout=DEFAULT_API_TIMEOUT_SECONDS)
# ❌ Wrong - magic number
response = requests.get(url, timeout=30)
See Constants Management Reference for patterns.
For operations taking more than 1 minute, log status every 15-60 seconds:
import logging
from datetime import datetime
logger = logging.getLogger(__name__)
def long_operation(items: list) -> None:
total = len(items)
last_log = datetime.now()
for i, item in enumerate(items):
process(item)
# Log every 30 seconds
if (datetime.now() - last_log).seconds >= 30:
logger.info(f"Progress: {i+1}/{total} ({100*(i+1)//total}%)")
last_log = datetime.now()
logger.info(f"Completed: {total} items processed")
Save logs to: logs/{adr-id}-YYYYMMDD_HHMMSS.log
# Running with nohup
nohup python script.py > logs/2025-12-01-my-feature-20251201_143022.log 2>&1 &
Core Rule : Prefer Polars over Pandas for dataframe operations.
| Scenario | Recommendation |
|---|---|
| New data pipelines | Use Polars (30x faster, lazy eval) |
| ML feature eng | Polars → Arrow → NumPy (zero-copy) |
| MLflow logging | Pandas OK (add exception comment) |
| Legacy code fixes | Keep existing library |
Exception mechanism : Add at file top:
# polars-exception: MLflow requires Pandas DataFrames
import pandas as pd
See ml-data-pipeline-architecture for decision tree and benchmarks.
| Skill | Purpose |
|---|---|
adr-code-traceability | Add ADR references to code |
code-hardcode-audit | Detect hardcoded values before release |
semantic-release | Version management and release automation |
ml-data-pipeline-architecture | Polars/Arrow efficiency patterns |
| Issue | Cause | Solution |
|---|---|---|
| Silent failures | Bare except blocks | Catch specific exceptions, log or re-raise |
| Magic numbers in code | Missing constants | Extract to named constants with context |
| Error swallowed | except: pass pattern | Log error before continuing or re-raise |
| Type errors at runtime | Missing validation | Add input validation at boundaries |
| Config not loading | Hardcoded paths | Use environment variables with defaults |
Weekly Installs
60
Repository
GitHub Stars
24
First Seen
Jan 24, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode57
claude-code55
gemini-cli55
github-copilot54
codex54
cursor53
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
123,700 周安装
Elasticsearch安全故障排除指南:诊断401/403错误、TLS证书、API密钥和许可证问题
265 周安装
App Store Connect 版本说明生成器 - 自动本地化更新日志与SEO优化
257 周安装
Node.js依赖更新技能bump-deps:智能提示Major更新,自动应用Minor/Patch更新
263 周安装
安全套件 (security-suite) - 二进制与仓库安全测试、行为契约分析与CI门控工具
258 周安装
Angular最佳实践指南:性能优化、变更检测与包大小优化
254 周安装
Spline 3D 交互设计:无需代码的浏览器3D建模与动画工具
255 周安装