finder-color-walk
Finder Color Walk Skill
от plurigrid★ 73 звезды на GitHub
Установить finder-color-walk в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Finder Color Walk Skill
Status: ✅ Production Ready
Trit: 0 (ERGODIC - coordination)
Principle: Random walk over files → deterministic Finder colors
Integration: Gay.jl colors → macOS Finder labels
Overview
Finder Color Walk traverses directories using deterministic random walks and assigns macOS Finder label colors based on Gay.jl's SplitMix64 color generation. Each file gets a reproducible color from the same seed.
seed → SplitMix64 → hue → Finder label
macOS Finder Label Colors
| Index | Color | Hue Range | Trit | GF(3) Role |
|---|---|---|---|---|
| 0 | None | - | - | Clear |
| 1 | Gray | neutral | 0 | ERGODIC |
| 2 | Green | 120° | 0 | ERGODIC |
| 3 | Purple | 270° | -1 | MINUS |
| 4 | Blue | 240° | -1 | MINUS |
| 5 | Yellow | 60° | 0 | ERGODIC |
| 6 | Orange | 30° | +1 | PLUS |
| 7 | Red | 0° | +1 | PLUS |
Hue to Finder Label Mapping
def hue_to_finder_label(hue: float) -> int:
"""Map Gay.jl hue (0-360°) to Finder label (1-7)."""
if 0 <= hue < 30:
return 7 # Red
elif 30 <= hue < 60:
return 6 # Orange
elif 60 <= hue < 90:
return 5 # Yellow
elif 90 <= hue < 150:
return 2 # Green
elif 150 <= hue < 210:
return 4 # Blue
elif 210 <= hue < 270:
return 4 # Blue
elif 270 <= hue < 330:
return 3 # Purple
else:
return 7 # Red (330-360)
def trit_to_finder_label(trit: int) -> int:
"""Map GF(3) trit to Finder label."""
return {
-1: 4, # MINUS → Blue
0: 2, # ERGODIC → Green
+1: 7, # PLUS → Red
}[trit]
Core Algorithm
from gay import SplitMixTernary
import subprocess
import os
class FinderColorWalk:
"""Random walk over files with Finder color assignment."""
def __init__(self, seed: int, directory: str):
self.gen = SplitMixTernary(seed)
self.directory = directory
self.walk_log = []
def set_finder_label(self, filepath: str, label: int):
"""Set macOS Finder label color (0-7)."""
script = f'''
tell application "Finder"
set theFile to POSIX file "{filepath}" as alias
set label index of theFile to {label}
end tell
'''
subprocess.run(['osascript', '-e', script], check=True)
def color_file(self, filepath: str, index: int) -> dict:
"""Assign color to file based on walk index."""
color = self.gen.color_at(index)
label = hue_to_finder_label(color['H'])
self.set_finder_label(filepath, label)
result = {
'file': filepath,
'index': index,
'color': color,
'finder_label': label,
'trit': color['trit']
}
self.walk_log.append(result)
return result
def walk_directory(self, max_files: int = 100) -> list:
"""Random walk through directory, coloring files."""
files = []
for root, dirs, filenames in os.walk(self.directory):
for f in filenames:
files.append(os.path.join(root, f))
# Shuffle deterministically based on seed
indices = list(range(len(files)))
for i in range(len(indices) - 1, 0, -1):
j = self.gen.next_u64() % (i + 1)
indices[i], indices[j] = indices[j], indices[i]
# Color files in walk order
results = []
for walk_step, file_idx in enumerate(indices[:max_files]):
result = self.color_file(files[file_idx], walk_step)
results.append(result)
return results
def verify_gf3(self) -> bool:
"""Verify GF(3) conservation across walk."""
total = sum(entry['trit'] for entry in self.walk_log)
return total % 3 == 0
Shell Commands
# Color files in a directory with seed
finder-color-walk ~/Documents 0x42D
# Color with trit-based labels (simpler)
finder-color-walk --trit ~/Projects 1069
# Clear all Finder labels in directory
finder-color-clear ~/Documents
# Show walk log
finder-color-log 0x42D
Babashka Implementation
#!/usr/bin/env bb
;; finder_color_walk.bb
(require '[babashka.process :refer [shell]])
(def GOLDEN 0x9E3779B97F4A7C15)
(def MIX1 0xBF58476D1CE4E5B9)
(def MIX2 0x94D049BB133111EB)
(def MASK64 0xFFFFFFFFFFFFFFFF)
(defn splitmix64 [state]
(let [z (bit-and (+ state GOLDEN) MASK64)
z (bit-and (* (bit-xor z (unsigned-bit-shift-right z 30)) MIX1) MASK64)
z (bit-and (* (bit-xor z (unsigned-bit-shift-right z 27)) MIX2) MASK64)]
[(bit-xor z (unsigned-bit-shift-right z 31)) z]))
(defn color-at [seed index]
(loop [state seed i 0]
(let [[rand new-state] (splitmix64 state)]
(if (= i ind
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- INTERLEAVED.md
- drive_color_walk.org
- drive_color_walk.py
- finder_color_walk.bb
- geodesics/drive_color_walk.geodesic.py
- geodesics/schema.geodesic.jl
- geodesics/spi_test.geodesic.py
- parallel_walk.bb
- schema.jl
- schema.org
- spi_test.org
- spi_test.py
- triadic_router.bb
FAQ
Что делает скилл finder-color-walk?
Finder Color Walk Skill
Как установить скилл finder-color-walk?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл finder-color-walk запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
frontend-design
AnthropicGuidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
webapp-testing
AnthropicToolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
brand-guidelines
AnthropicApplies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
web-artifacts-builder
AnthropicSuite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…