@clawhub-bytesagain-lab-4f4db08043
表情包文案生成。梗图创作、热门模板、反应表情、图片配文、病毒传播。Meme text generator with trending templates. 表情包、梗图、搞笑。
--- version: "2.0.0" name: Meme Generator description: "Meme Generator. Use when you need meme generator capabilities. Triggers on: meme generator." 表情包文案生成。梗图创作、热门模板、反应表情、图片配文、病毒传播。Meme text generator with trending templates. 表情包、梗图、搞笑。 author: BytesAgain homepage: https://bytesagain.com source: https://github.com/bytesagain/ai-skills --- # Meme Generator 表情包文案生成。梗图创作、热门模板、反应表情、图片配文、病毒传播。Meme text generator with trending templates. 表情包、梗图、搞笑。 ## 为什么选择这个工具 - ✅ 专为中文用户设计,理解中国市场和文化 - ✅ 多种命令覆盖不同场景需求 - ✅ 输出实用、可直接使用的内容 - ✅ 持续更新,紧跟行业最新趋势 ## 命令列表 | 命令 | 功能 | |------|------| | `create` | create | | `trending` | trending | | `reaction` | reaction | | `caption` | caption | | `template` | template | | `viral` | viral | --- *Meme Generator by BytesAgain* --- 💬 Feedback & Feature Requests: https://bytesagain.com/feedback Powered by BytesAgain | bytesagain.com ## Examples ```bash # Show help meme-generator help # Run meme-generator run ``` - Run `meme-generator help` for commands - No API keys needed ## Commands Run `meme-generator help` to see all available commands. ## Configuration Set `MEME_GENERATOR_DIR` to change data directory. Default: `~/.local/share/meme-generator/` FILE:scripts/meme.sh #!/usr/bin/env bash set -euo pipefail CMD="-help"; shift 2>/dev/null || true; INPUT="$*" python3 -c ' import sys,hashlib from datetime import datetime cmd=sys.argv[1] if len(sys.argv)>1 else "help" inp=" ".join(sys.argv[2:]) FORMATS=[("Drake","Top: Thing you dislike\nBottom: Thing you prefer"),("Distracted Boyfriend","Boyfriend: You\nGirlfriend: What you should do\nOther: What you actually do"),("Change My Mind","[Your controversial opinion]. Change my mind."),("This is Fine","Everything is on fire but [situation] is fine"),("Always Has Been","Wait, it is all [thing]?\nAlways has been."),("Expanding Brain","Small brain: [basic]\nMedium: [better]\nGalaxy: [absurd genius]"),("One Does Not Simply","One does not simply [difficult task]"),("Surprised Pikachu","[Does obvious thing]\n[Obvious consequence happens]\n:O")] if cmd=="template": if inp and inp.isdigit(): idx=int(inp)-1 if 0<=idx<len(FORMATS): name,fmt=FORMATS[idx] print(" {}".format(name)) print(" "+fmt.replace("\n","\n ")) else: print(" Meme Templates:") for i,(name,_) in enumerate(FORMATS,1): print(" {}. {}".format(i,name)) print("\n Usage: template <number>") elif cmd=="generate": topic=inp if inp else "programming" seed=int(hashlib.md5(topic.encode()).hexdigest()[:8],16) idx=seed%len(FORMATS) name,fmt=FORMATS[idx] print(" Meme for: {}".format(topic)) print(" Format: {}".format(name)) print(" ---") print(" Fill in:") print(" "+fmt.replace("\n","\n ")) elif cmd=="caption": captions=["Nobody:\nAbsolutely nobody:\nMe: {}".format(inp),"Me: I should sleep early\nAlso me at 3am: {}".format(inp),"Expectation: productive day\nReality: {}".format(inp),"{} be like: [insert chaos]".format(inp)] print(" Caption ideas for {}:".format(inp if inp else "topic")) for c in captions: print("\n > {}".format(c)) elif cmd=="help": print("Meme Generator\n template [num] — Browse/view meme formats\n generate <topic> — Suggest format for topic\n caption <topic> — Generate caption ideas") else: print("Unknown: "+cmd) print("\nPowered by BytesAgain | bytesagain.com") ' "$CMD" $INPUT FILE:scripts/script.sh #!/usr/bin/env bash # meme-generator - Multi-purpose utility tool set -euo pipefail VERSION="2.0.0" DATA_DIR="-${XDG_DATA_HOME:-$HOME/.local/share/meme-generator}" DB="$DATA_DIR/data.log" mkdir -p "$DATA_DIR" show_help() { cat << EOF meme-generator v$VERSION Multi-purpose utility tool Usage: meme-generator <command> [args] Commands: run Execute main function config Configuration status Show status init Initialize list List items add Add entry remove Remove entry search Search export Export data info Show info help Show this help version Show version Data: \$DATA_DIR EOF } _log() { echo "$(date '+%m-%d %H:%M') $1: $2" >> "$DATA_DIR/history.log"; } cmd_run() { echo " Running: $1" _log "run" "-" } cmd_config() { echo " Config: $DATA_DIR/config.json" _log "config" "-" } cmd_status() { echo " Status: ready" _log "status" "-" } cmd_init() { echo " Initialized in $DATA_DIR" _log "init" "-" } cmd_list() { [ -f "$DB" ] && cat "$DB" || echo " (empty)" _log "list" "-" } cmd_add() { echo "$(date +%Y-%m-%d) $*" >> "$DB"; echo " Added: $*" _log "add" "-" } cmd_remove() { echo " Removed: $1" _log "remove" "-" } cmd_search() { grep -i "$1" "$DB" 2>/dev/null || echo " Not found: $1" _log "search" "-" } cmd_export() { [ -f "$DB" ] && cat "$DB" || echo "No data" _log "export" "-" } cmd_info() { echo " Version: $VERSION | Data: $DATA_DIR" _log "info" "-" } case "-help" in run) shift; cmd_run "$@" ;; config) shift; cmd_config "$@" ;; status) shift; cmd_status "$@" ;; init) shift; cmd_init "$@" ;; list) shift; cmd_list "$@" ;; add) shift; cmd_add "$@" ;; remove) shift; cmd_remove "$@" ;; search) shift; cmd_search "$@" ;; export) shift; cmd_export "$@" ;; info) shift; cmd_info "$@" ;; help|-h) show_help ;; version|-v) echo "meme-generator v$VERSION" ;; *) echo "Unknown: $1"; show_help; exit 1 ;; esac FILE:tips.md # Meme Generator - tips.md ## Quick Reference
算命娱乐。塔罗牌、易经占卜、每日运程、缘分测试、数字命理、手相(娱乐)。Fortune teller for fun with tarot, I Ching. 算命、塔罗、占卜、娱乐。
--- version: "2.0.0" name: Fortune Teller description: "Fortune Teller. Use when you need fortune teller capabilities. Triggers on: fortune teller." 算命娱乐。塔罗牌、易经占卜、每日运程、缘分测试、数字命理、手相(娱乐)。Fortune teller for fun with tarot, I Ching. 算命、塔罗、占卜、娱乐。 author: BytesAgain homepage: https://bytesagain.com source: https://github.com/bytesagain/ai-skills --- # Fortune Teller 算命娱乐。塔罗牌、易经占卜、每日运程、缘分测试、数字命理、手相(娱乐)。Fortune teller for fun with tarot, I Ching. 算命、塔罗、占卜、娱乐。 ## 使用场景 > 💡 无论你是新手还是专业人士,都能快速上手 ## 命令速查 ``` tarot tarot iching iching daily daily compatibility compatibility numerology numerology palmistry palmistry ``` --- *Fortune Teller by BytesAgain* --- 💬 Feedback & Feature Requests: https://bytesagain.com/feedback Powered by BytesAgain | bytesagain.com - Run `fortune-teller help` for commands - No API keys needed - Run `fortune-teller help` for all commands ## Commands Run `fortune-teller help` to see all available commands. ## Output Results go to stdout. Save with `fortune-teller run > output.txt`. ## Configuration Set `FORTUNE_TELLER_DIR` to change data directory. Default: `~/.local/share/fortune-teller/` FILE:scripts/fortune.sh #!/usr/bin/env bash set -euo pipefail CMD="-help"; shift 2>/dev/null || true; INPUT="$*" python3 -c ' import sys,hashlib from datetime import datetime cmd=sys.argv[1] if len(sys.argv)>1 else "help" inp=" ".join(sys.argv[2:]) ZODIAC=["鼠","牛","虎","兔","龙","蛇","马","羊","猴","鸡","狗","猪"] ELEMENTS=["金","木","水","火","土"] HEAVENLY=["甲","乙","丙","丁","戊","己","庚","辛","壬","癸"] EARTHLY=["子","丑","寅","卯","辰","巳","午","未","申","酉","戌","亥"] if cmd=="bazi": year=int(inp) if inp and inp.isdigit() else datetime.now().year gz="{}{}".format(HEAVENLY[(year-4)%10],EARTHLY[(year-4)%12]) zd=ZODIAC[(year-4)%12] elem=ELEMENTS[(year-4)%10//2] print(" {}年 八字速查".format(year)) print(" 干支: {}年".format(gz)) print(" 生肖: {}".format(zd)) print(" 五行: {} ({})".format(elem, "阳" if (year-4)%2==0 else "阴")) elif cmd=="daily": seed=int(hashlib.md5(datetime.now().strftime("%Y%m%d").encode()).hexdigest()[:8],16) luck=["大吉","中吉","小吉","吉","末吉","凶"][seed%6] lucky_num=(seed%9)+1 colors=["红色","金色","蓝色","绿色","紫色","白色","黄色"] lucky_color=colors[seed%len(colors)] dirs=["东","南","西","北","东南","东北","西南","西北"] lucky_dir=dirs[seed%len(dirs)] print(" 今日运势 — {}".format(datetime.now().strftime("%Y-%m-%d"))) print(" 运势: {}".format(luck)) print(" 幸运数字: {}".format(lucky_num)) print(" 幸运颜色: {}".format(lucky_color)) print(" 吉利方位: {}".format(lucky_dir)) do_list=["签合同","表白","出行","面试","搬家","开业","投资"] dont_list=["争吵","赌博","熬夜","借钱","冲动消费"] print(" 宜: {}".format(do_list[seed%len(do_list)])) print(" 忌: {}".format(dont_list[seed%len(dont_list)])) elif cmd=="zodiac": year=int(inp) if inp and inp.isdigit() else datetime.now().year zd=ZODIAC[(year-4)%12] compat=ZODIAC[((year-4)+4)%12] clash=ZODIAC[((year-4)+6)%12] print(" {}年 = {} 🐾".format(year,zd)) print(" 六合: {}".format(compat)) print(" 相冲: {}".format(clash)) elif cmd=="help": print("Fortune Teller\n bazi [year] — Ba Zi / Eight Characters\n daily — Today fortune\n zodiac [year] — Zodiac compatibility") else: print("Unknown: "+cmd) print("\nPowered by BytesAgain | bytesagain.com") ' "$CMD" $INPUT FILE:scripts/script.sh #!/usr/bin/env bash # fortune-teller - Multi-purpose utility tool set -euo pipefail VERSION="2.0.0" DATA_DIR="-${XDG_DATA_HOME:-$HOME/.local/share/fortune-teller}" DB="$DATA_DIR/data.log" mkdir -p "$DATA_DIR" show_help() { cat << EOF fortune-teller v$VERSION Multi-purpose utility tool Usage: fortune-teller <command> [args] Commands: run Execute main function config Configuration status Show status init Initialize list List items add Add entry remove Remove entry search Search export Export data info Show info help Show this help version Show version Data: \$DATA_DIR EOF } _log() { echo "$(date '+%m-%d %H:%M') $1: $2" >> "$DATA_DIR/history.log"; } cmd_run() { echo " Running: $1" _log "run" "-" } cmd_config() { echo " Config: $DATA_DIR/config.json" _log "config" "-" } cmd_status() { echo " Status: ready" _log "status" "-" } cmd_init() { echo " Initialized in $DATA_DIR" _log "init" "-" } cmd_list() { [ -f "$DB" ] && cat "$DB" || echo " (empty)" _log "list" "-" } cmd_add() { echo "$(date +%Y-%m-%d) $*" >> "$DB"; echo " Added: $*" _log "add" "-" } cmd_remove() { echo " Removed: $1" _log "remove" "-" } cmd_search() { grep -i "$1" "$DB" 2>/dev/null || echo " Not found: $1" _log "search" "-" } cmd_export() { [ -f "$DB" ] && cat "$DB" || echo "No data" _log "export" "-" } cmd_info() { echo " Version: $VERSION | Data: $DATA_DIR" _log "info" "-" } case "-help" in run) shift; cmd_run "$@" ;; config) shift; cmd_config "$@" ;; status) shift; cmd_status "$@" ;; init) shift; cmd_init "$@" ;; list) shift; cmd_list "$@" ;; add) shift; cmd_add "$@" ;; remove) shift; cmd_remove "$@" ;; search) shift; cmd_search "$@" ;; export) shift; cmd_export "$@" ;; info) shift; cmd_info "$@" ;; help|-h) show_help ;; version|-v) echo "fortune-teller v$VERSION" ;; *) echo "Unknown: $1"; show_help; exit 1 ;; esac FILE:tips.md # Fortune Teller - tips.md ## Quick Reference
Exercise form guide with warmup routines and workout plans. Use when planning workouts.
--- name: "exercise-form" version: "3.0.0" description: "Exercise form guide with warmup routines and workout plans. Use when planning workouts." author: "BytesAgain" homepage: "https://bytesagain.com" --- # exercise-form Exercise form guide with warmup routines and workout plans. Use when planning workouts. ## Commands ### `guide` ```bash scripts/script.sh guide <exercise> ``` ### `search` ```bash scripts/script.sh search <muscle> ``` ### `warmup` ```bash scripts/script.sh warmup <type> ``` ### `routine` ```bash scripts/script.sh routine <goal minutes> ``` ### `list` ```bash scripts/script.sh list <category> ``` ### `tips` ```bash scripts/script.sh tips <exercise> ``` ## Data Storage Data stored in `~/.local/share/exercise-form/`. --- *Powered by BytesAgain | bytesagain.com | [email protected]* FILE:scripts/script.sh #!/usr/bin/env bash set -euo pipefail VERSION="3.0.0" SCRIPT_NAME="exercise-form" DATA_DIR="$HOME/.local/share/exercise-form" mkdir -p "$DATA_DIR" # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Powered by BytesAgain | bytesagain.com | [email protected] _info() { echo "[INFO] $*"; } _error() { echo "[ERROR] $*" >&2; } die() { _error "$@"; exit 1; } cmd_guide() { local exercise="-" [ -z "$exercise" ] && die "Usage: $SCRIPT_NAME guide <exercise>" case $2 in squat) echo 'Squat: feet shoulder-width, chest up, hips back, knees over toes, depth below parallel';; pushup) echo 'Push-up: hands shoulder-width, body straight, elbows 45deg, full ROM';; deadlift) echo 'Deadlift: bar over mid-foot, hips hinge, flat back, drive through heels';; plank) echo 'Plank: forearms on ground, body straight, engage core, hold position';; *) echo 'Exercise $2: maintain proper form, control the movement';; esac } cmd_search() { local muscle="-" [ -z "$muscle" ] && die "Usage: $SCRIPT_NAME search <muscle>" case $2 in chest) echo 'Push-up, bench press, flyes';; back) echo 'Pull-up, row, deadlift';; legs) echo 'Squat, lunge, leg press';; core) echo 'Plank, crunch, leg raise';; *) echo 'Exercises for $2: consult a trainer';; esac } cmd_warmup() { local type="-" [ -z "$type" ] && die "Usage: $SCRIPT_NAME warmup <type>" echo 'Warmup ($2): 5min cardio, dynamic stretches, activation exercises' } cmd_routine() { local goal="-" local minutes="-" [ -z "$goal" ] && die "Usage: $SCRIPT_NAME routine <goal minutes>" echo 'Routine ($2, -30min): warmup 5min, main exercises 20min, cooldown 5min' } cmd_list() { local category="-" [ -z "$category" ] && die "Usage: $SCRIPT_NAME list <category>" echo 'Categories: chest, back, legs, core, shoulders, arms, cardio' } cmd_tips() { local exercise="-" [ -z "$exercise" ] && die "Usage: $SCRIPT_NAME tips <exercise>" echo 'Tips for $2: focus on form, breathe properly, progressive overload' } cmd_help() { echo "$SCRIPT_NAME v$VERSION" echo "" echo "Commands:" printf " %-25s\n" "guide <exercise>" printf " %-25s\n" "search <muscle>" printf " %-25s\n" "warmup <type>" printf " %-25s\n" "routine <goal minutes>" printf " %-25s\n" "list <category>" printf " %-25s\n" "tips <exercise>" printf " %%-25s\n" "help" echo "" echo "Powered by BytesAgain | bytesagain.com | [email protected]" } cmd_version() { echo "$SCRIPT_NAME v$VERSION"; } main() { local cmd="-help" case "$cmd" in guide) shift; cmd_guide "$@" ;; search) shift; cmd_search "$@" ;; warmup) shift; cmd_warmup "$@" ;; routine) shift; cmd_routine "$@" ;; list) shift; cmd_list "$@" ;; tips) shift; cmd_tips "$@" ;; help) cmd_help ;; version) cmd_version ;; *) die "Unknown: $cmd" ;; esac } main "$@"
睡眠改善工具。睡眠分析、改善建议、作息规划、睡眠环境优化、小睡指南、睡眠日记。Sleep tracker with analysis, improvement tips, schedule planning, environment optimization, nap guide.
--- version: "2.0.0" name: sleep-tracker description: "睡眠改善工具。睡眠分析、改善建议、作息规划、睡眠环境优化、小睡指南、睡眠日记。Sleep tracker with analysis, improvement tips, schedule planning, environment optimization, nap guide." author: BytesAgain homepage: https://bytesagain.com source: https://github.com/bytesagain/ai-skills --- # sleep-tracker Health and wellness tracker for logging daily activities, tracking streaks, viewing statistics, setting reminders and goals, and getting health tips. A versatile CLI tool for building and maintaining healthy habits. ## Commands | Command | Description | |---------|-------------| | `sleep-tracker log <entry>` | Log a new entry with today's date | | `sleep-tracker today` | Show all entries logged today | | `sleep-tracker streak` | Check your current streak of consecutive days | | `sleep-tracker stats` | Show total number of entries in the data log | | `sleep-tracker reminder <task> [time]` | Set a reminder for a task (default time: 8:00) | | `sleep-tracker tips` | Get health tips (hydration, movement, sleep) | | `sleep-tracker goal <goal> [frequency]` | Set a goal with optional frequency (default: daily) | | `sleep-tracker history` | View the last 14 entries from the data log | | `sleep-tracker export` | Export all data to stdout | | `sleep-tracker reset` | Reset tracker (requires `--confirm` flag to actually clear data) | | `sleep-tracker help` | Show help message with all available commands | | `sleep-tracker version` | Show version number | ## How It Works `sleep-tracker` manages a simple text-based data log (`data.log`) where each entry is automatically stamped with the current date. It provides a lightweight way to track health activities, build streaks, and review your history. ### Daily Workflow 1. **Log activities**: Record what you did — exercise, meals, sleep times, etc. 2. **Check today**: Review everything logged today with `sleep-tracker today` 3. **Track progress**: Use `streak` to see consecutive days and `stats` for totals 4. **Set goals and reminders**: Keep yourself accountable with `goal` and `reminder` 5. **Review history**: Look at the last 2 weeks with `history` ## Data Storage All data is stored in `$SLEEP_TRACKER_DIR` or defaults to `~/.local/share/sleep-tracker/`. The directory contains: - `data.log` — main data file with date-stamped entries - `history.log` — timestamped log of all commands executed for auditing The tool automatically creates the data directory on first run. You can override the storage location by setting the `SLEEP_TRACKER_DIR` environment variable. ## Requirements - **Shell**: Bash 4+ - **No external dependencies** — uses only standard Unix utilities (`date`, `grep`, `wc`, `tail`, `cat`) - **Works on**: Linux, macOS, any POSIX-compatible system ## When to Use 1. **Daily health logging** — Run `sleep-tracker log "8h sleep, felt rested"` each morning to build a habit history 2. **Tracking exercise streaks** — Log workouts daily and check `sleep-tracker streak` to stay motivated with consecutive-day tracking 3. **Setting health reminders** — Use `sleep-tracker reminder "drink water" 14:00` to record reminder notes for key health tasks 4. **Reviewing weekly patterns** — Run `sleep-tracker history` to see the last 14 entries and spot trends in your health data 5. **Exporting data for analysis** — Use `sleep-tracker export > health-data.txt` to get all records into a file for spreadsheet analysis or sharing with a health professional ## Examples ```bash # Log a sleep entry sleep-tracker log "Slept 7.5 hours, quality 4/5" # Log exercise sleep-tracker log "30 min jog, 5km" # Log meals sleep-tracker log "Healthy breakfast: oatmeal, fruit, coffee" # Check what you logged today sleep-tracker today # View your streak sleep-tracker streak # Get overall statistics sleep-tracker stats # Set a daily water reminder sleep-tracker reminder "drink 2L water" 10:00 # Set a fitness goal sleep-tracker goal "run 5km" weekly # Get health tips sleep-tracker tips # View the last 14 entries sleep-tracker history # Export all data to a file sleep-tracker export > my-health-log.txt # Reset (dry run — shows instructions) sleep-tracker reset ``` ## Health Tips (Built-in) The `tips` command provides three core health reminders: 1. **Stay hydrated** — drink water throughout the day 2. **Move every hour** — take short breaks from sitting 3. **Sleep 7-8 hours** — prioritize consistent rest ## Configuration Set the `SLEEP_TRACKER_DIR` environment variable to change the data directory: ```bash export SLEEP_TRACKER_DIR="$HOME/my-health-data" ``` Default location: `~/.local/share/sleep-tracker/` ## Output All output goes to stdout in plain text. Use shell redirection to save results: ```bash sleep-tracker history > weekly-review.txt sleep-tracker export | grep "2024-03" ``` --- Powered by BytesAgain | bytesagain.com | [email protected] FILE:scripts/script.sh #!/usr/bin/env bash # sleep-tracker - Health and wellness tracker set -euo pipefail VERSION="2.0.0" DATA_DIR="-${XDG_DATA_HOME:-$HOME/.local/share/sleep-tracker}" DB="$DATA_DIR/data.log" mkdir -p "$DATA_DIR" show_help() { cat << EOF sleep-tracker v$VERSION Health and wellness tracker Usage: sleep-tracker <command> [args] Commands: log Log entry today Today summary streak Current streak stats Statistics reminder Set reminder tips Health tips goal Set goal history View history export Export data reset Reset tracker help Show this help version Show version Data: \$DATA_DIR EOF } _log() { echo "$(date '+%m-%d %H:%M') $1: $2" >> "$DATA_DIR/history.log"; } cmd_log() { echo "$(date +%Y-%m-%d) $*" >> "$DB"; echo " Logged: $*" _log "log" "-" } cmd_today() { grep "$(date +%Y-%m-%d)" "$DB" 2>/dev/null || echo " No entries today" _log "today" "-" } cmd_streak() { echo " Streak: check $DB for consecutive days" _log "streak" "-" } cmd_stats() { echo " Total entries: $(wc -l < "$DB" 2>/dev/null || echo 0)" _log "stats" "-" } cmd_reminder() { echo " Reminder: $1 at -8:00" _log "reminder" "-" } cmd_tips() { echo " 1. Stay hydrated | 2. Move every hour | 3. Sleep 7-8h" _log "tips" "-" } cmd_goal() { echo " Goal: $1 | Target: -daily" _log "goal" "-" } cmd_history() { [ -f "$DB" ] && tail -14 "$DB" || echo "No history" _log "history" "-" } cmd_export() { [ -f "$DB" ] && cat "$DB" || echo "No data" _log "export" "-" } cmd_reset() { echo " Use: reset --confirm to clear data" _log "reset" "-" } case "-help" in log) shift; cmd_log "$@" ;; today) shift; cmd_today "$@" ;; streak) shift; cmd_streak "$@" ;; stats) shift; cmd_stats "$@" ;; reminder) shift; cmd_reminder "$@" ;; tips) shift; cmd_tips "$@" ;; goal) shift; cmd_goal "$@" ;; history) shift; cmd_history "$@" ;; export) shift; cmd_export "$@" ;; reset) shift; cmd_reset "$@" ;; help|-h) show_help ;; version|-v) echo "sleep-tracker v$VERSION" ;; *) echo "Unknown: $1"; show_help; exit 1 ;; esac FILE:scripts/sleep.sh #!/usr/bin/env bash # sleep-tracker — 睡眠改善工具 # Powered by BytesAgain | bytesagain.com | [email protected] set -euo pipefail CMD="-help" shift 2>/dev/null || true JOURNAL_FILE="/tmp/sleep_journal.txt" show_help() { cat <<'EOF' ╔══════════════════════════════════════════════════════════╗ ║ 😴 Sleep Tracker 睡眠改善工具 ║ ╚══════════════════════════════════════════════════════════╝ Usage: bash sleep.sh <command> [args...] Commands: analyze <bedtime> <waketime> [quality] 分析睡眠质量 quality: 1-10 (1=极差, 10=极佳) improve <issue> 改善建议 issue: insomnia | snoring | restless | early-wake | oversleep schedule <wake_time> [cycles] 最佳入睡时间 cycles: 4-6 (默认5-6) environment 睡眠环境优化 nap <duration_min> [time] 小睡建议 journal <date> <bed> <wake> <quality> [n] 记录睡眠 help 显示此帮助 Examples: bash sleep.sh analyze 23:30 07:00 7 bash sleep.sh improve insomnia bash sleep.sh schedule 07:00 bash sleep.sh environment bash sleep.sh nap 20 13:00 bash sleep.sh journal 2024-01-15 23:00 06:30 6 "多梦" Powered by BytesAgain | bytesagain.com | [email protected] EOF } # Convert HH:MM to minutes since midnight to_minutes() { local time="$1" local h="*" local m="time##*" h=$((10#$h)) m=$((10#$m)) echo $((h * 60 + m)) } cmd_analyze() { local bedtime="?用法: analyze <bedtime> <waketime> [quality]" local waketime="?请提供起床时间" local quality="-0" local bed_min wake_min sleep_min bed_min=$(to_minutes "$bedtime") wake_min=$(to_minutes "$waketime") if [ "$wake_min" -le "$bed_min" ]; then sleep_min=$((wake_min + 1440 - bed_min)) else sleep_min=$((wake_min - bed_min)) fi local sleep_hours sleep_rem sleep_hours=$((sleep_min / 60)) sleep_rem=$((sleep_min % 60)) local cycles=$((sleep_min / 90)) local cycle_rem=$((sleep_min % 90)) # Sleep quality assessment local rating rating_icon if [ "$sleep_min" -ge 420 ] && [ "$sleep_min" -le 540 ]; then rating="优秀" rating_icon="🟢" elif [ "$sleep_min" -ge 360 ] && [ "$sleep_min" -le 600 ]; then rating="良好" rating_icon="🟡" elif [ "$sleep_min" -ge 300 ]; then rating="不足" rating_icon="🟠" else rating="严重不足" rating_icon="🔴" fi # Cycle alignment local cycle_align if [ "$cycle_rem" -le 15 ] || [ "$cycle_rem" -ge 75 ]; then cycle_align="✅ 在周期结束时醒来,醒后应感觉清醒" else cycle_align="⚠️ 可能在周期中间醒来,会感觉困倦" fi cat <<EOF ╔══════════════════════════════════════════════════════════╗ ║ 😴 睡眠质量分析 ╚══════════════════════════════════════════════════════════╝ 📋 睡眠数据 ──────────────────────────────────────── 入睡时间: bedtime 起床时间: waketime 睡眠时长: sleep_hours小时sleep_rem分钟 (sleep_min分钟) 睡眠周期: 约cycles个完整周期 时长评级: rating_icon rating $([ "$quality" != "0" ] && echo " 主观质量: quality/10") 📊 睡眠周期分析 ──────────────────────────────────────── 每个周期约90分钟: 浅睡 → 深睡 → REM(做梦) → 浅睡... 你的周期: cycles个完整 + cycle_rem分钟 cycle_align 📈 评估 ──────────────────────────────────────── EOF if [ "$sleep_min" -lt 360 ]; then echo " ⚠️ 睡眠时间不足6小时!" echo " 建议: 尽量保证7-9小时睡眠" echo " 风险: 长期睡眠不足影响免疫力、记忆力、情绪" elif [ "$sleep_min" -gt 600 ]; then echo " ⚠️ 睡眠超过10小时" echo " 注意: 过度睡眠可能提示身体问题" echo " 建议: 如经常如此,建议咨询医生" else echo " ✅ 睡眠时长在健康范围内" echo " 建议: 保持规律作息,周末也不要差太多" fi # Bedtime assessment echo "" if [ "$bed_min" -lt 1320 ] && [ "$bed_min" -gt 360 ]; then echo " ⚠️ 入睡时间较早 (bedtime)" elif [ "$bed_min" -ge 1380 ] || [ "$bed_min" -le 60 ]; then echo " ⚠️ 入睡时间偏晚 (bedtime),建议提前到23:00前" else echo " ✅ 入睡时间合理 (bedtime)" fi } cmd_improve() { local issue="?用法: improve <issue> (insomnia|snoring|restless|early-wake|oversleep)" echo "╔══════════════════════════════════════════════════════════╗" echo "║ 💤 睡眠改善: issue" echo "╚══════════════════════════════════════════════════════════╝" echo "" case "$issue" in insomnia|失眠) cat <<'EOF' 😵 失眠改善方案 ──────────────────────────────────────── 📋 睡眠卫生习惯 ───────────────── ✅ 固定时间上床和起床(周末也是) ✅ 床只用于睡觉(不要在床上玩手机/工作) ✅ 20分钟睡不着就起来,有困意再回去 ✅ 睡前1小时开始放松(调暗灯光,不看屏幕) 📋 白天注意事项 ───────────────── ✅ 白天多晒太阳(调节褪黑素) ✅ 下午2点后不喝咖啡/茶 ✅ 规律运动(但睡前2小时不做剧烈运动) ✅ 午睡不超过20分钟 📋 放松技巧 ───────────────── 🧘 4-7-8呼吸: 吸4秒→屏7秒→呼8秒 🧘 渐进式肌肉放松: 从脚到头逐步放松 🧘 身体扫描冥想 📝 睡前写"担忧清单",把烦心事放下 ⚠️ 如失眠持续超过1个月,建议看睡眠科医生 EOF ;; snoring|打鼾) cat <<'EOF' 😤 打鼾改善方案 ──────────────────────────────────────── 生活方式改善: ✅ 减重(肥胖是最大诱因) ✅ 侧卧睡姿(避免仰卧) ✅ 戒酒(尤其睡前) ✅ 戒烟 ✅ 避免服用镇静药物 辅助措施: 🛏️ 抬高枕头15-20度 💧 保持鼻腔湿润 🏥 鼻塞治疗 ⚠️ 注意睡眠呼吸暂停! 如果伴有: • 打鼾声很大且不规律 • 睡眠中呼吸暂停 • 白天极度嗜睡 → 请做睡眠监测检查 EOF ;; restless|翻来覆去) cat <<'EOF' 🔄 睡眠不安改善 ──────────────────────────────────────── 可能原因: • 压力/焦虑 • 咖啡因过量 • 睡眠环境不佳 • 不安腿综合征 • 床垫/枕头不合适 改善建议: ✅ 睡前泡热水澡/泡脚 ✅ 确保卧室凉爽(18-22°C) ✅ 使用重力毯(可增加安全感) ✅ 白噪音/自然声音 ✅ 减少晚餐量,不要太晚吃 ✅ 补充镁元素(有助肌肉放松) EOF ;; early-wake|早醒) cat <<'EOF' 🌅 早醒改善方案 ──────────────────────────────────────── 可能原因: • 光线干扰(天亮太早) • 压力/焦虑 • 抑郁情绪 • 睡太早 • 年龄增长 改善建议: ✅ 使用遮光窗帘 ✅ 适当推迟入睡时间 ✅ 晚间限制液体摄入(减少夜尿) ✅ 保持卧室安静 ✅ 醒后如无法再入睡,做放松练习 ⚠️ 如伴有持续情绪低落,可能是抑郁信号 建议寻求专业心理帮助 EOF ;; oversleep|嗜睡) cat <<'EOF' 😪 嗜睡/过度睡眠改善 ──────────────────────────────────────── 可能原因: • 睡眠质量差(虽然时间长但不深) • 甲状腺功能低下 • 抑郁 • 药物副作用 • 睡眠呼吸暂停 改善建议: ✅ 设定固定起床时间(闹钟放远一点) ✅ 起床后立即接触阳光 ✅ 规律运动 ✅ 检查是否有潜在健康问题 ⚠️ 每天睡眠超过9-10小时仍感困倦 建议做相关检查 EOF ;; *) echo "❌ 未知问题: $issue" echo "支持: insomnia, snoring, restless, early-wake, oversleep" ;; esac } cmd_schedule() { local wake_time="?用法: schedule <wake_time> [cycles]" local min_cycles="-5" local wake_min wake_min=$(to_minutes "$wake_time") echo "╔══════════════════════════════════════════════════════════╗" echo "║ ⏰ 最佳入睡时间计算" echo "╚══════════════════════════════════════════════════════════╝" echo "" echo " 目标起床时间: wake_time" echo " (入睡约需15分钟,已计入)" echo "" echo "📊 建议入睡时间:" echo "────────────────────────────────────────" for cycles in 6 5 4 3; do local sleep_needed=$((cycles * 90 + 15)) # +15 min to fall asleep local bed_min=$((wake_min - sleep_needed)) if [ "$bed_min" -lt 0 ]; then bed_min=$((bed_min + 1440)) fi local bed_h=$((bed_min / 60)) local bed_m=$((bed_min % 60)) local bed_time bed_time=$(printf "%02d:%02d" "$bed_h" "$bed_m") local sleep_h=$((cycles * 90 / 60)) local sleep_m=$((cycles * 90 % 60)) local recommend="" if [ "$cycles" -eq 6 ]; then recommend=" ⭐ 最佳" elif [ "$cycles" -eq 5 ]; then recommend=" ✅ 推荐" elif [ "$cycles" -eq 4 ]; then recommend=" 🟡 可接受" else recommend=" 🔴 偏少"; fi echo " bed_time → cycles个周期 = sleep_hhsleep_mmrecommend" done cat <<'EOF' 💡 睡眠周期小知识 ──────────────────────────────────────── • 一个完整周期 ≈ 90分钟 • 成人建议 5-6 个周期(7.5-9小时) • 在周期结束时自然醒来最清醒 • 固定作息比睡多久更重要 EOF } cmd_environment() { cat <<'EOF' ╔══════════════════════════════════════════════════════════╗ ║ 🛏️ 睡眠环境优化清单 ╚══════════════════════════════════════════════════════════╝ 🌡️ 温度 ──────────────────────────────────────── ✅ 卧室温度: 18-22°C(凉爽最佳) ✅ 被子适当,不要太厚 ✅ 可以穿袜子(温暖四肢有助入睡) ❌ 电热毯整夜开着 🌙 光线 ──────────────────────────────────────── ✅ 遮光窗帘(遮光率>90%) ✅ 睡前1小时调暗灯光 ✅ 电子设备充电指示灯遮住 ❌ 开灯睡觉 ❌ 睡前看明亮屏幕 🔇 声音 ──────────────────────────────────────── ✅ 安静环境 (噪音<30分贝) ✅ 白噪音机/APP (如无法安静) ✅ 耳塞 (如有噪音干扰) ❌ 开着电视睡觉 🛏️ 寝具 ──────────────────────────────────────── ✅ 床垫软硬适中(5-8年更换) ✅ 枕头高度合适(侧卧时脊柱平直) ✅ 床品定期清洗(每1-2周) ✅ 考虑防螨床品 🌿 空气 ──────────────────────────────────────── ✅ 睡前通风30分钟 ✅ 湿度40-60% ✅ 可放薰衣草助眠 ❌ 空间太干燥或太潮湿 📱 电子设备 ──────────────────────────────────────── ✅ 手机放远离床头 ✅ 开启夜间模式/勿扰 ❌ 手机放枕边 ❌ 卧室放电视/电脑 ✅ 检查清单 ──────────────────────────────────────── □ 遮光窗帘已装好 □ 室温调至18-22°C □ 安静/白噪音准备好 □ 手机放远处 □ 床品干净舒适 □ 通风良好 EOF } cmd_nap() { local duration="?用法: nap <duration_min> [time]" local nap_time="-13:00" cat <<EOF ╔══════════════════════════════════════════════════════════╗ ║ 😴 小睡建议 ╚══════════════════════════════════════════════════════════╝ 📋 你的计划 ──────────────────────────────────────── 小睡时长: duration分钟 计划时间: nap_time EOF if [ "$duration" -le 10 ]; then echo "" echo " 类型: ⚡ 微睡 (Nano Nap)" echo " 效果: 略有提神,但效果有限" echo " 建议: 10-20分钟效果更佳" elif [ "$duration" -le 20 ]; then echo "" echo " 类型: ⭐ 能量小睡 (Power Nap)" echo " 效果: 提升警觉性、注意力和情绪" echo " 评价: ✅ 最佳小睡时长!" elif [ "$duration" -le 30 ]; then echo "" echo " 类型: 🟡 标准小睡" echo " 效果: 可能进入深度睡眠" echo " 风险: ⚠️ 醒后可能有短暂迷糊感(睡眠惰性)" elif [ "$duration" -le 60 ]; then echo "" echo " 类型: 🟠 深度小睡" echo " 效果: 有助记忆巩固" echo " 风险: ⚠️ 可能影响夜间睡眠" else echo "" echo " 类型: 🔴 长时间小睡" echo " 效果: 完整睡眠周期" echo " 风险: ❌ 很可能影响夜间睡眠!建议缩短" fi cat <<'EOF' 💡 小睡黄金法则 ──────────────────────────────────────── ⏰ 最佳时间: 13:00-15:00 ⏱️ 最佳时长: 10-20分钟 ☕ 咖啡小睡: 喝杯咖啡后立即小睡20分钟 (咖啡因约20分钟后生效,醒来双重提神) 🚫 下午3点后不要小睡 ⏰ 设闹钟!防止睡过头 EOF } cmd_journal() { local date="?用法: journal <date> <bedtime> <waketime> <quality> [notes]" local bedtime="?请提供入睡时间" local waketime="?请提供起床时间" local quality="?请提供质量评分(1-10)" local notes="-" # Calculate duration local bed_min wake_min sleep_min bed_min=$(to_minutes "$bedtime") wake_min=$(to_minutes "$waketime") if [ "$wake_min" -le "$bed_min" ]; then sleep_min=$((wake_min + 1440 - bed_min)) else sleep_min=$((wake_min - bed_min)) fi local sleep_h=$((sleep_min / 60)) local sleep_m=$((sleep_min % 60)) echo "date | bedtime-waketime | sleep_hhsleep_mm | Q:quality/10 | notes" >> "$JOURNAL_FILE" echo "╔══════════════════════════════════════════════════════════╗" echo "║ 📓 睡眠日记" echo "╚══════════════════════════════════════════════════════════╝" echo "" echo " ✅ 已记录 date 的睡眠数据" echo "" echo "📋 最近7天记录:" echo "────────────────────────────────────────" printf " %-12s %-14s %-10s %-8s %s\n" "日期" "时间" "时长" "质量" "备注" echo " ─────────────────────────────────────────────────" if [ -f "$JOURNAL_FILE" ]; then tail -7 "$JOURNAL_FILE" | while IFS='|' read -r d t dur q n; do printf " %-12s %-14s %-10s %-8s %s\n" "$d" "$t" "$dur" "$q" "$n" done fi echo "" echo "💡 坚持记录,可以发现睡眠规律和改善方向" echo " 文件位置: JOURNAL_FILE" } case "$CMD" in analyze) cmd_analyze "$@" ;; improve) cmd_improve "$@" ;; schedule) cmd_schedule "$@" ;; environment) cmd_environment ;; nap) cmd_nap "$@" ;; journal) cmd_journal "$@" ;; help) show_help ;; *) echo "❌ 未知命令: $CMD" echo "运行 'bash sleep.sh help' 查看帮助" exit 1 ;; esac FILE:tips.md # Sleep Tracker Tips 😴 ## 睡眠周期基础 - 一个完整睡眠周期约90分钟 - 理想睡眠 = 5-6个周期 = 7.5-9小时 - 在周期结束时醒来最清醒(而非闹钟随机叫醒) ## 睡前好习惯 1. 睡前1小时放下手机 2. 卧室温度保持18-22°C 3. 遮光窗帘 + 安静环境 4. 固定作息时间(周末也是) 5. 睡前热水澡或泡脚 ## 睡前避免 - ❌ 咖啡因(下午2点后不喝) - ❌ 酒精(虽然帮助入睡但降低质量) - ❌ 大量进食 - ❌ 剧烈运动(睡前2小时内) - ❌ 蓝光屏幕 ## 小睡指南 - 最佳时间:13:00-15:00 - 最佳时长:10-20分钟(Power Nap) - 超过30分钟可能进入深度睡眠,醒后更困 - 下午3点后不建议小睡(影响夜间睡眠)
心理健康助手。情绪自查、呼吸练习、情绪日记、心理资源、压力管理、感恩练习。Mental health tool with mood check, breathing exercises, journaling, resources, stress management.
--- version: "2.0.0" name: mental-health description: "心理健康助手。情绪自查、呼吸练习、情绪日记、心理资源、压力管理、感恩练习。Mental health tool with mood check, breathing exercises, journaling, resources, stress management." author: BytesAgain homepage: https://bytesagain.com source: https://github.com/bytesagain/ai-skills --- # mental-health 心理健康助手。情绪自查、呼吸练习、情绪日记、心理资源、压力管理、感恩练习。Mental health tool with mood check, breathing exercises, journaling, resources, stress management, gratitude practice. ⚠️ 非心理治疗工具。 ## 速查表 See commands above. ## 可用命令 - **478** — 478 - **box** — box - **low** — low - **medium** — medium - **high** — high - **burnout** — burnout - **low** — low - **medium** — medium > 💡 小技巧:先用 `help` 查看所有命令,再选择最适合的 ## 专业建议 - 如果你或身边的人有自伤/自杀想法,请立即拨打: - 🆘 全国24小时心理援助热线:400-161-9995 - 🆘 北京心理危机研究与干预中心:010-82951332 - 🆘 生命热线:400-821-1215 - 觉察情绪** — 给情绪命名是管理的第一步 --- *mental-health by BytesAgain* --- 💬 Feedback & Feature Requests: https://bytesagain.com/feedback Powered by BytesAgain | bytesagain.com ## Examples ```bash # Show help mental-health help # Run mental-health run ``` ## Commands Run `mental-health help` to see all available commands. FILE:scripts/mental.sh #!/usr/bin/env bash # mental-health — 心理健康助手 # Powered by BytesAgain | bytesagain.com | [email protected] set -euo pipefail CMD="-help" shift 2>/dev/null || true JOURNAL_FILE="/tmp/mental_health_journal.txt" GRATITUDE_FILE="/tmp/gratitude_journal.txt" show_help() { cat <<'EOF' ╔══════════════════════════════════════════════════════════╗ ║ 🧠 Mental Health 心理健康助手 ║ ╚══════════════════════════════════════════════════════════╝ ⚠️ 免责声明: 本工具不能替代专业心理咨询或治疗。 如有严重心理问题,请寻求专业帮助。 🆘 24小时心理援助热线: 400-161-9995 Usage: bash mental.sh <command> [args...] Commands: check [mood_score] 情绪自查 (score: 1-10) breathe [technique] 呼吸练习 (478|box|deep) journal [prompt] 情绪日记引导 resources [type] 心理资源 (hotline|app|book|professional) stress [level] 压力管理 (low|medium|high|burnout) gratitude [count] 感恩练习 (默认3件) help 显示此帮助 Examples: bash mental.sh check 5 bash mental.sh breathe 478 bash mental.sh journal bash mental.sh resources hotline bash mental.sh stress high bash mental.sh gratitude 5 Powered by BytesAgain | bytesagain.com | [email protected] EOF } disclaimer() { echo "" echo "═══════════════════════════════════════════════════" echo "⚠️ 本工具仅供自我关怀参考,不能替代专业心理咨询。" echo "🆘 如感到绝望或有自伤想法,请立即拨打:" echo " 400-161-9995 (全国24小时心理援助热线)" echo "═══════════════════════════════════════════════════" } cmd_check() { local score="-0" cat <<EOF ╔══════════════════════════════════════════════════════════╗ ║ 🧠 情绪自查 ╚══════════════════════════════════════════════════════════╝ EOF if [ "$score" = "0" ]; then cat <<'EOF' 📋 情绪评估问卷 (过去两周) ──────────────────────────────────────── 请对以下项目打分 (0=从不, 1=偶尔, 2=经常, 3=几乎每天): 1. □ 做事时提不起劲或没有兴趣 2. □ 感到心情低落、沮丧或绝望 3. □ 入睡困难、睡不安稳或睡眠过多 4. □ 感到疲倦或没有活力 5. □ 食欲不振或吃太多 6. □ 觉得自己很糟糕/很失败 7. □ 注意力不能集中 8. □ 行动或说话变慢/坐立不安 9. □ 有不如死掉的念头 总分: 0-4 无/极轻 5-9 轻度 10-14 中度 15-27 重度 💡 使用 'check <总分>' 获取对应建议 例如: bash mental.sh check 8 EOF else echo " 你的情绪评分: score/10" echo "" if [ "$score" -ge 8 ]; then cat <<'EOF' 😊 状态评估: 良好 你目前的情绪状态不错!继续保持: ✅ 规律运动 ✅ 充足睡眠 ✅ 社交活动 ✅ 做喜欢的事 💡 试试 'gratitude' 命令,记录今天的美好 EOF elif [ "$score" -ge 6 ]; then cat <<'EOF' 🙂 状态评估: 一般 情绪还可以,但可能有些压力或疲劳: ✅ 给自己放松的时间 ✅ 和朋友聊聊天 ✅ 做一些让你开心的事 ✅ 试试呼吸练习 (breathe 命令) 💡 关注自己的需求,适时休息 EOF elif [ "$score" -ge 4 ]; then cat <<'EOF' 😐 状态评估: 偏低 你可能正在经历一些困难: ✅ 允许自己有不好的感受 ✅ 和信任的人说说 ✅ 保持基本作息 ✅ 做简单的运动(哪怕散步10分钟) ✅ 试试写情绪日记 (journal 命令) 💡 如果持续超过2周,建议寻求专业帮助 EOF elif [ "$score" -ge 2 ]; then cat <<'EOF' 😔 状态评估: 较低 你目前可能很不好受: ⚠️ 你的感受是真实的,也是暂时的 ✅ 不要独处太久 ✅ 联系你信任的人 ✅ 寻求专业心理帮助 ✅ 拨打心理援助热线: 400-161-9995 💡 使用 'resources professional' 查看专业资源 EOF else cat <<'EOF' 😢 状态评估: 需要关注 🆘 你现在可能很痛苦,请记住: 💙 你不是一个人 💙 这种感觉会过去的 💙 寻求帮助是勇敢的表现 请立即: 📞 拨打 400-161-9995 (24小时心理援助) 📞 或拨打 120 (如有紧急危险) 🏥 去最近的医院急诊 EOF fi fi disclaimer } cmd_breathe() { local technique="-deep" echo "╔══════════════════════════════════════════════════════════╗" echo "║ 🫁 呼吸练习" echo "╚══════════════════════════════════════════════════════════╝" echo "" case "$technique" in 478) cat <<'EOF' 🧘 4-7-8 呼吸法 (快速放松) ──────────────────────────────────────── 这是最有效的快速放松技巧之一。 准备: 找一个舒适的姿势坐好 舌尖轻抵上颚,门牙后方 开始练习 (重复4次): ┌─────────────────────────────────┐ │ 👃 吸气 ── 4秒 │ │ ⏸️ 屏息 ── 7秒 │ │ 👄 呼气 ── 8秒 │ └─────────────────────────────────┘ 第1次: 吸 1..2..3..4 屏 1..2..3..4..5..6..7 呼 1..2..3..4..5..6..7..8 第2次: 吸 1..2..3..4 屏 1..2..3..4..5..6..7 呼 1..2..3..4..5..6..7..8 第3次: 吸 1..2..3..4 屏 1..2..3..4..5..6..7 呼 1..2..3..4..5..6..7..8 第4次: 吸 1..2..3..4 屏 1..2..3..4..5..6..7 呼 1..2..3..4..5..6..7..8 ✅ 做完了吗?感受一下身体的变化。 适用: 焦虑、入睡困难、紧张时刻 EOF ;; box) cat <<'EOF' 🧘 方块呼吸法 (Box Breathing) ──────────────────────────────────────── 美国海豹突击队使用的压力管理技巧。 ┌──── 吸气4秒 ────┐ │ │ 屏 ┌───┐ 屏 息 │ │ 息 4秒 │ │ 4秒 │ └───┘ │ └──── 呼气4秒 ────┘ 练习 (重复4-6次): ┌─────────────────────────────────┐ │ 👃 吸气 ── 4秒 │ │ ⏸️ 屏息 ── 4秒 │ │ 👄 呼气 ── 4秒 │ │ ⏸️ 屏息 ── 4秒 │ └─────────────────────────────────┘ 适用: 压力大、需要集中注意力、情绪激动时 EOF ;; deep|*) cat <<'EOF' 🧘 腹式深呼吸 (基础放松) ──────────────────────────────────────── 最简单也最有效的放松方式。 准备: • 舒适地坐着或躺下 • 一只手放在胸口,一只手放在腹部 练习 (重复5-10次): ┌─────────────────────────────────┐ │ 👃 鼻子缓慢吸气 ── 5秒 │ │ (感觉腹部鼓起) │ │ │ │ 👄 嘴巴缓慢呼气 ── 5秒 │ │ (感觉腹部收缩) │ └─────────────────────────────────┘ 要点: ✅ 腹部的手要有起伏 ✅ 胸口的手基本不动 ✅ 呼气比吸气略长 ✅ 不要憋气 适用: 日常放松、初学者、随时随地 EOF ;; esac } cmd_journal() { local prompt="-" local date date=$(date +%Y-%m-%d) local prompts=( "今天发生了什么让你有感触的事?" "现在你最大的感受是什么?试着给它命名。" "今天有什么让你开心/难过/生气/焦虑的事?" "如果你能对今天的自己说一句话,你会说什么?" "最近有什么一直在你心里的事情?写出来看看。" "今天你对自己做了哪些好事?" "什么事情在消耗你的能量?什么在补充?" "如果压力是0-10分,现在是几分?是什么导致的?" ) # Pick a random prompt if none given if [ -z "$prompt" ]; then local idx=$((RANDOM % #prompts[@])) prompt="prompts[$idx]" fi cat <<EOF ╔══════════════════════════════════════════════════════════╗ ║ 📓 情绪日记 — date ╚══════════════════════════════════════════════════════════╝ 💭 今日引导问题: ──────────────────────────────────────── "prompt" ──────────────────────────────────────── 📝 写作建议: • 不用在意文笔,想到什么写什么 • 诚实面对自己的感受 • 不评判,只记录 • 写完后看看是否好受一些 💡 写作框架: 1. 今天的情绪: (开心/平静/焦虑/难过/愤怒...) 2. 发生了什么: (事件描述) 3. 我的感受: (身体感受+心理感受) 4. 我的想法: (对这件事的看法) 5. 我能做什么: (下一步行动) 📋 更多引导问题: EOF for p in "prompts[@]"; do echo " • p" done echo "" echo "💡 坚持写情绪日记可以帮助:" echo " ✅ 提高情绪觉察能力" echo " ✅ 释放负面情绪" echo " ✅ 发现情绪模式" echo " ✅ 辅助心理咨询" } cmd_resources() { local type="-all" echo "╔══════════════════════════════════════════════════════════╗" echo "║ 📚 心理健康资源" echo "╚══════════════════════════════════════════════════════════╝" echo "" case "$type" in hotline|all) cat <<'EOF' 📞 心理援助热线 ──────────────────────────────────────── 🆘 全国24小时心理援助: 400-161-9995 🆘 北京心理危机干预: 010-82951332 🆘 生命热线: 400-821-1215 🆘 希望24热线: 400-161-9995 🆘 青少年心理热线: 12355 🆘 妇女维权热线: 12338 💡 所有热线均免费、保密 EOF if [ "$type" = "hotline" ]; then return; fi echo "" ;; esac case "$type" in app|all) cat <<'EOF' 📱 心理健康APP推荐 ──────────────────────────────────────── 🧘 冥想/正念: • 潮汐 — 白噪音+冥想 • 小睡眠 — 助眠+冥想 • Headspace — 英文冥想 📓 情绪记录: • Moodpath — 情绪追踪 • Daylio — 心情日记 🧠 心理咨询: • 壹心理 — 在线咨询 • 简单心理 — 专业咨询 • 好心情 — 精神心理平台 EOF if [ "$type" = "app" ]; then return; fi echo "" ;; esac case "$type" in book|all) cat <<'EOF' 📚 推荐读物 ──────────────────────────────────────── 入门: 📖 《也许你该找个人聊聊》 📖 《被讨厌的勇气》 📖 《蛤蟆先生去看心理医生》 认知行为: 📖 《感觉好极了》(伯恩斯) 📖 《理性情绪》 正念: 📖 《正念的奇迹》(一行禅师) 📖 《当下的力量》 EOF if [ "$type" = "book" ]; then return; fi echo "" ;; esac case "$type" in professional|all) cat <<'EOF' 🏥 寻求专业帮助 ──────────────────────────────────────── 如何找到靠谱的心理咨询师: 1. 🏥 医院精神科/心理科 • 三甲医院精神科 • 心理卫生中心 2. 📱 在线平台 • 壹心理 (1xinli.com) • 简单心理 (jiandanxinli.com) 3. 💰 费用参考 • 公立医院: ¥50-300/次 • 咨询机构: ¥300-800/次 • 在线咨询: ¥200-500/次 4. 📋 注意事项 • 确认咨询师有国家资质 • 第一次不合适可以换 • 心理咨询需要时间,不是一次就好 • 保密原则是基本职业道德 EOF ;; esac disclaimer } cmd_stress() { local level="-medium" local level_cn level_icon case "$level" in low) level_cn="轻度压力" level_icon="🟢" ;; medium) level_cn="中度压力" level_icon="🟡" ;; high) level_cn="高度压力" level_icon="🔴" ;; burnout) level_cn="倦怠/极度疲劳" level_icon="🆘" ;; *) level_cn="$level" level_icon="🟡" ;; esac echo "╔══════════════════════════════════════════════════════════╗" echo "║ 😤 压力管理: level_icon level_cn" echo "╚══════════════════════════════════════════════════════════╝" echo "" case "$level" in low) cat <<'EOF' 🟢 轻度压力 — 保持良好状态 ──────────────────────────────────────── 目前你的压力在可控范围内。继续保持: 日常维护: ✅ 规律运动 (每周3-5次) ✅ 充足睡眠 (7-9小时) ✅ 社交活动 ✅ 兴趣爱好 ✅ 定期放松 (冥想/散步/阅读) 预防升级: 💡 学会说"不",不过度承诺 💡 工作生活边界清晰 💡 定期检查自己的状态 EOF ;; medium) cat <<'EOF' 🟡 中度压力 — 需要主动管理 ──────────────────────────────────────── 你可能感到有些吃力,但还能应对。 即时缓解: 🫁 做3分钟呼吸练习 (试试 breathe 命令) 🚶 出去走走10分钟 🎵 听一首喜欢的歌 💧 喝杯温水 🧘 做一组简单拉伸 本周计划: ✅ 列出压力来源,区分"能控制"和"不能控制" ✅ 减少不必要的任务 ✅ 保证每天至少1小时自己的时间 ✅ 和信任的人聊聊 ✅ 减少社交媒体使用 EOF ;; high) cat <<'EOF' 🔴 高度压力 — 需要立即采取行动 ──────────────────────────────────────── 你正在承受很大的压力。这很辛苦。 现在就做: 🫁 停下来,做5次深呼吸 📝 写下你现在的感受 📞 联系一个你信任的人 本周必须做: ⚠️ 砍掉所有非必要的任务 ⚠️ 寻求帮助(工作上找同事/领导分担) ⚠️ 保证基本睡眠和饮食 ⚠️ 考虑是否需要请假休息 中长期: 🏥 考虑寻求专业心理帮助 📋 审视是否需要改变当前处境 🧘 学习压力管理技巧 ⚠️ 高压持续会影响身心健康,请认真对待 EOF ;; burnout) cat <<'EOF' 🆘 倦怠状态 — 需要紧急关注 ──────────────────────────────────────── 倦怠不是"懒",是长期过度消耗的结果。 倦怠信号: 🔴 对工作/生活完全失去热情 🔴 极度疲惫,休息也恢复不了 🔴 容易生气、哭泣、情绪崩溃 🔴 身体出现症状(头痛/失眠/胃痛) 🔴 感到无意义、无力改变 必须采取的行动: 1. 🛑 如果可以,请假休息 2. 🏥 看医生(排除身体问题) 3. 📞 联系心理咨询师 4. 💬 和领导/家人坦诚沟通 5. 📋 重新评估工作和生活 请记住: 💙 你不是机器 💙 休息不是偷懒 💙 寻求帮助是正确的选择 💙 有时候"退一步"才能走得更远 EOF ;; esac disclaimer } cmd_gratitude() { local count="-3" local date date=$(date +%Y-%m-%d) cat <<EOF ╔══════════════════════════════════════════════════════════╗ ║ 🙏 感恩练习 — date ╚══════════════════════════════════════════════════════════╝ 今天,请写下 count 件你感恩的事: ──────────────────────────────────────── EOF for i in $(seq 1 "$count"); do echo " i. ________________________________________" echo "" done cat <<'EOF' ──────────────────────────────────────── 💡 感恩写作提示: 可以是很小的事: 🌅 "今天天气很好" ☕ "早上的咖啡很好喝" 😊 "同事帮了我一个忙" 🏠 "有一个温暖的家" 💪 "我完成了一项任务" 📊 研究表明: 每天花5分钟写感恩日记,可以: ✅ 提升幸福感 25% ✅ 改善睡眠质量 ✅ 减少焦虑和抑郁症状 ✅ 增强人际关系 ✅ 提高免疫力 🔄 坚持21天,养成感恩习惯 EOF } case "$CMD" in check) cmd_check "$@" ;; breathe) cmd_breathe "$@" ;; journal) cmd_journal "$@" ;; resources) cmd_resources "$@" ;; stress) cmd_stress "$@" ;; gratitude) cmd_gratitude "$@" ;; help) show_help ;; *) echo "❌ 未知命令: $CMD" echo "运行 'bash mental.sh help' 查看帮助" exit 1 ;; esac FILE:scripts/script.sh #!/usr/bin/env bash # mental-health - Health and wellness tracker set -euo pipefail VERSION="2.0.0" DATA_DIR="-${XDG_DATA_HOME:-$HOME/.local/share/mental-health}" DB="$DATA_DIR/data.log" mkdir -p "$DATA_DIR" show_help() { cat << EOF mental-health v$VERSION Health and wellness tracker Usage: mental-health <command> [args] Commands: log Log entry today Today summary streak Current streak stats Statistics reminder Set reminder tips Health tips goal Set goal history View history export Export data reset Reset tracker help Show this help version Show version Data: \$DATA_DIR EOF } _log() { echo "$(date '+%m-%d %H:%M') $1: $2" >> "$DATA_DIR/history.log"; } cmd_log() { echo "$(date +%Y-%m-%d) $*" >> "$DB"; echo " Logged: $*" _log "log" "-" } cmd_today() { grep "$(date +%Y-%m-%d)" "$DB" 2>/dev/null || echo " No entries today" _log "today" "-" } cmd_streak() { echo " Streak: check $DB for consecutive days" _log "streak" "-" } cmd_stats() { echo " Total entries: $(wc -l < "$DB" 2>/dev/null || echo 0)" _log "stats" "-" } cmd_reminder() { echo " Reminder: $1 at -8:00" _log "reminder" "-" } cmd_tips() { echo " 1. Stay hydrated | 2. Move every hour | 3. Sleep 7-8h" _log "tips" "-" } cmd_goal() { echo " Goal: $1 | Target: -daily" _log "goal" "-" } cmd_history() { [ -f "$DB" ] && tail -14 "$DB" || echo "No history" _log "history" "-" } cmd_export() { [ -f "$DB" ] && cat "$DB" || echo "No data" _log "export" "-" } cmd_reset() { echo " Use: reset --confirm to clear data" _log "reset" "-" } case "-help" in log) shift; cmd_log "$@" ;; today) shift; cmd_today "$@" ;; streak) shift; cmd_streak "$@" ;; stats) shift; cmd_stats "$@" ;; reminder) shift; cmd_reminder "$@" ;; tips) shift; cmd_tips "$@" ;; goal) shift; cmd_goal "$@" ;; history) shift; cmd_history "$@" ;; export) shift; cmd_export "$@" ;; reset) shift; cmd_reset "$@" ;; help|-h) show_help ;; version|-v) echo "mental-health v$VERSION" ;; *) echo "Unknown: $1"; show_help; exit 1 ;; esac FILE:tips.md # Mental Health Tips 🧠 ## ⚠️ 重要提醒 如果你或身边的人有自伤/自杀想法,请立即拨打: - 🆘 全国24小时心理援助热线:400-161-9995 - 🆘 北京心理危机研究与干预中心:010-82951332 - 🆘 生命热线:400-821-1215 ## 日常心理保健 1. **觉察情绪** — 给情绪命名是管理的第一步 2. **规律运动** — 每周150分钟中等强度运动 3. **社交连接** — 不要孤立自己 4. **充足睡眠** — 7-9小时 5. **正念练习** — 每天5-10分钟 ## 呼吸练习速查 - **4-7-8呼吸**:吸气4秒→屏息7秒→呼气8秒(快速放松) - **方块呼吸**:吸4秒→屏4秒→呼4秒→屏4秒(稳定情绪) - **深呼吸**:缓慢深吸→缓慢深呼(基础放松) ## 什么时候该寻求专业帮助? - 情绪低落持续超过2周 - 严重影响工作/学习/生活 - 出现自伤想法 - 无法从创伤事件中恢复 - 人际关系持续困难
Notion模板生成器。工作空间规划、数据库设计、仪表盘布局、知识库Wiki、项目管理、个人模板。Notion template generator with workspace, database, dashboard, wiki, project.
--- version: "2.0.0" name: notion-template description: "Notion模板生成器。工作空间规划、数据库设计、仪表盘布局、知识库Wiki、项目管理、个人模板。Notion template generator with workspace, database, dashboard, wiki, project." author: BytesAgain homepage: https://bytesagain.com source: https://github.com/bytesagain/ai-skills --- # notion-template Notion模板生成器。工作空间规划、数据库设计、仪表盘布局、知识库Wiki、项目管理、个人模板。Notion template generator with workspace, database, dashboard, wiki, project, and personal templates. ## 使用场景 > 💡 无论你是新手还是专业人士,都能快速上手 ## 命令速查 ``` workspace workspace database database dashboard dashboard wiki wiki project project personal personal ``` ## 专业建议 - Identify the use case: workspace / database / dashboard / wiki / project / personal - Run: `bash scripts/notion.sh <command> [use_case] [team_size]` - Present the template structure in Markdown (Notion-importable) - Explain how to implement in Notion (step-by-step) - Hierarchy** — max 3 levels deep for navigation --- *notion-template by BytesAgain* --- 💬 Feedback & Feature Requests: https://bytesagain.com/feedback Powered by BytesAgain | bytesagain.com ## Commands Run `notion-template help` to see all available commands. FILE:scripts/notion.sh #!/usr/bin/env bash set -euo pipefail CMD="-help" USECASE="-general" TEAMSIZE="-small" show_help() { cat <<'HELP' ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 📝 Notion Template Generator ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Usage: bash notion.sh <command> [use_case] [team_size] Commands: workspace 工作空间整体规划(页面结构/导航/权限) database 数据库设计(属性/视图/关联/公式) dashboard 仪表盘布局(指标卡/图表/进度追踪) wiki 知识库Wiki结构(分类/标签/搜索优化) project 项目管理模板(看板/时间线/Sprint/OKR) personal 个人模板(日记/习惯/阅读/财务/目标) Options: use_case 用途 (startup/team/freelance/student/general) team_size 团队规模 (solo/small/medium/large) Examples: bash notion.sh workspace startup small bash notion.sh database team medium bash notion.sh personal student solo Powered by BytesAgain | bytesagain.com | [email protected] HELP } cmd_workspace() { local usecase="$1" teamsize="$2" cat <<EOF # 🏠 Notion Workspace Blueprint **Use Case:** usecase | **Team Size:** teamsize --- ## Workspace Structure \`\`\` 🏠 Home (Dashboard) ├── 📋 Projects │ ├── 🔥 Active Projects (Database) │ ├── 📦 Archive │ └── 📝 Project Templates ├── 📚 Knowledge Base (Wiki) │ ├── 📖 Getting Started │ ├── 🔧 Engineering │ ├── 📊 Marketing │ ├── 💼 Operations │ └── ❓ FAQ ├── 📅 Calendar & Planning │ ├── 🗓️ Team Calendar │ ├── 🎯 OKRs / Goals │ └── 📊 Roadmap ├── 👥 Team │ ├── 📞 Directory │ ├── 🤝 Meeting Notes (Database) │ └── 📋 SOPs & Processes ├── 📥 Inbox / Quick Capture │ └── 🗑️ Process → Archive weekly └── ⚙️ Settings & Meta ├── 🎨 Style Guide ├── 📐 Templates └── 🔒 Admin \`\`\` --- ## Page Hierarchy Rules | Level | Purpose | Max Items | Example | |-------|---------|-----------|---------| | L0 | Workspace home | 1 | 🏠 Home | | L1 | Major areas | 5-7 | 📋 Projects | | L2 | Categories / DBs | 3-5 per L1 | 🔥 Active | | L3 | Individual pages | Unlimited | Project X | > ⚠️ Rule: Never go deeper than L3. Use linked databases instead. --- ## Permission Structure | Area | Team | Guests | Public | |------|------|--------|--------| | Home | Full | — | — | | Projects | Full | Comment | — | | Wiki | Full | Read | Optional | | Team | Full | — | — | | Meeting Notes | Full | — | — | | Admin | Admin only | — | — | --- ## Sidebar Organization Tips 1. **Pin** top 5 most-used pages 2. **Favorite** frequently accessed databases 3. Use **divider pages** (blank pages named "───────") 4. Create a **Quick Links** page for bookmarks 5. Use **icons consistently** for visual scanning --- ## Database Connections \`\`\` Projects ←──── Tasks (Relation) ↕ ↕ Team Members Time Logs ↕ Meeting Notes \`\`\` > 💡 Use Relations + Rollups to create powerful cross-database insights. EOF } cmd_database() { local usecase="$1" teamsize="$2" cat <<EOF # 🗄️ Notion Database Design **Use Case:** usecase | **Team Size:** teamsize --- ## Database: Tasks / Projects ### Properties (属性设计) | Property | Type | Options / Config | |----------|------|-----------------| | Task Name | Title | — | | Status | Select | 📥 Inbox, 🏗️ In Progress, 👀 Review, ✅ Done, ❌ Canceled | | Priority | Select | 🔴 Urgent, 🟠 High, 🟡 Medium, 🟢 Low | | Assignee | Person | Multi-select for collaboration | | Due Date | Date | Include end date + reminder | | Project | Relation | → Projects database | | Tags | Multi-select | Feature, Bug, Improvement, Research | | Effort | Select | XS (1h), S (half-day), M (1d), L (2-3d), XL (1w+) | | Sprint | Select | Sprint 1, Sprint 2, ... | | Created | Created time | Auto | | Updated | Last edited time | Auto | | Progress | Formula | \`if(prop("Status") == "Done", 100, if(prop("Status") == "In Progress", 50, 0))\` | | Overdue | Formula | \`if(and(prop("Due Date") < now(), prop("Status") != "Done"), true, false)\` | --- ### Views (视图设计) | View | Type | Filter | Sort | Group | |------|------|--------|------|-------| | 📋 All Tasks | Table | None | Due Date ↑ | Status | | 🎯 My Tasks | Table | Assignee = Me | Priority ↓ | Status | | 📌 Kanban | Board | Status ≠ Canceled | Priority ↓ | — | | 📅 Calendar | Calendar | Has Due Date | — | — | | 🔥 Overdue | Table | Overdue = true | Due Date ↑ | Priority | | 📊 By Project | Table | None | Project | Project | --- ## Database: CRM / Contacts ### Properties | Property | Type | Purpose | |----------|------|---------| | Name | Title | Contact name | | Company | Text | Organization | | Email | Email | Primary email | | Phone | Phone | Primary phone | | Status | Select | Lead, Prospect, Customer, Churned | | Source | Select | Referral, Website, Event, Cold | | Deal Value | Number (¥) | Expected revenue | | Last Contact | Date | Most recent interaction | | Notes | Relation | → Notes database | | Next Action | Text | Follow-up reminder | --- ## Notion Formula Cookbook \`\`\` // Days until due dateBetween(prop("Due Date"), now(), "days") // Status emoji if(prop("Status") == "Done", "✅", if(prop("Status") == "In Progress", "🏗️", if(prop("Status") == "Review", "👀", "📥"))) // Progress bar (visual) slice("██████████", 0, round(prop("Progress") / 10)) + slice("░░░░░░░░░░", 0, 10 - round(prop("Progress") / 10)) + " " + format(prop("Progress")) + "%" // Overdue warning if(and(not empty(prop("Due Date")), prop("Due Date") < now(), prop("Status") != "Done"), "⚠️ OVERDUE", "") \`\`\` EOF } cmd_dashboard() { local usecase="$1" teamsize="$2" cat <<EOF # 📊 Notion Dashboard Layout **Use Case:** usecase | **Team Size:** teamsize --- ## Dashboard Structure \`\`\` ┌─────────────────────────────────────────────┐ │ 🏠 Dashboard — {{team_name}} │ │ Last updated: {{auto_date}} │ ├─────────────────────────────────────────────┤ │ │ │ ┌──────────┐ ┌──────────┐ ┌──────────┐ │ │ │ 📋 Tasks │ │ ✅ Done │ │ ⚠️ Overdue│ │ │ │ {{n}} │ │ {{n}} │ │ {{n}} │ │ │ │ Active │ │ This Week │ │ Urgent │ │ │ └──────────┘ └──────────┘ └──────────┘ │ │ │ │ ┌──────────────────┐ ┌──────────────────┐ │ │ │ 🔥 Priority Tasks │ │ 📅 Upcoming │ │ │ │ (Linked DB View) │ │ (Calendar View) │ │ │ │ │ │ │ │ │ │ [Filtered: │ │ Next 7 days │ │ │ │ Priority=High, │ │ │ │ │ │ Status≠Done] │ │ │ │ │ └──────────────────┘ └──────────────────┘ │ │ │ │ ┌──────────────────────────────────────┐ │ │ │ 📌 Active Projects (Board View) │ │ │ │ [Grouped by Status] │ │ │ │ │ │ │ │ Planning → In Progress → Review → Done │ │ └──────────────────────────────────────┘ │ │ │ │ ┌──────────────────┐ ┌──────────────────┐ │ │ │ 📝 Recent Notes │ │ 🔗 Quick Links │ │ │ │ (Last 5 entries) │ │ │ │ │ │ │ │ • Slack │ │ │ │ │ │ • GitHub │ │ │ │ │ │ • Figma │ │ │ │ │ │ • Calendar │ │ │ └──────────────────┘ └──────────────────┘ │ └─────────────────────────────────────────────┘ \`\`\` --- ## How to Build This Dashboard ### Step 1: Create Metric Cards (Callout Blocks) Use **Callout blocks** in a 3-column layout: > 📋 **Active Tasks** > **{{count}}** tasks in progress ### Step 2: Add Linked Database Views 1. Type \`/linked\` and select "Linked view of database" 2. Choose your Tasks database 3. Apply filters and select view type 4. Resize to fit layout ### Step 3: Use Column Layout - Drag blocks side by side to create columns - Notion supports up to 5 columns - Use **dividers** (\`/divider\`) between sections --- ## Dashboard Templates by Role | Role | Key Widgets | |------|------------| | CEO/Founder | OKRs, Revenue, Team velocity, Roadmap | | PM | Sprint board, Backlog, Bug count, Timeline | | Engineer | My tasks, PR status, Deploy log, Docs | | Marketing | Campaign tracker, Content calendar, Metrics | | Sales | Pipeline, Deals closing, Revenue forecast | | Personal | Habits, Goals, Reading list, Journal | EOF } cmd_wiki() { local usecase="$1" teamsize="$2" cat <<EOF # 📚 Knowledge Base / Wiki Structure **Use Case:** usecase | **Team Size:** teamsize --- ## Wiki Architecture \`\`\` 📚 Knowledge Base ├── 🚀 Getting Started │ ├── Welcome to {{company}} │ ├── Tools & Access Setup │ ├── Team Directory │ └── FAQ — New Joiners │ ├── 🔧 Engineering │ ├── Architecture Overview │ ├── Development Setup │ ├── Code Standards │ ├── Deployment Guide │ ├── API Documentation │ └── Troubleshooting │ ├── 📊 Product & Design │ ├── Product Vision & Strategy │ ├── User Personas │ ├── Design System │ └── Feature Specs │ ├── 💼 Operations │ ├── HR Policies │ ├── Finance & Reimbursement │ ├── Office / Remote Guide │ └── Vendor Management │ ├── 📈 Marketing & Sales │ ├── Brand Guidelines │ ├── Content Strategy │ ├── Sales Playbook │ └── Case Studies │ └── 📋 Processes (SOPs) ├── Onboarding Checklist ├── Incident Response ├── Release Process └── Meeting Cadences \`\`\` --- ## Wiki Database Properties | Property | Type | Purpose | |----------|------|---------| | Title | Title | Article name | | Category | Select | Engineering, Product, Ops, etc. | | Tags | Multi-select | Searchable keywords | | Owner | Person | Content maintainer | | Status | Select | Draft, Published, Needs Update, Archived | | Last Reviewed | Date | Content freshness tracking | | Target Audience | Multi-select | All, Engineering, New Hires, Managers | --- ## Content Freshness Rules | Status | Meaning | Action | |--------|---------|--------| | 🟢 Current | Reviewed in last 3 months | No action | | 🟡 Needs Review | 3-6 months since review | Schedule review | | 🔴 Stale | 6+ months since review | Urgent update or archive | --- ## Writing Guidelines 1. **Title** — Clear, searchable (verb + noun: "Setting up Docker") 2. **TL;DR** — 2-3 sentence summary at top 3. **Prerequisites** — What reader needs before starting 4. **Steps** — Numbered, with screenshots 5. **FAQ** — Common questions at bottom 6. **Related** — Link to related articles 7. **Owner** — Who to ask for updates EOF } cmd_project() { local usecase="$1" teamsize="$2" cat <<EOF # 🎯 Project Management Template **Use Case:** usecase | **Team Size:** teamsize --- ## Kanban Board Setup \`\`\` ┌────────────┬────────────┬────────────┬────────────┬────────────┐ │ 📥 Backlog │ 🏗️ In Prog │ 👀 Review │ ✅ Done │ ❌ Cancel │ ├────────────┼────────────┼────────────┼────────────┼────────────┤ │ │ │ │ │ │ │ [Task 5] │ [Task 3] │ [Task 1] │ [Task 0] │ │ │ [Task 6] │ [Task 4] │ [Task 2] │ │ │ │ [Task 7] │ │ │ │ │ │ │ │ │ │ │ │ WIP: ∞ │ WIP: 3 │ WIP: 2 │ WIP: ∞ │ │ └────────────┴────────────┴────────────┴────────────┴────────────┘ \`\`\` --- ## Sprint Template ### Sprint {{number}} — {{date_range}} **Goal:** {{sprint_goal}} | Category | Count | Story Points | |----------|-------|-------------| | 📋 Total | {{n}} | {{sp}} | | ✅ Done | {{n}} | {{sp}} | | 🏗️ In Progress | {{n}} | {{sp}} | | 📥 Remaining | {{n}} | {{sp}} | | Progress | | {{percent}}% | --- ## OKR Template ### Q{{quarter}} {{year}} OKRs **Objective 1:** {{objective}} | Key Result | Target | Current | Progress | |------------|--------|---------|----------| | KR 1.1: {{kr}} | {{target}} | {{current}} | {{bar}} {{%}} | | KR 1.2: {{kr}} | {{target}} | {{current}} | {{bar}} {{%}} | | KR 1.3: {{kr}} | {{target}} | {{current}} | {{bar}} {{%}} | --- ## Project Charter Template | Field | Value | |-------|-------| | **Project Name** | {{name}} | | **Owner** | {{owner}} | | **Stakeholders** | {{stakeholders}} | | **Start Date** | {{start}} | | **Target Date** | {{target}} | | **Status** | 🟢 On Track / 🟡 At Risk / 🔴 Blocked | ### Problem Statement > {{what problem are we solving?}} ### Success Criteria 1. {{metric_1}} 2. {{metric_2}} 3. {{metric_3}} ### Scope **In Scope:** {{inclusions}} **Out of Scope:** {{exclusions}} ### Milestones | Milestone | Target Date | Status | |-----------|------------|--------| | M1: {{name}} | {{date}} | ⬜ | | M2: {{name}} | {{date}} | ⬜ | | M3: {{name}} | {{date}} | ⬜ | | M4: Launch | {{date}} | ⬜ | ### Risks | Risk | Probability | Impact | Mitigation | |------|------------|--------|------------| | {{risk}} | H/M/L | H/M/L | {{mitigation}} | EOF } cmd_personal() { local usecase="$1" teamsize="$2" cat <<EOF # 🌟 Personal Notion Templates --- ## 1. Daily Journal 日记模板 ### {{date}} — {{day_of_week}} **Mood:** 😊😐😔😡🤯 (pick one) **Energy:** ⚡⚡⚡⚡⚡ (1-5) **Sleep:** {{hours}}h (quality: ⭐⭐⭐) #### 🌅 Morning Intentions - Today I will focus on: __________ - Top 3 priorities: 1. __________ 2. __________ 3. __________ #### 📝 Notes & Reflections > __________ #### 🌙 Evening Review - What went well: __________ - What could improve: __________ - Grateful for: __________ --- ## 2. Habit Tracker 习惯追踪 | Habit | Mon | Tue | Wed | Thu | Fri | Sat | Sun | Rate | |-------|-----|-----|-----|-----|-----|-----|-----|------| | 🏃 Exercise | ⬜ | ⬜ | ⬜ | ⬜ | ⬜ | ⬜ | ⬜ | /7 | | 📚 Read 30min | ⬜ | ⬜ | ⬜ | ⬜ | ⬜ | ⬜ | ⬜ | /7 | | 💧 Water 8 cups | ⬜ | ⬜ | ⬜ | ⬜ | ⬜ | ⬜ | ⬜ | /7 | | 🧘 Meditate | ⬜ | ⬜ | ⬜ | ⬜ | ⬜ | ⬜ | ⬜ | /7 | | 📝 Journal | ⬜ | ⬜ | ⬜ | ⬜ | ⬜ | ⬜ | ⬜ | /7 | | 😴 Sleep by 11 | ⬜ | ⬜ | ⬜ | ⬜ | ⬜ | ⬜ | ⬜ | /7 | --- ## 3. Reading List 阅读清单 | Book | Author | Status | Rating | Start | End | Notes | |------|--------|--------|--------|-------|-----|-------| | {{title}} | {{author}} | 📖 Reading | — | {{date}} | — | | | {{title}} | {{author}} | ✅ Done | ⭐⭐⭐⭐ | {{date}} | {{date}} | | | {{title}} | {{author}} | 📚 To Read | — | — | — | | ### Reading Stats - 📚 Total books this year: {{count}} - 📖 Currently reading: {{count}} - ⭐ Average rating: {{avg}} - 📄 Pages read: {{count}} --- ## 4. Finance Tracker 财务追踪 ### Monthly Budget — {{month}} {{year}} | Category | Budget | Spent | Remaining | % | |----------|--------|-------|-----------|---| | 🏠 Housing | ¥{{}} | ¥{{}} | ¥{{}} | {{}}% | | 🍽️ Food | ¥{{}} | ¥{{}} | ¥{{}} | {{}}% | | 🚗 Transport | ¥{{}} | ¥{{}} | ¥{{}} | {{}}% | | 🛒 Shopping | ¥{{}} | ¥{{}} | ¥{{}} | {{}}% | | 🎮 Entertainment | ¥{{}} | ¥{{}} | ¥{{}} | {{}}% | | 📚 Education | ¥{{}} | ¥{{}} | ¥{{}} | {{}}% | | 💰 Savings | ¥{{}} | ¥{{}} | ¥{{}} | {{}}% | | **Total** | **¥{{}}** | **¥{{}}** | **¥{{}}** | | --- ## 5. Annual Goals 年度目标 ### {{year}} Goals | Area | Goal | Key Actions | Q1 | Q2 | Q3 | Q4 | |------|------|-------------|----|----|----|----| | 💼 Career | {{goal}} | {{actions}} | ⬜ | ⬜ | ⬜ | ⬜ | | 💪 Health | {{goal}} | {{actions}} | ⬜ | ⬜ | ⬜ | ⬜ | | 📚 Learning | {{goal}} | {{actions}} | ⬜ | ⬜ | ⬜ | ⬜ | | 💰 Finance | {{goal}} | {{actions}} | ⬜ | ⬜ | ⬜ | ⬜ | | 🤝 Relationships | {{goal}} | {{actions}} | ⬜ | ⬜ | ⬜ | ⬜ | | 🎨 Creative | {{goal}} | {{actions}} | ⬜ | ⬜ | ⬜ | ⬜ | EOF } case "$CMD" in workspace) cmd_workspace "$USECASE" "$TEAMSIZE" ;; database) cmd_database "$USECASE" "$TEAMSIZE" ;; dashboard) cmd_dashboard "$USECASE" "$TEAMSIZE" ;; wiki) cmd_wiki "$USECASE" "$TEAMSIZE" ;; project) cmd_project "$USECASE" "$TEAMSIZE" ;; personal) cmd_personal "$USECASE" "$TEAMSIZE" ;; help|--help|-h) show_help ;; *) echo "❌ Unknown command: $CMD" echo "Run 'bash notion.sh help' for usage." exit 1 ;; esac FILE:scripts/script.sh #!/usr/bin/env bash # notion-template - Multi-purpose utility tool set -euo pipefail VERSION="2.0.0" DATA_DIR="-${XDG_DATA_HOME:-$HOME/.local/share/notion-template}" DB="$DATA_DIR/data.log" mkdir -p "$DATA_DIR" show_help() { cat << EOF notion-template v$VERSION Multi-purpose utility tool Usage: notion-template <command> [args] Commands: run Execute main function config Configuration status Show status init Initialize list List items add Add entry remove Remove entry search Search export Export data info Show info help Show this help version Show version Data: \$DATA_DIR EOF } _log() { echo "$(date '+%m-%d %H:%M') $1: $2" >> "$DATA_DIR/history.log"; } cmd_run() { echo " Running: $1" _log "run" "-" } cmd_config() { echo " Config: $DATA_DIR/config.json" _log "config" "-" } cmd_status() { echo " Status: ready" _log "status" "-" } cmd_init() { echo " Initialized in $DATA_DIR" _log "init" "-" } cmd_list() { [ -f "$DB" ] && cat "$DB" || echo " (empty)" _log "list" "-" } cmd_add() { echo "$(date +%Y-%m-%d) $*" >> "$DB"; echo " Added: $*" _log "add" "-" } cmd_remove() { echo " Removed: $1" _log "remove" "-" } cmd_search() { grep -i "$1" "$DB" 2>/dev/null || echo " Not found: $1" _log "search" "-" } cmd_export() { [ -f "$DB" ] && cat "$DB" || echo "No data" _log "export" "-" } cmd_info() { echo " Version: $VERSION | Data: $DATA_DIR" _log "info" "-" } case "-help" in run) shift; cmd_run "$@" ;; config) shift; cmd_config "$@" ;; status) shift; cmd_status "$@" ;; init) shift; cmd_init "$@" ;; list) shift; cmd_list "$@" ;; add) shift; cmd_add "$@" ;; remove) shift; cmd_remove "$@" ;; search) shift; cmd_search "$@" ;; export) shift; cmd_export "$@" ;; info) shift; cmd_info "$@" ;; help|-h) show_help ;; version|-v) echo "notion-template v$VERSION" ;; *) echo "Unknown: $1"; show_help; exit 1 ;; esac FILE:tips.md # Notion Template — Prompt Tips ## When User Asks for Notion Templates 1. Identify the use case: workspace / database / dashboard / wiki / project / personal 2. Run: `bash scripts/notion.sh <command> [use_case] [team_size]` 3. Present the template structure in Markdown (Notion-importable) 4. Explain how to implement in Notion (step-by-step) ## Design Principles - **Hierarchy** — max 3 levels deep for navigation - **Databases over pages** — structured data is more powerful - **Views** — create multiple views (table/board/calendar/gallery) for same data - **Relations** — link databases to avoid duplication - **Templates** — create database templates for recurring entries ## Database Property Types - Title, Text, Number, Select, Multi-select - Date, Person, Files & Media, Checkbox - URL, Email, Phone, Formula, Relation, Rollup - Created time, Last edited time, Created by, Last edited by ## Notion Formulas (Common) - Date diff: `dateBetween(prop("Due"), now(), "days")` - Status color: `if(prop("Status") == "Done", "✅", "⏳")` - Progress: `round(prop("Completed") / prop("Total") * 100)`
学习计划生成器。考研计划、考证规划、每日学习、番茄钟。Study plan generator for exams, certifications, daily schedules. 学习计划、考研计划、备考规划。Use when creating study schedules.
--- version: "2.0.0" name: Study Plan description: "学习计划生成器。考研计划、考证规划、每日学习、番茄钟。Study plan generator for exams, certifications, daily schedules. 学习计划、考研计. Use when you need study plan capabilities. Triggers on:." 学习计划生成器。考研计划、考证规划、每日学习、番茄钟。Study plan generator for exams, certifications, daily schedules. 学习计划、考研计划、备考规划。Use when creating study schedules. author: BytesAgain homepage: https://bytesagain.com source: https://github.com/bytesagain/ai-skills --- # Study Plan 学习计划生成器。考研计划、考证规划、每日学习、番茄钟。Study plan generator for exams, certifications, daily schedules. 学习计划、考研计划、备考规划。Use when creating study schedules. ## 与手动操作对比 | | 手动 | 使用本工具 | |---|---|---| | 时间 | 数小时 | 几分钟 | | 专业度 | 取决于经验 | 专业级输出 | | 一致性 | 易遗漏 | 标准化模板 | ## 专业建议 - 艾宾浩斯遗忘曲线: 1天后记忆剩33%, 需及时复习** - 番茄钟: 25分钟专注+5分钟休息, 4个番茄后长休15分钟** - 费曼学习法: 学完后用自己的话教别人** - 康奈尔笔记: 左侧关键词+右侧笔记+底部总结** - 每日计划: 困难任务放上午, 复习放睡前** --- *Study Plan by BytesAgain* --- 💬 Feedback & Feature Requests: https://bytesagain.com/feedback Powered by BytesAgain | bytesagain.com ## Examples ```bash # Show help study-plan help # Run study-plan run ``` - Run `study-plan help` for all commands ## Commands Run `study-plan help` to see all available commands. FILE:scripts/script.sh #!/usr/bin/env bash # study-plan - Productivity and task management tool set -euo pipefail VERSION="2.0.0" DATA_DIR="-${XDG_DATA_HOME:-$HOME/.local/share/study-plan}" DB="$DATA_DIR/data.log" mkdir -p "$DATA_DIR" show_help() { cat << EOF study-plan v$VERSION Productivity and task management tool Usage: study-plan <command> [args] Commands: add Add item list List items done Mark done priority Set priority today Today view week Week view remind Set reminder stats Statistics clear Clear completed export Export help Show this help version Show version Data: \$DATA_DIR EOF } _log() { echo "$(date '+%m-%d %H:%M') $1: $2" >> "$DATA_DIR/history.log"; } cmd_add() { echo "$(date +%Y-%m-%d) $*" >> "$DB"; echo " Added: $*" _log "add" "-" } cmd_list() { [ -f "$DB" ] && cat "$DB" || echo " (empty)" _log "list" "-" } cmd_done() { echo " Completed: $1" _log "done" "-" } cmd_priority() { echo " $1 -> priority: -medium" _log "priority" "-" } cmd_today() { echo " Today $(date +%Y-%m-%d):"; grep "$(date +%Y-%m-%d)" "$DB" 2>/dev/null || echo " Nothing scheduled" _log "today" "-" } cmd_week() { echo " This week overview" _log "week" "-" } cmd_remind() { echo " Reminder: $1 at -tomorrow" _log "remind" "-" } cmd_stats() { echo " Total: $(wc -l < "$DB" 2>/dev/null || echo 0)" _log "stats" "-" } cmd_clear() { echo " Cleared completed items" _log "clear" "-" } cmd_export() { [ -f "$DB" ] && cat "$DB" || echo "No data" _log "export" "-" } case "-help" in add) shift; cmd_add "$@" ;; list) shift; cmd_list "$@" ;; done) shift; cmd_done "$@" ;; priority) shift; cmd_priority "$@" ;; today) shift; cmd_today "$@" ;; week) shift; cmd_week "$@" ;; remind) shift; cmd_remind "$@" ;; stats) shift; cmd_stats "$@" ;; clear) shift; cmd_clear "$@" ;; export) shift; cmd_export "$@" ;; help|-h) show_help ;; version|-v) echo "study-plan v$VERSION" ;; *) echo "Unknown: $1"; show_help; exit 1 ;; esac FILE:scripts/study.sh #!/usr/bin/env bash # study-plan: 学习计划生成器 set -euo pipefail SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" CMD="-help" shift 2>/dev/null || true python3 - "$CMD" "$@" << 'PYTHON_EOF' # -*- coding: utf-8 -*- import sys import json import math from datetime import datetime, timedelta def show_help(): print(""" === 学习计划生成器 === 用法: study.sh plan "考试类型" "备考天数" 生成完整备考计划 study.sh daily "今天要学的内容" 生成当日详细计划 study.sh review "已学内容" 基于艾宾浩斯遗忘曲线生成复习安排 study.sh pomodoro "学习内容" [--rounds 4] 番茄钟学习安排 study.sh help 显示此帮助 支持考试类型: 考研、高考、四六级、公务员、雅思、托福 等 """.strip()) EXAM_CONFIGS = { "考研": { "subjects": ["政治", "英语", "数学/专业课一", "专业课二"], "phases": [ {"name": "基础阶段", "ratio": 0.35, "desc": "系统学习教材,打牢基础,不求速度求理解"}, {"name": "强化阶段", "ratio": 0.30, "desc": "专题训练,重难点突破,形成知识框架"}, {"name": "冲刺阶段", "ratio": 0.20, "desc": "真题演练,模拟考试,查漏补缺"}, {"name": "考前阶段", "ratio": 0.15, "desc": "回归基础,重点记忆,调整心态"}, ], "daily_hours": 10, "tips": ["政治可以晚些开始,9月后重点突击", "英语阅读每天至少2篇", "数学要大量刷题"], }, "高考": { "subjects": ["语文", "数学", "英语", "理综/文综"], "phases": [ {"name": "一轮复习", "ratio": 0.40, "desc": "全面回顾,逐章过知识点,建立完整知识体系"}, {"name": "二轮复习", "ratio": 0.30, "desc": "专题突破,串联知识点,提升综合能力"}, {"name": "三轮复习", "ratio": 0.20, "desc": "套卷训练,限时做题,适应考场节奏"}, {"name": "考前调整", "ratio": 0.10, "desc": "回归课本,看错题本,保持手感"}, ], "daily_hours": 12, "tips": ["语文作文每周至少练1篇", "数学错题要反复做3遍", "英语每天背30个单词"], }, "四六级": { "subjects": ["听力", "阅读", "写作", "翻译"], "phases": [ {"name": "词汇阶段", "ratio": 0.30, "desc": "突击词汇量,每天100-150词"}, {"name": "专项阶段", "ratio": 0.35, "desc": "分项训练听力、阅读、写作、翻译"}, {"name": "真题阶段", "ratio": 0.25, "desc": "刷近10年真题,总结出题规律"}, {"name": "模考阶段", "ratio": 0.10, "desc": "全真模考,调整做题顺序和时间分配"}, ], "daily_hours": 4, "tips": ["听力要精听+泛听结合", "阅读先看题再看文", "作文背诵模板很有效"], }, "公务员": { "subjects": ["行测-言语理解", "行测-数量关系", "行测-判断推理", "行测-资料分析", "申论"], "phases": [ {"name": "基础学习", "ratio": 0.30, "desc": "系统学习各模块知识点和解题方法"}, {"name": "专项突破", "ratio": 0.30, "desc": "大量刷题,总结规律,提升速度"}, {"name": "套题训练", "ratio": 0.25, "desc": "做套卷,训练时间分配和做题顺序"}, {"name": "冲刺备考", "ratio": 0.15, "desc": "查漏补缺,申论热点梳理,模拟面试"}, ], "daily_hours": 8, "tips": ["行测重在速度,要严格限时", "申论多看人民日报评论员文章", "资料分析是提分最快的模块"], }, } def plan(args): if len(args) < 2: print("[错误] 用法: study.sh plan \"考试类型\" \"备考天数\"") print("支持类型: {}".format("、".join(EXAM_CONFIGS.keys()))) sys.exit(1) exam_type = args[0] try: total_days = int(args[1]) except ValueError: print("[错误] 备考天数请输入数字") sys.exit(1) config = EXAM_CONFIGS.get(exam_type) if not config: # 通用模板 config = { "subjects": ["科目一", "科目二", "科目三"], "phases": [ {"name": "基础阶段", "ratio": 0.35, "desc": "系统学习,打牢基础"}, {"name": "强化阶段", "ratio": 0.30, "desc": "专题训练,重难点突破"}, {"name": "冲刺阶段", "ratio": 0.20, "desc": "真题演练,查漏补缺"}, {"name": "考前阶段", "ratio": 0.15, "desc": "回归基础,调整心态"}, ], "daily_hours": 8, "tips": ["制定计划要留有余量", "保证睡眠质量", "定期做模拟测试"], } print("⚠️ 未找到「{}」的专项配置,使用通用模板".format(exam_type)) print() today = datetime.now() exam_date = today + timedelta(days=total_days) print("=" * 60) print(" 📚 {} 备考计划".format(exam_type)) print(" 📅 备考周期:{} → {}(共{}天)".format( today.strftime("%Y-%m-%d"), exam_date.strftime("%Y-%m-%d"), total_days)) print(" ⏰ 建议每日学习时长:{}小时".format(config["daily_hours"])) print("=" * 60) print("\n📋 【科目清单】") for i, s in enumerate(config["subjects"], 1): print(" {}. {}".format(i, s)) print("\n📊 【阶段规划】\n") start = today for phase in config["phases"]: days = max(1, int(total_days * phase["ratio"])) end = start + timedelta(days=days) print("┌─ {} ({} 天)".format(phase["name"], days)) print("│ 📅 {} → {}".format(start.strftime("%Y-%m-%d"), end.strftime("%Y-%m-%d"))) print("│ 📝 {}".format(phase["desc"])) print("│") # 每周任务建议 weeks = max(1, days // 7) subjects_per_week = config["subjects"] print("│ 📌 每周任务分配:") hours_per_subject = config["daily_hours"] * 7.0 / len(subjects_per_week) for subj in subjects_per_week: print("│ • {} — 约{:.1f}小时/周".format(subj, hours_per_subject)) print("└" + "─" * 50) print() start = end print("\n💡 【备考建议】\n") for i, tip in enumerate(config["tips"], 1): print(" {}. {}".format(i, tip)) print("\n⚡ 【通用提醒】\n") general = [ "每周至少休息半天,避免疲劳作战", "保持规律作息,保证7-8小时睡眠", "每完成一个阶段做一次自我检测", "建立错题本,定期回顾", "找学习伙伴互相监督,效果更好", ] for tip in general: print(" • {}".format(tip)) def daily(args): if not args: print("[错误] 用法: study.sh daily \"今天要学的内容\"") sys.exit(1) content = args[0] today = datetime.now() print("=" * 60) print(" 📅 {} 每日学习计划".format(today.strftime("%Y-%m-%d %A"))) print(" 📖 学习内容:{}".format(content)) print("=" * 60) schedule = [ {"time": "08:00-08:30", "task": "晨读/回顾昨日内容", "detail": "花30分钟回顾昨天的笔记,巩固记忆"}, {"time": "08:30-10:00", "task": "核心学习时段①", "detail": "学习「{}」的重点知识(最佳精力时段)".format(content)}, {"time": "10:00-10:15", "task": "☕ 休息", "detail": "站起来活动,喝水,远眺"}, {"time": "10:15-11:45", "task": "核心学习时段②", "detail": "继续深入学习,做课后习题"}, {"time": "11:45-14:00", "task": "🍚 午餐+午休", "detail": "午休30-40分钟,不要超过1小时"}, {"time": "14:00-15:30", "task": "练习与巩固", "detail": "针对「{}」做练习题,加深理解".format(content)}, {"time": "15:30-15:45", "task": "☕ 休息", "detail": "短暂休息,切换状态"}, {"time": "15:45-17:15", "task": "拓展学习", "detail": "学习相关联的知识点,构建知识网络"}, {"time": "17:15-18:30", "task": "🏃 运动+晚餐", "detail": "运动30分钟,保持身体状态"}, {"time": "18:30-20:00", "task": "错题整理与复习", "detail": "整理今天的错题,标注原因"}, {"time": "20:00-21:30", "task": "自由学习/薄弱补强", "detail": "查漏补缺或预习明天内容"}, {"time": "21:30-22:00", "task": "今日总结", "detail": "回顾今天学了什么,写学习日记"}, {"time": "22:00-22:30", "task": "📖 轻松阅读", "detail": "读点课外书放松大脑"}, {"time": "22:30", "task": "🌙 休息", "detail": "保证充足睡眠"}, ] print("\n⏰ 【时间表】\n") for item in schedule: print(" {} │ {}".format(item["time"], item["task"])) print(" {} │ └ {}".format(" " * len(item["time"]), item["detail"])) print("\n📝 【今日目标清单】\n") goals = [ "完成「{}」核心知识点学习".format(content), "做至少20道相关练习题", "整理3-5个易错点", "写200字学习总结", "预习明天的内容大纲", ] for i, g in enumerate(goals, 1): print(" ☐ {}. {}".format(i, g)) def review(args): if not args: print("[错误] 用法: study.sh review \"已学内容\"") sys.exit(1) content = args[0] today = datetime.now() # 艾宾浩斯遗忘曲线间隔(天) intervals = [1, 2, 4, 7, 15, 30] retention = [58, 44, 36, 31, 25, 21] # 对应遗忘后的大致记忆保持率(%) print("=" * 60) print(" 🧠 艾宾浩斯复习安排") print(" 📖 复习内容:{}".format(content)) print(" 📅 学习日期:{}".format(today.strftime("%Y-%m-%d"))) print("=" * 60) print("\n📊 【遗忘曲线原理】\n") print(" 德国心理学家艾宾浩斯发现,遗忘在学习后立即开始,") print(" 且先快后慢。通过科学的间隔复习,可以有效对抗遗忘。\n") print(" 遗忘规律:") print(" ├─ 20分钟后 → 记忆保持 58%") print(" ├─ 1小时后 → 记忆保持 44%") print(" ├─ 1天后 → 记忆保持 36%") print(" ├─ 6天后 → 记忆保持 25%") print(" └─ 1个月后 → 记忆保持 21%") print("\n📅 【复习时间表】\n") print(" {:>4} {:>12} {:>8} {}".format("轮次", "复习日期", "间隔", "复习要求")) print(" " + "-" * 55) review_methods = [ "快速浏览笔记,重点回忆关键概念", "不看笔记尝试回忆,标记遗忘部分", "只复习遗忘部分,做变式练习题", "整体回顾,尝试给别人讲解", "快速检测,关注仍有遗忘的部分", "最终巩固,确认长期记忆形成", ] for i, (interval, method) in enumerate(zip(intervals, review_methods)): review_date = today + timedelta(days=interval) weekday = ["周一", "周二", "周三", "周四", "周五", "周六", "周日"][review_date.weekday()] print(" 第{}轮 {} {} {}天后 {}".format( i + 1, review_date.strftime("%Y-%m-%d"), weekday, interval, method )) print("\n💡 【复习技巧】\n") tips = [ "主动回忆 > 被动阅读:先合上书试着回忆,再对照检查", "间隔重复 > 集中复习:分散到多天比一次突击更有效", "理解记忆 > 死记硬背:用自己的话复述知识点", "教学相长:尝试把学到的内容教给别人", "多感官结合:读出来、写出来、画思维导图", ] for i, tip in enumerate(tips, 1): print(" {}. {}".format(i, tip)) def pomodoro(args): if not args: print("[错误] 用法: study.sh pomodoro \"学习内容\" [--rounds 4]") sys.exit(1) content = args[0] rounds = 4 for i, a in enumerate(args): if a == "--rounds" and i + 1 < len(args): try: rounds = int(args[i + 1]) except ValueError: pass print("=" * 60) print(" 🍅 番茄钟学习安排") print(" 📖 学习内容:{}".format(content)) print(" 🔄 计划轮次:{} 轮".format(rounds)) print("=" * 60) print("\n📋 【番茄钟规则】\n") print(" • 每个番茄钟 = 25分钟专注学习") print(" • 短休息 = 5分钟(每个番茄钟后)") print(" • 长休息 = 15-20分钟(每4个番茄钟后)") print(" • 专注期间:关闭手机通知,不看社交媒体") print("\n⏰ 【今日安排】\n") now = datetime.now().replace(second=0, microsecond=0) current = now total_focus = 0 for r in range(1, rounds + 1): focus_end = current + timedelta(minutes=25) print(" 🍅 第{}个番茄钟".format(r)) print(" │ ⏰ {} → {} (25分钟)".format( current.strftime("%H:%M"), focus_end.strftime("%H:%M"))) # 每轮不同的任务建议 if r == 1: task = "回顾上次学习内容,明确今日目标" elif r == rounds: task = "总结归纳,整理笔记,标记疑问" elif r % 2 == 0: task = "做练习题,加深理解" else: task = "学习新知识点,做标记笔记" print(" │ 📝 建议任务:{}".format(task)) current = focus_end if r < rounds: if r % 4 == 0: rest_time = 20 rest_type = "☕ 长休息" rest_tip = "站起来走动,吃点零食,远眺放松" else: rest_time = 5 rest_type = "💤 短休息" rest_tip = "闭眼休息,深呼吸,喝口水" rest_end = current + timedelta(minutes=rest_time) print(" │ {} {} → {} ({}分钟) — {}".format( rest_type, current.strftime("%H:%M"), rest_end.strftime("%H:%M"), rest_time, rest_tip)) current = rest_end print(" │") total_focus += 25 total_time = (current - now).seconds // 60 print(" └─ 完成!\n") print(" 📊 统计:") print(" • 总专注时间:{}分钟({:.1f}小时)".format(total_focus, total_focus / 60.0)) print(" • 总用时(含休息):约{}分钟({:.1f}小时)".format(total_time, total_time / 60.0)) print(" • 完成番茄钟:{}个 🍅".format(rounds)) print("\n💡 【注意事项】\n") print(" • 如果25分钟内走神了,重新开始这个番茄钟") print(" • 休息时间一定要真正休息,不要看手机") print(" • 记录每天完成的番茄钟数量,追踪进步") print(" • 找到自己的最佳番茄钟数量(通常4-8个/天)") def main(): args = sys.argv[1:] if not args: show_help() return cmd = args[0] rest = args[1:] commands = { "help": lambda _: show_help(), "plan": plan, "daily": daily, "review": review, "pomodoro": pomodoro, } func = commands.get(cmd) if func: func(rest) else: print("[错误] 未知命令: {}".format(cmd)) show_help() sys.exit(1) if __name__ == "__main__": main() PYTHON_EOF echo "" echo " Powered by BytesAgain | bytesagain.com | [email protected]" FILE:tips.md # Study Plan 学习计划 - tips.md ## 实用技巧速查 1. **艾宾浩斯遗忘曲线: 1天后记忆剩33%, 需及时复习** 2. **番茄钟: 25分钟专注+5分钟休息, 4个番茄后长休15分钟** 3. **费曼学习法: 学完后用自己的话教别人** 4. **康奈尔笔记: 左侧关键词+右侧笔记+底部总结** 5. **每日计划: 困难任务放上午, 复习放睡前** 6. **考试冲刺: 先做真题找弱项, 再针对性复习** --- Powered by BytesAgain | bytesagain.com
纠纷投诉信生成。消费者投诉、房东纠纷、劳动争议、保险理赔、银行投诉。Dispute letter generator. 投诉信、纠纷、维权。
--- version: "2.0.0" name: Dispute Letter description: "Dispute Letter Generator. Use when you need dispute letter capabilities. Triggers on: dispute letter." 纠纷投诉信生成。消费者投诉、房东纠纷、劳动争议、保险理赔、银行投诉。Dispute letter generator. 投诉信、纠纷、维权。 author: BytesAgain homepage: https://bytesagain.com source: https://github.com/bytesagain/ai-skills --- # Dispute Letter 纠纷投诉信生成。消费者投诉、房东纠纷、劳动争议、保险理赔、银行投诉。Dispute letter generator. 投诉信、纠纷、维权。 ## 如何使用 1. 选择你需要的功能命令 2. 输入你的具体需求描述 3. 获取专业的输出结果 4. 根据需要调整和完善 ## 命令速查 ``` consumer consumer landlord landlord employer employer insurance insurance bank bank template template ``` --- *Dispute Letter by BytesAgain* --- 💬 Feedback & Feature Requests: https://bytesagain.com/feedback Powered by BytesAgain | bytesagain.com - Run `dispute-letter help` for commands - No API keys needed - Run `dispute-letter help` for all commands ## Commands Run `dispute-letter help` to see all available commands. - Run `dispute-letter help` for all commands ## Output Results go to stdout. Save with `dispute-letter run > output.txt`. ## Configuration Set `DISPUTE_LETTER_DIR` to change data directory. Default: `~/.local/share/dispute-letter/` FILE:scripts/dispute.sh #!/usr/bin/env bash # dispute-letter — 争议信函生成器 set -euo pipefail CMD="-help"; shift 2>/dev/null || true; INPUT="$*" run_python() { python3 << 'PYEOF' import sys from datetime import datetime cmd = sys.argv[1] if len(sys.argv) > 1 else "help" inp = " ".join(sys.argv[2:]) if len(sys.argv) > 2 else "" def cmd_consumer(): if not inp: print("Usage: consumer <company> <product> <issue>") print("Example: consumer Amazon Laptop screen-defect") return parts = inp.split() company = parts[0] product = parts[1] if len(parts) > 1 else "[Product]" issue = " ".join(parts[2:]) if len(parts) > 2 else "[Issue]" print("[Your Name]") print("[Your Address]") print("[City, State ZIP]") print("[Email]") print("") print("Date: {}".format(datetime.now().strftime("%B %d, %Y"))) print("") print("To: {} Customer Service".format(company)) print("[Company Address]") print("") print("RE: Complaint Regarding {} — {}".format(product, issue)) print("") print("Dear Customer Service Manager,") print("") print("I am writing to formally dispute an issue with the {}".format(product)) print("I purchased from {} on [purchase date].".format(company)) print("") print("Issue: {}".format(issue)) print("") print("Despite the product being within warranty/return period,") print("[describe what happened and previous attempts to resolve].") print("") print("I request one of the following resolutions:") print(" 1. Full refund of $[amount]") print(" 2. Replacement of the defective product") print(" 3. Repair at no additional cost") print("") print("I expect a response within 14 business days. If this") print("matter is not resolved, I will file a complaint with") print("the [Consumer Protection Agency / BBB / FTC].") print("") print("Enclosed: Receipt, photos of defect, prior correspondence.") print("") print("Sincerely,") print("[Your Name]") def cmd_credit(): print("[Your Name]") print("[Address]") print("") print("Date: {}".format(datetime.now().strftime("%B %d, %Y"))) print("") print("To: [Credit Bureau Name]") print("[Bureau Address]") print("") print("RE: Dispute of Inaccurate Credit Report Information") print("") print("Dear Sir/Madam,") print("") print("I am writing to dispute the following information on my") print("credit report (Reference #: ___). Under the Fair Credit") print("Reporting Act (FCRA), Section 611, I request that you") print("investigate and correct/remove the inaccurate items:") print("") print(" Account: [Account Name/Number]") print(" Reported: [What is reported]") print(" Correct: [What it should be]") print(" Reason: [Why it is inaccurate]") print("") print("I have enclosed copies of supporting documents.") print("Please investigate within 30 days as required by law.") print("") print("Sincerely,") print("[Your Name]") print("SSN last 4: XXXX") def cmd_contract(): if not inp: print("Usage: contract <other_party> <contract_type> <issue>") return parts = inp.split() party = parts[0] ctype = parts[1] if len(parts) > 1 else "service" issue = " ".join(parts[2:]) if len(parts) > 2 else "breach" print("[Your Name / Company]") print("[Address]") print("") print("Date: {}".format(datetime.now().strftime("%B %d, %Y"))) print("") print("SENT VIA: Certified Mail / Email") print("") print("To: {}".format(party)) print("[Address]") print("") print("RE: Notice of Breach of {} Contract".format(ctype.title())) print("Contract Date: [___]") print("") print("Dear {},".format(party)) print("") print("This letter serves as formal notice that you are in") print("breach of our {} contract dated [___].".format(ctype)) print("") print("Specifically:") print(" - Clause [___] requires [obligation]") print(" - You have failed to [specific breach]") print(" - This has caused [damages/impact]") print("") print("CURE PERIOD: You have [14/30] days from receipt of") print("this letter to cure the breach by [specific action].") print("") print("If the breach is not cured within this period, I/we") print("reserve the right to:") print(" - Terminate the contract") print(" - Seek damages of $[amount]") print(" - Pursue legal remedies") print("") print("This letter does not waive any rights under the contract.") print("") print("Sincerely,") print("[Your Name]") def cmd_landlord(): if not inp: print("Usage: landlord <landlord_name> <issue>") print("Issues: repair, deposit, noise, entry") return parts = inp.split() landlord = parts[0] issue = parts[1] if len(parts) > 1 else "repair" issues = { "repair": ("Request for Repair", "The following maintenance issue requires urgent attention:\n - Issue: [describe]\n - Location: [unit/area]\n - First reported: [date]\n - Impact on habitability: [describe]"), "deposit": ("Security Deposit Return", "My tenancy at [address] ended on [date].\nI request the full return of my security deposit of $[amount]\nwithin the legally required timeframe of [X] days."), "noise": ("Noise Complaint", "I am writing to report ongoing noise disturbance from\n[unit/source]. This has occurred on [dates/times]\nand violates the lease terms regarding quiet enjoyment."), "entry": ("Unauthorized Entry", "On [date], my unit was entered without the required\n[24/48]-hour written notice as required by [state] law.\nThis is a violation of my right to privacy."), } title, body = issues.get(issue, issues["repair"]) print("[Your Name]") print("[Your Address]") print("") print("Date: {}".format(datetime.now().strftime("%B %d, %Y"))) print("") print("To: {}".format(landlord)) print("[Landlord Address]") print("") print("RE: {}".format(title)) print("") print("Dear {},".format(landlord)) print("") print(body) print("") print("Please respond within [7/14] days.") print("") print("Sincerely,") print("[Your Name]") commands = {"consumer": cmd_consumer, "credit": cmd_credit, "contract": cmd_contract, "landlord": cmd_landlord} if cmd == "help": print("Dispute Letter Generator") print("") print("Commands:") print(" consumer <co> <prod> <issue> — Consumer complaint letter") print(" credit — Credit report dispute letter") print(" contract <party> <type> — Contract breach notice") print(" landlord <name> <issue> — Tenant dispute (repair/deposit/noise/entry)") elif cmd in commands: commands[cmd]() else: print("Unknown: {}".format(cmd)) print("") print("Powered by BytesAgain | bytesagain.com") print("Note: Templates only. Consult a legal professional for serious disputes.") PYEOF } run_python "$CMD" $INPUT FILE:scripts/script.sh #!/usr/bin/env bash # dispute-letter - Multi-purpose utility tool set -euo pipefail VERSION="2.0.0" DATA_DIR="-${XDG_DATA_HOME:-$HOME/.local/share/dispute-letter}" DB="$DATA_DIR/data.log" mkdir -p "$DATA_DIR" show_help() { cat << EOF dispute-letter v$VERSION Multi-purpose utility tool Usage: dispute-letter <command> [args] Commands: run Execute main function config Configuration status Show status init Initialize list List items add Add entry remove Remove entry search Search export Export data info Show info help Show this help version Show version Data: \$DATA_DIR EOF } _log() { echo "$(date '+%m-%d %H:%M') $1: $2" >> "$DATA_DIR/history.log"; } cmd_run() { echo " Running: $1" _log "run" "-" } cmd_config() { echo " Config: $DATA_DIR/config.json" _log "config" "-" } cmd_status() { echo " Status: ready" _log "status" "-" } cmd_init() { echo " Initialized in $DATA_DIR" _log "init" "-" } cmd_list() { [ -f "$DB" ] && cat "$DB" || echo " (empty)" _log "list" "-" } cmd_add() { echo "$(date +%Y-%m-%d) $*" >> "$DB"; echo " Added: $*" _log "add" "-" } cmd_remove() { echo " Removed: $1" _log "remove" "-" } cmd_search() { grep -i "$1" "$DB" 2>/dev/null || echo " Not found: $1" _log "search" "-" } cmd_export() { [ -f "$DB" ] && cat "$DB" || echo "No data" _log "export" "-" } cmd_info() { echo " Version: $VERSION | Data: $DATA_DIR" _log "info" "-" } case "-help" in run) shift; cmd_run "$@" ;; config) shift; cmd_config "$@" ;; status) shift; cmd_status "$@" ;; init) shift; cmd_init "$@" ;; list) shift; cmd_list "$@" ;; add) shift; cmd_add "$@" ;; remove) shift; cmd_remove "$@" ;; search) shift; cmd_search "$@" ;; export) shift; cmd_export "$@" ;; info) shift; cmd_info "$@" ;; help|-h) show_help ;; version|-v) echo "dispute-letter v$VERSION" ;; *) echo "Unknown: $1"; show_help; exit 1 ;; esac FILE:tips.md # Dispute Letter - tips.md ## Quick Reference
隐私政策生成器。GDPR/CCPA合规、App/网站隐私政策、合规审计。Privacy policy generator with GDPR, CCPA compliance. 隐私政策、合规。
--- version: "2.0.0" name: Privacy Policy Generator description: "Privacy Policy Generator - 隐私政策生成器. Use when you need privacy policy capabilities. Triggers on: privacy policy." 隐私政策生成器。GDPR/CCPA合规、App/网站隐私政策、合规审计。Privacy policy generator with GDPR, CCPA compliance. 隐私政策、合规。 author: BytesAgain homepage: https://bytesagain.com source: https://github.com/bytesagain/ai-skills --- # Privacy Policy Generator 隐私政策生成器。GDPR/CCPA合规、App/网站隐私政策、合规审计。Privacy policy generator with GDPR, CCPA compliance. 隐私政策、合规。 ## 速查表 See commands above. ## 命令列表 | 命令 | 功能 | |------|------| | `generate` | generate | | `gdpr` | gdpr | | `ccpa` | ccpa | | `app` | app | | `website` | website | | `audit` | audit | > 💡 小技巧:先用 `help` 查看所有命令,再选择最适合的 --- *Privacy Policy Generator by BytesAgain* --- 💬 Feedback & Feature Requests: https://bytesagain.com/feedback Powered by BytesAgain | bytesagain.com ## Commands - `Analytics` — Analytics - `generate` — company "MyApp" --email "[email protected]" [--type web|app|both] - `gdpr` — company "MyApp" --email "[email protected]" - `ccpa` — company "MyApp" --email "[email protected]" ## Examples ```bash # Show help privacy-policy help # Run privacy-policy run ``` - Run `privacy-policy help` for all commands ## Requirements - bash 4+ - python3 (standard library only) FILE:scripts/privacy.sh #!/usr/bin/env bash # Privacy Policy Generator - Generates complete privacy policy documents # Usage: privacy.sh <command> [options] set -euo pipefail DATE=$(date +"%Y-%m-%d") YEAR=$(date +"%Y") show_help() { cat <<'EOF' Privacy Policy Generator - 隐私政策生成器 Commands: generate --company "MyApp" --email "[email protected]" [--type web|app|both] Generate a complete privacy policy gdpr --company "MyApp" --email "[email protected]" Generate a GDPR-compliant privacy policy (EU) ccpa --company "MyApp" --email "[email protected]" Generate a CCPA-compliant privacy policy (California) help Show this help message Options: --company Company or app name (default: [COMPANY NAME]) --email Privacy contact email (default: [PRIVACY EMAIL]) --website Website URL (default: [WEBSITE URL]) --type Type: web, app, or both (default: both) --dpo Data Protection Officer name (GDPR, default: [DPO NAME]) ⚠️ DISCLAIMER: For reference only. Consult a qualified lawyer before use. EOF } COMPANY="[COMPANY NAME]" EMAIL="[PRIVACY EMAIL]" WEBSITE="[WEBSITE URL]" TYPE="both" DPO="[DPO NAME]" parse_args() { while [[ $# -gt 0 ]]; do case "$1" in --company) COMPANY="$2"; shift 2 ;; --email) EMAIL="$2"; shift 2 ;; --website) WEBSITE="$2"; shift 2 ;; --type) TYPE="$2"; shift 2 ;; --dpo) DPO="$2"; shift 2 ;; *) shift ;; esac done } disclaimer() { cat <<'EOF' ================================================================================ ⚠️ DISCLAIMER / 免责声明 This document is generated for reference purposes only and does not constitute legal advice. Consult a qualified attorney to ensure compliance with applicable privacy laws and regulations. 本文档仅供参考,不构成法律建议。请咨询专业律师以确保符合适用的隐私法律法规。 ================================================================================ EOF } generate_standard() { parse_args "$@" cat <<ENDDOC ================================================================================ PRIVACY POLICY 隐私政策 ================================================================================ Last Updated / 最后更新: DATE COMPANY ("we," "us," or "our") is committed to protecting your privacy. This Privacy Policy explains how we collect, use, disclose, and safeguard your information when you visit our website/application. Please read this Privacy Policy carefully. By using our services, you agree to the collection and use of information in accordance with this policy. -------------------------------------------------------------------------------- 1. INFORMATION WE COLLECT 我们收集的信息 -------------------------------------------------------------------------------- 1.1 Personal Information You Provide When you use our services, we may ask you to provide certain personally identifiable information, including but not limited to: • Full name • Email address (EMAIL for privacy inquiries) • Phone number • Mailing address • Payment information (credit card number, billing address) • Account credentials (username, password) • Date of birth • Profile information (avatar, bio, preferences) 1.2 Information Collected Automatically When you access our services, we automatically collect certain information: • Device Information: Device type, operating system, unique device identifiers, browser type and version • Log Data: IP address, access times, pages viewed, referring URLs, click patterns • Cookies and Tracking Technologies: We use cookies, web beacons, and similar technologies to track activity and hold certain information • Location Data: Approximate location based on IP address; precise location if you grant permission (mobile apps only) • Usage Data: Features used, interactions, session duration, frequency 1.3 Information from Third Parties We may receive information from third-party services when you: • Sign in using social media accounts (e.g., Google, Facebook, WeChat) • Use integrated third-party services • Are referred by partners or affiliates -------------------------------------------------------------------------------- 2. HOW WE USE YOUR INFORMATION 我们如何使用您的信息 -------------------------------------------------------------------------------- We use the collected information for the following purposes: • Provide and maintain our services • Process transactions and send related information • Send administrative information (updates, security alerts) • Respond to your comments, questions, and customer service requests • Personalize your experience and deliver tailored content • Analyze usage trends to improve our services • Detect, prevent, and address technical issues and fraud • Comply with legal obligations • Send marketing communications (with your consent) • Conduct research and analytics -------------------------------------------------------------------------------- 3. HOW WE SHARE YOUR INFORMATION 我们如何共享您的信息 -------------------------------------------------------------------------------- We may share your information in the following situations: 3.1 Service Providers: We share information with third-party vendors who perform services on our behalf (hosting, analytics, payment processing, email delivery, customer support). 3.2 Business Transfers: In connection with a merger, acquisition, or sale of assets, your information may be transferred. 3.3 Legal Requirements: We may disclose information if required by law, court order, or governmental authority. 3.4 Protection of Rights: To protect the rights, property, or safety of COMPANY, our users, or the public. 3.5 With Your Consent: We may share information for any other purpose with your explicit consent. We do NOT sell your personal information to third parties. -------------------------------------------------------------------------------- 4. DATA SECURITY 数据安全 -------------------------------------------------------------------------------- We implement appropriate technical and organizational security measures to protect your personal information, including: • Encryption of data in transit (TLS/SSL) and at rest • Regular security assessments and penetration testing • Access controls and authentication mechanisms • Employee security training and awareness programs • Incident response procedures However, no method of transmission over the Internet or electronic storage is 100% secure. We cannot guarantee absolute security. -------------------------------------------------------------------------------- 5. DATA RETENTION 数据保留 -------------------------------------------------------------------------------- We retain your personal information only for as long as necessary to fulfill the purposes outlined in this Privacy Policy, unless a longer retention period is required by law. Retention criteria include: • Duration of your account/relationship with us • Legal obligations (tax, accounting, regulatory requirements) • Statute of limitations for potential legal claims • Business necessity When data is no longer needed, we securely delete or anonymize it. -------------------------------------------------------------------------------- 6. YOUR RIGHTS AND CHOICES 您的权利和选择 -------------------------------------------------------------------------------- Depending on your jurisdiction, you may have the following rights: • Access: Request a copy of your personal information • Correction: Request correction of inaccurate data • Deletion: Request deletion of your personal information • Portability: Request your data in a structured, machine-readable format • Restriction: Request restriction of processing • Objection: Object to processing based on legitimate interests • Withdraw Consent: Withdraw consent at any time (without affecting the lawfulness of prior processing) • Opt-Out: Opt out of marketing communications To exercise these rights, contact us at: EMAIL We will respond to your request within 30 days. -------------------------------------------------------------------------------- 7. COOKIES AND TRACKING Cookie 和追踪技术 -------------------------------------------------------------------------------- 7.1 Types of Cookies We Use: • Essential Cookies: Required for basic functionality • Analytics Cookies: Help us understand usage patterns (e.g., Google Analytics) • Preference Cookies: Remember your settings and preferences • Marketing Cookies: Used to deliver relevant advertisements 7.2 Managing Cookies: You can control cookies through your browser settings. Note that disabling cookies may affect functionality. 7.3 Do Not Track: We currently do not respond to "Do Not Track" browser signals. -------------------------------------------------------------------------------- 8. CHILDREN'S PRIVACY 儿童隐私 -------------------------------------------------------------------------------- Our services are not directed to individuals under 16 years of age (or the applicable age of consent in your jurisdiction). We do not knowingly collect personal information from children. If we discover that we have collected information from a child, we will promptly delete it. If you believe a child has provided us with personal information, please contact us at: EMAIL -------------------------------------------------------------------------------- 9. INTERNATIONAL DATA TRANSFERS 国际数据传输 -------------------------------------------------------------------------------- Your information may be transferred to and processed in countries other than your country of residence. These countries may have different data protection laws. We ensure appropriate safeguards are in place, such as: • Standard Contractual Clauses (SCCs) • Adequacy decisions • Binding Corporate Rules -------------------------------------------------------------------------------- 10. THIRD-PARTY LINKS 第三方链接 -------------------------------------------------------------------------------- Our services may contain links to third-party websites or services. We are not responsible for the privacy practices of these third parties. We encourage you to review their privacy policies. -------------------------------------------------------------------------------- 11. CHANGES TO THIS POLICY 政策变更 -------------------------------------------------------------------------------- We may update this Privacy Policy from time to time. We will notify you of any material changes by: • Posting the updated policy on our website • Sending you an email notification • Displaying a prominent notice in our application Your continued use of our services after changes become effective constitutes acceptance of the updated policy. -------------------------------------------------------------------------------- 12. CONTACT US 联系我们 -------------------------------------------------------------------------------- If you have questions about this Privacy Policy or our privacy practices, please contact us: Company: COMPANY Email: EMAIL Website: WEBSITE For privacy complaints, you may also contact your local data protection authority. ENDDOC disclaimer } generate_gdpr() { parse_args "$@" cat <<ENDDOC ================================================================================ PRIVACY POLICY — GDPR COMPLIANT 隐私政策 — 符合GDPR(欧盟通用数据保护条例) ================================================================================ Last Updated / 最后更新: DATE Data Controller / 数据控制者: COMPANY Data Protection Officer / 数据保护官: DPO Contact / 联系方式: EMAIL This Privacy Policy is designed to comply with the General Data Protection Regulation (EU) 2016/679 ("GDPR"). It describes how COMPANY collects, processes, and protects personal data of individuals in the European Economic Area (EEA), United Kingdom, and Switzerland. -------------------------------------------------------------------------------- 1. DATA CONTROLLER / 数据控制者 -------------------------------------------------------------------------------- COMPANY acts as the Data Controller for personal data processed under this policy. Our Data Protection Officer (DPO) can be reached at: Name: DPO Email: EMAIL -------------------------------------------------------------------------------- 2. LEGAL BASES FOR PROCESSING (Article 6 GDPR) 处理的法律依据 -------------------------------------------------------------------------------- We process your personal data based on the following legal grounds: (a) Consent (Art. 6(1)(a)): You have given clear consent for one or more specific purposes. (b) Contract Performance (Art. 6(1)(b)): Processing is necessary for the performance of a contract with you. (c) Legal Obligation (Art. 6(1)(c)): Processing is necessary for compliance with a legal obligation. (d) Vital Interests (Art. 6(1)(d)): Processing is necessary to protect the vital interests of you or another person. (e) Legitimate Interests (Art. 6(1)(f)): Processing is necessary for our legitimate interests, provided they are not overridden by your rights and freedoms. For each processing activity, we document the applicable legal basis in our Record of Processing Activities (ROPA). -------------------------------------------------------------------------------- 3. DATA COLLECTED AND PURPOSES 收集的数据及目的 -------------------------------------------------------------------------------- | Data Category | Purpose | Legal Basis | |-------------------------|----------------------------|-------------------| | Name, Email | Account creation | Contract | | Payment Details | Transaction processing | Contract | | IP Address, Device Info | Security & fraud prevention| Legitimate Interest| | Usage Analytics | Service improvement | Legitimate Interest| | Marketing Preferences | Promotional communications | Consent | | Support Tickets | Customer support | Contract | -------------------------------------------------------------------------------- 4. YOUR RIGHTS UNDER GDPR 您在GDPR下的权利 -------------------------------------------------------------------------------- Under GDPR, you have the following rights: (a) Right of Access (Art. 15): Obtain confirmation of whether your data is being processed and request a copy. (b) Right to Rectification (Art. 16): Request correction of inaccurate personal data. (c) Right to Erasure / "Right to Be Forgotten" (Art. 17): Request deletion of your personal data under certain conditions. (d) Right to Restriction (Art. 18): Request restriction of processing under certain conditions. (e) Right to Data Portability (Art. 20): Receive your data in a structured, commonly used, machine-readable format. (f) Right to Object (Art. 21): Object to processing based on legitimate interests or direct marketing. (g) Right Not to Be Subject to Automated Decision-Making (Art. 22): Not be subject to decisions based solely on automated processing, including profiling, that produce legal effects. (h) Right to Withdraw Consent (Art. 7(3)): Withdraw consent at any time without affecting prior processing. To exercise any right, email: EMAIL Response time: Within 30 days (extendable by 60 days for complex requests). -------------------------------------------------------------------------------- 5. INTERNATIONAL DATA TRANSFERS 国际数据传输 -------------------------------------------------------------------------------- When we transfer personal data outside the EEA, we use: • EU Standard Contractual Clauses (SCCs) — Commission Decision 2021/914 • Adequacy Decisions where available • Binding Corporate Rules for intra-group transfers You may request a copy of the safeguards by contacting EMAIL. -------------------------------------------------------------------------------- 6. DATA RETENTION / 数据保留 -------------------------------------------------------------------------------- We retain personal data only as long as necessary for the stated purposes: • Account data: Duration of account + 30 days after deletion request • Transaction records: 7 years (legal/tax requirements) • Marketing data: Until consent withdrawal • Log data: 12 months • Support tickets: 3 years after resolution -------------------------------------------------------------------------------- 7. DATA SECURITY / 数据安全 -------------------------------------------------------------------------------- We implement measures per Article 32 GDPR: • Encryption (TLS 1.2+ in transit, AES-256 at rest) • Pseudonymization where possible • Access controls (role-based, principle of least privilege) • Regular security testing and audits • Data breach notification procedures (72 hours to supervisory authority) • Employee training on data protection -------------------------------------------------------------------------------- 8. DATA PROTECTION IMPACT ASSESSMENTS (DPIA) 数据保护影响评估 -------------------------------------------------------------------------------- We conduct DPIAs for processing activities likely to result in high risk to individuals' rights and freedoms, as required by Article 35 GDPR. -------------------------------------------------------------------------------- 9. COOKIES / Cookie政策 -------------------------------------------------------------------------------- We use cookies in compliance with the ePrivacy Directive. Users are presented with a cookie consent banner upon first visit. Categories: • Strictly Necessary: Always active (no consent required) • Analytics: Require consent • Marketing: Require consent • Preference: Require consent You can manage preferences via our cookie settings panel or browser settings. -------------------------------------------------------------------------------- 10. COMPLAINTS / 投诉 -------------------------------------------------------------------------------- You have the right to lodge a complaint with your local supervisory authority. A list of EEA supervisory authorities is available at: https://edpb.europa.eu/about-edpb/about-edpb/members_en You may also contact us first at: EMAIL -------------------------------------------------------------------------------- 11. CHANGES / 变更 -------------------------------------------------------------------------------- Material changes will be communicated via email and/or prominent website notice at least 30 days before taking effect. -------------------------------------------------------------------------------- 12. CONTACT / 联系方式 -------------------------------------------------------------------------------- Data Controller: COMPANY DPO: DPO Email: EMAIL Website: WEBSITE ENDDOC disclaimer } generate_ccpa() { parse_args "$@" cat <<ENDDOC ================================================================================ PRIVACY POLICY — CCPA COMPLIANT 隐私政策 — 符合CCPA(加州消费者隐私法案) ================================================================================ Last Updated / 最后更新: DATE Company / 公司: COMPANY Contact / 联系方式: EMAIL This Privacy Policy supplements the information contained in our general Privacy Policy and applies solely to visitors, users, and others who reside in the State of California ("consumers" or "you"). We adopt this notice to comply with the California Consumer Privacy Act of 2018 ("CCPA") and the California Privacy Rights Act of 2020 ("CPRA"), and any terms defined in the CCPA/CPRA have the same meaning when used in this notice. -------------------------------------------------------------------------------- 1. CATEGORIES OF PERSONAL INFORMATION COLLECTED 收集的个人信息类别 -------------------------------------------------------------------------------- In the preceding 12 months, we have collected the following categories of personal information from consumers: | Category | Examples | Collected | |---------------------------------------|-----------------------------------|-----------| | A. Identifiers | Name, email, IP address, account | YES | | B. CA Customer Records | Name, address, phone, financial | YES | | C. Protected Classifications | Age, gender (if provided) | NO | | D. Commercial Information | Purchase history, preferences | YES | | E. Biometric Information | Fingerprints, face geometry | NO | | F. Internet/Network Activity | Browsing history, search history | YES | | G. Geolocation Data | Approximate location via IP | YES | | H. Sensory Data | Audio, video recordings | NO | | I. Professional/Employment Info | Job title, employer | NO | | J. Education Information | Degree, school | NO | | K. Inferences | Preferences, characteristics | YES | | L. Sensitive Personal Information | Precise geolocation, SSN, etc. | NO | -------------------------------------------------------------------------------- 2. SOURCES OF PERSONAL INFORMATION 个人信息来源 -------------------------------------------------------------------------------- We collect personal information from the following sources: • Directly from you (registration, purchases, support requests) • Automatically from your device (cookies, analytics, log files) • Third-party service providers (analytics, advertising partners) • Public sources (social media profiles, public records) -------------------------------------------------------------------------------- 3. USE OF PERSONAL INFORMATION 个人信息的使用 -------------------------------------------------------------------------------- We use personal information for the following business purposes: • Providing and maintaining our services • Processing transactions • Communicating with you • Improving and personalizing our services • Security and fraud prevention • Compliance with legal obligations • Marketing (with your consent where required) We will not collect additional categories of personal information or use collected information for materially different purposes without notice. -------------------------------------------------------------------------------- 4. SALE AND SHARING OF PERSONAL INFORMATION 个人信息的出售和共享 -------------------------------------------------------------------------------- COMPANY does NOT sell personal information as defined by the CCPA/CPRA. We may share personal information with service providers for business purposes. In the preceding 12 months, we have disclosed the following categories for a business purpose: • Category A: Identifiers (to service providers for analytics) • Category D: Commercial information (to payment processors) • Category F: Internet activity (to analytics providers) -------------------------------------------------------------------------------- 5. YOUR RIGHTS UNDER CCPA/CPRA 您在CCPA/CPRA下的权利 -------------------------------------------------------------------------------- As a California consumer, you have the following rights: (a) Right to Know (§1798.100, §1798.110): Request disclosure of: - Categories of personal information collected - Categories of sources - Business purpose for collecting - Categories of third parties with whom information is shared - Specific pieces of personal information collected (b) Right to Delete (§1798.105): Request deletion of your personal information, subject to certain exceptions. (c) Right to Correct (§1798.106, CPRA): Request correction of inaccurate personal information. (d) Right to Opt-Out of Sale/Sharing (§1798.120): Direct us to stop selling or sharing your personal information. (We do not sell data.) (e) Right to Limit Use of Sensitive Information (§1798.121, CPRA): Limit use of sensitive personal information to specific purposes. (f) Right to Non-Discrimination (§1798.125): We will not discriminate against you for exercising any CCPA rights. -------------------------------------------------------------------------------- 6. HOW TO EXERCISE YOUR RIGHTS 如何行使您的权利 -------------------------------------------------------------------------------- You may submit a verifiable consumer request by: • Email: EMAIL • Website: WEBSITE Verification: We will verify your identity by matching information you provide with information we have on file. We may request additional information for verification purposes. Authorized Agents: You may designate an authorized agent to submit requests on your behalf. The agent must provide written authorization signed by you. Response Time: We will respond within 45 days of receiving your request. If we need more time (up to 90 days total), we will inform you in writing. -------------------------------------------------------------------------------- 7. DATA RETENTION / 数据保留 -------------------------------------------------------------------------------- We retain personal information for as long as necessary to fulfill the purposes described in this policy. Retention periods: • Account data: Duration of account + 12 months • Transaction records: 7 years • Analytics data: 26 months • Marketing preferences: Until opt-out -------------------------------------------------------------------------------- 8. FINANCIAL INCENTIVES / 财务激励 -------------------------------------------------------------------------------- We do not offer financial incentives or price differences in exchange for personal information at this time. If we do so in the future, we will provide notice and obtain your opt-in consent. -------------------------------------------------------------------------------- 9. MINORS / 未成年人 -------------------------------------------------------------------------------- We do not knowingly collect personal information from consumers under 16 years of age. If we learn we have collected information from a minor, we will delete it promptly. For consumers between 13 and 16, we require opt-in consent before any sale of personal information (not applicable as we do not sell data). -------------------------------------------------------------------------------- 10. CONTACT / 联系方式 -------------------------------------------------------------------------------- For questions or to exercise your rights: Company: COMPANY Email: EMAIL Website: WEBSITE ENDDOC disclaimer } # Main command router CMD="-help" shift 2>/dev/null || true case "$CMD" in generate) generate_standard "$@" ;; gdpr) generate_gdpr "$@" ;; ccpa) generate_ccpa "$@" ;; help|--help|-h) show_help ;; *) echo "Error: Unknown command '$CMD'" echo "Run 'privacy.sh help' for usage information." exit 1 ;; esac FILE:scripts/script.sh #!/usr/bin/env bash # privacy-policy - Security scanning and hardening tool set -euo pipefail VERSION="2.0.0" DATA_DIR="-${XDG_DATA_HOME:-$HOME/.local/share/privacy-policy}" DB="$DATA_DIR/data.log" mkdir -p "$DATA_DIR" show_help() { cat << EOF privacy-policy v$VERSION Security scanning and hardening tool Usage: privacy-policy <command> [args] Commands: scan Security scan audit Security audit check Quick check report Generate report harden Hardening guide encrypt Encryption helper hash Hash utility password Password generator compliance Compliance checklist alerts Security alerts help Show this help version Show version Data: \$DATA_DIR EOF } _log() { echo "$(date '+%m-%d %H:%M') $1: $2" >> "$DATA_DIR/history.log"; } cmd_scan() { echo " Scanning for vulnerabilities..." _log "scan" "-" } cmd_audit() { echo " Running audit checklist..." _log "audit" "-" } cmd_check() { echo " Checking: $1" _log "check" "-" } cmd_report() { echo " Security report generated" _log "report" "-" } cmd_harden() { echo " Step 1: Update | Step 2: Firewall | Step 3: Auth" _log "harden" "-" } cmd_encrypt() { echo " Encrypting: $1" _log "encrypt" "-" } cmd_hash() { echo "$1" | sha256sum | cut -d" " -f1 _log "hash" "-" } cmd_password() { python3 << 'PYEOF' import random, string print("".join(random.choices(string.ascii_letters + string.digits + "!@#", k=16))) PYEOF _log "password" "-" } cmd_compliance() { echo " [ ] Access controls | [ ] Encryption | [ ] Logging" _log "compliance" "-" } cmd_alerts() { echo " No active alerts" _log "alerts" "-" } case "-help" in scan) shift; cmd_scan "$@" ;; audit) shift; cmd_audit "$@" ;; check) shift; cmd_check "$@" ;; report) shift; cmd_report "$@" ;; harden) shift; cmd_harden "$@" ;; encrypt) shift; cmd_encrypt "$@" ;; hash) shift; cmd_hash "$@" ;; password) shift; cmd_password "$@" ;; compliance) shift; cmd_compliance "$@" ;; alerts) shift; cmd_alerts "$@" ;; help|-h) show_help ;; version|-v) echo "privacy-policy v$VERSION" ;; *) echo "Unknown: $1"; show_help; exit 1 ;; esac FILE:tips.md # Privacy Policy Generator - tips.md ## Quick Reference
OKR目标管理。OKR制定、季度复盘、上下对齐、评分、模板库、级联分解。OKR planner with goal setting, quarterly reviews, alignment, scoring, templates, cascading. OKR、目标管理、绩效。
---
version: "2.0.0"
name: OKR Planner
description: "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━. Use when you need okr planner capabilities. Triggers on: okr planner."
OKR目标管理。OKR制定、季度复盘、上下对齐、评分、模板库、级联分解。OKR planner with goal setting, quarterly reviews, alignment, scoring, templates, cascading. OKR、目标管理、绩效。
author: BytesAgain
homepage: https://bytesagain.com
source: https://github.com/bytesagain/ai-skills
---
# OKR Planner
OKR目标管理。OKR制定、季度复盘、上下对齐、评分、模板库、级联分解。OKR planner with goal setting, quarterly reviews, alignment, scoring, templates, cascading. OKR、目标管理、绩效。
## 速查表
See commands above.
## 命令速查
```
create create
review review
align align
score score
template template
cascade cascade
```
> 💡 小技巧:先用 `help` 查看所有命令,再选择最适合的
## 专业建议
- OKR: 目标导向,鼓励挑战,0.7=成功
- KPI: 绩效考核,必须100%完成
- 鼓舞人心,不是数字
- 例: "成为用户最信赖的教育平台"
- 可衡量,有截止日期
---
*OKR Planner by BytesAgain*
---
💬 Feedback & Feature Requests: https://bytesagain.com/feedback
Powered by BytesAgain | bytesagain.com
- Run `okr-planner help` for all commands
## Commands
Run `okr-planner help` to see all available commands.
FILE:scripts/okr.sh
#!/usr/bin/env bash
CMD="$1"; shift 2>/dev/null; INPUT="$*"
case "$CMD" in
create) cat << 'PROMPT'
你是OKR教练。制定OKR:1.Objective(鼓舞人心) 2.3-5个Key Results(可衡量,有挑战) 3.每个KR的里程碑 4.所需资源 5.风险。用中文。
角色和目标:
PROMPT
echo "$INPUT" ;;
review) cat << 'PROMPT'
你是OKR评审专家。季度复盘:1.完成度评分(0-1.0) 2.每个KR分析 3.成功因素 4.改进空间 5.下季度建议。用中文。
OKR执行情况:
PROMPT
echo "$INPUT" ;;
align) cat << 'PROMPT'
你是战略对齐专家。检查OKR对齐:1.公司→部门→个人的关联 2.冲突识别 3.缺失环节 4.对齐建议。用中文。
各级OKR:
PROMPT
echo "$INPUT" ;;
score) cat << 'EOF'
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 OKR 评分标准
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
0.0-0.3 ❌ 未达标(需要反思)
0.4-0.6 ⚠️ 有进展(正常水平)
0.7-1.0 ✅ 优秀(0.7是甜蜜点)
1.0 🤔 可能目标设太低了
评分原则:
• 0.7 = 完美分数(说明目标有挑战性)
• 每次都1.0 = 目标太保守
• 每次都0.3 = 目标不现实或资源不够
Powered by BytesAgain | bytesagain.com | [email protected]
EOF
;;
template) cat << 'PROMPT'
你是OKR模板专家。提供OKR模板:1.按角色(CEO/产品/技术/营销/HR) 2.Markdown格式 3.示例填充 4.常见KR指标。用中文。
角色/部门:
PROMPT
echo "$INPUT" ;;
cascade) cat << 'PROMPT'
你是战略分解专家。将公司目标级联分解:1.公司OKR 2.部门OKR 3.团队OKR 4.个人OKR。确保每级支撑上级目标。用中文。
公司目标:
PROMPT
echo "$INPUT" ;;
*) cat << 'EOF'
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 OKR Planner — 使用指南
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
create [目标] 制定OKR
review [执行情况] 季度复盘
align [各级OKR] 对齐检查
score 评分标准速查
template [角色] OKR模板库
cascade [公司目标] 级联分解
Powered by BytesAgain | bytesagain.com | [email protected]
EOF
;;
esac
FILE:scripts/script.sh
#!/usr/bin/env bash
# okr-planner - Productivity and task management tool
set -euo pipefail
VERSION="2.0.0"
DATA_DIR="-${XDG_DATA_HOME:-$HOME/.local/share/okr-planner}"
DB="$DATA_DIR/data.log"
mkdir -p "$DATA_DIR"
show_help() {
cat << EOF
okr-planner v$VERSION
Productivity and task management tool
Usage: okr-planner <command> [args]
Commands:
add Add item
list List items
done Mark done
priority Set priority
today Today view
week Week view
remind Set reminder
stats Statistics
clear Clear completed
export Export
help Show this help
version Show version
Data: \$DATA_DIR
EOF
}
_log() { echo "$(date '+%m-%d %H:%M') $1: $2" >> "$DATA_DIR/history.log"; }
cmd_add() {
echo "$(date +%Y-%m-%d) $*" >> "$DB"; echo " Added: $*"
_log "add" "-"
}
cmd_list() {
[ -f "$DB" ] && cat "$DB" || echo " (empty)"
_log "list" "-"
}
cmd_done() {
echo " Completed: $1"
_log "done" "-"
}
cmd_priority() {
echo " $1 -> priority: -medium"
_log "priority" "-"
}
cmd_today() {
echo " Today $(date +%Y-%m-%d):"; grep "$(date +%Y-%m-%d)" "$DB" 2>/dev/null || echo " Nothing scheduled"
_log "today" "-"
}
cmd_week() {
echo " This week overview"
_log "week" "-"
}
cmd_remind() {
echo " Reminder: $1 at -tomorrow"
_log "remind" "-"
}
cmd_stats() {
echo " Total: $(wc -l < "$DB" 2>/dev/null || echo 0)"
_log "stats" "-"
}
cmd_clear() {
echo " Cleared completed items"
_log "clear" "-"
}
cmd_export() {
[ -f "$DB" ] && cat "$DB" || echo "No data"
_log "export" "-"
}
case "-help" in
add) shift; cmd_add "$@" ;;
list) shift; cmd_list "$@" ;;
done) shift; cmd_done "$@" ;;
priority) shift; cmd_priority "$@" ;;
today) shift; cmd_today "$@" ;;
week) shift; cmd_week "$@" ;;
remind) shift; cmd_remind "$@" ;;
stats) shift; cmd_stats "$@" ;;
clear) shift; cmd_clear "$@" ;;
export) shift; cmd_export "$@" ;;
help|-h) show_help ;;
version|-v) echo "okr-planner v$VERSION" ;;
*) echo "Unknown: $1"; show_help; exit 1 ;;
esac
FILE:tips.md
# OKR Planner — tips.md
## OKR vs KPI
- OKR: 目标导向,鼓励挑战,0.7=成功
- KPI: 绩效考核,必须100%完成
## 好的Objective
- 鼓舞人心,不是数字
- 例: "成为用户最信赖的教育平台"
## 好的Key Result
- 可衡量,有截止日期
- 例: "NPS从40提升到60"
邮件模板库。欢迎邮件、Newsletter、事务邮件、冷启动邮件、跟进邮件、催款邮件模板生成。Email template library with welcome, newsletter, transactional, cold outreach, follow-up.
--- version: "2.0.0" name: email-template description: "邮件模板库。欢迎邮件、Newsletter、事务邮件、冷启动邮件、跟进邮件、催款邮件模板生成。Email template library with welcome, newsletter, transactional, cold outreach, follow-up." author: BytesAgain homepage: https://bytesagain.com source: https://github.com/bytesagain/ai-skills --- # email-template 邮件模板库。欢迎邮件、Newsletter、事务邮件、冷启动邮件、跟进邮件、催款邮件模板生成。Email template library with welcome, newsletter, transactional, cold outreach, follow-up, and collection templates. ## 常见问题 **Q: 这个工具适合谁用?** A: 任何需要email-template的人,无论是个人还是企业用户。 **Q: 输出格式是什么?** A: 主要输出Markdown格式,方便复制和编辑。 ## 命令列表 | 命令 | 功能 | |------|------| | `welcome` | welcome | | `newsletter` | newsletter | | `transactional` | transactional | | `cold` | cold | | `followup` | followup | | `collection` | collection | ## 专业建议 - Identify which type: welcome / newsletter / transactional / cold / followup / collection - Run: `bash scripts/emailtpl.sh <type> [industry] [tone]` - Present the generated template to the user - Offer customization: subject line variants, CTA options, tone adjustment - Subject lines matter** — provide 3-5 variants with open-rate optimization tips --- *email-template by BytesAgain* --- 💬 Feedback & Feature Requests: https://bytesagain.com/feedback Powered by BytesAgain | bytesagain.com ## Examples ```bash # Show help email-template help # Run email-template run ``` ## Commands Run `email-template help` to see all available commands. ## Requirements - bash 4+ - python3 (standard library only) FILE:scripts/emailtpl.sh #!/usr/bin/env bash set -euo pipefail CMD="-help" INDUSTRY="-general" TONE="-professional" show_help() { cat <<'HELP' ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 📧 Email Template Generator ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Usage: bash emailtpl.sh <command> [industry] [tone] Commands: welcome 欢迎邮件模板(新用户注册、订阅确认) newsletter Newsletter邮件模板(周报、月报、产品更新) transactional 事务邮件模板(订单确认、密码重置、通知) cold 冷启动邮件模板(商务合作、销售外联) followup 跟进邮件模板(面试跟进、合作跟进、催回复) collection 催款邮件模板(友好提醒→正式催款→最终通知) Options: industry 行业 (tech/ecommerce/saas/education/general) tone 语气 (professional/friendly/urgent/casual) Examples: bash emailtpl.sh welcome tech friendly bash emailtpl.sh cold saas professional bash emailtpl.sh collection general urgent Powered by BytesAgain | bytesagain.com | [email protected] HELP } cmd_welcome() { local industry="$1" tone="$2" cat <<EOF # 📧 Welcome Email Template **Industry:** industry | **Tone:** tone --- ## Subject Line Options (A/B Test) 1. 🎉 欢迎加入{{company_name}}!开启你的旅程 2. Welcome to {{company_name}} — Here's What's Next 3. 你的账号已就绪 — 3步开始使用{{product_name}} 4. {{name}},欢迎!一份专属新手指南等你查收 5. 🚀 Ready to go? Your {{company_name}} account is live --- ## Email Body (HTML Structure) \`\`\` ┌─────────────────────────────────────┐ │ [Logo] │ │ ───────────────────────────────── │ │ │ │ Hi {{first_name}}, │ │ │ │ Welcome to {{company_name}}! 🎉 │ │ │ │ We're thrilled to have you. │ │ Here's how to get started: │ │ │ │ ┌─────────────────────────────┐ │ │ │ Step 1: Complete Profile │ │ │ │ Step 2: Explore Features │ │ │ │ Step 3: Connect Your Team │ │ │ └─────────────────────────────┘ │ │ │ │ ┌───────────────────────┐ │ │ │ [Get Started Now] │ ← CTA │ │ └───────────────────────┘ │ │ │ │ Need help? Reply to this email │ │ or visit our Help Center. │ │ │ │ ───────────────────────────────── │ │ {{company_name}} │ │ [Social Icons] │ │ Unsubscribe | Privacy Policy │ │ {{company_address}} │ └─────────────────────────────────────┘ \`\`\` --- ## Plain Text Version \`\`\` Hi {{first_name}}, Welcome to {{company_name}}! We're excited to have you on board. Here's how to get started: 1. Complete your profile: {{profile_url}} 2. Explore key features: {{features_url}} 3. Join our community: {{community_url}} Questions? Just reply to this email. Best, The {{company_name}} Team \`\`\` --- ## Welcome Email Series (Drip) | Day | Email | Purpose | |-----|-------|---------| | 0 | Welcome + Quick Start | First impression, activate | | 1 | Feature Highlight #1 | Show core value | | 3 | Success Story / Case Study | Social proof | | 5 | Feature Highlight #2 | Deepen engagement | | 7 | Check-in + Offer | Convert / retain | --- ## Personalization Variables | Variable | Description | Example | |----------|-------------|---------| | \`{{first_name}}\` | 用户名 | Kelly | | \`{{company_name}}\` | 公司名 | BytesAgain | | \`{{product_name}}\` | 产品名 | OpenClaw | | \`{{signup_date}}\` | 注册日期 | 2026-03-10 | | \`{{profile_url}}\` | 个人设置链接 | https://... | --- ## Compliance Checklist - [ ] Unsubscribe link present - [ ] Physical address included (CAN-SPAM) - [ ] Reply-to address is monitored - [ ] Mobile-responsive design tested - [ ] Plain text version available - [ ] Preheader text optimized - [ ] SPF/DKIM/DMARC configured EOF } cmd_newsletter() { local industry="$1" tone="$2" cat <<EOF # 📰 Newsletter Email Template **Industry:** industry | **Tone:** tone --- ## Subject Line Formulas 1. 📬 {{company_name}} Weekly: {{main_topic}} + More 2. This Week in {{industry}}: {{number}} Things You Should Know 3. {{month}} Roundup — What We Shipped & What's Next 4. 🔥 Trending: {{topic}} | {{company_name}} Newsletter #{{issue}} 5. {{first_name}}, here's your {{frequency}} update --- ## Newsletter Structure \`\`\` ┌─────────────────────────────────────┐ │ [Logo] | Newsletter #{{issue}} │ │ {{date}} │ │ ───────────────────────────────── │ │ │ │ 📌 HERO STORY │ │ ┌─────────────────────────────┐ │ │ │ [Feature Image] │ │ │ │ Headline of Main Story │ │ │ │ 2-3 sentence summary... │ │ │ │ [Read More →] │ │ │ └─────────────────────────────┘ │ │ │ │ 📋 THIS WEEK'S HIGHLIGHTS │ │ ├─ Story 1: Brief + Link │ │ ├─ Story 2: Brief + Link │ │ └─ Story 3: Brief + Link │ │ │ │ 💡 TIP OF THE WEEK │ │ Quick actionable advice... │ │ │ │ 📊 BY THE NUMBERS │ │ Interesting stat or metric │ │ │ │ ───────────────────────────────── │ │ [Social] | [Unsubscribe] │ └─────────────────────────────────────┘ \`\`\` --- ## Content Sections Menu (Pick 3-5) | Section | Icon | Use When | |---------|------|----------| | Hero Story | 📌 | Always — lead with strongest content | | Product Updates | 🚀 | New features, releases | | Industry News | 📰 | Curated relevant news | | Tips & Tricks | 💡 | Actionable how-to content | | Community Spotlight | 🌟 | User stories, testimonials | | Upcoming Events | 📅 | Webinars, meetups, launches | | Team Update | 👥 | Hiring, milestones, culture | | Data/Stats | 📊 | Interesting numbers | | Resource of the Week | 📚 | Tools, articles, templates | | Poll/Survey | 📊 | Engagement + feedback | --- ## Sending Best Practices | Factor | Recommendation | |--------|----------------| | Frequency | Weekly or bi-weekly (consistency > frequency) | | Send Day | Tuesday–Thursday perform best | | Send Time | 10:00 AM local time | | Length | 200-500 words (scannable) | | Images | 3-5 max, with alt text | | CTA | 1 primary + max 2 secondary | EOF } cmd_transactional() { local industry="$1" tone="$2" cat <<EOF # 🔔 Transactional Email Templates **Industry:** industry | **Tone:** tone --- ## Template Collection ### 1. Order Confirmation 📦 **Subject:** ✅ 订单确认 — 订单号 #{{order_id}} \`\`\` Hi {{first_name}}, 感谢你的订购!以下是你的订单详情: ━━━━━━━━━━━━━━━━━━━━━━━ 订单号: #{{order_id}} 日期: {{order_date}} ━━━━━━━━━━━━━━━━━━━━━━━ 商品: {{#items}} • {{item_name}} × {{quantity}} ¥{{price}} {{/items}} ━━━━━━━━━━━━━━━━━━━━━━━ 小计: ¥{{subtotal}} 运费: ¥{{shipping}} 总计: ¥{{total}} ━━━━━━━━━━━━━━━━━━━━━━━ 配送地址: {{shipping_address}} 预计送达: {{estimated_delivery}} [查看订单详情] 如有问题,请联系我们: {{support_email}} \`\`\` --- ### 2. Password Reset 🔐 **Subject:** 重置你的{{company_name}}密码 \`\`\` Hi {{first_name}}, 我们收到了你的密码重置请求。 点击下方按钮重置密码(链接30分钟内有效): [重置密码] → {{reset_url}} 如果不是你本人操作,请忽略此邮件。 你的密码不会发生变化。 安全提示: • 我们绝不会通过邮件要求你提供密码 • 使用至少12位包含大小写和数字的密码 • 开启两步验证增强账户安全 \`\`\` --- ### 3. Shipping Notification 🚚 **Subject:** 📦 你的包裹已发出!运单号: {{tracking_number}} \`\`\` Hi {{first_name}}, 好消息!你的订单 #{{order_id}} 已经发货。 快递公司: {{carrier}} 运单号: {{tracking_number}} 预计送达: {{eta}} [📍 追踪包裹] \`\`\` --- ### 4. Invoice / Receipt 🧾 **Subject:** 发票/收据 — {{company_name}} #{{invoice_id}} ### 5. Account Notification ⚠️ **Subject:** 安全提醒 — 你的账号在新设备登录 --- ## Transactional Email Checklist - [ ] 不包含营销内容(CAN-SPAM合规) - [ ] 即时发送(延迟<30秒) - [ ] 包含所有必要交易信息 - [ ] 明确的下一步操作指引 - [ ] 提供客服联系方式 - [ ] 纯文本后备版本 - [ ] 安全链接(HTTPS) - [ ] 回复地址可接收回复 EOF } cmd_cold() { local industry="$1" tone="$2" cat <<EOF # 🎯 Cold Email Templates **Industry:** industry | **Tone:** tone --- ## Cold Email Framework: AIDA | Element | Purpose | Length | |---------|---------|--------| | **A**ttention | Subject line + first line hook | 1 line | | **I**nterest | Relevant pain point / insight | 2-3 lines | | **D**esire | Your solution + proof | 2-3 lines | | **A**ction | Clear, low-friction CTA | 1 line | --- ## Template 1: Pain Point Approach **Subject:** {{company}} 的 {{pain_point}} — 一个想法 \`\`\` Hi {{first_name}}, 注意到 {{company}} 正在 {{observation}}(比如:扩展海外市场 / 招聘工程师 / 上线新产品)。 很多 {{industry}} 公司在这个阶段会遇到 {{pain_point}}, 我们帮助 {{similar_company}} 在 {{timeframe}} 内解决了这个问题, {{specific_result}}(如:转化率提升37%)。 如果你有15分钟,我可以分享一些适合 {{company}} 的具体方案。 这周三或周四下午方便吗? {{signature}} \`\`\` --- ## Template 2: Mutual Connection **Subject:** {{mutual_connection}} 推荐我联系你 ## Template 3: Value-First (No Ask) **Subject:** 关于 {{company}} 的 {{topic}} — 一些数据 ## Template 4: Breakup Email (Final Follow-up) **Subject:** 该关闭这个对话了吗? --- ## Cold Email Rules | Rule | Details | |------|---------| | 长度 | 50-125 words (越短越好) | | Subject | 3-5 words, lowercase, no emoji | | CTA | 一个CTA,一个问题 | | Personalization | 至少2个个性化元素 | | Follow-up | 3-5封序列,间隔3-5天 | | Timing | 周二-周四 8-10AM | --- ## Follow-up Sequence | # | Day | Approach | Subject | |---|-----|----------|---------| | 1 | 0 | Initial outreach | 独立 subject | | 2 | +3 | Add value (resource/insight) | Re: 原 subject | | 3 | +6 | Social proof / case study | Re: 原 subject | | 4 | +10 | Different angle | 新 subject | | 5 | +15 | Breakup email | 该关闭了吗? | --- ## Deliverability Checklist - [ ] 使用自定义域名邮箱(非Gmail) - [ ] 配置 SPF + DKIM + DMARC - [ ] 域名预热 2-4 weeks - [ ] 每日发送量 <50 (新域名) - [ ] 不使用短链接(触发垃圾邮件过滤) - [ ] 不使用图片或附件(首封邮件) - [ ] 避免垃圾邮件关键词(免费/紧急/限时) EOF } cmd_followup() { local industry="$1" tone="$2" cat <<EOF # 🔄 Follow-up Email Templates **Industry:** industry | **Tone:** tone --- ## Template 1: Meeting Follow-up **Subject:** 感谢今天的交流 — 下一步行动 \`\`\` Hi {{first_name}}, 感谢今天的会面!以下是我们讨论的要点: 📋 会议摘要: • {{point_1}} • {{point_2}} • {{point_3}} ✅ 后续行动: • [你] {{your_action}} — 预计 {{date_1}} • [对方] {{their_action}} — 预计 {{date_2}} 下次同步时间: {{next_meeting_date}} 如有任何补充,随时告知。 {{signature}} \`\`\` --- ## Template 2: Interview Follow-up (24h内) **Subject:** 感谢面试机会 — {{position}} 职位 \`\`\` {{interviewer_name}} 您好, 感谢今天的面试。和您交流关于 {{topic}} 非常愉快。 面试中您提到的 {{specific_point}}, 让我对这个角色有了更深的理解。 我相信我在 {{your_strength}} 方面的经验 能为团队带来价值。 期待后续消息。如需任何补充材料,请随时告知。 {{signature}} \`\`\` --- ## Template 3: Proposal Follow-up **Subject:** Re: {{project_name}} 方案 — 有什么我能补充的? --- ## Template 4: Gentle Reminder **Subject:** 温馨提醒: {{topic}} --- ## Follow-up Timing Guide | Scenario | Wait Time | Max Attempts | |----------|-----------|--------------| | 面试后 | 24h | 2 | | 方案发送后 | 2-3 days | 3 | | 合作洽谈 | 3-5 days | 4 | | 冷邮件 | 3-5 days | 5 | | 客户回复 | 1-2 days | 3 | | 内部审批 | 1 day | 2 | --- ## Tone Escalation 1. **Friendly** — "想确认一下您是否收到了..." 2. **Professional** — "跟进一下上次的讨论..." 3. **Direct** — "希望能在本周内收到回复..." 4. **Final** — "如果没有回音,我将..." EOF } cmd_collection() { local industry="$1" tone="$2" cat <<EOF # 💰 Collection Email Templates **Industry:** industry | **Tone:** tone --- ## Collection Email Sequence (由友好到正式) ### Level 1: Friendly Reminder (逾期1-7天) **Subject:** 温馨提醒 — 发票 #{{invoice_id}} 已到期 \`\`\` {{company_name}} 您好, 这是一封友好提醒,以下发票已于 {{due_date}} 到期: 发票号: #{{invoice_id}} 金额: ¥{{amount}} 到期日: {{due_date}} 逾期: {{days_overdue}} 天 如果已付款,请忽略此邮件。 如需查看发票详情或有疑问,请点击: {{invoice_url}} 付款方式: • 银行转账: {{bank_details}} • 在线支付: {{payment_url}} 谢谢! {{signature}} \`\`\` --- ### Level 2: Formal Notice (逾期7-30天) **Subject:** 逾期通知 — 发票 #{{invoice_id}} 已逾期{{days}}天 \`\`\` {{contact_name}} 您好, 我们注意到以下发票仍未结清: 发票号: #{{invoice_id}} 金额: ¥{{amount}} 到期日: {{due_date}} 逾期: {{days_overdue}} 天 我们此前已发送过友好提醒。 请在收到此邮件后 7个工作日内 安排付款。 如有付款困难或对账单有异议, 请及时与我们联系协商解决方案。 {{signature}} \`\`\` --- ### Level 3: Final Notice (逾期30-60天) **Subject:** ⚠️ 最终付款通知 — 发票 #{{invoice_id}} --- ### Level 4: Escalation Warning (逾期60+天) **Subject:** 重要通知 — 即将采取进一步措施 --- ## Collection Timeline | Day | Action | Tone | |-----|--------|------| | -7 | 到期前提醒 | 友好 | | 0 | 到期日提醒 | 友好 | | +7 | 首次逾期提醒 | 友好 | | +14 | 正式通知 | 专业 | | +30 | 最终通知 | 严肃 | | +45 | 电话沟通 | 严肃 | | +60 | 升级警告 | 正式法律语气 | | +90 | 法律途径 | 正式 | --- ## Best Practices - 始终保持专业和尊重 - 记录所有沟通(时间、方式、内容) - 提供便捷的付款方式 - 开放协商分期付款 - 了解当地法律法规 - 区分"不愿付"和"不能付" EOF } case "$CMD" in welcome) cmd_welcome "$INDUSTRY" "$TONE" ;; newsletter) cmd_newsletter "$INDUSTRY" "$TONE" ;; transactional) cmd_transactional "$INDUSTRY" "$TONE" ;; cold) cmd_cold "$INDUSTRY" "$TONE" ;; followup) cmd_followup "$INDUSTRY" "$TONE" ;; collection) cmd_collection "$INDUSTRY" "$TONE" ;; help|--help|-h) show_help ;; *) echo "❌ Unknown command: $CMD" echo "Run 'bash emailtpl.sh help' for usage." exit 1 ;; esac FILE:scripts/script.sh #!/usr/bin/env bash # email-template - AI and prompt engineering assistant set -euo pipefail VERSION="2.0.0" DATA_DIR="-${XDG_DATA_HOME:-$HOME/.local/share/email-template}" DB="$DATA_DIR/data.log" mkdir -p "$DATA_DIR" show_help() { cat << EOF email-template v$VERSION AI and prompt engineering assistant Usage: email-template <command> [args] Commands: prompt Generate prompt system System prompt chain Prompt chain template Prompt templates compare Compare models cost Cost estimator optimize Optimize prompt # Evaluate output safety Safety guidelines tools AI tool list help Show this help version Show version Data: \$DATA_DIR EOF } _log() { echo "$(date '+%m-%d %H:%M') $1: $2" >> "$DATA_DIR/history.log"; } cmd_prompt() { echo " Role: $1 Task: -assist Format: -text" _log "prompt" "-" } cmd_system() { echo " You are an expert $1. Be precise, helpful, and concise." _log "system" "-" } cmd_chain() { echo " Step 1: Understand | Step 2: Plan | Step 3: Execute | Step 4: Verify" _log "chain" "-" } cmd_template() { echo " 1. Zero-shot | 2. Few-shot | 3. Chain-of-thought | 4. Role-play" _log "template" "-" } cmd_compare() { echo " GPT-4 vs Claude vs Gemini: benchmark comparison" _log "compare" "-" } cmd_cost() { local _cost _cost=$(TOKENS="-1000" python3 << 'PYEOF2' import os tokens = int(os.environ["TOKENS"]) print("{:.4f}".format(tokens * 0.00003)) PYEOF2 ) 2>/dev/null || _cost="?" echo " Tokens: ~$1 | Cost: ~\$$_cost" _log "cost" "-" } cmd_optimize() { echo " Tips: Be specific | Add examples | Set format | Constrain length" _log "optimize" "-" } cmd_evaluate() { echo " Check: accuracy | relevance | completeness | tone" _log "evaluate" "-" } cmd_safety() { echo " 1. No harmful content | 2. No personal data | 3. Cite sources" _log "safety" "-" } cmd_tools() { echo " ChatGPT | Claude | Gemini | Perplexity | Midjourney" _log "tools" "-" } case "-help" in prompt) shift; cmd_prompt "$@" ;; system) shift; cmd_system "$@" ;; chain) shift; cmd_chain "$@" ;; template) shift; cmd_template "$@" ;; compare) shift; cmd_compare "$@" ;; cost) shift; cmd_cost "$@" ;; optimize) shift; cmd_optimize "$@" ;; evaluate) shift; cmd_"$@" ;; safety) shift; cmd_safety "$@" ;; tools) shift; cmd_tools "$@" ;; help|-h) show_help ;; version|-v) echo "email-template v$VERSION" ;; *) echo "Unknown: $1"; show_help; exit 1 ;; esac FILE:tips.md # Email Template — Prompt Tips ## When User Asks for Email Templates 1. Identify which type: welcome / newsletter / transactional / cold / followup / collection 2. Run: `bash scripts/emailtpl.sh <type> [industry] [tone]` 3. Present the generated template to the user 4. Offer customization: subject line variants, CTA options, tone adjustment ## Key Principles - **Subject lines matter** — provide 3-5 variants with open-rate optimization tips - **Mobile-first** — all HTML templates should be responsive - **CAN-SPAM / GDPR** — remind about unsubscribe links and compliance - **Personalization** — use {{name}}, {{company}} placeholders - **Tone matching** — formal for B2B, friendly for B2C, urgent for collection ## Customization Flow 1. Ask: industry / audience / goal 2. Generate base template 3. Suggest A/B test variants for subject line 4. Add compliance footer
Manage Raspberry Pi devices — GPIO control, system monitoring (CPU/temp/memory), service management, sensor data reading.
--- version: "2.0.0" name: raspberry-pi-manager description: "Manage Raspberry Pi devices — GPIO control, system monitoring (CPU/temp/memory), service management, sensor data reading." author: BytesAgain homepage: https://bytesagain.com source: https://github.com/bytesagain/ai-skills --- # Raspberry Pi Manager A command-line toolkit for managing Raspberry Pi operations. Log, track, and organize entries across multiple operational categories — from device connections and syncing to monitoring, automation, notifications, and reporting. All data is stored locally with timestamped history, full-text search, and multi-format export. ## Commands The following commands are available via `raspberry-pi-manager <command> [args]`: ### Core Operations | Command | Description | |---------|-------------| | `connect <input>` | Log a connection event (e.g. SSH session, network link, peripheral attach). Called without args, shows recent connect entries. | | `sync <input>` | Record a sync operation (e.g. file sync, config push, backup mirror). Called without args, shows recent sync entries. | | `monitor <input>` | Log a monitoring observation (e.g. CPU temp spike, disk usage alert). Called without args, shows recent monitor entries. | | `automate <input>` | Record an automation task (e.g. cron job setup, GPIO script trigger). Called without args, shows recent automate entries. | | `notify <input>` | Log a notification event (e.g. email alert sent, Telegram ping). Called without args, shows recent notify entries. | | `report <input>` | Save a report note (e.g. weekly summary, incident write-up). Called without args, shows recent report entries. | | `schedule <input>` | Record a scheduled task (e.g. reboot at 3 AM, backup every Sunday). Called without args, shows recent schedule entries. | | `template <input>` | Store a template entry (e.g. config template, deploy script skeleton). Called without args, shows recent template entries. | | `webhook <input>` | Log a webhook event (e.g. incoming POST, IFTTT trigger). Called without args, shows recent webhook entries. | | `status <input>` | Record a status update (e.g. Pi online, service healthy). Called without args, shows recent status entries. | | `analytics <input>` | Log an analytics data point (e.g. uptime percentage, request count). Called without args, shows recent analytics entries. | | `export <input>` | Record an export action. Called without args, shows recent export entries. | ### Utility Commands | Command | Description | |---------|-------------| | `stats` | Show summary statistics — entry counts per category, total entries, data size, and earliest record timestamp. | | `export <fmt>` | Export all data in `json`, `csv`, or `txt` format. Output file saved to the data directory. | | `search <term>` | Full-text search across all log files (case-insensitive). | | `recent` | Show the 20 most recent activity entries from the global history log. | | `status` | Health check — version, data directory path, total entries, disk usage, last activity, and OK status. | | `help` | Display the full command reference. | | `version` | Print the current version (`v2.0.0`). | ## Data Storage All data is persisted locally in `~/.local/share/raspberry-pi-manager/`: - **Per-command logs** — Each command (connect, sync, monitor, etc.) writes to its own `.log` file with `YYYY-MM-DD HH:MM|<input>` format. - **Global history** — Every action is also appended to `history.log` with `MM-DD HH:MM <command>: <input>` format for unified audit trail. - **Export files** — Generated exports are saved as `export.json`, `export.csv`, or `export.txt` in the same directory. No external services, databases, or network connections are required. Everything runs locally via bash. ## Requirements - **Bash 4+** (uses `local` variables, `set -euo pipefail`) - Standard Unix utilities: `date`, `wc`, `du`, `head`, `tail`, `grep`, `basename`, `cat` - No root privileges needed - No external dependencies or package installs ## When to Use 1. **Tracking Pi fleet operations** — Log connect/sync/monitor events across multiple Raspberry Pi devices to maintain an operational journal. 2. **Building an automation audit trail** — Record every automation task and webhook trigger so you can trace what happened and when. 3. **Generating operational reports** — Use `stats`, `recent`, and `export` to produce summaries for weekly reviews or incident investigations. 4. **Organizing scheduled maintenance** — Use `schedule` to document planned tasks (reboots, updates, backups) and `notify` to log alert dispatches. 5. **Searching historical records** — Use `search` to quickly find past events across all categories when troubleshooting an issue. ## Examples ```bash # Log a new SSH connection to a Pi raspberry-pi-manager connect "SSH to [email protected] — firmware update session" # Record a file sync event raspberry-pi-manager sync "rsync /home/pi/data → NAS backup completed, 2.3GB transferred" # Log a temperature monitoring alert raspberry-pi-manager monitor "CPU temp 72°C on pi-node-3 — fan triggered" # Record an automation task raspberry-pi-manager automate "Cron job added: /home/pi/scripts/backup.sh every Sunday 02:00" # View summary statistics raspberry-pi-manager stats # Export all data as JSON raspberry-pi-manager export json # Search for all entries mentioning 'backup' raspberry-pi-manager search backup # Check overall health status raspberry-pi-manager status # View the 20 most recent activities raspberry-pi-manager recent ``` ## How It Works Each command follows the same pattern: 1. **With arguments** — Timestamps the input, appends it to the command-specific log file, increments the entry count, and writes to the global history log. 2. **Without arguments** — Displays the 20 most recent entries from that command's log file. The `stats` command aggregates counts across all log files. The `export` command iterates through all logs and produces a unified output in your chosen format. The `search` command performs a case-insensitive grep across every log file. --- Powered by BytesAgain | bytesagain.com | [email protected] FILE:scripts/script.sh #!/usr/bin/env bash # Raspberry Pi Manager — social tool # Powered by BytesAgain | bytesagain.com | [email protected] set -euo pipefail DATA_DIR="HOME/.local/share/raspberry-pi-manager" mkdir -p "$DATA_DIR" _log() { echo "$(date '+%m-%d %H:%M') $1: $2" >> "$DATA_DIR/history.log"; } _version() { echo "raspberry-pi-manager v2.0.0"; } _help() { echo "Raspberry Pi Manager v2.0.0 — social toolkit" echo "" echo "Usage: raspberry-pi-manager <command> [args]" echo "" echo "Commands:" echo " connect Connect" echo " sync Sync" echo " monitor Monitor" echo " automate Automate" echo " notify Notify" echo " report Report" echo " schedule Schedule" echo " template Template" echo " webhook Webhook" echo " status Status" echo " analytics Analytics" echo " export Export" echo " stats Summary statistics" echo " export <fmt> Export (json|csv|txt)" echo " status Health check" echo " help Show this help" echo " version Show version" echo "" echo "Data: $DATA_DIR" } _stats() { echo "=== Raspberry Pi Manager Stats ===" local total=0 for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local name=$(basename "$f" .log) local c=$(wc -l < "$f") total=$((total + c)) echo " $name: $c entries" done echo " ---" echo " Total: $total entries" echo " Data size: $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1)" echo " Since: $(head -1 "$DATA_DIR/history.log" 2>/dev/null | cut -d'|' -f1 || echo 'N/A')" } _export() { local fmt="-json" local out="$DATA_DIR/export.$fmt" case "$fmt" in json) echo "[" > "$out" local first=1 for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local name=$(basename "$f" .log) while IFS='|' read -r ts val; do [ $first -eq 1 ] && first=0 || echo "," >> "$out" printf ' {"type":"%s","time":"%s","value":"%s"}' "$name" "$ts" "$val" >> "$out" done < "$f" done echo "" >> "$out" echo "]" >> "$out" ;; csv) echo "type,time,value" > "$out" for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local name=$(basename "$f" .log) while IFS='|' read -r ts val; do echo "$name,$ts,$val" >> "$out" done < "$f" done ;; txt) echo "=== Raspberry Pi Manager Export ===" > "$out" for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue echo "--- $(basename "$f" .log) ---" >> "$out" cat "$f" >> "$out" echo "" >> "$out" done ;; *) echo "Formats: json, csv, txt"; return 1 ;; esac echo "Exported to $out ($(wc -c < "$out") bytes)" } _status() { echo "=== Raspberry Pi Manager Status ===" echo " Version: v2.0.0" echo " Data dir: $DATA_DIR" echo " Entries: $(cat "$DATA_DIR"/*.log 2>/dev/null | wc -l) total" echo " Disk: $(du -sh "$DATA_DIR" 2>/dev/null | cut -f1)" local last=$(tail -1 "$DATA_DIR/history.log" 2>/dev/null || echo "never") echo " Last activity: $last" echo " Status: OK" } _search() { local term="?Usage: raspberry-pi-manager search <term>" echo "Searching for: $term" local found=0 for f in "$DATA_DIR"/*.log; do [ -f "$f" ] || continue local matches=$(grep -i "$term" "$f" 2>/dev/null || true) if [ -n "$matches" ]; then echo " --- $(basename "$f" .log) ---" echo "$matches" | while read -r line; do echo " $line" found=$((found + 1)) done fi done [ $found -eq 0 ] && echo " No matches found." } _recent() { echo "=== Recent Activity ===" if [ -f "$DATA_DIR/history.log" ]; then tail -20 "$DATA_DIR/history.log" | while IFS='' read -r line; do echo " $line" done else echo " No activity yet." fi } # Main dispatch case "-help" in connect) shift if [ $# -eq 0 ]; then echo "Recent connect entries:" tail -20 "$DATA_DIR/connect.log" 2>/dev/null || echo " No entries yet. Use: raspberry-pi-manager connect <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/connect.log" local total=$(wc -l < "$DATA_DIR/connect.log") echo " [Raspberry Pi Manager] connect: $input" echo " Saved. Total connect entries: $total" _log "connect" "$input" fi ;; sync) shift if [ $# -eq 0 ]; then echo "Recent sync entries:" tail -20 "$DATA_DIR/sync.log" 2>/dev/null || echo " No entries yet. Use: raspberry-pi-manager sync <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/sync.log" local total=$(wc -l < "$DATA_DIR/sync.log") echo " [Raspberry Pi Manager] sync: $input" echo " Saved. Total sync entries: $total" _log "sync" "$input" fi ;; monitor) shift if [ $# -eq 0 ]; then echo "Recent monitor entries:" tail -20 "$DATA_DIR/monitor.log" 2>/dev/null || echo " No entries yet. Use: raspberry-pi-manager monitor <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/monitor.log" local total=$(wc -l < "$DATA_DIR/monitor.log") echo " [Raspberry Pi Manager] monitor: $input" echo " Saved. Total monitor entries: $total" _log "monitor" "$input" fi ;; automate) shift if [ $# -eq 0 ]; then echo "Recent automate entries:" tail -20 "$DATA_DIR/automate.log" 2>/dev/null || echo " No entries yet. Use: raspberry-pi-manager automate <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/automate.log" local total=$(wc -l < "$DATA_DIR/automate.log") echo " [Raspberry Pi Manager] automate: $input" echo " Saved. Total automate entries: $total" _log "automate" "$input" fi ;; notify) shift if [ $# -eq 0 ]; then echo "Recent notify entries:" tail -20 "$DATA_DIR/notify.log" 2>/dev/null || echo " No entries yet. Use: raspberry-pi-manager notify <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/notify.log" local total=$(wc -l < "$DATA_DIR/notify.log") echo " [Raspberry Pi Manager] notify: $input" echo " Saved. Total notify entries: $total" _log "notify" "$input" fi ;; report) shift if [ $# -eq 0 ]; then echo "Recent report entries:" tail -20 "$DATA_DIR/report.log" 2>/dev/null || echo " No entries yet. Use: raspberry-pi-manager report <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/report.log" local total=$(wc -l < "$DATA_DIR/report.log") echo " [Raspberry Pi Manager] report: $input" echo " Saved. Total report entries: $total" _log "report" "$input" fi ;; schedule) shift if [ $# -eq 0 ]; then echo "Recent schedule entries:" tail -20 "$DATA_DIR/schedule.log" 2>/dev/null || echo " No entries yet. Use: raspberry-pi-manager schedule <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/schedule.log" local total=$(wc -l < "$DATA_DIR/schedule.log") echo " [Raspberry Pi Manager] schedule: $input" echo " Saved. Total schedule entries: $total" _log "schedule" "$input" fi ;; template) shift if [ $# -eq 0 ]; then echo "Recent template entries:" tail -20 "$DATA_DIR/template.log" 2>/dev/null || echo " No entries yet. Use: raspberry-pi-manager template <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/template.log" local total=$(wc -l < "$DATA_DIR/template.log") echo " [Raspberry Pi Manager] template: $input" echo " Saved. Total template entries: $total" _log "template" "$input" fi ;; webhook) shift if [ $# -eq 0 ]; then echo "Recent webhook entries:" tail -20 "$DATA_DIR/webhook.log" 2>/dev/null || echo " No entries yet. Use: raspberry-pi-manager webhook <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/webhook.log" local total=$(wc -l < "$DATA_DIR/webhook.log") echo " [Raspberry Pi Manager] webhook: $input" echo " Saved. Total webhook entries: $total" _log "webhook" "$input" fi ;; status) shift if [ $# -eq 0 ]; then echo "Recent status entries:" tail -20 "$DATA_DIR/status.log" 2>/dev/null || echo " No entries yet. Use: raspberry-pi-manager status <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/status.log" local total=$(wc -l < "$DATA_DIR/status.log") echo " [Raspberry Pi Manager] status: $input" echo " Saved. Total status entries: $total" _log "status" "$input" fi ;; analytics) shift if [ $# -eq 0 ]; then echo "Recent analytics entries:" tail -20 "$DATA_DIR/analytics.log" 2>/dev/null || echo " No entries yet. Use: raspberry-pi-manager analytics <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/analytics.log" local total=$(wc -l < "$DATA_DIR/analytics.log") echo " [Raspberry Pi Manager] analytics: $input" echo " Saved. Total analytics entries: $total" _log "analytics" "$input" fi ;; export) shift if [ $# -eq 0 ]; then echo "Recent export entries:" tail -20 "$DATA_DIR/export.log" 2>/dev/null || echo " No entries yet. Use: raspberry-pi-manager export <input>" else local input="$*" local ts=$(date '+%Y-%m-%d %H:%M') echo "$ts|$input" >> "$DATA_DIR/export.log" local total=$(wc -l < "$DATA_DIR/export.log") echo " [Raspberry Pi Manager] export: $input" echo " Saved. Total export entries: $total" _log "export" "$input" fi ;; stats) _stats ;; export) shift; _export "$@" ;; search) shift; _search "$@" ;; recent) _recent ;; status) _status ;; help|--help|-h) _help ;; version|--version|-v) _version ;; *) echo "Unknown command: $1" echo "Run 'raspberry-pi-manager help' for available commands." exit 1 ;; esac
会议议程管理。议程创建、站会模板、复盘会、一对一、决策会议、会议纪要。Meeting agenda with standups, retrospectives, one-on-ones, decision meetings, minutes. 会议、议程、站会、纪要。
---
version: "2.0.0"
name: Meeting Agenda
description: "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━. Use when you need meeting agenda capabilities. Triggers on: meeting agenda."
会议议程管理。议程创建、站会模板、复盘会、一对一、决策会议、会议纪要。Meeting agenda with standups, retrospectives, one-on-ones, decision meetings, minutes. 会议、议程、站会、纪要。
author: BytesAgain
homepage: https://bytesagain.com
source: https://github.com/bytesagain/ai-skills
---
# Meeting Agenda
会议议程管理。议程创建、站会模板、复盘会、一对一、决策会议、会议纪要。Meeting agenda with standups, retrospectives, one-on-ones, decision meetings, minutes. 会议、议程、站会、纪要。
## 推荐工作流
```
需求分析 → 选择命令 → 输入描述 → 获取结果 → 调整优化
```
## 命令列表
| 命令 | 功能 |
|------|------|
| `create` | create |
| `standup` | standup |
| `retro` | retro |
| `oneonone` | oneonone |
| `decision` | decision |
| `minutes` | minutes |
## 专业建议
- 有议程才开会
- 控制人数(最多7人)
- 准时开始准时结束
- 每项有时间限制
- 会后24h内发纪要
---
*Meeting Agenda by BytesAgain*
---
💬 Feedback & Feature Requests: https://bytesagain.com/feedback
Powered by BytesAgain | bytesagain.com
- Run `meeting-agenda help` for all commands
## Commands
Run `meeting-agenda help` to see all available commands.
FILE:scripts/agenda.sh
#!/usr/bin/env bash
CMD="$1"; shift 2>/dev/null; INPUT="$*"
case "$CMD" in
create) cat << 'PROMPT'
你是会议管理专家。创建会议议程(Markdown):1.会议目标 2.参与人 3.时间分配 4.每项议题(讨论要点+时长+负责人) 5.下一步行动。用中文。
会议主题和时长:
PROMPT
echo "$INPUT" ;;
standup) cat << 'EOF'
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🕐 每日站会模板 (15分钟)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
每人回答3个问题(每人2分钟):
1️⃣ 昨天完成了什么?
2️⃣ 今天计划做什么?
3️⃣ 有什么阻碍?
规则:
• 站着开(保持简短)
• 不讨论细节(会后单独聊)
• 准时开始准时结束
• 记录阻碍项,指定跟进人
Powered by BytesAgain | bytesagain.com | [email protected]
EOF
;;
retro) cat << 'PROMPT'
你是敏捷教练。设计复盘会(Markdown):1.回顾目标 2.好的(继续) 3.不好的(停止) 4.可以尝试(开始) 5.行动项(SMART)。用中文。
复盘周期/项目:
PROMPT
echo "$INPUT" ;;
oneonone) cat << 'PROMPT'
你是管理教练。设计一对一会议议程(Markdown):1.开场(近况) 2.工作进展 3.挑战支持 4.职业发展 5.反馈(双向) 6.行动项。30分钟分配。用中文。
会议对象和情况:
PROMPT
echo "$INPUT" ;;
decision) cat << 'PROMPT'
你是决策会议引导师。设计决策会议议程:1.背景介绍(5min) 2.方案展示(10min) 3.利弊分析(10min) 4.提问讨论(10min) 5.投票决策(5min) 6.行动项。用中文。
决策主题:
PROMPT
echo "$INPUT" ;;
minutes) cat << 'PROMPT'
你是会议记录专家。将会议内容整理为正式纪要(Markdown):1.会议信息(日期/参与人/时长) 2.讨论要点 3.决议事项 4.行动项(负责人+截止日期) 5.下次会议安排。用中文。
会议内容:
PROMPT
echo "$INPUT" ;;
*) cat << 'EOF'
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📋 Meeting Agenda — 使用指南
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
create [主题] 创建会议议程
standup 每日站会模板
retro [周期] 复盘会设计
oneonone [对象] 一对一会议
decision [主题] 决策会议
minutes [内容] 会议纪要整理
Powered by BytesAgain | bytesagain.com | [email protected]
EOF
;;
esac
FILE:scripts/script.sh
#!/usr/bin/env bash
# meeting-agenda - Productivity and task management tool
set -euo pipefail
VERSION="2.0.0"
DATA_DIR="-${XDG_DATA_HOME:-$HOME/.local/share/meeting-agenda}"
DB="$DATA_DIR/data.log"
mkdir -p "$DATA_DIR"
show_help() {
cat << EOF
meeting-agenda v$VERSION
Productivity and task management tool
Usage: meeting-agenda <command> [args]
Commands:
add Add item
list List items
done Mark done
priority Set priority
today Today view
week Week view
remind Set reminder
stats Statistics
clear Clear completed
export Export
help Show this help
version Show version
Data: \$DATA_DIR
EOF
}
_log() { echo "$(date '+%m-%d %H:%M') $1: $2" >> "$DATA_DIR/history.log"; }
cmd_add() {
echo "$(date +%Y-%m-%d) $*" >> "$DB"; echo " Added: $*"
_log "add" "-"
}
cmd_list() {
[ -f "$DB" ] && cat "$DB" || echo " (empty)"
_log "list" "-"
}
cmd_done() {
echo " Completed: $1"
_log "done" "-"
}
cmd_priority() {
echo " $1 -> priority: -medium"
_log "priority" "-"
}
cmd_today() {
echo " Today $(date +%Y-%m-%d):"; grep "$(date +%Y-%m-%d)" "$DB" 2>/dev/null || echo " Nothing scheduled"
_log "today" "-"
}
cmd_week() {
echo " This week overview"
_log "week" "-"
}
cmd_remind() {
echo " Reminder: $1 at -tomorrow"
_log "remind" "-"
}
cmd_stats() {
echo " Total: $(wc -l < "$DB" 2>/dev/null || echo 0)"
_log "stats" "-"
}
cmd_clear() {
echo " Cleared completed items"
_log "clear" "-"
}
cmd_export() {
[ -f "$DB" ] && cat "$DB" || echo "No data"
_log "export" "-"
}
case "-help" in
add) shift; cmd_add "$@" ;;
list) shift; cmd_list "$@" ;;
done) shift; cmd_done "$@" ;;
priority) shift; cmd_priority "$@" ;;
today) shift; cmd_today "$@" ;;
week) shift; cmd_week "$@" ;;
remind) shift; cmd_remind "$@" ;;
stats) shift; cmd_stats "$@" ;;
clear) shift; cmd_clear "$@" ;;
export) shift; cmd_export "$@" ;;
help|-h) show_help ;;
version|-v) echo "meeting-agenda v$VERSION" ;;
*) echo "Unknown: $1"; show_help; exit 1 ;;
esac
FILE:tips.md
# Meeting Agenda — tips.md
## 高效会议原则
- 有议程才开会
- 控制人数(最多7人)
- 准时开始准时结束
- 每项有时间限制
- 会后24h内发纪要
- 明确行动项和负责人
Reference tool for life — covers intro, quickstart, patterns and more. Quick lookup for Roomba Control concepts, best practices, and implementation patterns.
--- name: "roomba-control" version: "3.0.1" description: "Reference tool for life — covers intro, quickstart, patterns and more. Quick lookup for Roomba Control concepts, best practices, and implementation patterns." author: "BytesAgain" homepage: "https://bytesagain.com" source: "https://github.com/bytesagain/ai-skills" tags: [roomba,control, reference] category: "life" --- # Roomba Control Reference tool for life — covers intro, quickstart, patterns and more. Quick lookup for Roomba Control concepts, best practices, and implementation patterns. No API keys or credentials required. ## Commands | Command | Description | |---------|-------------| | `intro` | intro reference | | `quickstart` | quickstart reference | | `patterns` | patterns reference | | `debugging` | debugging reference | | `performance` | performance reference | | `security` | security reference | | `migration` | migration reference | | `cheatsheet` | cheatsheet reference | ## Output Format All commands output plain-text reference documentation via heredoc. No external API calls, no credentials needed, no network access. --- *Powered by BytesAgain | bytesagain.com | [email protected]* FILE:scripts/script.sh #!/usr/bin/env bash # roomba-control — Roomba Control reference tool. Use when working with roomba control in devtools contexts. # Powered by BytesAgain | bytesagain.com | [email protected] set -euo pipefail VERSION="3.0.0" show_help() { cat << 'HELPEOF' roomba-control v$VERSION — Roomba Control Reference Tool Usage: roomba-control <command> Commands: intro Overview and core concepts quickstart Getting started guide patterns Common patterns and best practices debugging Debugging and troubleshooting performance Performance optimization tips security Security considerations migration Migration and upgrade guide cheatsheet Quick reference cheat sheet help Show this help version Show version Powered by BytesAgain | bytesagain.com HELPEOF } cmd_intro() { cat << 'EOF' # Roomba Control — Overview ## What is Roomba Control? Roomba Control (roomba-control) is a specialized tool/concept in the devtools domain. It provides essential capabilities for professionals working with roomba control. ## Key Concepts - Core roomba control principles and fundamentals - How roomba control fits into the broader devtools ecosystem - Essential terminology every practitioner should know ## Why Roomba Control Matters Understanding roomba control is critical for: - Improving efficiency in devtools workflows - Reducing errors and downtime - Meeting industry standards and compliance requirements - Enabling better decision-making with accurate data ## Getting Started 1. Understand the basic roomba control concepts 2. Learn the standard tools and interfaces 3. Practice with common scenarios 4. Review safety and compliance requirements EOF } cmd_quickstart() { cat << 'EOF' # Roomba Control — Quick Start Guide ## Prerequisites - Basic understanding of devtools concepts - Required tools and access credentials - System meeting minimum requirements ## Installation 1. Download or clone the roomba control package 2. Install dependencies 3. Configure initial settings 4. Verify installation ## First Steps 1. Run the hello-world example 2. Review the default configuration 3. Try a simple real-world task 4. Explore available commands and options ## Next Steps - Read the full documentation - Join the community forum - Try advanced features - Set up automated workflows EOF } cmd_patterns() { cat << 'EOF' # Roomba Control — Common Patterns & Best Practices ## Design Patterns 1. **Standard Pattern**: The most common approach for roomba control 2. **Scalable Pattern**: For high-volume or distributed scenarios 3. **Resilient Pattern**: For fault-tolerant implementations ## Best Practices - Follow the principle of least privilege - Use version control for all configurations - Implement comprehensive logging - Test changes in staging before production - Document all custom configurations ## Anti-Patterns to Avoid - Hardcoding credentials or configuration - Skipping validation and error handling - Ignoring monitoring and alerting - Making changes without documentation - Over-engineering simple solutions EOF } cmd_debugging() { cat << 'EOF' # Roomba Control — Debugging Guide ## Common Errors 1. **Connection refused**: Check service status and network 2. **Permission denied**: Verify credentials and access rights 3. **Timeout**: Check network, increase limits, optimize queries 4. **Invalid input**: Validate data format and encoding ## Debugging Tools - Built-in logging and diagnostics - Network analysis tools (tcpdump, wireshark) - System monitoring (top, htop, iostat) - Application-specific debug modes ## Debug Workflow 1. Reproduce the issue consistently 2. Check logs for error messages 3. Isolate the failing component 4. Test with minimal configuration 5. Apply fix and verify EOF } cmd_performance() { cat << 'EOF' # Roomba Control — Performance Optimization ## Key Metrics - Response time / latency - Throughput / operations per second - Resource utilization (CPU, memory, I/O) - Error rate and retry frequency ## Optimization Strategies 1. **Caching**: Reduce redundant operations 2. **Batching**: Group small operations 3. **Indexing**: Speed up data lookups 4. **Compression**: Reduce data transfer size 5. **Parallel Processing**: Utilize multiple cores ## Monitoring - Set up baseline performance metrics - Configure alerts for anomalies - Track trends over time - Regular capacity planning reviews EOF } cmd_security() { cat << 'EOF' # Roomba Control — Security Considerations ## Authentication & Authorization - Use strong, unique credentials - Implement role-based access control - Enable multi-factor authentication where possible - Regularly review and rotate credentials ## Data Protection - Encrypt data at rest and in transit - Implement proper backup procedures - Follow data retention policies - Sanitize inputs to prevent injection ## Network Security - Use firewalls and network segmentation - Monitor for suspicious activity - Keep all software patched and updated - Disable unnecessary services and ports EOF } cmd_migration() { cat << 'EOF' # Roomba Control — Migration & Upgrade Guide ## Pre-Migration Checklist - [ ] Current system fully documented - [ ] Complete backup taken and verified - [ ] Target environment prepared - [ ] Rollback plan documented - [ ] Stakeholders notified ## Migration Steps 1. Prepare target environment 2. Export data from source 3. Transform data if needed 4. Import to target 5. Verify data integrity 6. Update configurations 7. Test all functionality 8. Switch traffic / go live ## Post-Migration - Monitor for errors and performance - Verify all integrations working - Update documentation - Decommission old system after confirmation EOF } cmd_cheatsheet() { cat << 'EOF' # Roomba Control — Quick Reference ## Essential Commands | Command | Description | |---------|-------------| | help | Show available commands | | version | Display version info | | intro | Overview and fundamentals | | troubleshooting | Common problems and fixes | ## Common Workflows 1. **Setup**: install → configure → verify → test 2. **Daily**: check → monitor → report → review 3. **Issue**: diagnose → isolate → fix → verify → document ## Key Shortcuts - Use tab completion for commands - Check logs first when troubleshooting - Always backup before making changes - Document everything you change EOF } CMD="-help" shift 2>/dev/null || true case "$CMD" in intro) cmd_intro "$@" ;; quickstart) cmd_quickstart "$@" ;; patterns) cmd_patterns "$@" ;; debugging) cmd_debugging "$@" ;; performance) cmd_performance "$@" ;; security) cmd_security "$@" ;; migration) cmd_migration "$@" ;; cheatsheet) cmd_cheatsheet "$@" ;; help|--help|-h) show_help ;; version|--version|-v) echo "roomba-control v$VERSION — Powered by BytesAgain" ;; *) echo "Unknown: $CMD"; echo "Run: roomba-control help"; exit 1 ;; esac
Reference tool for life — covers intro, quickstart, patterns and more. Quick lookup for Ring Security concepts, best practices, and implementation patterns.
--- name: "ring-security" version: "3.0.1" description: "Reference tool for life — covers intro, quickstart, patterns and more. Quick lookup for Ring Security concepts, best practices, and implementation patterns." author: "BytesAgain" homepage: "https://bytesagain.com" source: "https://github.com/bytesagain/ai-skills" tags: [ring,security, reference] category: "life" --- # Ring Security Reference tool for life — covers intro, quickstart, patterns and more. Quick lookup for Ring Security concepts, best practices, and implementation patterns. No API keys or credentials required. ## Commands | Command | Description | |---------|-------------| | `intro` | intro reference | | `quickstart` | quickstart reference | | `patterns` | patterns reference | | `debugging` | debugging reference | | `performance` | performance reference | | `security` | security reference | | `migration` | migration reference | | `cheatsheet` | cheatsheet reference | ## Output Format All commands output plain-text reference documentation via heredoc. No external API calls, no credentials needed, no network access. --- *Powered by BytesAgain | bytesagain.com | [email protected]* FILE:scripts/script.sh #!/usr/bin/env bash # ring-security — Ring Security reference tool. Use when working with ring security in security contexts. # Powered by BytesAgain | bytesagain.com | [email protected] set -euo pipefail VERSION="3.0.0" show_help() { cat << 'HELPEOF' ring-security v$VERSION — Ring Security Reference Tool Usage: ring-security <command> Commands: intro Overview and core concepts quickstart Getting started guide patterns Common patterns and best practices debugging Debugging and troubleshooting performance Performance optimization tips security Security considerations migration Migration and upgrade guide cheatsheet Quick reference cheat sheet help Show this help version Show version Powered by BytesAgain | bytesagain.com HELPEOF } cmd_intro() { cat << 'EOF' # Ring Security — Overview ## What is Ring Security? Ring Security (ring-security) is a specialized tool/concept in the security domain. It provides essential capabilities for professionals working with ring security. ## Key Concepts - Core ring security principles and fundamentals - How ring security fits into the broader security ecosystem - Essential terminology every practitioner should know ## Why Ring Security Matters Understanding ring security is critical for: - Improving efficiency in security workflows - Reducing errors and downtime - Meeting industry standards and compliance requirements - Enabling better decision-making with accurate data ## Getting Started 1. Understand the basic ring security concepts 2. Learn the standard tools and interfaces 3. Practice with common scenarios 4. Review safety and compliance requirements EOF } cmd_quickstart() { cat << 'EOF' # Ring Security — Quick Start Guide ## Prerequisites - Basic understanding of security concepts - Required tools and access credentials - System meeting minimum requirements ## Installation 1. Download or clone the ring security package 2. Install dependencies 3. Configure initial settings 4. Verify installation ## First Steps 1. Run the hello-world example 2. Review the default configuration 3. Try a simple real-world task 4. Explore available commands and options ## Next Steps - Read the full documentation - Join the community forum - Try advanced features - Set up automated workflows EOF } cmd_patterns() { cat << 'EOF' # Ring Security — Common Patterns & Best Practices ## Design Patterns 1. **Standard Pattern**: The most common approach for ring security 2. **Scalable Pattern**: For high-volume or distributed scenarios 3. **Resilient Pattern**: For fault-tolerant implementations ## Best Practices - Follow the principle of least privilege - Use version control for all configurations - Implement comprehensive logging - Test changes in staging before production - Document all custom configurations ## Anti-Patterns to Avoid - Hardcoding credentials or configuration - Skipping validation and error handling - Ignoring monitoring and alerting - Making changes without documentation - Over-engineering simple solutions EOF } cmd_debugging() { cat << 'EOF' # Ring Security — Debugging Guide ## Common Errors 1. **Connection refused**: Check service status and network 2. **Permission denied**: Verify credentials and access rights 3. **Timeout**: Check network, increase limits, optimize queries 4. **Invalid input**: Validate data format and encoding ## Debugging Tools - Built-in logging and diagnostics - Network analysis tools (tcpdump, wireshark) - System monitoring (top, htop, iostat) - Application-specific debug modes ## Debug Workflow 1. Reproduce the issue consistently 2. Check logs for error messages 3. Isolate the failing component 4. Test with minimal configuration 5. Apply fix and verify EOF } cmd_performance() { cat << 'EOF' # Ring Security — Performance Optimization ## Key Metrics - Response time / latency - Throughput / operations per second - Resource utilization (CPU, memory, I/O) - Error rate and retry frequency ## Optimization Strategies 1. **Caching**: Reduce redundant operations 2. **Batching**: Group small operations 3. **Indexing**: Speed up data lookups 4. **Compression**: Reduce data transfer size 5. **Parallel Processing**: Utilize multiple cores ## Monitoring - Set up baseline performance metrics - Configure alerts for anomalies - Track trends over time - Regular capacity planning reviews EOF } cmd_security() { cat << 'EOF' # Ring Security — Security Considerations ## Authentication & Authorization - Use strong, unique credentials - Implement role-based access control - Enable multi-factor authentication where possible - Regularly review and rotate credentials ## Data Protection - Encrypt data at rest and in transit - Implement proper backup procedures - Follow data retention policies - Sanitize inputs to prevent injection ## Network Security - Use firewalls and network segmentation - Monitor for suspicious activity - Keep all software patched and updated - Disable unnecessary services and ports EOF } cmd_migration() { cat << 'EOF' # Ring Security — Migration & Upgrade Guide ## Pre-Migration Checklist - [ ] Current system fully documented - [ ] Complete backup taken and verified - [ ] Target environment prepared - [ ] Rollback plan documented - [ ] Stakeholders notified ## Migration Steps 1. Prepare target environment 2. Export data from source 3. Transform data if needed 4. Import to target 5. Verify data integrity 6. Update configurations 7. Test all functionality 8. Switch traffic / go live ## Post-Migration - Monitor for errors and performance - Verify all integrations working - Update documentation - Decommission old system after confirmation EOF } cmd_cheatsheet() { cat << 'EOF' # Ring Security — Quick Reference ## Essential Commands | Command | Description | |---------|-------------| | help | Show available commands | | version | Display version info | | intro | Overview and fundamentals | | troubleshooting | Common problems and fixes | ## Common Workflows 1. **Setup**: install → configure → verify → test 2. **Daily**: check → monitor → report → review 3. **Issue**: diagnose → isolate → fix → verify → document ## Key Shortcuts - Use tab completion for commands - Check logs first when troubleshooting - Always backup before making changes - Document everything you change EOF } CMD="-help" shift 2>/dev/null || true case "$CMD" in intro) cmd_intro "$@" ;; quickstart) cmd_quickstart "$@" ;; patterns) cmd_patterns "$@" ;; debugging) cmd_debugging "$@" ;; performance) cmd_performance "$@" ;; security) cmd_security "$@" ;; migration) cmd_migration "$@" ;; cheatsheet) cmd_cheatsheet "$@" ;; help|--help|-h) show_help ;; version|--version|-v) echo "ring-security v$VERSION — Powered by BytesAgain" ;; *) echo "Unknown: $CMD"; echo "Run: ring-security help"; exit 1 ;; esac
Filter Polymarket prediction markets and track probabilities. Use when screening bets, drafting analyses, outlining trends, tracking price movements.
--- version: "2.0.0" name: Polymarket Screener description: "Filter Polymarket prediction markets and track probabilities. Use when screening bets, drafting analyses, outlining trends, tracking price movements." author: BytesAgain homepage: https://bytesagain.com source: https://github.com/bytesagain/ai-skills --- # Polymarket Screener 🎯 Filter and analyze prediction markets on Polymarket using their public API. Find undervalued bets, track probability movements, and discover high-opportunity markets. ## Comparison: Polymarket Screener vs Manual Browsing | Capability | Manual Browsing | Polymarket Screener | |-----------|----------------|-------------------| | Filter by probability range | ❌ Limited | ✅ Exact range (e.g., 20%-40%) | | Filter by liquidity | ❌ No | ✅ Min/max liquidity filters | | Track probability changes | ❌ Manual checking | ✅ Automated tracking with delta | | Multi-category scan | ❌ One at a time | ✅ All categories at once | | Probability movement alerts | ❌ No | ✅ Configurable thresholds | | Historical probability data | ❌ Limited chart | ✅ Exportable time series | | Bulk opportunity scoring | ❌ No | ✅ Automated scoring | | Custom watchlists | ❌ No | ✅ JSON watchlist with tracking | | Export to HTML report | ❌ No | ✅ Professional report output | | Sort by expected value | ❌ No | ✅ Built-in EV calculator | ## Getting Started No API key needed — Polymarket's public API is free. ```bash # List active markets bash scripts/polymarket-screener.sh list --limit 20 # Filter by category bash scripts/polymarket-screener.sh list --category politics --limit 50 # Find high-opportunity markets (low probability, high liquidity) bash scripts/polymarket-screener.sh opportunities --min-liquidity 50000 --prob-range "5-30" # Track probability changes bash scripts/polymarket-screener.sh track --market-id MARKET_SLUG --hours 48 # Generate full screening report bash scripts/polymarket-screener.sh report --output polymarket-report.html ``` ## Market Categories - **politics** — Elections, legislation, government actions - **crypto** — Price predictions, ETF approvals, protocol events - **sports** — Game outcomes, championships, player performance - **entertainment** — Awards, releases, celebrity events - **science** — Space, climate, research milestones - **business** — Earnings, IPOs, M&A, market indices - **world** — Geopolitics, international events ## Opportunity Scoring Markets are scored based on: ``` Score = (Liquidity Factor × 0.3) + (Probability Edge × 0.3) + (Time Value × 0.2) + (Movement × 0.2) Liquidity Factor: Higher liquidity = higher score (easier to enter/exit) Probability Edge: Markets with probabilities far from 50% but trending = opportunity Time Value: Markets resolving soon with high uncertainty = valuable Movement: Recent probability shifts indicate new information ``` ### What Makes a Good Opportunity? 1. **Probability between 15-35% or 65-85%** — Enough edge without extreme odds 2. **Liquidity > $50K** — Can enter meaningful position 3. **Recent movement > 5%** — Market is actively repricing 4. **Resolution within 30 days** — Time value is concrete 5. **Your own knowledge edge** — You know something the market doesn't ## Output Formats | Command | Description | |---------|-------------| | `markets` | Markets | | `odds` | Odds | | `value-bets` | Value Bets | | `watchlist` | Watchlist | ## API Rate Limits Polymarket's public API has rate limits. The screener respects these automatically: - **60 requests/minute** for listing endpoints - **120 requests/minute** for market detail endpoints - Built-in retry with exponential backoff ## Disclaimer ⚠️ Prediction markets involve real money and financial risk. This tool provides analysis only — it does not place bets or manage positions. Always do your own research. --- 💬 Feedback & Feature Requests: https://bytesagain.com/feedback Powered by BytesAgain | bytesagain.com ## Commands Run `polymarket-screener help` to see all available commands. FILE:scripts/polymarket.sh #!/usr/bin/env bash # Polymarket Screener — Screen and monitor prediction markets # Usage: bash polymarket.sh <command> [options] set -euo pipefail COMMAND="-help" shift 2>/dev/null || true DATA_DIR="HOME/.polymarket-screener" mkdir -p "$DATA_DIR" case "$COMMAND" in markets) CATEGORY="-all" SORT="-volume" LIMIT="-20" python3 << 'PYEOF' import sys, os, json, time try: from urllib2 import urlopen, Request except ImportError: from urllib.request import urlopen, Request category = sys.argv[1] if len(sys.argv) > 1 else "all" sort_by = sys.argv[2] if len(sys.argv) > 2 else "volume" limit = int(sys.argv[3]) if len(sys.argv) > 3 else 20 # Polymarket CLOB API (public, no auth needed for reads) try: url = "https://gamma-api.polymarket.com/markets?closed=false&limit={}&order={}".format(limit * 2, sort_by) req = Request(url) req.add_header("User-Agent", "PolymarketScreener/1.0") resp = urlopen(req, timeout=15) markets = json.loads(resp.read().decode("utf-8")) if not isinstance(markets, list): markets = markets.get("data", markets.get("markets", [])) # Filter by category if category != "all": markets = [m for m in markets if category.lower() in (m.get("category", "") or "").lower() or category.lower() in (m.get("question", "") or "").lower()] markets = markets[:limit] print("=" * 80) print("POLYMARKET — Active Markets (sorted by {})".format(sort_by)) print("Time: {}".format(time.strftime("%Y-%m-%d %H:%M"))) print("=" * 80) print("") for i, m in enumerate(markets, 1): question = m.get("question", m.get("title", "?"))[:70] volume = m.get("volume", m.get("volumeNum", 0)) or 0 liquidity = m.get("liquidity", m.get("liquidityNum", 0)) or 0 end_date = (m.get("endDate", m.get("end_date_iso", "")) or "")[:10] # Get outcome prices outcomes = m.get("outcomes", m.get("tokens", [])) yes_price = None no_price = None if isinstance(outcomes, list) and len(outcomes) >= 2: for o in outcomes: if isinstance(o, dict): name = (o.get("outcome", o.get("name", "")) or "").lower() price = o.get("price", o.get("lastTradePrice", 0)) if price and isinstance(price, (int, float)): if "yes" in name: yes_price = float(price) elif "no" in name: no_price = float(price) # Also try outcomePrices field if yes_price is None: try: prices_str = m.get("outcomePrices", "") if prices_str: prices = json.loads(prices_str) if isinstance(prices_str, str) else prices_str if len(prices) >= 2: yes_price = float(prices[0]) no_price = float(prices[1]) except (json.JSONDecodeError, ValueError, IndexError, TypeError): pass vol_str = "${:,.0f}".format(volume) if volume < 1000000 else "${:.1f}M".format(volume / 1000000) liq_str = "${:,.0f}".format(liquidity) if liquidity < 1000000 else "${:.1f}M".format(liquidity / 1000000) print("{}. {}".format(i, question)) price_line = " " if yes_price is not None: price_line += "YES: {:.0f}¢".format(yes_price * 100 if yes_price < 1 else yes_price) if no_price is not None: price_line += " NO: {:.0f}¢".format(no_price * 100 if no_price < 1 else no_price) price_line += " Vol: {} Liq: {}".format(vol_str, liq_str) if end_date: price_line += " Ends: {}".format(end_date) print(price_line) print("") # Cache cache = {"timestamp": time.strftime("%Y-%m-%d %H:%M:%S"), "markets": markets} cache_file = os.path.join(os.path.expanduser("~/.polymarket-screener"), "markets.json") with open(cache_file, "w") as f: json.dump(cache, f, indent=2, default=str) except Exception as e: print("Error fetching markets: {}".format(str(e))) print("") print("Polymarket API may be temporarily unavailable.") print("Alternatively, visit: https://polymarket.com") PYEOF ;; odds) QUERY="-" python3 << 'PYEOF' import sys, os, json, time try: from urllib2 import urlopen, Request except ImportError: from urllib.request import urlopen, Request query = " ".join(sys.argv[1:]) if len(sys.argv) > 1 else "" if not query: print("Usage: bash polymarket.sh odds <search_query>") print("Example: bash polymarket.sh odds trump election") sys.exit(1) try: from urllib.parse import quote except ImportError: from urllib import quote try: url = "https://gamma-api.polymarket.com/markets?closed=false&limit=10" req = Request(url) req.add_header("User-Agent", "PolymarketScreener/1.0") resp = urlopen(req, timeout=15) markets = json.loads(resp.read().decode("utf-8")) if not isinstance(markets, list): markets = markets.get("data", markets.get("markets", [])) # Search filter matches = [] for m in markets: question = (m.get("question", m.get("title", "")) or "").lower() desc = (m.get("description", "") or "").lower() if query.lower() in question or query.lower() in desc: matches.append(m) if not matches: print("No markets found matching '{}'. Try broader terms.".format(query)) sys.exit(0) print("=" * 70) print("SEARCH: '{}' — {} results".format(query, len(matches))) print("=" * 70) print("") for m in matches[:5]: question = m.get("question", m.get("title", "?")) print("Q: {}".format(question)) # Parse outcomes try: prices_str = m.get("outcomePrices", "") if prices_str: prices = json.loads(prices_str) if isinstance(prices_str, str) else prices_str outcomes_str = m.get("outcomes", "") outcomes = json.loads(outcomes_str) if isinstance(outcomes_str, str) else outcomes_str if isinstance(outcomes, list) and isinstance(prices, list): for name, price in zip(outcomes, prices): pct = float(price) * 100 if float(price) < 2 else float(price) bar_len = int(pct / 2) bar = "█" * bar_len + "░" * (50 - bar_len) print(" {:<10} {:.1f}% {}".format(name, pct, bar)) except (json.JSONDecodeError, ValueError, TypeError): pass volume = m.get("volume", m.get("volumeNum", 0)) or 0 if isinstance(volume, (int, float)) and volume > 0: vol_str = "${:,.0f}".format(volume) if volume < 1e6 else "${:.1f}M".format(volume / 1e6) print(" Volume: {}".format(vol_str)) slug = m.get("slug", m.get("id", "")) if slug: print(" URL: https://polymarket.com/event/{}".format(slug)) print("") except Exception as e: print("Error: {}".format(str(e))) PYEOF ;; value-bets) THRESHOLD="-0.15" python3 << 'PYEOF' import sys, os, json, time try: from urllib2 import urlopen, Request except ImportError: from urllib.request import urlopen, Request threshold = float(sys.argv[1]) if len(sys.argv) > 1 else 0.15 print("=" * 70) print("VALUE BET FINDER (extreme odds)") print("Looking for YES < {:.0f}¢ or YES > {:.0f}¢".format(threshold * 100, (1 - threshold) * 100)) print("=" * 70) print("") try: url = "https://gamma-api.polymarket.com/markets?closed=false&limit=100" req = Request(url) req.add_header("User-Agent", "PolymarketScreener/1.0") resp = urlopen(req, timeout=15) markets = json.loads(resp.read().decode("utf-8")) if not isinstance(markets, list): markets = markets.get("data", markets.get("markets", [])) low_odds = [] high_odds = [] for m in markets: try: prices_str = m.get("outcomePrices", "") if not prices_str: continue prices = json.loads(prices_str) if isinstance(prices_str, str) else prices_str if not prices or len(prices) < 1: continue yes_price = float(prices[0]) volume = m.get("volume", m.get("volumeNum", 0)) or 0 if isinstance(volume, (int, float)) and volume < 10000: continue question = m.get("question", m.get("title", "?")) if yes_price < threshold: low_odds.append({"question": question, "yes": yes_price, "volume": volume}) elif yes_price > (1 - threshold): high_odds.append({"question": question, "yes": yes_price, "volume": volume}) except (ValueError, TypeError, json.JSONDecodeError): continue print("LONGSHOTS (YES < {:.0f}¢ — potential high payoff):".format(threshold * 100)) print("-" * 70) low_odds.sort(key=lambda x: x["yes"]) for i, m in enumerate(low_odds[:10], 1): payout = (1 / m["yes"]) if m["yes"] > 0 else 0 print(" {}. YES: {:.0f}¢ ({}x payout)".format(i, m["yes"] * 100, int(payout))) print(" {}".format(m["question"][:65])) print("") if not low_odds: print(" No longshot opportunities found.") print("") print("NEAR-CERTAIN (YES > {:.0f}¢ — low risk):".format((1 - threshold) * 100)) print("-" * 70) high_odds.sort(key=lambda x: x["yes"], reverse=True) for i, m in enumerate(high_odds[:10], 1): print(" {}. YES: {:.0f}¢ ({:.1f}% return if correct)".format( i, m["yes"] * 100, (1 - m["yes"]) * 100)) print(" {}".format(m["question"][:65])) print("") if not high_odds: print(" No near-certain bets found.") print("") print("⚠️ DISCLAIMER: Prediction markets involve real money risk.") print(" Past performance does not guarantee future results.") print(" Only bet what you can afford to lose.") except Exception as e: print("Error: {}".format(str(e))) PYEOF ;; watchlist) ACTION="-list" MARKET="-" python3 << 'PYEOF' import json, sys, os data_dir = os.path.expanduser("~/.polymarket-screener") action = sys.argv[1] if len(sys.argv) > 1 else "list" market = " ".join(sys.argv[2:]) if len(sys.argv) > 2 else "" wl_file = os.path.join(data_dir, "watchlist.json") watchlist = [] if os.path.exists(wl_file): with open(wl_file, "r") as f: watchlist = json.load(f) if action == "add": if not market: print("Usage: bash polymarket.sh watchlist add <market_question>") sys.exit(1) watchlist.append({"question": market, "added": __import__("time").strftime("%Y-%m-%d")}) with open(wl_file, "w") as f: json.dump(watchlist, f, indent=2) print("Added to watchlist: {}".format(market)) elif action == "remove": if not market: print("Usage: bash polymarket.sh watchlist remove <index>") sys.exit(1) try: idx = int(market) - 1 if 0 <= idx < len(watchlist): removed = watchlist.pop(idx) with open(wl_file, "w") as f: json.dump(watchlist, f, indent=2) print("Removed: {}".format(removed["question"][:60])) else: print("Invalid index.") except ValueError: print("Use index number, not text.") else: print("=" * 60) print("POLYMARKET WATCHLIST ({} items)".format(len(watchlist))) print("=" * 60) if watchlist: for i, item in enumerate(watchlist, 1): print(" {}. {} (added: {})".format(i, item["question"][:55], item.get("added", "?"))) else: print(" Empty. Add markets with: bash polymarket.sh watchlist add <question>") PYEOF ;; help|*) cat << 'HELPEOF' Polymarket Screener — Screen and monitor prediction markets COMMANDS: markets [category] [sort] [limit] List active markets (sort: volume|liquidity) odds <search_query> Search markets and show current odds value-bets [threshold] Find extreme odds (longshots and near-certain) watchlist [add|remove|list] [market] Manage your market watchlist CATEGORIES: all, politics, crypto, sports, science, culture EXAMPLES: bash polymarket.sh markets bash polymarket.sh markets politics volume 10 bash polymarket.sh odds "president 2028" bash polymarket.sh value-bets 0.10 bash polymarket.sh watchlist add "Will BTC reach 100k in 2025?" bash polymarket.sh watchlist NOTE: Uses Polymarket public API (no authentication required) HELPEOF ;; esac echo "" echo "Powered by BytesAgain | bytesagain.com | [email protected]" FILE:scripts/script.sh #!/usr/bin/env bash # polymarket-screener - Content creation and optimization assistant set -euo pipefail VERSION="2.0.0" DATA_DIR="-${XDG_DATA_HOME:-$HOME/.local/share/polymarket-screener}" DB="$DATA_DIR/data.log" mkdir -p "$DATA_DIR" show_help() { cat << EOF polymarket-screener v$VERSION Content creation and optimization assistant Usage: polymarket-screener <command> [args] Commands: draft Create draft headline Generate headlines outline Content outline seo SEO tips schedule Content schedule hooks Opening hooks cta Call to action repurpose Repurpose content metrics Content metrics ideas Content ideas help Show this help version Show version Data: \$DATA_DIR EOF } _log() { echo "$(date '+%m-%d %H:%M') $1: $2" >> "$DATA_DIR/history.log"; } cmd_draft() { echo " Draft: $1 Target: -800 words" _log "draft" "-" } cmd_headline() { echo " 1. How to $1 2. $1: Complete Guide 3. Why $1 Matters" _log "headline" "-" } cmd_outline() { echo " 1. Intro | 2. Problem | 3. Solution | 4. Examples | 5. CTA" _log "outline" "-" } cmd_seo() { echo " Keywords: $1 | Title tag | Meta desc | H1-H3 | Internal links" _log "seo" "-" } cmd_schedule() { echo " Mon: Research | Tue: Write | Wed: Edit | Thu: Publish | Fri: Promote" _log "schedule" "-" } cmd_hooks() { echo " Question | Statistic | Story | Bold claim | Controversy" _log "hooks" "-" } cmd_cta() { echo " Subscribe | Share | Comment | Try it | Learn more" _log "cta" "-" } cmd_repurpose() { echo " Blog -> Thread -> Video -> Carousel -> Newsletter" _log "repurpose" "-" } cmd_metrics() { echo " Views | Clicks | Shares | Time on page | Conversions" _log "metrics" "-" } cmd_ideas() { echo " How-to | Listicle | Case study | Interview | Comparison" _log "ideas" "-" } case "-help" in draft) shift; cmd_draft "$@" ;; headline) shift; cmd_headline "$@" ;; outline) shift; cmd_outline "$@" ;; seo) shift; cmd_seo "$@" ;; schedule) shift; cmd_schedule "$@" ;; hooks) shift; cmd_hooks "$@" ;; cta) shift; cmd_cta "$@" ;; repurpose) shift; cmd_repurpose "$@" ;; metrics) shift; cmd_metrics "$@" ;; ideas) shift; cmd_ideas "$@" ;; help|-h) show_help ;; version|-v) echo "polymarket-screener v$VERSION" ;; *) echo "Unknown: $1"; show_help; exit 1 ;; esac FILE:tips.md # Polymarket Screener — Tips & Tricks 🎯 ## Finding Value Bets 1. **Look for stale markets** — Markets that haven't moved in days despite new information are often mispriced. 2. **Check volume vs liquidity** — High liquidity but low volume means the market is sleepy, opportunity to enter. 3. **Probability extremes** — Markets at 5% or 95% can have huge payoffs but are usually priced correctly. 4. **The 20-40% sweet spot** — Markets in this range often have the best risk/reward for contrarian bets. ## Market Analysis Tips - Compare Polymarket odds to other prediction markets (Kalshi, Metaculus) — discrepancies signal opportunities - Follow the "smart money" — sudden large bets shifting probability indicate informed traders - Check the resolution criteria carefully — many disputes arise from ambiguous resolution rules - Time decay matters — a 30% market resolving tomorrow is very different from one resolving in 6 months ## Category-Specific Notes - **Politics** — Most liquid category, hardest to find edge unless you follow polls closely - **Crypto** — You probably have alpha here if you're in the crypto space - **Sports** — Efficient markets, hard to beat unless you have specialized knowledge - **Science/World** — Often mispriced due to lower attention, good for patient bettors ## Watchlist Strategy - Keep 10-20 markets on your watchlist, not 100 - Set probability change alerts at ±5% for early warning - Review watchlist weekly and prune resolved/irrelevant markets - Focus on markets resolving in 7-60 days for best time value ## Risk Management - ❌ Never bet more than 5% of bankroll on a single market - ✅ Diversify across categories and timeframes - ✅ Take profits when a market moves significantly in your favor - ✅ Keep a trading journal — track WHY you entered each position - ✅ Set a monthly loss limit and stick to it
Reference tool for life — covers intro, quickstart, patterns and more. Quick lookup for Homeassistant Toolkit concepts, best practices, and implementation pa...
--- name: "homeassistant-toolkit" version: "3.0.1" description: "Reference tool for life — covers intro, quickstart, patterns and more. Quick lookup for Homeassistant Toolkit concepts, best practices, and implementation pa..." author: "BytesAgain" homepage: "https://bytesagain.com" source: "https://github.com/bytesagain/ai-skills" tags: [homeassistant,toolkit, reference] category: "life" --- # Homeassistant Toolkit Reference tool for life — covers intro, quickstart, patterns and more. Quick lookup for Homeassistant Toolkit concepts, best practices, and implementation pa... No API keys or credentials required. ## Commands | Command | Description | |---------|-------------| | `intro` | intro reference | | `quickstart` | quickstart reference | | `patterns` | patterns reference | | `debugging` | debugging reference | | `performance` | performance reference | | `security` | security reference | | `migration` | migration reference | | `cheatsheet` | cheatsheet reference | ## Output Format All commands output plain-text reference documentation via heredoc. No external API calls, no credentials needed, no network access. --- *Powered by BytesAgain | bytesagain.com | [email protected]* FILE:scripts/script.sh #!/usr/bin/env bash # homeassistant-toolkit — Homeassistant Toolkit reference tool. Use when working with homeassistant toolkit in devtools contexts. # Powered by BytesAgain | bytesagain.com | [email protected] set -euo pipefail VERSION="3.0.0" show_help() { cat << 'HELPEOF' homeassistant-toolkit v$VERSION — Homeassistant Toolkit Reference Tool Usage: homeassistant-toolkit <command> Commands: intro Overview and core concepts quickstart Getting started guide patterns Common patterns and best practices debugging Debugging and troubleshooting performance Performance optimization tips security Security considerations migration Migration and upgrade guide cheatsheet Quick reference cheat sheet help Show this help version Show version Powered by BytesAgain | bytesagain.com HELPEOF } cmd_intro() { cat << 'EOF' # Homeassistant Toolkit — Overview ## What is Homeassistant Toolkit? Homeassistant Toolkit (homeassistant-toolkit) is a specialized tool/concept in the devtools domain. It provides essential capabilities for professionals working with homeassistant toolkit. ## Key Concepts - Core homeassistant toolkit principles and fundamentals - How homeassistant toolkit fits into the broader devtools ecosystem - Essential terminology every practitioner should know ## Why Homeassistant Toolkit Matters Understanding homeassistant toolkit is critical for: - Improving efficiency in devtools workflows - Reducing errors and downtime - Meeting industry standards and compliance requirements - Enabling better decision-making with accurate data ## Getting Started 1. Understand the basic homeassistant toolkit concepts 2. Learn the standard tools and interfaces 3. Practice with common scenarios 4. Review safety and compliance requirements EOF } cmd_quickstart() { cat << 'EOF' # Homeassistant Toolkit — Quick Start Guide ## Prerequisites - Basic understanding of devtools concepts - Required tools and access credentials - System meeting minimum requirements ## Installation 1. Download or clone the homeassistant toolkit package 2. Install dependencies 3. Configure initial settings 4. Verify installation ## First Steps 1. Run the hello-world example 2. Review the default configuration 3. Try a simple real-world task 4. Explore available commands and options ## Next Steps - Read the full documentation - Join the community forum - Try advanced features - Set up automated workflows EOF } cmd_patterns() { cat << 'EOF' # Homeassistant Toolkit — Common Patterns & Best Practices ## Design Patterns 1. **Standard Pattern**: The most common approach for homeassistant toolkit 2. **Scalable Pattern**: For high-volume or distributed scenarios 3. **Resilient Pattern**: For fault-tolerant implementations ## Best Practices - Follow the principle of least privilege - Use version control for all configurations - Implement comprehensive logging - Test changes in staging before production - Document all custom configurations ## Anti-Patterns to Avoid - Hardcoding credentials or configuration - Skipping validation and error handling - Ignoring monitoring and alerting - Making changes without documentation - Over-engineering simple solutions EOF } cmd_debugging() { cat << 'EOF' # Homeassistant Toolkit — Debugging Guide ## Common Errors 1. **Connection refused**: Check service status and network 2. **Permission denied**: Verify credentials and access rights 3. **Timeout**: Check network, increase limits, optimize queries 4. **Invalid input**: Validate data format and encoding ## Debugging Tools - Built-in logging and diagnostics - Network analysis tools (tcpdump, wireshark) - System monitoring (top, htop, iostat) - Application-specific debug modes ## Debug Workflow 1. Reproduce the issue consistently 2. Check logs for error messages 3. Isolate the failing component 4. Test with minimal configuration 5. Apply fix and verify EOF } cmd_performance() { cat << 'EOF' # Homeassistant Toolkit — Performance Optimization ## Key Metrics - Response time / latency - Throughput / operations per second - Resource utilization (CPU, memory, I/O) - Error rate and retry frequency ## Optimization Strategies 1. **Caching**: Reduce redundant operations 2. **Batching**: Group small operations 3. **Indexing**: Speed up data lookups 4. **Compression**: Reduce data transfer size 5. **Parallel Processing**: Utilize multiple cores ## Monitoring - Set up baseline performance metrics - Configure alerts for anomalies - Track trends over time - Regular capacity planning reviews EOF } cmd_security() { cat << 'EOF' # Homeassistant Toolkit — Security Considerations ## Authentication & Authorization - Use strong, unique credentials - Implement role-based access control - Enable multi-factor authentication where possible - Regularly review and rotate credentials ## Data Protection - Encrypt data at rest and in transit - Implement proper backup procedures - Follow data retention policies - Sanitize inputs to prevent injection ## Network Security - Use firewalls and network segmentation - Monitor for suspicious activity - Keep all software patched and updated - Disable unnecessary services and ports EOF } cmd_migration() { cat << 'EOF' # Homeassistant Toolkit — Migration & Upgrade Guide ## Pre-Migration Checklist - [ ] Current system fully documented - [ ] Complete backup taken and verified - [ ] Target environment prepared - [ ] Rollback plan documented - [ ] Stakeholders notified ## Migration Steps 1. Prepare target environment 2. Export data from source 3. Transform data if needed 4. Import to target 5. Verify data integrity 6. Update configurations 7. Test all functionality 8. Switch traffic / go live ## Post-Migration - Monitor for errors and performance - Verify all integrations working - Update documentation - Decommission old system after confirmation EOF } cmd_cheatsheet() { cat << 'EOF' # Homeassistant Toolkit — Quick Reference ## Essential Commands | Command | Description | |---------|-------------| | help | Show available commands | | version | Display version info | | intro | Overview and fundamentals | | troubleshooting | Common problems and fixes | ## Common Workflows 1. **Setup**: install → configure → verify → test 2. **Daily**: check → monitor → report → review 3. **Issue**: diagnose → isolate → fix → verify → document ## Key Shortcuts - Use tab completion for commands - Check logs first when troubleshooting - Always backup before making changes - Document everything you change EOF } CMD="-help" shift 2>/dev/null || true case "$CMD" in intro) cmd_intro "$@" ;; quickstart) cmd_quickstart "$@" ;; patterns) cmd_patterns "$@" ;; debugging) cmd_debugging "$@" ;; performance) cmd_performance "$@" ;; security) cmd_security "$@" ;; migration) cmd_migration "$@" ;; cheatsheet) cmd_cheatsheet "$@" ;; help|--help|-h) show_help ;; version|--version|-v) echo "homeassistant-toolkit v$VERSION — Powered by BytesAgain" ;; *) echo "Unknown: $CMD"; echo "Run: homeassistant-toolkit help"; exit 1 ;; esac
Reference tool for blockchain and crypto — covers intro, quickstart, patterns and more. Quick lookup for Arbitrage Finder concepts, best practices, and imple...
--- name: "arbitrage-finder" version: "3.0.1" description: "Reference tool for blockchain and crypto — covers intro, quickstart, patterns and more. Quick lookup for Arbitrage Finder concepts, best practices, and imple..." author: "BytesAgain" homepage: "https://bytesagain.com" source: "https://github.com/bytesagain/ai-skills" tags: [arbitrage,finder, reference] category: "blockchain" --- # Arbitrage Finder Reference tool for blockchain and crypto — covers intro, quickstart, patterns and more. Quick lookup for Arbitrage Finder concepts, best practices, and imple... No API keys or credentials required. ## Commands | Command | Description | |---------|-------------| | `intro` | intro reference | | `quickstart` | quickstart reference | | `patterns` | patterns reference | | `debugging` | debugging reference | | `performance` | performance reference | | `security` | security reference | | `migration` | migration reference | | `cheatsheet` | cheatsheet reference | ## Output Format All commands output plain-text reference documentation via heredoc. No external API calls, no credentials needed, no network access. --- *Powered by BytesAgain | bytesagain.com | [email protected]* FILE:scripts/script.sh #!/usr/bin/env bash # arbitrage-finder — Arbitrage Finder reference tool. Use when working with arbitrage finder in devtools contexts. # Powered by BytesAgain | bytesagain.com | [email protected] set -euo pipefail VERSION="3.0.0" show_help() { cat << 'HELPEOF' arbitrage-finder v$VERSION — Arbitrage Finder Reference Tool Usage: arbitrage-finder <command> Commands: intro Overview and core concepts quickstart Getting started guide patterns Common patterns and best practices debugging Debugging and troubleshooting performance Performance optimization tips security Security considerations migration Migration and upgrade guide cheatsheet Quick reference cheat sheet help Show this help version Show version Powered by BytesAgain | bytesagain.com HELPEOF } cmd_intro() { cat << 'EOF' # Arbitrage Finder — Overview ## What is Arbitrage Finder? Arbitrage Finder (arbitrage-finder) is a specialized tool/concept in the devtools domain. It provides essential capabilities for professionals working with arbitrage finder. ## Key Concepts - Core arbitrage finder principles and fundamentals - How arbitrage finder fits into the broader devtools ecosystem - Essential terminology every practitioner should know ## Why Arbitrage Finder Matters Understanding arbitrage finder is critical for: - Improving efficiency in devtools workflows - Reducing errors and downtime - Meeting industry standards and compliance requirements - Enabling better decision-making with accurate data ## Getting Started 1. Understand the basic arbitrage finder concepts 2. Learn the standard tools and interfaces 3. Practice with common scenarios 4. Review safety and compliance requirements EOF } cmd_quickstart() { cat << 'EOF' # Arbitrage Finder — Quick Start Guide ## Prerequisites - Basic understanding of devtools concepts - Required tools and access credentials - System meeting minimum requirements ## Installation 1. Download or clone the arbitrage finder package 2. Install dependencies 3. Configure initial settings 4. Verify installation ## First Steps 1. Run the hello-world example 2. Review the default configuration 3. Try a simple real-world task 4. Explore available commands and options ## Next Steps - Read the full documentation - Join the community forum - Try advanced features - Set up automated workflows EOF } cmd_patterns() { cat << 'EOF' # Arbitrage Finder — Common Patterns & Best Practices ## Design Patterns 1. **Standard Pattern**: The most common approach for arbitrage finder 2. **Scalable Pattern**: For high-volume or distributed scenarios 3. **Resilient Pattern**: For fault-tolerant implementations ## Best Practices - Follow the principle of least privilege - Use version control for all configurations - Implement comprehensive logging - Test changes in staging before production - Document all custom configurations ## Anti-Patterns to Avoid - Hardcoding credentials or configuration - Skipping validation and error handling - Ignoring monitoring and alerting - Making changes without documentation - Over-engineering simple solutions EOF } cmd_debugging() { cat << 'EOF' # Arbitrage Finder — Debugging Guide ## Common Errors 1. **Connection refused**: Check service status and network 2. **Permission denied**: Verify credentials and access rights 3. **Timeout**: Check network, increase limits, optimize queries 4. **Invalid input**: Validate data format and encoding ## Debugging Tools - Built-in logging and diagnostics - Network analysis tools (tcpdump, wireshark) - System monitoring (top, htop, iostat) - Application-specific debug modes ## Debug Workflow 1. Reproduce the issue consistently 2. Check logs for error messages 3. Isolate the failing component 4. Test with minimal configuration 5. Apply fix and verify EOF } cmd_performance() { cat << 'EOF' # Arbitrage Finder — Performance Optimization ## Key Metrics - Response time / latency - Throughput / operations per second - Resource utilization (CPU, memory, I/O) - Error rate and retry frequency ## Optimization Strategies 1. **Caching**: Reduce redundant operations 2. **Batching**: Group small operations 3. **Indexing**: Speed up data lookups 4. **Compression**: Reduce data transfer size 5. **Parallel Processing**: Utilize multiple cores ## Monitoring - Set up baseline performance metrics - Configure alerts for anomalies - Track trends over time - Regular capacity planning reviews EOF } cmd_security() { cat << 'EOF' # Arbitrage Finder — Security Considerations ## Authentication & Authorization - Use strong, unique credentials - Implement role-based access control - Enable multi-factor authentication where possible - Regularly review and rotate credentials ## Data Protection - Encrypt data at rest and in transit - Implement proper backup procedures - Follow data retention policies - Sanitize inputs to prevent injection ## Network Security - Use firewalls and network segmentation - Monitor for suspicious activity - Keep all software patched and updated - Disable unnecessary services and ports EOF } cmd_migration() { cat << 'EOF' # Arbitrage Finder — Migration & Upgrade Guide ## Pre-Migration Checklist - [ ] Current system fully documented - [ ] Complete backup taken and verified - [ ] Target environment prepared - [ ] Rollback plan documented - [ ] Stakeholders notified ## Migration Steps 1. Prepare target environment 2. Export data from source 3. Transform data if needed 4. Import to target 5. Verify data integrity 6. Update configurations 7. Test all functionality 8. Switch traffic / go live ## Post-Migration - Monitor for errors and performance - Verify all integrations working - Update documentation - Decommission old system after confirmation EOF } cmd_cheatsheet() { cat << 'EOF' # Arbitrage Finder — Quick Reference ## Essential Commands | Command | Description | |---------|-------------| | help | Show available commands | | version | Display version info | | intro | Overview and fundamentals | | troubleshooting | Common problems and fixes | ## Common Workflows 1. **Setup**: install → configure → verify → test 2. **Daily**: check → monitor → report → review 3. **Issue**: diagnose → isolate → fix → verify → document ## Key Shortcuts - Use tab completion for commands - Check logs first when troubleshooting - Always backup before making changes - Document everything you change EOF } CMD="-help" shift 2>/dev/null || true case "$CMD" in intro) cmd_intro "$@" ;; quickstart) cmd_quickstart "$@" ;; patterns) cmd_patterns "$@" ;; debugging) cmd_debugging "$@" ;; performance) cmd_performance "$@" ;; security) cmd_security "$@" ;; migration) cmd_migration "$@" ;; cheatsheet) cmd_cheatsheet "$@" ;; help|--help|-h) show_help ;; version|--version|-v) echo "arbitrage-finder v$VERSION — Powered by BytesAgain" ;; *) echo "Unknown: $CMD"; echo "Run: arbitrage-finder help"; exit 1 ;; esac
Crypto wallet analytics reference — address formats, on-chain analytics, transaction tracing, hardware wallets, and approval revocation
--- name: "wallet-tracker" version: "5.0.0" description: "Crypto wallet analytics reference — address formats, on-chain analytics, transaction tracing, hardware wallets, and approval revocation" author: "BytesAgain" homepage: "https://bytesagain.com" source: "https://github.com/bytesagain/ai-skills" tags: [crypto, wallet, ethereum, bitcoin, on-chain] category: "blockchain" --- # Wallet Tracker Crypto wallet analytics reference — address formats, on-chain analytics, transaction tracing, hardware wallets, and approval revocation. No API keys or credentials required — outputs reference documentation only. ## Commands | Command | Description | |---------|-------------| | `intro` | Wallet types, on-chain analytics overview | | `standards` | Address formats for BTC, ETH, SOL, BIP-44 paths | | `troubleshooting` | Missing transactions, wrong network, stuck tx | | `performance` | Batch RPC, indexers, WebSocket vs polling | | `security` | Private keys, approvals, social engineering | | `migration` | Single to multisig, hot to cold, exchange to self-custody | | `cheatsheet` | Block explorers, APIs, Dune queries, whale addresses | | `faq` | Wallet tracking, whale alerts, safety checks | ## Output Format All commands output plain-text reference documentation via heredoc. No external API calls, no credentials needed, no network access. --- *Powered by BytesAgain | bytesagain.com | [email protected]* FILE:scripts/script.sh #!/usr/bin/env bash # wallet-tracker — Crypto Wallet Analytics Reference set -euo pipefail VERSION="5.0.0" cmd_intro() { cat << 'EOF' # Crypto Wallet Analytics — Overview ## Wallet Types EOA (Externally Owned Account): Controlled by private key, no code, sends transactions Example: MetaMask, Trust Wallet, hardware wallet addresses Ethereum: 20-byte address, starts with 0x Contract Wallet (Smart Account): Code-based wallet with programmable logic Gnosis Safe: Multi-signature, threshold signing (e.g., 2-of-3) ERC-4337 Account Abstraction: Gasless transactions, social recovery Argent: Guardian-based recovery without seed phrase Multisig Wallet: Requires M-of-N signatures to execute transactions Common setups: 2-of-3 (personal), 3-of-5 (DAO treasury) Gnosis Safe (now Safe{Wallet}): Most popular, 50B+ TVL secured Benefits: No single point of failure, shared custody ## On-Chain Analytics Wallet clustering: Group addresses belonging to same entity Transaction graph analysis: Map fund flows between wallets Entity labeling: Tag known wallets (exchanges, protocols, whales) Behavioral analysis: Trading patterns, DeFi usage, gas spending Key providers: Nansen, Arkham Intelligence, Chainalysis, Dune Analytics ## Key Metrics Per Wallet Net worth (USD equivalent across all chains) Token diversity (number of distinct tokens held) Transaction frequency and volume DeFi positions (lending, staking, LP positions) NFT holdings and floor value Gas spent (total and average per transaction) First/last activity timestamps Counterparty analysis (most interacted addresses) EOF } cmd_standards() { cat << 'EOF' # Address Formats & Standards ## Bitcoin Address Formats P2PKH (Legacy): Starts with "1" Example: 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa Base58Check encoded, 25-34 characters Script: OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG P2SH (Script): Starts with "3" Example: 3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy Used for multisig and SegWit-compatible (P2SH-P2WPKH) Script hash: HASH160 of the redeem script Bech32 (SegWit): Starts with "bc1q" Example: bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq BIP-173, lowercase only, 42/62 characters (P2WPKH/P2WSH) Bech32m for Taproot: bc1p... (BIP-350) Taproot (P2TR): Starts with "bc1p" Example: bc1p5d7rjq7g6rdk2yhzks9smlaqtedr4dekq08ge8ztwac72sfr9rusxg3297 BIP-341, Schnorr signatures, key/script path spending ## Ethereum Address Format 20 bytes hex: 0x followed by 40 hexadecimal characters EIP-55 Checksum: Mixed-case encoding for error detection 0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed (checksummed) All-lowercase also valid but no error detection ## Solana Address Format Base58 encoded Ed25519 public key, 32-44 characters Example: 9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM No checksum in address itself (validated at protocol level) ## Multi-Chain Address Derivation (BIP-44) Path: m / purpose' / coin_type' / account' / change / index Bitcoin: m/44'/0'/0'/0/0 (or m/84' for native SegWit) Ethereum: m/44'/60'/0'/0/0 Solana: m/44'/501'/0'/0' Cosmos: m/44'/118'/0'/0/0 EOF } cmd_troubleshooting() { cat << 'EOF' # Wallet Troubleshooting Guide ## Missing Transactions Symptom: Sent tokens but recipient doesn't see them Checks: 1. Verify correct network (Ethereum mainnet vs Arbitrum vs BSC) 2. Check transaction hash on block explorer (etherscan.io) 3. Token may need to be manually added to wallet (custom token) 4. Internal transactions (contract calls) don't show in basic view 5. For ERC-20: Check Transfer event logs, not transaction value Common cause: Sent ETH on Arbitrum but recipient checked Ethereum mainnet ## Wrong Network Problem: Sent USDC on Polygon but gave Ethereum address Reality: Same address works on all EVM chains — funds are on Polygon Fix: Add Polygon network to wallet, tokens will appear Exception: Sending to a smart contract address that doesn't exist on target chain — Funds recoverable only if contract is deployed to same address on that chain ## Stuck Pending Transaction Cause: Gas price too low, nonce gap, or network congestion Fix for MetaMask: 1. Speed Up: Resubmit same nonce with higher gas (1.5x-2x) 2. Cancel: Send 0 ETH to yourself with same nonce + higher gas 3. Reset: Settings → Advanced → Reset Account (clears local nonce) Fix for hardware wallet: Use MEW/MyCrypto to submit replacement tx ## Gas Estimation Failures Error: "Gas estimation failed" or "execution reverted" Causes: - Insufficient token approval for DEX swap - Slippage too low for volatile token - Contract paused or blacklisted address - Insufficient ETH for gas (even when swapping tokens) Debug: Use Tenderly.co to simulate transaction and see exact revert reason ## Hardware Wallet Connection Issues Ledger not detected: Update Ledger Live, enable "Contract Data" in app settings Trezor bridge: Install/update Trezor Bridge service MetaMask + Ledger: Use "WebHID" connection method (not U2F) Transaction signing timeout: Check device screen for confirmation prompt EOF } cmd_performance() { cat << 'EOF' # Wallet Analytics Performance ## Batch RPC Calls Problem: Checking 100 token balances = 100 RPC calls Solution: Use multicall contract (MakerDAO Multicall3) Address: 0xcA11bde05977b3631167028862bE2a173976CA11 (all EVM chains) Batch unlimited balanceOf calls into single eth_call Latency: 1 RPC call vs 100, ~50ms vs ~5000ms ## Indexer vs Direct Node Direct Node (eth_getLogs, eth_getTransactionReceipt): - Real-time, no dependency, but slow for historical queries - Rate limited on free RPC (Infura: 100K req/day, Alchemy: 300M CU/mo) Indexer (The Graph, Goldsky, Ponder): - Pre-indexed, fast queries, GraphQL API - Subgraph sync delay: 5-30 seconds behind chain - Best for: Historical data, complex queries, dashboard analytics Covalent/Moralis: REST API over indexed data - Token balances, transaction history, NFT metadata in one call - Free tier: 5-10 req/second ## WebSocket vs Polling WebSocket (eth_subscribe): - Real-time: new blocks, pending transactions, log events - Connection: wss://eth-mainnet.alchemyapi.io/v2/{key} - Best for: Live wallet monitoring, whale alerts - Caveat: Connection drops need reconnection logic Polling (eth_getBlockByNumber): - Interval: Every 12 seconds (Ethereum block time) - Simpler implementation, works behind corporate proxies - Higher latency, more RPC calls consumed ## Multi-Chain Wallet Tracking Portfolio aggregation platforms: DeBank, Zapper, Zerion API approach: One API call per chain per wallet Optimization: Cache balances, poll only on new block Cross-chain identity: ENS, Lens Profile, Farcaster ID EOF } cmd_security() { cat << 'EOF' # Wallet Security Reference ## Private Key Management NEVER share: Private key, seed phrase (12/24 words), keystore password Storage hierarchy (most to least secure): 1. Hardware wallet (Ledger/Trezor): Keys never leave device 2. Air-gapped signing (Keystone, AirGap): QR-code based 3. Mobile wallet with Secure Enclave (iPhone) / TEE (Android) 4. Browser extension (MetaMask): Keys in encrypted local storage 5. Hot wallet on server: Highest risk, use only for automation Seed phrase backup: - Metal plate (Cryptosteel, Billfodl): Fire/water resistant - Split with Shamir Secret Sharing (2-of-3 pieces) - Never store digitally (no cloud, no photo, no notes app) ## Token Approval Security Risk: Unlimited approval = contract can drain all tokens Check: revoke.cash or etherscan.io/tokenapprovalchecker Best practice: Approve exact amount, not type(uint256).max Revoke: Call approve(spender, 0) for unused protocols Permit2 (Uniswap): Time-limited approvals, single contract ## Social Engineering Attacks Fake customer support: "Share your screen" → steal seed phrase Discord DM scams: "Claim your airdrop" → phishing site Address poisoning: Attacker sends $0 from similar address → victim copies wrong address Clipboard hijacking: Malware replaces copied address with attacker's Prevention: Verify address character-by-character, use address book, hardware wallet ## Approval Revocation Checklist When to revoke: - After using a DEX/DeFi protocol you won't use again - If protocol is compromised (check rekt.news) - Regularly audit (monthly) all active approvals Cost: Standard ETH revocation tx costs ~$2-5 in gas Tools: revoke.cash (free), Etherscan token approval checker EOF } cmd_migration() { cat << 'EOF' # Wallet Migration Guide ## Single-Sig → Multisig Migration Why: Eliminate single point of failure, shared control Steps: 1. Deploy Safe{Wallet} at safe.global (free) 2. Set owners: Hardware wallet + mobile + backup key 3. Set threshold: 2-of-3 recommended for personal 4. Transfer assets from EOA to Safe address 5. Update DeFi positions to new address 6. Move governance delegations (Snapshot, on-chain) Cost: Safe deployment ~$20-50 in gas (Ethereum mainnet) Note: Some protocols don't support contract wallet interaction ## Hot Wallet → Cold Storage Steps: 1. Set up hardware wallet (Ledger/Trezor) 2. Write down seed phrase on metal plate 3. Verify seed phrase by recovering on second device 4. Send small test transaction from hot to cold 5. Transfer remaining assets after confirmation 6. Keep small ETH in hot wallet for gas Amount guidelines: Cold storage: >90% of holdings (long-term) Hot wallet: <10% (active trading/DeFi) Hardware: Any amount >$1,000 ## Single-Chain → Multi-Chain Problem: Assets only on Ethereum mainnet (high gas) Solution: Bridge to L2s (Arbitrum, Optimism, Base, zkSync) Native bridges (safest): bridge.arbitrum.io, app.optimism.io Third-party bridges (faster): Across, Stargate, LayerZero Risks: Bridge hacks (Ronin $625M, Wormhole $320M) Best practice: Use native bridges for large amounts, wait for finality ## Exchange → Self-Custody Steps: 1. Set up wallet (MetaMask/Rabby for daily, Ledger for storage) 2. Whitelist withdrawal address on exchange 3. Withdraw small test amount first 4. Wait for confirmation (BTC: 6 blocks, ETH: 12 blocks) 5. Withdraw remaining after test succeeds 6. Record transaction hash for tax records Warning: "Not your keys, not your coins" — but also your responsibility EOF } cmd_cheatsheet() { cat << 'EOF' # Wallet Analytics — Quick Reference ## Block Explorer URLs Ethereum: etherscan.io/address/{addr} Bitcoin: mempool.space/address/{addr} Polygon: polygonscan.com/address/{addr} Arbitrum: arbiscan.io/address/{addr} Solana: solscan.io/account/{addr} BSC: bscscan.com/address/{addr} Base: basescan.org/address/{addr} Avalanche: snowtrace.io/address/{addr} ## Etherscan API Quick Reference Base URL: api.etherscan.io/api Balance: ?module=account&action=balance&address={addr} Tx List: ?module=account&action=txlist&address={addr}&startblock=0 Token Tx: ?module=account&action=tokentx&address={addr} Token Bal: ?module=account&action=tokenbalance&contractaddress={token}&address={addr} Gas Price: ?module=gastracker&action=gasoracle Rate limit: 5 calls/sec (free key), 10 calls/sec (Pro) ## Popular Dune Queries Wallet Profiler: dune.com/queries/1637344 Token Holdings: dune.com/queries/2058337 Gas Spent: dune.com/queries/1746389 DEX Activity: dune.com/queries/2437841 SQL pattern: SELECT * FROM ethereum.transactions WHERE "from" = {{wallet}} ## Analytics Platforms Comparison Nansen: Institutional-grade, wallet labels, smart money tracking ($150/mo) Arkham: Entity intelligence, alert system, free tier available DeBank: Portfolio tracking, chain coverage, social features (free) Zapper: DeFi positions, NFTs, multichain dashboard (free) Zerion: Portfolio + trading, mobile app, clean UI (free) Dune: Custom SQL queries on blockchain data (free + Pro) ## Notable Whale Addresses Vitalik: 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 Justin Sun: 0x3DdfA8eC3052539b6C9549F12cEA2C295cfF5296 Binance Hot: 0x28C6c06298d514Db089934071355E5743bf21d60 Coinbase: 0x71660c4005BA85c37ccec55d0C4493E66Fe775d3 FTX Exploiter: 0x59ABf3837Fa962d6853b4Cc0a19513AA031fd32b ## Quick Balance Check (curl) curl "https://api.etherscan.io/api?module=account&action=balance&address=0x...&tag=latest&apikey=YOUR_KEY" EOF } cmd_faq() { cat << 'EOF' # Wallet Analytics — FAQ Q: How do I find who owns a wallet address? A: Blockchain addresses are pseudonymous, not anonymous. Tools: Nansen (labeled wallets), Arkham (entity intelligence), Etherscan labels (exchange, fund, protocol addresses). ENS reverse lookup: Check if address has .eth name. On-chain sleuthing: Follow fund flows to known exchanges. Caveat: Deanonymization without consent may violate privacy laws. Q: How accurate are "whale alert" services? A: Major whale moves are generally accurate (large exchange transfers). False positives: Exchange internal transfers, contract interactions. Services like Whale Alert track known exchange hot/cold wallets. For CEX deposits: Look for deposits to known exchange addresses. For smart money: Nansen labels are ~85% accurate for major entities. Q: How do I track a wallet across multiple chains? A: Same EOA address works on all EVM chains (Ethereum/Polygon/Arbitrum/BSC). Portfolio trackers: DeBank API, Zapper API, Moralis API. Non-EVM chains (Bitcoin, Solana): Separate addresses, need separate tracking. Unified view: DeBank.com shows 50+ EVM chains in one dashboard. Q: What happens if I send tokens to the wrong address? A: If sent to valid address you don't control: Irreversible on-chain. If sent to contract without withdrawal function: Permanently lost. If sent to correct address wrong chain: Add that network, tokens are there. If sent to burn address (0x000...): Permanently lost. Prevention: Always send small test transaction first. Q: How do I check if a token contract is safe? A: Check contract on: tokensniffer.com (scam score), gopluslabs.io (security API). Red flags: Honeypot (can buy but not sell), hidden mint function, proxy contract with unverified implementation, owner can pause transfers, tax >10%. Verified contract on Etherscan is minimum requirement but not sufficient. EOF } cmd_help() { echo "wallet-tracker v$VERSION — Crypto Wallet Analytics Reference" echo "" echo "Usage: wallet-tracker <command>" echo "" echo "Commands:" echo " intro Wallet types, on-chain analytics overview" echo " standards Address formats (BTC/ETH/SOL), BIP-44 paths" echo " troubleshooting Missing transactions, wrong network, stuck tx" echo " performance Batch RPC, indexers, WebSocket vs polling" echo " security Private keys, approvals, social engineering" echo " migration Single→multisig, hot→cold, exchange→self-custody" echo " cheatsheet Explorers, APIs, Dune queries, whale addresses" echo " faq Wallet tracking, whale alerts, safety checks" echo " help Show this help" } case "-help" in intro) cmd_intro ;; standards) cmd_standards ;; troubleshooting) cmd_troubleshooting ;; performance) cmd_performance ;; security) cmd_security ;; migration) cmd_migration ;; cheatsheet) cmd_cheatsheet ;; faq) cmd_faq ;; help|--help|-h) cmd_help ;; *) echo "Unknown: $1"; echo "Run: wallet-tracker help" ;; esac
Cryptocurrency tax reference — IRS guidance, FIFO/LIFO/HIFO cost basis methods, Form 8949, tax loss harvesting, and DeFi transaction categorization
--- name: "crypto-tax-calc" version: "3.0.0" description: "Cryptocurrency tax reference — IRS guidance, FIFO/LIFO/HIFO cost basis methods, Form 8949, tax loss harvesting, and DeFi transaction categorization" author: "BytesAgain" homepage: "https://bytesagain.com" source: "https://github.com/bytesagain/ai-skills" tags: [crypto-tax, irs, capital-gains, form-8949, defi] category: "blockchain" --- # Crypto Tax Calc Cryptocurrency tax reference — IRS guidance, FIFO/LIFO/HIFO cost basis methods, Form 8949, tax loss harvesting, and DeFi transaction categorization. No API keys or credentials required — outputs reference documentation only. ## Commands | Command | Description | |---------|-------------| | `intro` | Taxable events, tax categories, IRS guidance | | `standards` | Cost basis methods, Form 8949, reporting | | `troubleshooting` | Missing basis, DeFi categorization, wash sales | | `performance` | Tax loss harvesting, donation strategy | | `security` | Record-keeping, audit preparation, FBAR | | `migration` | Spreadsheet to tax software, exchange exports | | `cheatsheet` | Tax brackets, form fields, key dates | | `faq` | Reporting requirements, gas fees, IRS tracking | ## Output Format All commands output plain-text reference documentation via heredoc. No external API calls, no credentials needed, no network access. --- *Powered by BytesAgain | bytesagain.com | [email protected]* FILE:scripts/script.sh #!/usr/bin/env bash # crypto-tax-calc — Cryptocurrency Tax Reference set -euo pipefail VERSION="3.0.0" cmd_intro() { cat << 'EOF' # Cryptocurrency Taxation — Overview ## Taxable Events Trading: Selling crypto for fiat (BTC → USD) — capital gain/loss Swapping: Trading one crypto for another (BTC → ETH) — taxable event Spending: Buying goods/services with crypto — taxable at fair market value Mining: Income at fair market value when received (ordinary income) Staking: Rewards taxed as ordinary income when received Airdrops: Taxed as ordinary income at fair market value when received Hard Forks: Taxable as ordinary income when you gain dominion/control NFT Sales: Capital gain/loss on sale (cost basis = purchase price + gas) DeFi Yields: Farming rewards, lending interest = ordinary income Liquidity Pool: Add/remove may be taxable depending on interpretation ## Non-Taxable Events Buying crypto with fiat (no gain/loss yet) Transferring between your own wallets (same-person transfer) Gifting (below gift tax exclusion: $18,000/person in 2024) Donating to qualified charity (may get deduction, no capital gains) HODLing (unrealized gains are not taxed until disposed) ## Tax Categories Short-term capital gains: Held ≤1 year → taxed as ordinary income Long-term capital gains: Held >1 year → preferential rates (0/15/20%) Ordinary income: Mining, staking, airdrops → income tax rates (10-37%) ## Key Tax Authority Guidance IRS (US): Notice 2014-21, Rev. Rul. 2019-24, Rev. Rul. 2023-14 HMRC (UK): CRYPTO01000 manual ATO (AU): Crypto asset guidance BZSt (DE): 1 year holding = tax-free for individuals Portugal: Previously tax-free, now 28% on short-term gains EOF } cmd_standards() { cat << 'EOF' # Tax Calculation Standards ## Cost Basis Methods (IRS-Approved) FIFO (First In, First Out): Default method if you don't specify Sell oldest coins first In bull market: Higher gains (bought cheap, selling at higher price) Most common, simplest for auditing LIFO (Last In, First Out): Sell newest coins first In bull market: Lower gains (recently bought at higher price) Must be specifically elected and consistently applied Specific Identification: Choose exactly which coins to sell Best for tax optimization (pick highest cost basis to minimize gain) Requires: Transaction ID, date, amount, cost basis for each lot IRS: Must identify "before the transfer" (not retroactive) HIFO (Highest In, First Out): Variant of specific ID — always sell highest cost basis first Minimizes realized gains Supported by most crypto tax software Most tax-efficient but hardest to track manually ## IRS Crypto Reporting Requirements Form 8949: Report each disposal (sale, swap, spend) Column (a): Description ("0.5 BTC") Column (b): Date acquired Column (c): Date sold/disposed Column (d): Proceeds Column (e): Cost basis Column (h): Gain or loss (d - e) Schedule D: Summary of total capital gains/losses Form 1040: "Did you receive, sell, send, exchange, or otherwise acquire any digital assets?" — must answer YES if any crypto activity 1099-DA: New form starting 2025 tax year (exchanges report to IRS) EOF } cmd_troubleshooting() { cat << 'EOF' # Crypto Tax Troubleshooting ## Missing Cost Basis Problem: Bought on exchange that closed or lost records Solutions: 1. Check email for trade confirmation/receipts 2. Request data export (most exchanges keep 7+ years) 3. Use blockchain data: Find original acquisition transaction 4. CoinMarketCap historical prices for fair market value on date 5. Last resort: IRS may accept $0 cost basis (maximum gain) Best practice: Export trade history from every exchange quarterly ## DeFi Transaction Categorization Swap on DEX: Capital gain/loss event (like trading on CEX) Add to LP: Potentially taxable (disposing tokens for LP tokens) Remove from LP: Capital gain/loss on LP token disposal Yield farming rewards: Ordinary income when claimed Borrowing: NOT taxable (debt, not income) Liquidation: Taxable disposal (forced sale at liquidation price) Wrapping/unwrapping (ETH→WETH): Debatable — most treat as non-taxable Bridge transfers: Should be non-taxable (same asset, different chain) Gas fees: Add to cost basis (buy) or subtract from proceeds (sell) ## Wash Sale Considerations US: Wash sale rule (30-day rule) does NOT currently apply to crypto Reason: IRS classifies crypto as property, not securities Strategy: Tax loss harvesting — sell at loss, immediately rebuy WARNING: May change in future legislation (proposed in Build Back Better) International: Rules vary — UK has a 30-day "bed and breakfasting" rule ## Fork and Airdrop Valuation Hard fork (e.g., BTC → BCH): Cost basis of new coin = Fair market value when you gain control This becomes ordinary income If you can't access forked coin, taxable when you CAN access it Airdrop: Similar to hard fork — income at FMV when received If airdrop has $0 value at receipt, no income (IRS Rev. Rul. 2023-14) Cost basis = FMV at time of receipt (or $0 if worthless) EOF } cmd_performance() { cat << 'EOF' # Crypto Tax Optimization ## Tax Loss Harvesting Strategy: Sell positions at a loss to offset capital gains No wash sale rule for crypto (as of 2024): Buy back immediately Example: Gain from selling ETH: +$10,000 Sell LINK at loss: -$3,000, immediately rebuy LINK Net taxable gain: $7,000 (saved ~$1,050 at 15% rate) Capital loss deduction: Up to $3,000/year against ordinary income Excess losses: Carry forward to future years (unlimited) Best timing: December (maximize current-year deductions) ## Long-Term vs Short-Term Planning Short-term rate: Up to 37% (ordinary income) Long-term rate: 0% (<$47K), 15% ($47K-$518K), 20% (>$518K) + 3.8% NIIT Strategy: Hold >1 year whenever possible = save 17-20% in taxes Net Investment Income Tax (NIIT): Additional 3.8% above $200K/$250K ## Batch Transaction Processing Problem: Thousands of DeFi transactions to categorize Solution: Automated tax software (see migration section) Approach: 1. Connect all exchange accounts via API 2. Import on-chain transactions via wallet address 3. Software auto-categorizes (trade, income, transfer, etc.) 4. Review flagged/uncertain transactions manually 5. Generate Form 8949 and Schedule D ## Donation Strategy Donate appreciated crypto directly to charity Deduct fair market value (if held >1 year) No capital gains tax on the appreciation Example: Bought BTC at $10K, now worth $50K Sell and donate cash: Pay $6K tax on $40K gain, donate $44K Donate BTC directly: Deduct full $50K, pay $0 capital gains tax Limits: Deduction capped at 30% of AGI for appreciated property EOF } cmd_security() { cat << 'EOF' # Tax Record-Keeping & Audit Preparation ## Record-Keeping Requirements What to keep for every transaction: - Date and time (UTC or local timezone, be consistent) - Type of transaction (buy, sell, swap, transfer, income) - Amount of crypto (to 8+ decimal places) - Fair market value in USD at time of transaction - Cost basis and acquisition date - Fees paid (trading fees, gas fees, withdrawal fees) - Exchange or platform name - Transaction hash (for on-chain transactions) Retention: IRS can audit 3 years (6 years if >25% understatement) Keep records indefinitely if you don't file (no statute of limitations) ## Audit Preparation Triggers for crypto audit: - Large unreported gains - Inconsistency between 1099 and Form 8949 - Exchange reporting (1099-B/1099-MISC) doesn't match your filing - John Doe summons (IRS served to Coinbase, Kraken, Circle) Prepare: - Complete transaction history with cost basis calculations - Matching between exchange records and tax forms - Supporting documents for claimed losses - Proof of holding period for long-term treatment ## Statute of Limitations Standard: 3 years from filing date (or due date, whichever is later) Substantial understatement (>25%): 6 years Fraud or non-filing: No limit Foreign account reporting (FBAR): 6 years Best practice: Keep records for at least 7 years ## International Reporting FBAR: Report foreign exchange accounts >$10K aggregate (FinCEN 114) FATCA: Form 8938 if foreign financial assets >$50K/$200K Does crypto on foreign exchange count? IRS position unclear but trending yes Penalties: $10K-$100K per violation for FBAR non-compliance EOF } cmd_migration() { cat << 'EOF' # Tax Software & Migration ## Spreadsheet → Tax Software Migration Popular crypto tax platforms: Koinly: Supports 800+ exchanges, DeFi, NFTs. From $49/year. CoinTracker: Clean UI, Coinbase integration. From $59/year. TokenTax: Full service option with CPA review. From $65/year. TaxBit: Enterprise-grade, free for basic. Powers TurboTax Crypto. CryptoTaxCalculator: Australian-based, good DeFi support. From $49/year. ZenLedger: DeFi focus, integrates with TurboTax. From $49/year. Migration steps: 1. Export all trades from exchanges (CSV or API connection) 2. Import wallet addresses for on-chain transactions 3. Review auto-categorization (transfers vs trades) 4. Fix missing cost basis (manual entry or blockchain lookup) 5. Choose cost basis method (FIFO/LIFO/HIFO) 6. Generate tax forms (Form 8949, Schedule D, international forms) ## Exchange Export Formats Coinbase: CSV (Reports → Tax Reports → Generate report) Binance: CSV (Orders → Spot Order → Trade History → Export) Kraken: CSV (History → Export → Trades) Gemini: CSV (Account → Statements → Transaction History) API method: Most tax software can read directly via read-only API key On-chain: Enter wallet address — software reads blockchain ## TurboTax / Tax Preparer Integration TurboTax: Direct import from CoinTracker, TaxBit H&R Block: CSV upload of Form 8949 data CPA: Provide generated 8949 in CSV or PDF format Important: Give CPA your methodology memo (which cost basis method) ## Year-End Tax Planning Checklist [ ] Export all exchange trade history [ ] Reconcile wallet-to-wallet transfers (not taxable) [ ] Calculate unrealized gains/losses [ ] Execute tax loss harvesting before Dec 31 [ ] Verify staking/mining income recorded as ordinary income [ ] Check if any positions qualify for long-term treatment [ ] Confirm FBAR filing requirement if foreign exchange [ ] Generate Form 8949 draft for review EOF } cmd_cheatsheet() { cat << 'EOF' # Crypto Tax Quick Reference ## 2024 US Tax Rate Brackets (Single) Short-term (= ordinary income): 10%: $0 - $11,600 12%: $11,601 - $47,150 22%: $47,151 - $100,525 24%: $100,526 - $191,950 32%: $191,951 - $243,725 35%: $243,726 - $609,350 37%: $609,351+ Long-term capital gains: 0%: $0 - $47,025 15%: $47,026 - $518,900 20%: $518,901+ +3.8% NIIT above $200K (single) / $250K (married) ## Form 8949 Fields Part I: Short-term (held ≤1 year) Part II: Long-term (held >1 year) Box A: Reported to IRS on 1099-B (basis reported) Box B: Reported to IRS on 1099-B (basis NOT reported) Box C: NOT reported to IRS on 1099-B ## Key Dates April 15: Tax filing deadline (or October 15 with extension) January 31: Exchanges issue 1099 forms March 15: FBAR calendar-year filing (extended to October 15) December 31: Last day for tax loss harvesting in current year ## Taxable vs Non-Taxable Quick Check Taxable: Sell, swap, spend, mine, stake rewards, airdrops, LP rewards Non-taxable: Buy with fiat, transfer between own wallets, hold, gift (<$18K) Debatable: Wrap/unwrap, bridge transfers, LP deposit/withdrawal ## Cost Basis Calculation Cost basis = Purchase price + Fees (trading + gas) Gain/Loss = Proceeds - Cost basis Example: Buy 1 ETH @ $3,000 + $5 gas = $3,005 cost basis Sell 1 ETH @ $4,000 - $3 gas = $3,997 proceeds Capital gain = $3,997 - $3,005 = $992 EOF } cmd_faq() { cat << 'EOF' # Crypto Tax — FAQ Q: Do I need to report crypto if I didn't sell? A: If you ONLY bought and held (no selling, swapping, spending), you still must answer "Yes" to the crypto question on Form 1040 but have no taxable event to report. If you received staking rewards or airdrops, those are ordinary income even if you didn't sell. Q: What if I lost money on crypto? A: Capital losses offset capital gains dollar-for-dollar. Excess losses deduct up to $3,000/year against ordinary income. Remaining losses carry forward to future years (no limit). Keep records of worthless tokens — you may need to "abandon" them. Q: Are gas fees tax-deductible? A: Gas fees on purchases: Add to cost basis (reduces future gain). Gas fees on sales: Reduce proceeds (reduces current gain). Gas fees for DeFi activities: Treatment depends on the activity. Gas fees not directly tied to a transaction: May not be deductible. Keep records of all gas fees — they add up significantly. Q: How does the IRS know about my crypto? A: Exchanges report to IRS via 1099-B (starting 2025 with 1099-DA). IRS has served summons to Coinbase, Kraken, Circle for user data. Chain analytics firms (Chainalysis) work with IRS to trace on-chain. The IRS crypto unit has grown significantly since 2020. Voluntary compliance is strongly recommended. Q: Is moving crypto between my own wallets taxable? A: No. Same-person transfers are not taxable events. BUT you must be able to prove both wallets are yours. Problem: Tax software may flag wallet-to-wallet as a sale. Fix: Manually tag these as "transfers" in your tax software. Keep records showing wallet addresses you control. EOF } cmd_help() { echo "crypto-tax-calc v$VERSION — Cryptocurrency Tax Reference" echo "" echo "Usage: crypto-tax-calc <command>" echo "" echo "Commands:" echo " intro Taxable events, tax categories, IRS guidance" echo " standards Cost basis methods, Form 8949, reporting" echo " troubleshooting Missing basis, DeFi categorization, wash sales" echo " performance Tax loss harvesting, donation strategy" echo " security Record-keeping, audit preparation, FBAR" echo " migration Spreadsheet→tax software, exchange exports" echo " cheatsheet Tax brackets, form fields, key dates" echo " faq Reporting requirements, gas fees, IRS tracking" echo " help Show this help" } case "-help" in intro) cmd_intro ;; standards) cmd_standards ;; troubleshooting) cmd_troubleshooting ;; performance) cmd_performance ;; security) cmd_security ;; migration) cmd_migration ;; cheatsheet) cmd_cheatsheet ;; faq) cmd_faq ;; help|--help|-h) cmd_help ;; *) echo "Unknown: $1"; echo "Run: crypto-tax-calc help" ;; esac
DEX aggregation reference — routing algorithms, 1inch Fusion mode, CowSwap batch auctions, sandwich attack protection, and swap API endpoints
--- name: "dex-aggregator" version: "4.0.0" description: "DEX aggregation reference — routing algorithms, 1inch Fusion mode, CowSwap batch auctions, sandwich attack protection, and swap API endpoints" author: "BytesAgain" homepage: "https://bytesagain.com" source: "https://github.com/bytesagain/ai-skills" tags: [dex, swap, 1inch, uniswap, defi] category: "blockchain" --- # Dex Aggregator DEX aggregation reference — routing algorithms, 1inch Fusion mode, CowSwap batch auctions, sandwich attack protection, and swap API endpoints. No API keys or credentials required — outputs reference documentation only. ## Commands | Command | Description | |---------|-------------| | `intro` | Aggregator mechanics, major platforms | | `standards` | 1inch Fusion, 0x RFQ, CowSwap batches | | `troubleshooting` | Reverted transactions, approvals, price impact | | `performance` | Split ratios, gas estimation, private pools | | `security` | Approvals, front-running, token risks | | `migration` | CEX to DEX, single-DEX to aggregator, cross-chain | | `cheatsheet` | API endpoints, chain IDs, router addresses | | `faq` | Fees, safety, savings, integration | ## Output Format All commands output plain-text reference documentation via heredoc. No external API calls, no credentials needed, no network access. --- *Powered by BytesAgain | bytesagain.com | [email protected]* FILE:scripts/script.sh #!/usr/bin/env bash # dex-aggregator — DEX Aggregation Reference set -euo pipefail VERSION="4.0.0" cmd_intro() { cat << 'EOF' # DEX Aggregation — Overview ## What is a DEX Aggregator? A DEX aggregator sources liquidity from multiple decentralized exchanges to find the optimal swap route for a given trade. Instead of using one DEX, the aggregator splits and routes your order across multiple pools. ## How Routing Works 1. Query prices from all supported DEXs simultaneously 2. Calculate all possible routes (direct, multi-hop, split) 3. Account for gas costs of each route 4. Select route with best net output (after gas and fees) 5. Execute swap(s) in a single transaction Example route for 100 ETH → USDC: 30 ETH via Uniswap V3 (0.3% pool) → 60,300 USDC 50 ETH via Uniswap V3 (0.05% pool) → 100,450 USDC 20 ETH via Curve tricrypto → 40,180 USDC Total: 200,930 USDC (vs 198,500 on single DEX = 1.2% better) ## Major Aggregators 1inch: Most popular, Fusion mode for gasless swaps, Pathfinder algorithm 0x/Matcha: RFQ system for professional market makers, gasless API Paraswap: MultiPath algorithm, augustusSwapper contract, gas refund CowSwap: Batch auctions, MEV protection, surplus to users, CoW Protocol Jupiter: Solana's dominant aggregator, Limit orders, DCA, Perps KyberSwap: Dynamic trade routing, elastic pools, cross-chain ODOS: Smart Order Routing with multi-input tokens ## Aggregator vs Direct DEX Aggregator advantages: - Better price (sourcing from all liquidity) - Lower slippage (splitting across pools) - MEV protection (some aggregators) - Gas optimization (batching multiple swaps) Direct DEX advantages: - Simpler (single contract interaction) - Known slippage (no routing complexity) - Lower gas for small trades (no router overhead) Rule: Use aggregator for trades >$1,000, direct DEX for small amounts EOF } cmd_standards() { cat << 'EOF' # Aggregator Protocol Standards ## 1inch Fusion Mode Gasless swaps: User signs order off-chain, resolvers execute on-chain Dutch auction: Price starts favorable, decreases until resolver fills MEV protection: Resolvers compete, MEV goes to user as better price No gas required: Resolver pays gas, deducted from trade output Architecture: User → Sign order → 1inch API → Resolver network → On-chain execution Supported chains: Ethereum, BSC, Polygon, Arbitrum, Optimism, Avalanche ## 0x RFQ (Request For Quote) System Professional market makers provide guaranteed quotes Flow: Request → Market makers bid → Best quote selected → Execute Advantages: No slippage, fixed price guaranteed Used by: Matcha, MetaMask Swaps, Coinbase Wallet, Robinhood Limit orders: Place orders that execute when price reaches target 0x API: api.0x.org — most widely integrated swap API ## CowSwap Batch Auctions CoW (Coincidence of Wants): Match opposing trades directly If Alice sells ETH for USDC and Bob sells USDC for ETH → direct match No AMM needed, no LP fees, no price impact Surplus: If batch settles at better price, surplus goes to user MEV protection: Trades never enter public mempool Architecture: Users → Signed orders → Solvers compete → Best batch wins ## Paraswap MultiPath Algorithm: Find optimal path through any combination of DEXs Augustus Swapper: Modular contract, upgradeable routing logic Gas refund: Paraswap sometimes refunds gas in PSP tokens Price feed: Real-time quotes from 300+ liquidity sources Delta: New routing algorithm with improved path finding EOF } cmd_troubleshooting() { cat << 'EOF' # DEX Aggregator Troubleshooting ## Transaction Reverted: Common Causes "INSUFFICIENT_OUTPUT_AMOUNT": Price moved between quote and execution (slippage exceeded) Fix: Increase slippage tolerance (try 1-3%) For volatile tokens: 3-5% or use limit orders "TRANSFER_FROM_FAILED" or "STF": Token has transfer fee/tax not accounted for Common with: Reflection tokens, rebase tokens, fee-on-transfer Fix: Increase slippage to cover token tax (check tokenomics) Some aggregators have "Fee-on-transfer" toggle "DEADLINE_EXCEEDED" or "EXPIRED": Transaction sat in mempool too long Fix: Increase gas price or set longer deadline (30+ min) Fusion/gasless mode: Resolver didn't fill within deadline "EXECUTION_REVERTED" (generic): Debug: Check transaction on Tenderly for exact revert reason Common: Insufficient approval, paused contract, blacklisted address ## Price Impact Too High Warning: "Price impact >5%" or "High price impact" Cause: Trade size too large relative to pool liquidity Solutions: 1. Split trade manually over time (DCA) 2. Use limit orders (fill over time at target price) 3. Use aggregator's built-in split across more pools 4. Trade on a chain with deeper liquidity ## Approval Issues "Approve token first": Must approve aggregator router to spend tokens Infinite vs exact approval: Infinite: Approve once, trade unlimited times (convenient but risky) Exact: Approve only needed amount each time (safer, extra gas per trade) Stuck approval: If previous approval pending, need to cancel with same nonce Token permit: EIP-2612 tokens support gasless approval via signature EOF } cmd_performance() { cat << 'EOF' # Swap Optimization ## Optimal Split Ratios Why split: Large trades in one pool cause high price impact Aggregator algorithms: Solve optimization problem across all available pools Manual splitting: Trade in chunks of <1% of pool TVL for minimal impact Example for $500K swap: Single pool (TVL $10M): ~5% price impact Split 50/50 across two pools: ~2.5% each = less total impact Aggregator optimal: May find 60/25/15 split = even less impact ## Gas Estimation Accuracy Aggregator quotes include estimated gas cost Actual gas may differ: ±10-20% due to state changes Multi-hop trades: Each hop ~100-150K gas Approval transaction: ~46K gas (one-time per token per router) Tips: - Simple swap (1 hop): ~150K gas - 2-hop route: ~250K gas - Split across 3 pools: ~350K gas - Check if better route saves more than extra gas costs ## Partial Fill Strategies Some aggregators support partial fills: 1inch Limit Order: Can be partially filled by resolvers CowSwap: Batch may partially fill if insufficient counterparty 0x RFQ: Usually all-or-nothing Benefits: Get some execution even in thin markets Risk: Remaining unfilled amount needs separate execution ## Private Transaction Pools Problem: Public mempool exposes pending trades to MEV bots Solutions: Flashbots Protect: Submit via private mempool MEV Blocker: rpc.mevblocker.io custom RPC 1inch Fusion: Resolver executes, never hits public mempool CowSwap: Off-chain order book, batch auction Setup: Add private RPC to MetaMask → Settings → Networks → RPC URL Trade-off: Private txs may take slightly longer to confirm EOF } cmd_security() { cat << 'EOF' # Aggregator Security ## Approval Management Infinite Approval Risk: If router contract is compromised → attacker can drain all approved tokens Historical incidents: Multichain (2022), Badger DAO (2021) Best Practice: - Use exact approval amounts when possible - Periodically revoke unused approvals (revoke.cash) - Only approve to audited, well-known router contracts - Check approval transaction before signing (verify spender address) Permit2 (Uniswap): Single approval to Permit2 contract, then per-trade signatures Time-limited: Set expiration on each trade approval Batch revoke: Revoke Permit2 once instead of per-token Adopted by: Uniswap, 1inch, and others ## Front-Running Protection Sandwich attack mechanics: Attacker sees pending swap → buys token → your swap executes → attacker sells You get worse price, attacker profits difference Protection layers: 1. Private transaction submission (Flashbots, MEV Blocker) 2. Tight slippage settings (0.5-1%) 3. Gasless/off-chain aggregators (1inch Fusion, CowSwap) 4. Time-weighted average price (TWAP) for large orders ## Token Contract Risks Before swapping unknown tokens, check: 1. Is contract verified on Etherscan? (Unverified = red flag) 2. Can owner pause/blacklist transfers? (Centralization risk) 3. Are there hidden fees? (Buy/sell tax in transfer function) 4. Is it a proxy contract? (Implementation can be changed) 5. Check on: tokensniffer.com, gopluslabs.io, de.fi/scanner ## Router Contract Security Only interact with official router addresses: 1inch v5: 0x1111111254EEB25477B68fb85Ed929f73A960582 Uniswap V3: 0xE592427A0AEce92De3Edee1F18E0157C05861564 0x Exchange: 0xDef1C0ded9bec7F1a1670819833240f027b25EfF Paraswap v5: 0xDEF171Fe48CF0115B1d80b88dc8eAB59176FEe57 Verify by checking official documentation, not just Google results Phishing: Fake aggregator sites use similar-looking domains EOF } cmd_migration() { cat << 'EOF' # Migration Guide ## CEX → DEX Transition Why switch: - Self-custody (not your keys, not your coins) - No KYC requirement (privacy) - Access to long-tail tokens not listed on CEXs - 24/7 availability (no maintenance windows) Steps: 1. Set up non-custodial wallet (MetaMask, Rabby, or hardware wallet) 2. Withdraw funds from CEX to your wallet 3. Choose an aggregator (1inch, CowSwap, Paraswap) 4. Approve tokens for the router contract 5. Start with small test swap 6. Set appropriate slippage (0.5% for majors, 1-3% for small caps) CEX advantages you'll lose: - Limit orders (some aggregators now support this) - Margin/leverage (use perp DEXs: GMX, dYdX, Hyperliquid) - Fiat on/off-ramp (use MoonPay, Transak, or CEX for fiat only) ## Single-DEX → Aggregator Before: Always swap on Uniswap directly After: Use aggregator to get best price across all DEXs Result: Typically 0.5-3% better execution on mid-size trades No downside for large trades (aggregator always checks direct route too) Setup: Just use aggregator interface instead of DEX directly API integration: Replace Uniswap router calls with 0x/1inch API calls ## Cross-Chain Swapping Problem: Assets on Ethereum, want to swap on Arbitrum Solutions: 1. Bridge first, then swap (two steps, more control) 2. Cross-chain aggregators: LI.FI, Socket, Squid Router 3. Intent-based: Across Protocol, deBridge LI.FI: Aggregates bridges + DEXs in single transaction API: li.fi/v1/quote?fromChain=1&toChain=42161&fromToken=ETH&toToken=USDC Risk: Cross-chain swaps involve bridge risk (added smart contract exposure) EOF } cmd_cheatsheet() { cat << 'EOF' # DEX Aggregator Quick Reference ## API Endpoints 1inch: https://api.1inch.dev/swap/v5.2/{chainId}/swap 0x: https://api.0x.org/swap/v1/quote Paraswap: https://apiv5.paraswap.io/prices CowSwap: https://api.cow.fi/mainnet/api/v1/quote Jupiter: https://quote-api.jup.ag/v6/quote LI.FI: https://li.quest/v1/quote ## Common Swap Parameters fromToken: Token address to sell (or "ETH" for native) toToken: Token address to buy amount: Amount in smallest unit (wei for ETH = amount × 10^18) slippage: Tolerance in percentage (1 = 1%) fromAddress: Your wallet address (for gas estimation) deadline: Unix timestamp for transaction expiry ## Chain IDs Ethereum: 1 Arbitrum: 42161 Optimism: 10 Polygon: 137 BSC: 56 Avalanche: 43114 Base: 8453 zkSync: 324 Fantom: 250 Solana: (not EVM, different APIs) ## Token Approval Commands (ethers.js) // Check current allowance const allowance = await token.allowance(owner, spenderAddress); // Approve exact amount await token.approve(spenderAddress, amount); // Approve unlimited (use with caution) await token.approve(spenderAddress, ethers.MaxUint256); // Revoke approval await token.approve(spenderAddress, 0); ## Popular Router Addresses (Ethereum) 1inch v5: 0x1111111254EEB25477B68fb85Ed929f73A960582 Uniswap V3: 0xE592427A0AEce92De3Edee1F18E0157C05861564 Uniswap Universal: 0x3fC91A3afd70395Cd496C647d5a6CC9D4B2b7FAD 0x Exchange: 0xDef1C0ded9bec7F1a1670819833240f027b25EfF Paraswap Augustus: 0xDEF171Fe48CF0115B1d80b88dc8eAB59176FEe57 CowSwap Vault: 0xC92E8bdf79f0507f65a392b0ab4667716BFE0110 Permit2: 0x000000000022D473030F116dDEE9F6B43aC78BA3 EOF } cmd_faq() { cat << 'EOF' # DEX Aggregator — FAQ Q: Do aggregators charge extra fees? A: Most aggregators are free for basic swaps (they earn from positive slippage). 1inch: Free API, Fusion has no gas cost, may take small spread. 0x: Free API for DeFi, paid for commercial use (0x pricing page). CowSwap: No fees, protocol earns from batch surplus. Paraswap: Free, earns from positive slippage and PSP token utility. Some charge API fees for high-volume commercial integrations. Q: Is it safe to use DEX aggregators? A: Major aggregators (1inch, 0x, CowSwap, Paraswap) are audited. Risk: Smart contract bug in router contract (rare but happened). Risk: Approving tokens to compromised contract. Mitigation: Use exact approvals, revoke when done, stick to major ones. Never interact with aggregator links from Discord DMs or random tweets. Q: Why did my swap give me less than quoted? A: Price moved between quote and execution (especially in volatile markets). Slippage: You set 1% tolerance, price moved 0.8% → you got less. MEV: Sandwich attack extracted value (use private transactions). Gas: Quote doesn't always reflect actual gas cost perfectly. Check: Compare actual output vs minimum output in transaction details. Q: How do I integrate a DEX aggregator into my app? A: Easiest: Use 0x API or 1inch API (most documentation, SDKs). Steps: 1) Get API key, 2) Fetch quote, 3) Build transaction, 4) Send. SDKs: @0x/swap-sdk (JS), 1inch SDK, paraswap-sdk. Important: Handle approval flow before swap transaction. Test on testnet first (Goerli/Sepolia supported by most). Q: Aggregator vs Uniswap directly — real savings? A: Small trades (<$500): Usually same or within $1 difference. Medium ($500-$50K): Aggregator typically 0.3-1.5% better. Large ($50K+): Aggregator significantly better (split orders). Exotic tokens: Aggregator finds routes you wouldn't find manually. Always compare: Check both and use whichever gives better output. EOF } cmd_help() { echo "dex-aggregator v$VERSION — DEX Aggregation Reference" echo "" echo "Usage: dex-aggregator <command>" echo "" echo "Commands:" echo " intro Aggregator mechanics, major platforms" echo " standards 1inch Fusion, 0x RFQ, CowSwap batches" echo " troubleshooting Reverted transactions, approvals, price impact" echo " performance Split ratios, gas estimation, private pools" echo " security Approvals, front-running, token risks" echo " migration CEX→DEX, single-DEX→aggregator, cross-chain" echo " cheatsheet API endpoints, chain IDs, router addresses" echo " faq Fees, safety, savings, integration" echo " help Show this help" } case "-help" in intro) cmd_intro ;; standards) cmd_standards ;; troubleshooting) cmd_troubleshooting ;; performance) cmd_performance ;; security) cmd_security ;; migration) cmd_migration ;; cheatsheet) cmd_cheatsheet ;; faq) cmd_faq ;; help|--help|-h) cmd_help ;; *) echo "Unknown: $1"; echo "Run: dex-aggregator help" ;; esac
Reference tool for devtools — covers intro, formulas, regulations and more. Quick lookup for Onchain Analyzer concepts, best practices, and implementation pa...
--- name: "onchain-analyzer" version: "4.0.1" description: "Reference tool for devtools — covers intro, formulas, regulations and more. Quick lookup for Onchain Analyzer concepts, best practices, and implementation pa..." author: "BytesAgain" homepage: "https://bytesagain.com" source: "https://github.com/bytesagain/ai-skills" tags: [onchain,analyzer, reference] category: "devtools" --- # Onchain Analyzer Reference tool for devtools — covers intro, formulas, regulations and more. Quick lookup for Onchain Analyzer concepts, best practices, and implementation pa... No API keys or credentials required. ## Commands | Command | Description | |---------|-------------| | `intro` | intro reference | | `formulas` | formulas reference | | `regulations` | regulations reference | | `risks` | risks reference | | `instruments` | instruments reference | | `strategies` | strategies reference | | `glossary` | glossary reference | | `checklist` | checklist reference | ## Output Format All commands output plain-text reference documentation via heredoc. No external API calls, no credentials needed, no network access. --- *Powered by BytesAgain | bytesagain.com | [email protected]* FILE:scripts/script.sh #!/usr/bin/env bash # onchain-analyzer — Onchain Analyzer reference tool. Use when working with onchain analyzer in blockchain contexts. # Powered by BytesAgain | bytesagain.com | [email protected] set -euo pipefail VERSION="4.0.0" show_help() { cat << 'HELPEOF' onchain-analyzer v$VERSION — Onchain Analyzer Reference Tool Usage: onchain-analyzer <command> Commands: intro Overview and fundamentals formulas Key formulas and calculations regulations Regulatory framework and compliance risks Risk factors and mitigation instruments Instruments and tools overview strategies Common strategies and approaches glossary Key terms and definitions checklist Due diligence checklist help Show this help version Show version Powered by BytesAgain | bytesagain.com HELPEOF } cmd_intro() { cat << 'EOF' # Onchain Analyzer — Overview ## What is Onchain Analyzer? Onchain Analyzer (onchain-analyzer) is a specialized tool/concept in the blockchain domain. It provides essential capabilities for professionals working with onchain analyzer. ## Key Concepts - Core onchain analyzer principles and fundamentals - How onchain analyzer fits into the broader blockchain ecosystem - Essential terminology every practitioner should know ## Why Onchain Analyzer Matters Understanding onchain analyzer is critical for: - Improving efficiency in blockchain workflows - Reducing errors and downtime - Meeting industry standards and compliance requirements - Enabling better decision-making with accurate data ## Getting Started 1. Understand the basic onchain analyzer concepts 2. Learn the standard tools and interfaces 3. Practice with common scenarios 4. Review safety and compliance requirements EOF } cmd_formulas() { cat << 'EOF' # Onchain Analyzer — Key Formulas & Calculations ## Core Formulas - **Basic ratio**: Value = Input / Reference × 100 - **Growth rate**: (Current - Previous) / Previous × 100% - **Weighted average**: Sum(Value × Weight) / Sum(Weight) ## Common Calculations 1. Risk-adjusted return 2. Break-even analysis 3. Compound growth 4. Present/future value 5. Standard deviation ## Quick Reference | Metric | Formula | Use Case | |--------|---------|----------| | ROI | (Gain - Cost) / Cost | Investment evaluation | | CAGR | (End/Start)^(1/n) - 1 | Growth measurement | | Sharpe | (Return - RiskFree) / StdDev | Risk-adjusted performance | EOF } cmd_regulations() { cat << 'EOF' # Onchain Analyzer — Regulatory Framework ## Key Regulations - Primary governing laws and statutes - Industry-specific compliance requirements - International standards and agreements ## Compliance Requirements - Registration and licensing - Reporting obligations - Record-keeping requirements - Audit and inspection readiness ## Enforcement - Regulatory bodies and their jurisdiction - Penalty structures for non-compliance - Appeal and dispute resolution processes EOF } cmd_risks() { cat << 'EOF' # Onchain Analyzer — Risk Analysis ## Risk Categories 1. **Market Risk**: Price volatility and liquidity 2. **Operational Risk**: System failures and human error 3. **Regulatory Risk**: Changing laws and compliance 4. **Credit Risk**: Counterparty default ## Risk Mitigation - Diversification strategies - Hedging instruments - Insurance and guarantees - Contingency planning ## Risk Assessment Framework | Risk | Probability | Impact | Mitigation | |------|-------------|--------|------------| | High | Likely | Severe | Immediate action | | Medium | Possible | Moderate | Monitor closely | | Low | Unlikely | Minor | Accept or transfer | EOF } cmd_instruments() { cat << 'EOF' # Onchain Analyzer — Instruments & Tools Overview ## Primary Instruments - Core tools used in onchain analyzer operations - Measurement and monitoring equipment - Software platforms and applications ## Selection Guide 1. Define requirements and constraints 2. Evaluate available options 3. Consider total cost of ownership 4. Assess vendor support and community 5. Test before committing EOF } cmd_strategies() { cat << 'EOF' # Onchain Analyzer — Common Strategies ## Fundamental Strategies 1. **Conservative**: Low risk, steady returns 2. **Balanced**: Moderate risk, diversified approach 3. **Aggressive**: Higher risk, growth-focused ## Implementation Steps 1. Define objectives and constraints 2. Select appropriate strategy 3. Execute with discipline 4. Monitor and adjust 5. Review periodically EOF } cmd_glossary() { cat << 'EOF' # Onchain Analyzer — Key Terms & Definitions ## Core Terminology - **Onchain Analyzer**: The primary subject of this reference - **blockchain**: The broader domain category - **Baseline**: A reference point for comparison - **Benchmark**: A standard for measuring performance - **Compliance**: Adherence to rules and standards - **Configuration**: System settings and parameters - **Diagnostics**: Tools and procedures for identifying issues - **Integration**: Connecting multiple systems together - **Protocol**: A set of rules governing communication - **Specification**: Detailed requirements document EOF } cmd_checklist() { cat << 'EOF' # Onchain Analyzer — Inspection Checklist ## Pre-Operation Checklist - [ ] Visual inspection completed - [ ] All connections secure - [ ] Safety systems functional - [ ] Operating parameters within range - [ ] Documentation current ## Daily Checks - [ ] System startup normal - [ ] No error indicators or alarms - [ ] Performance within expected range - [ ] Environmental conditions acceptable - [ ] Log entries reviewed ## Periodic Inspection - [ ] Comprehensive system test - [ ] Calibration verification - [ ] Wear component inspection - [ ] Firmware/software version check - [ ] Backup systems tested ## Shutdown Checklist - [ ] Proper shutdown sequence followed - [ ] All data saved and backed up - [ ] System secured - [ ] Maintenance items logged - [ ] Next startup requirements noted EOF } CMD="-help" shift 2>/dev/null || true case "$CMD" in intro) cmd_intro "$@" ;; formulas) cmd_formulas "$@" ;; regulations) cmd_regulations "$@" ;; risks) cmd_risks "$@" ;; instruments) cmd_instruments "$@" ;; strategies) cmd_strategies "$@" ;; glossary) cmd_glossary "$@" ;; checklist) cmd_checklist "$@" ;; help|--help|-h) show_help ;; version|--version|-v) echo "onchain-analyzer v$VERSION — Powered by BytesAgain" ;; *) echo "Unknown: $CMD"; echo "Run: onchain-analyzer help"; exit 1 ;; esac
Scan new meme coins for risks and opportunities — honeypot detection, liquidity analysis, holder concentration.
--- version: "2.0.0" name: Meme Coin Scanner description: "Scan new meme coins for risks and opportunities — honeypot detection, liquidity analysis, holder concentration." author: BytesAgain homepage: https://bytesagain.com source: https://github.com/bytesagain/ai-skills --- # Meme Coin Scanner Detect scams and find gems in the meme coin market. ## Commands ```bash bash scripts/meme.sh scan <token_address> [chain] # Deep scan a token bash scripts/meme.sh new [chain] # New token listings bash scripts/meme.sh trending # Trending meme coins bash scripts/meme.sh checklist # Safety checklist ``` ## Risk Indicators - 🔴 **Honeypot**: Can't sell after buying - 🔴 **Rug Pull**: Dev can drain liquidity - 🟡 **High Tax**: >10% buy/sell tax - 🟡 **Concentrated**: Top holder >20% supply - 🟢 **Locked LP**: Liquidity locked >6 months - 🟢 **Renounced**: Ownership given up ## Safety First 1. Never invest more than you can afford to lose 2. Always check contract before buying 3. Start with tiny amounts to test selling 4. Verify on multiple scanners (TokenSniffer, GoPlus) --- 💬 Feedback & Feature Requests: https://bytesagain.com/feedback Powered by BytesAgain | bytesagain.com ## Requirements - bash 4+ - python3 (standard library only) FILE:scripts/meme.sh #!/usr/bin/env bash # Meme Coin Scanner — Detect scams and analyze new tokens set -euo pipefail COMMAND="-help"; shift 2>/dev/null || true DATA_DIR="HOME/.meme-scanner"; mkdir -p "$DATA_DIR" case "$COMMAND" in scan) TOKEN="-"; CHAIN="-ethereum" python3 << 'PYEOF' import sys, os, json, time try: from urllib2 import urlopen, Request except ImportError: from urllib.request import urlopen, Request token = sys.argv[1] if len(sys.argv) > 1 else "" chain = sys.argv[2] if len(sys.argv) > 2 else "ethereum" if not token: print("Usage: bash meme.sh scan <token_address> [chain]") print("Chains: ethereum, bsc, polygon, arbitrum, base, solana") sys.exit(1) chain_ids = {"ethereum": "ethereum", "bsc": "bsc", "polygon": "polygon", "arbitrum": "arbitrum", "base": "base", "solana": "solana"} chain_id = chain_ids.get(chain, chain) print("=" * 65) print("MEME COIN SECURITY SCAN") print("=" * 65) print("") print("Token: {}".format(token)) print("Chain: {}".format(chain)) print("Time: {}".format(time.strftime("%Y-%m-%d %H:%M"))) print("") # Try DexScreener for basic info try: url = "https://api.dexscreener.com/latest/dex/tokens/{}".format(token) req = Request(url) req.add_header("User-Agent", "MemeCoinScanner/1.0") resp = urlopen(req, timeout=15) data = json.loads(resp.read().decode("utf-8")) pairs = data.get("pairs", []) if pairs: pair = pairs[0] base = pair.get("baseToken", {}) quote = pair.get("quoteToken", {}) print("TOKEN INFO:") print(" Name: {}".format(base.get("name", "?"))) print(" Symbol: {}".format(base.get("symbol", "?"))) print(" Address: {}".format(base.get("address", "?"))) print("") price = pair.get("priceUsd", "?") print("PRICE DATA:") print(" Current: ${}".format(price)) price_change = pair.get("priceChange", {}) for period in ["m5", "h1", "h6", "h24"]: pct = price_change.get(period, 0) if pct: direction = "+" if float(pct) > 0 else "" print(" {}: {}{}%".format(period, direction, pct)) print("") print("LIQUIDITY:") liq = pair.get("liquidity", {}) liq_usd = liq.get("usd", 0) print(" Total: ${:,.0f}".format(liq_usd) if liq_usd else " Total: Unknown") vol = pair.get("volume", {}) vol_24h = vol.get("h24", 0) print(" 24h Volume: ${:,.0f}".format(vol_24h) if vol_24h else " 24h Volume: Unknown") txns = pair.get("txns", {}) h24 = txns.get("h24", {}) buys = h24.get("buys", 0) sells = h24.get("sells", 0) print(" 24h Txns: {} buys / {} sells".format(buys, sells)) if buys > 0 and sells > 0: ratio = buys / sells if ratio > 3: print(" ⚠️ Buy/sell ratio very high ({:.1f}x) — possible bot activity".format(ratio)) elif sells > buys * 3: print(" 🔴 More sells than buys — possible dump in progress") print("") # Risk assessment print("-" * 65) print("RISK ASSESSMENT:") print("-" * 65) risks = [] if liq_usd and liq_usd < 10000: risks.append(("🔴 CRITICAL", "Liquidity under $10K — high rug pull risk")) elif liq_usd and liq_usd < 50000: risks.append(("🟡 WARNING", "Low liquidity under $50K — high slippage")) else: risks.append(("🟢 OK", "Reasonable liquidity")) if vol_24h and liq_usd and vol_24h > liq_usd * 10: risks.append(("🟡 WARNING", "Volume/liquidity ratio very high — volatile")) fdv = pair.get("fdv", 0) if fdv and fdv > 100000000: risks.append(("🟡 WARNING", "FDV over $100M — may be overvalued for a meme coin")) age_str = pair.get("pairCreatedAt", "") if age_str: try: created_ms = int(age_str) age_hours = (time.time() * 1000 - created_ms) / (1000 * 3600) if age_hours < 24: risks.append(("🔴 CRITICAL", "Pair created less than 24h ago ({:.0f}h)".format(age_hours))) elif age_hours < 168: risks.append(("🟡 WARNING", "Pair less than 1 week old ({:.0f}h)".format(age_hours))) else: risks.append(("🟢 OK", "Pair age: {:.0f} days".format(age_hours / 24))) except (ValueError, TypeError): pass for risk_level, msg in risks: print(" {} {}".format(risk_level, msg)) print("") print("EXTERNAL CHECKS (do these manually):") checkers = [ "TokenSniffer: https://tokensniffer.com/token/{}{}".format("" if chain == "ethereum" else chain + "/", token), "GoPlus: https://gopluslabs.io/token-security/{}/{}".format(chain_id, token), "Honeypot.is: https://honeypot.is/?address={}".format(token), "DEXScreener: https://dexscreener.com/{}/{}".format(chain_id, token) ] if chain == "solana": checkers.append("RugCheck: https://rugcheck.xyz/tokens/{}".format(token)) for c in checkers: print(" • {}".format(c)) else: print("No trading pairs found for this token.") print("It may not be listed on any DEX yet, or the address is incorrect.") except Exception as e: print("Error fetching data: {}".format(str(e))) print("DexScreener may be rate limited. Try again in a moment.") print("") print("⚠️ DISCLAIMER: This is not financial advice. Always DYOR.") print(" Start with tiny test amounts before committing real funds.") PYEOF ;; trending) CHAIN="-all" python3 << 'PYEOF' import sys, os, json, time try: from urllib2 import urlopen, Request except ImportError: from urllib.request import urlopen, Request chain = sys.argv[1] if len(sys.argv) > 1 else "all" print("=" * 70) print("TRENDING MEME COINS — {}".format(time.strftime("%Y-%m-%d %H:%M"))) print("=" * 70) print("") try: url = "https://api.dexscreener.com/token-boosts/latest/v1" req = Request(url) req.add_header("User-Agent", "MemeCoinScanner/1.0") resp = urlopen(req, timeout=15) data = json.loads(resp.read().decode("utf-8")) tokens = data if isinstance(data, list) else data.get("tokens", data.get("data", [])) if chain != "all": tokens = [t for t in tokens if chain.lower() in (t.get("chainId", "") or "").lower()] print("{:<4} {:<12} {:<10} {:<15} {:>12}".format("#", "Symbol", "Chain", "Name", "Boost")) print("-" * 60) for i, t in enumerate(tokens[:20], 1): symbol = t.get("tokenAddress", t.get("symbol", "?"))[:11] chain_id = t.get("chainId", "?")[:9] name = (t.get("description", t.get("name", "?")) or "?")[:14] amount = t.get("totalAmount", t.get("amount", 0)) print("{:<4} {:<12} {:<10} {:<15} {:>12}".format(i, symbol, chain_id, name, amount)) print("") print("Note: Boosted tokens have paid for promotion — exercise extra caution!") except Exception as e: print("Error: {}".format(str(e))) print("") print("Alternative: Check trending on") print(" • dexscreener.com/trending") print(" • dextools.io/trending") print(" • birdeye.so/trending (Solana)") PYEOF ;; checklist) python3 << 'PYEOF' print("=" * 60) print("MEME COIN SAFETY CHECKLIST") print("=" * 60) print("") categories = { "Before Buying": [ ("Check contract on block explorer", "CRITICAL"), ("Verify on TokenSniffer (score > 70)", "CRITICAL"), ("Check honeypot.is for sell ability", "CRITICAL"), ("Liquidity locked? (check locker)", "CRITICAL"), ("Ownership renounced?", "HIGH"), ("Top 10 holders < 30% total supply", "HIGH"), ("Contract verified and readable", "HIGH"), ("No mint function", "CRITICAL"), ("No blacklist function", "MEDIUM"), ("Tax < 10% each way", "HIGH") ], "Red Flags": [ ("Dev holds > 10% of supply", "🔴"), ("Liquidity < $10,000", "🔴"), ("Token < 24 hours old", "🔴"), ("No social media presence", "🟡"), ("Copy of another token name", "🟡"), ("Promises guaranteed returns", "🔴"), ("Telegram/Discord admin-only posting", "🟡"), ("No website or one-page site", "🟡") ], "After Buying": [ ("Set stop-loss mentally", "HIGH"), ("Take profit in stages (25/25/25/25)", "MEDIUM"), ("Monitor liquidity changes", "HIGH"), ("Watch for large holder sells", "MEDIUM"), ("Don't invest more than 1-2% of portfolio", "HIGH") ] } for cat, items in categories.items(): print("{}:".format(cat)) for item, level in items: print(" [ ] {} [{}]".format(item, level)) print("") print("SAFE APPROACH:") print(" 1. Only risk money you can 100% lose") print(" 2. Test with $10-50 first") print(" 3. If you can't sell the test amount — it's a honeypot") print(" 4. Take initial investment out after 2-3x") print(" 5. Let profits ride with zero risk") PYEOF ;; new) CHAIN="-solana" python3 << 'PYEOF' import sys, json, time try: from urllib2 import urlopen, Request except ImportError: from urllib.request import urlopen, Request chain = sys.argv[1] if len(sys.argv) > 1 else "solana" print("=" * 65) print("NEW TOKEN LISTINGS — {} Chain".format(chain.upper())) print("=" * 65) print("") try: url = "https://api.dexscreener.com/latest/dex/search?q=new%20{}".format(chain) req = Request(url) req.add_header("User-Agent", "MemeCoinScanner/1.0") resp = urlopen(req, timeout=15) data = json.loads(resp.read().decode("utf-8")) pairs = data.get("pairs", []) pairs = [p for p in pairs if chain.lower() in (p.get("chainId", "") or "").lower()] pairs.sort(key=lambda x: x.get("pairCreatedAt", 0) or 0, reverse=True) for i, p in enumerate(pairs[:15], 1): base = p.get("baseToken", {}) name = base.get("name", "?")[:20] symbol = base.get("symbol", "?")[:8] price = p.get("priceUsd", "?") liq = p.get("liquidity", {}).get("usd", 0) vol = p.get("volume", {}).get("h24", 0) liq_str = "${:,.0f}".format(liq) if liq else "?" vol_str = "${:,.0f}".format(vol) if vol else "?" created = p.get("pairCreatedAt", 0) if created: try: age_h = (time.time() * 1000 - int(created)) / (1000 * 3600) age_str = "{:.0f}h ago".format(age_h) if age_h < 48 else "{:.0f}d ago".format(age_h / 24) except (ValueError, TypeError): age_str = "?" else: age_str = "?" warn = "⚠️" if (liq and liq < 10000) else " " print("{}{:>2}. {} ({}) — ${}".format(warn, i, name, symbol, price)) print(" Liq: {} Vol: {} Age: {}".format(liq_str, vol_str, age_str)) print("") except Exception as e: print("Error: {}".format(str(e))) PYEOF ;; help|*) cat << 'HELPEOF' Meme Coin Scanner — Detect scams, analyze new tokens COMMANDS: scan <token_addr> [chain] Deep security scan trending [chain] Trending/boosted tokens new [chain] Newly listed tokens checklist Safety checklist EXAMPLES: bash meme.sh scan 0x1234...abcd ethereum bash meme.sh trending solana bash meme.sh new base bash meme.sh checklist HELPEOF ;; esac echo "" echo "Powered by BytesAgain | bytesagain.com | [email protected]" FILE:scripts/script.sh #!/usr/bin/env bash # meme-coin-scanner - Security scanning and hardening tool set -euo pipefail VERSION="2.0.0" DATA_DIR="-${XDG_DATA_HOME:-$HOME/.local/share/meme-coin-scanner}" DB="$DATA_DIR/data.log" mkdir -p "$DATA_DIR" show_help() { cat << EOF meme-coin-scanner v$VERSION Security scanning and hardening tool Usage: meme-coin-scanner <command> [args] Commands: scan Security scan audit Security audit check Quick check report Generate report harden Hardening guide encrypt Encryption helper hash Hash utility password Password generator compliance Compliance checklist alerts Security alerts help Show this help version Show version Data: \$DATA_DIR EOF } _log() { echo "$(date '+%m-%d %H:%M') $1: $2" >> "$DATA_DIR/history.log"; } cmd_scan() { echo " Scanning for vulnerabilities..." _log "scan" "-" } cmd_audit() { echo " Running audit checklist..." _log "audit" "-" } cmd_check() { echo " Checking: $1" _log "check" "-" } cmd_report() { echo " Security report generated" _log "report" "-" } cmd_harden() { echo " Step 1: Update | Step 2: Firewall | Step 3: Auth" _log "harden" "-" } cmd_encrypt() { echo " Encrypting: $1" _log "encrypt" "-" } cmd_hash() { echo "$1" | sha256sum | cut -d" " -f1 _log "hash" "-" } cmd_password() { python3 << 'PYEOF' import random, string print("".join(random.choices(string.ascii_letters + string.digits + "!@#", k=16))) PYEOF _log "password" "-" } cmd_compliance() { echo " [ ] Access controls | [ ] Encryption | [ ] Logging" _log "compliance" "-" } cmd_alerts() { echo " No active alerts" _log "alerts" "-" } case "-help" in scan) shift; cmd_scan "$@" ;; audit) shift; cmd_audit "$@" ;; check) shift; cmd_check "$@" ;; report) shift; cmd_report "$@" ;; harden) shift; cmd_harden "$@" ;; encrypt) shift; cmd_encrypt "$@" ;; hash) shift; cmd_hash "$@" ;; password) shift; cmd_password "$@" ;; compliance) shift; cmd_compliance "$@" ;; alerts) shift; cmd_alerts "$@" ;; help|-h) show_help ;; version|-v) echo "meme-coin-scanner v$VERSION" ;; *) echo "Unknown: $1"; show_help; exit 1 ;; esac FILE:tips.md # Tips for meme-coin-scanner - Always verify data from multiple sources - API rate limits may apply — space requests - Set environment variables for API keys when available - Data is for informational purposes only, not financial advice
Reference tool for blockchain and crypto — covers intro, quickstart, patterns and more. Quick lookup for Crypto Whale Tracker concepts, best practices, and i...
--- name: "crypto-whale-tracker" version: "4.0.1" description: "Reference tool for blockchain and crypto — covers intro, quickstart, patterns and more. Quick lookup for Crypto Whale Tracker concepts, best practices, and i..." author: "BytesAgain" homepage: "https://bytesagain.com" source: "https://github.com/bytesagain/ai-skills" tags: [crypto,whale,tracker, reference] category: "blockchain" --- # Crypto Whale Tracker Reference tool for blockchain and crypto — covers intro, quickstart, patterns and more. Quick lookup for Crypto Whale Tracker concepts, best practices, and i... No API keys or credentials required. ## Commands | Command | Description | |---------|-------------| | `intro` | intro reference | | `quickstart` | quickstart reference | | `patterns` | patterns reference | | `debugging` | debugging reference | | `performance` | performance reference | | `security` | security reference | | `migration` | migration reference | | `cheatsheet` | cheatsheet reference | ## Output Format All commands output plain-text reference documentation via heredoc. No external API calls, no credentials needed, no network access. --- *Powered by BytesAgain | bytesagain.com | [email protected]* FILE:scripts/script.sh #!/usr/bin/env bash # crypto-whale-tracker — Crypto Whale Tracker reference tool. Use when working with crypto whale tracker in security contexts. # Powered by BytesAgain | bytesagain.com | [email protected] set -euo pipefail VERSION="4.0.0" show_help() { cat << 'HELPEOF' crypto-whale-tracker v$VERSION — Crypto Whale Tracker Reference Tool Usage: crypto-whale-tracker <command> Commands: intro Overview and core concepts quickstart Getting started guide patterns Common patterns and best practices debugging Debugging and troubleshooting performance Performance optimization tips security Security considerations migration Migration and upgrade guide cheatsheet Quick reference cheat sheet help Show this help version Show version Powered by BytesAgain | bytesagain.com HELPEOF } cmd_intro() { cat << 'EOF' # Crypto Whale Tracker — Overview ## What is Crypto Whale Tracker? Crypto Whale Tracker (crypto-whale-tracker) is a specialized tool/concept in the security domain. It provides essential capabilities for professionals working with crypto whale tracker. ## Key Concepts - Core crypto whale tracker principles and fundamentals - How crypto whale tracker fits into the broader security ecosystem - Essential terminology every practitioner should know ## Why Crypto Whale Tracker Matters Understanding crypto whale tracker is critical for: - Improving efficiency in security workflows - Reducing errors and downtime - Meeting industry standards and compliance requirements - Enabling better decision-making with accurate data ## Getting Started 1. Understand the basic crypto whale tracker concepts 2. Learn the standard tools and interfaces 3. Practice with common scenarios 4. Review safety and compliance requirements EOF } cmd_quickstart() { cat << 'EOF' # Crypto Whale Tracker — Quick Start Guide ## Prerequisites - Basic understanding of security concepts - Required tools and access credentials - System meeting minimum requirements ## Installation 1. Download or clone the crypto whale tracker package 2. Install dependencies 3. Configure initial settings 4. Verify installation ## First Steps 1. Run the hello-world example 2. Review the default configuration 3. Try a simple real-world task 4. Explore available commands and options ## Next Steps - Read the full documentation - Join the community forum - Try advanced features - Set up automated workflows EOF } cmd_patterns() { cat << 'EOF' # Crypto Whale Tracker — Common Patterns & Best Practices ## Design Patterns 1. **Standard Pattern**: The most common approach for crypto whale tracker 2. **Scalable Pattern**: For high-volume or distributed scenarios 3. **Resilient Pattern**: For fault-tolerant implementations ## Best Practices - Follow the principle of least privilege - Use version control for all configurations - Implement comprehensive logging - Test changes in staging before production - Document all custom configurations ## Anti-Patterns to Avoid - Hardcoding credentials or configuration - Skipping validation and error handling - Ignoring monitoring and alerting - Making changes without documentation - Over-engineering simple solutions EOF } cmd_debugging() { cat << 'EOF' # Crypto Whale Tracker — Debugging Guide ## Common Errors 1. **Connection refused**: Check service status and network 2. **Permission denied**: Verify credentials and access rights 3. **Timeout**: Check network, increase limits, optimize queries 4. **Invalid input**: Validate data format and encoding ## Debugging Tools - Built-in logging and diagnostics - Network analysis tools (tcpdump, wireshark) - System monitoring (top, htop, iostat) - Application-specific debug modes ## Debug Workflow 1. Reproduce the issue consistently 2. Check logs for error messages 3. Isolate the failing component 4. Test with minimal configuration 5. Apply fix and verify EOF } cmd_performance() { cat << 'EOF' # Crypto Whale Tracker — Performance Optimization ## Key Metrics - Response time / latency - Throughput / operations per second - Resource utilization (CPU, memory, I/O) - Error rate and retry frequency ## Optimization Strategies 1. **Caching**: Reduce redundant operations 2. **Batching**: Group small operations 3. **Indexing**: Speed up data lookups 4. **Compression**: Reduce data transfer size 5. **Parallel Processing**: Utilize multiple cores ## Monitoring - Set up baseline performance metrics - Configure alerts for anomalies - Track trends over time - Regular capacity planning reviews EOF } cmd_security() { cat << 'EOF' # Crypto Whale Tracker — Security Considerations ## Authentication & Authorization - Use strong, unique credentials - Implement role-based access control - Enable multi-factor authentication where possible - Regularly review and rotate credentials ## Data Protection - Encrypt data at rest and in transit - Implement proper backup procedures - Follow data retention policies - Sanitize inputs to prevent injection ## Network Security - Use firewalls and network segmentation - Monitor for suspicious activity - Keep all software patched and updated - Disable unnecessary services and ports EOF } cmd_migration() { cat << 'EOF' # Crypto Whale Tracker — Migration & Upgrade Guide ## Pre-Migration Checklist - [ ] Current system fully documented - [ ] Complete backup taken and verified - [ ] Target environment prepared - [ ] Rollback plan documented - [ ] Stakeholders notified ## Migration Steps 1. Prepare target environment 2. Export data from source 3. Transform data if needed 4. Import to target 5. Verify data integrity 6. Update configurations 7. Test all functionality 8. Switch traffic / go live ## Post-Migration - Monitor for errors and performance - Verify all integrations working - Update documentation - Decommission old system after confirmation EOF } cmd_cheatsheet() { cat << 'EOF' # Crypto Whale Tracker — Quick Reference ## Essential Commands | Command | Description | |---------|-------------| | help | Show available commands | | version | Display version info | | intro | Overview and fundamentals | | troubleshooting | Common problems and fixes | ## Common Workflows 1. **Setup**: install → configure → verify → test 2. **Daily**: check → monitor → report → review 3. **Issue**: diagnose → isolate → fix → verify → document ## Key Shortcuts - Use tab completion for commands - Check logs first when troubleshooting - Always backup before making changes - Document everything you change EOF } CMD="-help" shift 2>/dev/null || true case "$CMD" in intro) cmd_intro "$@" ;; quickstart) cmd_quickstart "$@" ;; patterns) cmd_patterns "$@" ;; debugging) cmd_debugging "$@" ;; performance) cmd_performance "$@" ;; security) cmd_security "$@" ;; migration) cmd_migration "$@" ;; cheatsheet) cmd_cheatsheet "$@" ;; help|--help|-h) show_help ;; version|--version|-v) echo "crypto-whale-tracker v$VERSION — Powered by BytesAgain" ;; *) echo "Unknown: $CMD"; echo "Run: crypto-whale-tracker help"; exit 1 ;; esac