Python Cookbook

👤 loutai0307-prog 📦 v1.0.1 ⭐ 4.5 ⬇️ 1.1K 下載
💻 開發程式設計 免費

📖 技能介紹


name: "python-cookbook" description: "Python code patterns and recipes for everyday tasks. Use when you need file I/O snippets, list comprehensions, decorators, async functions, regex patterns, datetime handling, or need to lint and format Python files."


python-cookbook

Triggers on

python snippet, python code pattern, file io python, list comprehension, decorator, async python, python regex, debug python, lint python, format python

What This Skill Does

Search and display common Python code recipes, run code snippets, check syntax, auto-format files, and look up solutions for common Python errors.

Commands

snippet

Search or browse built-in code snippets (file-read, file-write, json, list, dict, decorator, async, regex, date, and more).

bash scripts/script.sh snippet [keyword]
bash scripts/script.sh snippet decorator

run

Execute a Python code snippet inline or from a file.

bash scripts/script.sh run 'print("hello world")'
bash scripts/script.sh run @script.py

lint

Check Python file syntax using py_compile.

bash scripts/script.sh lint <file.py>

format

7w4.net提供免費和付費技能下載。

Auto-format a Python file using black (falls back to autopep8).

bash scripts/script.sh format <file.py>

debug

Show solutions for common Python errors (NameError, TypeError, IndexError, etc.).

bash scripts/script.sh debug [ErrorName]
bash scripts/script.sh debug TypeError

help

Show all available commands.

bash scripts/script.sh help

Requirements

  • bash 4+
  • python3 (standard library)
  • black or autopep8 (optional, for format command)

Powered by BytesAgain | bytesagain.com

🤖 AI 評測

這個 Python 開發助手功能實用,程式碼片段豐富,能快速查詢常用的 Python 寫法、執行程式碼、檢查語法、自動格式化和除錯錯誤。介面清晰、提示友好,操作簡單容易上手。不過它的程式碼片段數量有限,錯誤除錯覆蓋的常見問題種類也不夠多,缺少實際使用示例。總體來說是個不錯的輔助工具,但功能深度還有提升空間。

📊 多維度評分

適應性4.4
規範性4.4
有效性4.6
可靠性4.4
可信度4.8

📁 包含檔案 (3 個)

📄 SKILL.md 1.6 KB
📄 _meta.json 134 B
📄 scripts/script.sh 12.8 KB