소스 정보
- 저장소
- mylee04/code-notify
- 최근 소스 활동
- 2026년 2월 4일 02:54
- 감지된 SKILL.md 언어
- 영어
- 스타
- 287
- 포크
- 25
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/mylee04/code-notify --skill cross-platform명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SKILL.md 표시 중
SOC 직업 분류 기준
| name | cross-platform |
| description | Cross-platform development patterns for macOS, Windows, and Linux |
detect_os() {
case "$(uname -s)" in
Darwin*) echo "macos" ;;
Linux*)
# Check for WSL
if grep -qi microsoft /proc/version 2>/dev/null; then
echo "wsl"
else
echo "linux"
fi
;;
CYGWIN*|MINGW*|MSYS*) echo "windows" ;;
*) echo "unknown" ;;
esac
}
function Get-Platform {
if ($IsWindows -or $env:OS -eq "Windows_NT") {
return "windows"
} elseif ($IsLinux) {
return "linux"
} elseif ($IsMacOS) {
return "macos"
}
return "unknown"
}
| Platform | Primary | Fallback |
|---|---|---|
| macOS | terminal-notifier | osascript |
| Linux | notify-send | zenity, wall |
| Windows | BurntToast | System.Windows.Forms |
| WSL | wsl-notify-send | notify-send |
send_macos_notification() {
local title="$1"
local message="$2"
if command -v terminal-notifier &> /dev/null; then
terminal-notifier \
-title "$title" \
-message "$message" \
-sound "Glass"
else
osascript -e "display notification \"$message\" with title \"$title\""
fi
}
send_linux_notification() {
local title="$1"
local message="$2"
if command -v notify-send &> /dev/null; then
notify-send "$title" "$message" \
--urgency=normal \
--app-name="Code-Notify"
elif command -v zenity &> /dev/null; then
zenity --notification --text="$title\n$message"
else
echo "[$title] $message" | wall 2>/dev/null
fi
}
function Send-WindowsNotification {
param(
[string]$Title,
[string]$Message
)
if (Get-Module -ListAvailable -Name BurntToast) {
New-BurntToastNotification -Text $Title, $Message
} else {
Add-Type -AssemblyName System.Windows.Forms
$notification = New-Object System.Windows.Forms.NotifyIcon
$notification.Icon = [System.Drawing.SystemIcons]::Information
$notification.BalloonTipTitle = $Title
$notification.BalloonTipText = $Message
$notification.Visible = $true
$notification.ShowBalloonTip(10000)
}
}
send_wsl_notification() {
local title="$1"
local message="$2"
if command -v wsl-notify-send.exe &> /dev/null; then
wsl-notify-send.exe --category "$title" "$message"
else
# Fall back to Linux notification
send_linux_notification "$title" "$message"
fi
}
# Convert Unix path to Windows path (in WSL)
to_windows_path() {
local unix_path="$1"
wslpath -w "$unix_path"
}
# Convert Windows path to Unix path (in WSL)
to_unix_path() {
local win_path="$1"
wslpath -u "$win_path"
}
# Bash
HOME_DIR="$HOME"
# PowerShell
$HomeDir = $env:USERPROFILE
# Works on all platforms
get_project_name() {
local git_root
if git rev-parse --git-dir &> /dev/null; then
git_root=$(git rev-parse --show-toplevel 2>/dev/null)
if [[ -n "$git_root" ]]; then
basename "$git_root"
return 0
fi
fi
basename "$PWD"
}
function Get-ProjectName {
try {
$gitRoot = & git rev-parse --show-toplevel 2>$null
if ($LASTEXITCODE -eq 0 -and $gitRoot) {
return Split-Path $gitRoot -Leaf
}
} catch {
# Not in git repo
}
return Split-Path (Get-Location) -Leaf
}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
# test/test-platform.sh
test_current_platform() {
local os=$(detect_os)
case "$os" in
macos) test_macos_notification ;;
linux) test_linux_notification ;;
wsl) test_wsl_notification ;;
*) echo "Unknown platform: $os" ;;
esac
}
Line Endings: Windows uses CRLF, Unix uses LF
.gitattributes to enforce line endingsPath Separators: Windows uses \, Unix uses /
$HOME instead of hardcoded pathsCase Sensitivity: Windows is case-insensitive
Command Availability: Commands differ by platform
command -v before use