Files
alfred-preferences/CLAUDE.md
Timmy a19b93bc57 docs: add documentation and sync script
- CLAUDE.md: guidance for Claude Code AI
- README.md: repository overview and structure
- QUICKSTART.md: setup and usage guide
- SUMMARY.md: inventory of workflows and snippets
- alfred-sync.sh: git sync script for Alfred preferences

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 09:31:25 +08:00

2.2 KiB

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Repository Overview

This is an Alfred preferences sync repository. It contains Alfred workflows, snippets, and preferences that are version-controlled via git and synced across machines.

Directory Structure:

  • Alfred.alfredpreferences/ - Main Alfred preferences package
    • workflows/ - Alfred workflows (UUID-named directories, each containing info.plist)
    • snippets/ - Text snippet collections (JSON files with Alfred snippet format)
    • preferences/ - General Alfred preferences (prefs.plist, features, etc.)
    • resources/ - Alfred resources (icons, images)
    • remote/ - Remote sync data
  • alfred-sync.sh - Git sync script

Syncing Changes

To commit and push Alfred preference changes:

./alfred-sync.sh

This script stages all changes, creates a timestamped commit, and pushes to the remote repository.

Alfred Workflow Structure

Each workflow is stored in workflows/user.workflow.{UUID}/ and contains:

  • info.plist - Main workflow configuration (name, objects, connections, script definitions)

Workflows are defined as XML plist files containing:

  • Workflow metadata (name, bundleid, createdby)
  • Objects (script actions, inputs, outputs, notifications)
  • Connections between objects
  • UI layout data (uidata)

Snippet Collections

Snippets are organized in themed collections under snippets/:

  • 術語速查字典/ - Technical terminology cheat sheets
  • 中文輸出速查/ - Chinese text output shortcuts
  • 特殊字元輸出集/ - Special character collections
  • topsecret/ - Sensitive credentials (be cautious when committing)

Each snippet is a JSON file with the structure:

{
  "alfredsnippet": {
    "snippet": "expansion text",
    "uid": "UUID",
    "name": "display name",
    "keyword": "trigger keyword"
  }
}

Notes

  • The Alfred.alfredpreferences directory is macOS package format
  • Workflow UUIDs are generated by Alfred and should not be changed
  • When editing workflows, ensure plist XML syntax remains valid
  • Be mindful of sensitive data in snippets (especially topsecret/ collection)