Skip to content

armgit / chops

Public Imported from GitHub
0

Your AI agent skills, finally organized. A macOS app to browse, edit, and manage skills across Claude Code, Cursor, Codex, Windsurf, and Amp.

feat: initial Chops app — macOS agent skills library manager

Josh Pigford6948842919fc
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..1ab7fd6
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,34 @@
+# Xcode
+*.xcodeproj/xcuserdata/
+*.xcworkspace/xcuserdata/
+DerivedData/
+build/
+*.pbxuser
+*.mode1v3
+*.mode2v3
+*.perspectivev3
+*.moved-aside
+*.hmap
+*.ipa
+*.dSYM.zip
+*.dSYM
+
+# Swift Package Manager
+.build/
+.swiftpm/
+Packages/
+
+# macOS
+.DS_Store
+*.swp
+*~
+
+# Distribution
+*.dmg
+*.app
+*.zip
+
+# Site
+site/node_modules/
+site/dist/
+site/.astro/
diff --git a/Chops.xcodeproj/project.pbxproj b/Chops.xcodeproj/project.pbxproj
new file mode 100644
index 0000000..b224c68
--- /dev/null
+++ b/Chops.xcodeproj/project.pbxproj
@@ -0,0 +1,477 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 77;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 09D3F065191A83BDEE922789 /* SkillDetailView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 168E103488DEA623E712852B /* SkillDetailView.swift */; };
+ 0AAAAE8C1D513060798C174A /* TagFilterView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B6645CCA31FE509667D24CE /* TagFilterView.swift */; };
+ 2263A0A3B358FBA099D0086D /* SettingsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A924245DDDA4C6A59BE15567 /* SettingsView.swift */; };
+ 25A4FB387DB5BD96DB630C14 /* AppState.swift in Sources */ = {isa = PBXBuildFile; fileRef = 231C267216AF1BCA8628B667 /* AppState.swift */; };
+ 309B12E0B72A22C9772BBC99 /* ChopsApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2787064DC7DF112E70C4E4D0 /* ChopsApp.swift */; };
+ 3E82E1FC990847E9A0C22AF9 /* Tag.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84F4D700DBF6267A1D940943 /* Tag.swift */; };
+ 53C393C13E30EC439317509F /* ToolBadge.swift in Sources */ = {isa = PBXBuildFile; fileRef = A7B6AE242CAD6A285DD57079 /* ToolBadge.swift */; };
+ 60A6711BAB0C3B8A3ACBF985 /* SkillParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5155D141EF812A3FE9ADF59C /* SkillParser.swift */; };
+ 6A8E0927D95BB14C9F377F4E /* SkillScanner.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6A5B26D335C1AFB6CDE8207 /* SkillScanner.swift */; };
+ 71E92A838AB4D1D6DC6174AF /* NewSkillSheet.swift in Sources */ = {isa = PBXBuildFile; fileRef = F02A00F80E4712872205EA7B /* NewSkillSheet.swift */; };
+ 7A17C99C5EFAE3AA9E788D50 /* Collection.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9AFE1AF02B0F8057791C2A9 /* Collection.swift */; };
+ 7EC6156934D559226BC78859 /* CollectionListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CA102A49ACFB23BC15794F8 /* CollectionListView.swift */; };
+ 7FD1DE6640F9339D5E97E09A /* MDCParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A4F680B33C74A38FCF5ADD5 /* MDCParser.swift */; };
+ 87A469B631CC80C89B14B1C7 /* SkillMetadataBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C812515FD8DC222B89745F2 /* SkillMetadataBar.swift */; };
+ 95163AEB7980654C901EC693 /* Skill.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27D6ED655F951177D2152351 /* Skill.swift */; };
+ 99EE8F6124FE91AC9576D6FD /* FileWatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = CAD26AA4787A2E0CDC86AADC /* FileWatcher.swift */; };
+ BD584933CCE2B650345C4CF1 /* ToolSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5487D9027B97F7E9EE9A1F4A /* ToolSource.swift */; };
+ C30BEAE03E54BD36F257A925 /* ToolFilterView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A5774429CCE83C2AFBE046C /* ToolFilterView.swift */; };
+ CAB16E444FFF8F149CB1421F /* DirectoryBrowserView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24274B19D8EA97BFA5C50EA1 /* DirectoryBrowserView.swift */; };
+ CBD8FECF1C5A453C8B021665 /* FrontmatterParser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C77C5B30E6C885B39444E5B /* FrontmatterParser.swift */; };
+ CCD92CB102DFA0965D6AFDB5 /* SidebarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CF7822031FD82A28978D9C5 /* SidebarView.swift */; };
+ CECE9BEEC1D933C543B66A4E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 17F7FE50C96124BA4EE43A6F /* Assets.xcassets */; };
+ D4C107BE303FC07CAF9C66AF /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 60E0F71982C4AF0045962380 /* ContentView.swift */; };
+ F98B1E8579B139FD2A801650 /* SearchService.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7FFC47BDE92105F4736B379F /* SearchService.swift */; };
+ FB295303DD30AED03290C726 /* SkillEditorView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 31B4DB87833D5160A11E39C9 /* SkillEditorView.swift */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+ 168E103488DEA623E712852B /* SkillDetailView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SkillDetailView.swift; sourceTree = "<group>"; };
+ 17F7FE50C96124BA4EE43A6F /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
+ 231C267216AF1BCA8628B667 /* AppState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppState.swift; sourceTree = "<group>"; };
+ 24274B19D8EA97BFA5C50EA1 /* DirectoryBrowserView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DirectoryBrowserView.swift; sourceTree = "<group>"; };
+ 2787064DC7DF112E70C4E4D0 /* ChopsApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChopsApp.swift; sourceTree = "<group>"; };
+ 27D6ED655F951177D2152351 /* Skill.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Skill.swift; sourceTree = "<group>"; };
+ 2CF7822031FD82A28978D9C5 /* SidebarView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SidebarView.swift; sourceTree = "<group>"; };
+ 31B4DB87833D5160A11E39C9 /* SkillEditorView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SkillEditorView.swift; sourceTree = "<group>"; };
+ 3A4F680B33C74A38FCF5ADD5 /* MDCParser.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MDCParser.swift; sourceTree = "<group>"; };
+ 4CA102A49ACFB23BC15794F8 /* CollectionListView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CollectionListView.swift; sourceTree = "<group>"; };
+ 5155D141EF812A3FE9ADF59C /* SkillParser.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SkillParser.swift; sourceTree = "<group>"; };
+ 5487D9027B97F7E9EE9A1F4A /* ToolSource.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ToolSource.swift; sourceTree = "<group>"; };
+ 5B6645CCA31FE509667D24CE /* TagFilterView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TagFilterView.swift; sourceTree = "<group>"; };
+ 60E0F71982C4AF0045962380 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
+ 7C77C5B30E6C885B39444E5B /* FrontmatterParser.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FrontmatterParser.swift; sourceTree = "<group>"; };
+ 7FFC47BDE92105F4736B379F /* SearchService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SearchService.swift; sourceTree = "<group>"; };
+ 84F4D700DBF6267A1D940943 /* Tag.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tag.swift; sourceTree = "<group>"; };
+ 8C812515FD8DC222B89745F2 /* SkillMetadataBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SkillMetadataBar.swift; sourceTree = "<group>"; };
+ 9A5774429CCE83C2AFBE046C /* ToolFilterView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ToolFilterView.swift; sourceTree = "<group>"; };
+ A7B6AE242CAD6A285DD57079 /* ToolBadge.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ToolBadge.swift; sourceTree = "<group>"; };
+ A924245DDDA4C6A59BE15567 /* SettingsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsView.swift; sourceTree = "<group>"; };
+ B3F5CF5BB1FC8455FDDB004A /* Chops.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Chops.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ C9AFE1AF02B0F8057791C2A9 /* Collection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Collection.swift; sourceTree = "<group>"; };
+ CAD26AA4787A2E0CDC86AADC /* FileWatcher.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileWatcher.swift; sourceTree = "<group>"; };
+ E6A5B26D335C1AFB6CDE8207 /* SkillScanner.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SkillScanner.swift; sourceTree = "<group>"; };
+ F02A00F80E4712872205EA7B /* NewSkillSheet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewSkillSheet.swift; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXGroup section */
+ 05CBDCA0595CF021CC38C7E4 /* Utilities */ = {
+ isa = PBXGroup;
+ children = (
+ 7C77C5B30E6C885B39444E5B /* FrontmatterParser.swift */,
+ 3A4F680B33C74A38FCF5ADD5 /* MDCParser.swift */,
+ );
+ path = Utilities;
+ sourceTree = "<group>";
+ };
+ 08ECEAD013847D8F110E61B4 = {
+ isa = PBXGroup;
+ children = (
+ 198DFCB0614727F57F6D073D /* Chops */,
+ D3558033A0A7B4EE7E7234CE /* Products */,
+ );
+ sourceTree = "<group>";
+ };
+ 198DFCB0614727F57F6D073D /* Chops */ = {
+ isa = PBXGroup;
+ children = (
+ 55B50A6F7E2143E2A7160C6D /* App */,
+ 75334DE5CD1545A8E1E63699 /* Models */,
+ D17AEFDEFE1C95D34F0F5771 /* Resources */,
+ 665294B304954CDCE458E2FA /* Services */,
+ 05CBDCA0595CF021CC38C7E4 /* Utilities */,
+ 414F6727A94989246C3B7B36 /* Views */,
+ );
+ path = Chops;
+ sourceTree = "<group>";
+ };
+ 1B016A7C37052B1801FCFD6A /* Shared */ = {
+ isa = PBXGroup;
+ children = (
+ F02A00F80E4712872205EA7B /* NewSkillSheet.swift */,
+ A7B6AE242CAD6A285DD57079 /* ToolBadge.swift */,
+ );
+ path = Shared;
+ sourceTree = "<group>";
+ };
+ 40FF74A5B2D0A1E16B14B7A4 /* Settings */ = {
+ isa = PBXGroup;
+ children = (
+ A924245DDDA4C6A59BE15567 /* SettingsView.swift */,
+ );
+ path = Settings;
+ sourceTree = "<group>";
+ };
+ 414F6727A94989246C3B7B36 /* Views */ = {
+ isa = PBXGroup;
+ children = (
+ 96A2A820C082754BBFB0237D /* Detail */,
+ 40FF74A5B2D0A1E16B14B7A4 /* Settings */,
+ 1B016A7C37052B1801FCFD6A /* Shared */,
+ 95530102A99D9A389717E414 /* Sidebar */,
+ );
+ path = Views;
+ sourceTree = "<group>";
+ };
+ 55B50A6F7E2143E2A7160C6D /* App */ = {
+ isa = PBXGroup;
+ children = (
+ 231C267216AF1BCA8628B667 /* AppState.swift */,
+ 2787064DC7DF112E70C4E4D0 /* ChopsApp.swift */,
+ 60E0F71982C4AF0045962380 /* ContentView.swift */,
+ );
+ path = App;
+ sourceTree = "<group>";
+ };
+ 665294B304954CDCE458E2FA /* Services */ = {
+ isa = PBXGroup;
+ children = (
+ CAD26AA4787A2E0CDC86AADC /* FileWatcher.swift */,
+ 7FFC47BDE92105F4736B379F /* SearchService.swift */,
+ 5155D141EF812A3FE9ADF59C /* SkillParser.swift */,
+ E6A5B26D335C1AFB6CDE8207 /* SkillScanner.swift */,
+ );
+ path = Services;
+ sourceTree = "<group>";
+ };
+ 75334DE5CD1545A8E1E63699 /* Models */ = {
+ isa = PBXGroup;
+ children = (
+ C9AFE1AF02B0F8057791C2A9 /* Collection.swift */,
+ 27D6ED655F951177D2152351 /* Skill.swift */,
+ 84F4D700DBF6267A1D940943 /* Tag.swift */,
+ 5487D9027B97F7E9EE9A1F4A /* ToolSource.swift */,
+ );
+ path = Models;
+ sourceTree = "<group>";
+ };
+ 95530102A99D9A389717E414 /* Sidebar */ = {
+ isa = PBXGroup;
+ children = (
+ 4CA102A49ACFB23BC15794F8 /* CollectionListView.swift */,
+ 2CF7822031FD82A28978D9C5 /* SidebarView.swift */,
+ 5B6645CCA31FE509667D24CE /* TagFilterView.swift */,
+ 9A5774429CCE83C2AFBE046C /* ToolFilterView.swift */,
+ );
+ path = Sidebar;
+ sourceTree = "<group>";
+ };
+ 96A2A820C082754BBFB0237D /* Detail */ = {
+ isa = PBXGroup;
+ children = (
+ 24274B19D8EA97BFA5C50EA1 /* DirectoryBrowserView.swift */,
+ 168E103488DEA623E712852B /* SkillDetailView.swift */,
+ 31B4DB87833D5160A11E39C9 /* SkillEditorView.swift */,
+ 8C812515FD8DC222B89745F2 /* SkillMetadataBar.swift */,
+ );
+ path = Detail;
+ sourceTree = "<group>";
+ };
+ D17AEFDEFE1C95D34F0F5771 /* Resources */ = {
+ isa = PBXGroup;
+ children = (
+ 17F7FE50C96124BA4EE43A6F /* Assets.xcassets */,
+ );
+ path = Resources;
+ sourceTree = "<group>";
+ };
+ D3558033A0A7B4EE7E7234CE /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ B3F5CF5BB1FC8455FDDB004A /* Chops.app */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 9188DE9415462C6D3B3FA067 /* Chops */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 19BD727EBF8BFE5016E97A7A /* Build configuration list for PBXNativeTarget "Chops" */;
+ buildPhases = (
+ 1D538A007981736680A1AD9B /* Sources */,
+ C796CFFF04920C825B5A52FA /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = Chops;
+ packageProductDependencies = (
+ );
+ productName = Chops;
+ productReference = B3F5CF5BB1FC8455FDDB004A /* Chops.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 0BF6016099FDE9BFD3432654 /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ BuildIndependentTargetsInParallel = YES;
+ LastUpgradeCheck = 1430;
+ TargetAttributes = {
+ };
+ };
+ buildConfigurationList = 719777DE0F769FDB488A0FDB /* Build configuration list for PBXProject "Chops" */;
+ developmentRegion = en;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ Base,
+ en,
+ );
+ mainGroup = 08ECEAD013847D8F110E61B4;
+ minimizedProjectReferenceProxies = 1;
+ preferredProjectObjectVersion = 77;
+ productRefGroup = D3558033A0A7B4EE7E7234CE /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 9188DE9415462C6D3B3FA067 /* Chops */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ C796CFFF04920C825B5A52FA /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ CECE9BEEC1D933C543B66A4E /* Assets.xcassets in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 1D538A007981736680A1AD9B /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 25A4FB387DB5BD96DB630C14 /* AppState.swift in Sources */,
+ 309B12E0B72A22C9772BBC99 /* ChopsApp.swift in Sources */,
+ 7A17C99C5EFAE3AA9E788D50 /* Collection.swift in Sources */,
+ 7EC6156934D559226BC78859 /* CollectionListView.swift in Sources */,
+ D4C107BE303FC07CAF9C66AF /* ContentView.swift in Sources */,
+ CAB16E444FFF8F149CB1421F /* DirectoryBrowserView.swift in Sources */,
+ 99EE8F6124FE91AC9576D6FD /* FileWatcher.swift in Sources */,
+ CBD8FECF1C5A453C8B021665 /* FrontmatterParser.swift in Sources */,
+ 7FD1DE6640F9339D5E97E09A /* MDCParser.swift in Sources */,
+ 71E92A838AB4D1D6DC6174AF /* NewSkillSheet.swift in Sources */,
+ F98B1E8579B139FD2A801650 /* SearchService.swift in Sources */,
+ 2263A0A3B358FBA099D0086D /* SettingsView.swift in Sources */,
+ CCD92CB102DFA0965D6AFDB5 /* SidebarView.swift in Sources */,
+ 95163AEB7980654C901EC693 /* Skill.swift in Sources */,
+ 09D3F065191A83BDEE922789 /* SkillDetailView.swift in Sources */,
+ FB295303DD30AED03290C726 /* SkillEditorView.swift in Sources */,
+ 87A469B631CC80C89B14B1C7 /* SkillMetadataBar.swift in Sources */,
+ 60A6711BAB0C3B8A3ACBF985 /* SkillParser.swift in Sources */,
+ 6A8E0927D95BB14C9F377F4E /* SkillScanner.swift in Sources */,
+ 3E82E1FC990847E9A0C22AF9 /* Tag.swift in Sources */,
+ 0AAAAE8C1D513060798C174A /* TagFilterView.swift in Sources */,
+ 53C393C13E30EC439317509F /* ToolBadge.swift in Sources */,
+ C30BEAE03E54BD36F257A925 /* ToolFilterView.swift in Sources */,
+ BD584933CCE2B650345C4CF1 /* ToolSource.swift in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin XCBuildConfiguration section */
+ 31FDAD4740108C316B09117A /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_ENABLE_OBJC_WEAK = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ ENABLE_NS_ASSERTIONS = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu11;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ MACOSX_DEPLOYMENT_TARGET = 26.0;
+ MTL_ENABLE_DEBUG_INFO = NO;
+ MTL_FAST_MATH = YES;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SDKROOT = macosx;
+ SWIFT_COMPILATION_MODE = wholemodule;
+ SWIFT_OPTIMIZATION_LEVEL = "-O";
+ SWIFT_VERSION = 5.0;
+ };
+ name = Release;
+ };
+ 52738EE717474F8671BFB266 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CODE_SIGN_ENTITLEMENTS = Chops/Chops.entitlements;
+ COMBINE_HIDPI_IMAGES = YES;
+ CURRENT_PROJECT_VERSION = 1;
+ GENERATE_INFOPLIST_FILE = NO;
+ INFOPLIST_FILE = Chops/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/../Frameworks",
+ );
+ MACOSX_DEPLOYMENT_TARGET = 26.0;
+ MARKETING_VERSION = 1.0.0;
+ PRODUCT_BUNDLE_IDENTIFIER = com.joshpigford.Chops;
+ SDKROOT = macosx;
+ SWIFT_STRICT_CONCURRENCY = minimal;
+ };
+ name = Debug;
+ };
+ 58C6E63A67ADDC4C7CB7ED9D /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CODE_SIGN_ENTITLEMENTS = Chops/Chops.entitlements;
+ COMBINE_HIDPI_IMAGES = YES;
+ CURRENT_PROJECT_VERSION = 1;
+ GENERATE_INFOPLIST_FILE = NO;
+ INFOPLIST_FILE = Chops/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/../Frameworks",
+ );
+ MACOSX_DEPLOYMENT_TARGET = 26.0;
+ MARKETING_VERSION = 1.0.0;
+ PRODUCT_BUNDLE_IDENTIFIER = com.joshpigford.Chops;
+ SDKROOT = macosx;
+ SWIFT_STRICT_CONCURRENCY = minimal;
+ };
+ name = Release;
+ };
+ 67CFFB04E52F4383BF75357C /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_ENABLE_OBJC_WEAK = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ ENABLE_TESTABILITY = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu11;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "$(inherited)",
+ "DEBUG=1",
+ );
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ MACOSX_DEPLOYMENT_TARGET = 26.0;
+ MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
+ MTL_FAST_MATH = YES;
+ ONLY_ACTIVE_ARCH = YES;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SDKROOT = macosx;
+ SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
+ SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+ SWIFT_VERSION = 5.0;
+ };
+ name = Debug;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 19BD727EBF8BFE5016E97A7A /* Build configuration list for PBXNativeTarget "Chops" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 52738EE717474F8671BFB266 /* Debug */,
+ 58C6E63A67ADDC4C7CB7ED9D /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Debug;
+ };
+ 719777DE0F769FDB488A0FDB /* Build configuration list for PBXProject "Chops" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 67CFFB04E52F4383BF75357C /* Debug */,
+ 31FDAD4740108C316B09117A /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Debug;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 0BF6016099FDE9BFD3432654 /* Project object */;
+}
diff --git a/Chops.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Chops.xcodeproj/project.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000..919434a
--- /dev/null
+++ b/Chops.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+ version = "1.0">
+ <FileRef
+ location = "self:">
+ </FileRef>
+</Workspace>
diff --git a/Chops/App/AppState.swift b/Chops/App/AppState.swift
new file mode 100644
index 0000000..b9a58e7
--- /dev/null
+++ b/Chops/App/AppState.swift
@@ -0,0 +1,18 @@
+import SwiftUI
+
+@Observable
+final class AppState {
+ var selectedTool: ToolSource?
+ var selectedSkill: Skill?
+ var searchText: String = ""
+ var showingNewSkillSheet: Bool = false
+ var sidebarFilter: SidebarFilter = .all
+}
+
+enum SidebarFilter: Hashable {
+ case all
+ case favorites
+ case tool(ToolSource)
+ case tag(String)
+ case collection(String)
+}
diff --git a/Chops/App/ChopsApp.swift b/Chops/App/ChopsApp.swift
new file mode 100644
index 0000000..f85dde4
--- /dev/null
+++ b/Chops/App/ChopsApp.swift
@@ -0,0 +1,47 @@
+import SwiftUI
+import SwiftData
+
+@main
+struct ChopsApp: App {
+ @State private var appState = AppState()
+
+ var sharedModelContainer: ModelContainer = {
+ let schema = Schema([
+ Skill.self,
+ Tag.self,
+ SkillCollection.self,
+ ])
+ let config = ModelConfiguration(schema: schema, isStoredInMemoryOnly: false)
+
+ do {
+ return try ModelContainer(for: schema, configurations: [config])
+ } catch {
+ fatalError("Could not create ModelContainer: \(error)")
+ }
+ }()
+
+ @FocusedValue(\.saveAction) var saveAction
+
+ var body: some Scene {
+ WindowGroup {
+ ContentView()
+ .environment(appState)
+ }
+ .modelContainer(sharedModelContainer)
+ .commands {
+ CommandGroup(replacing: .saveItem) {
+ Button("Save") {
+ saveAction?.action()
+ }
+ .keyboardShortcut("s", modifiers: .command)
+ .disabled(saveAction == nil)
+ }
+ }
+
+ Settings {
+ SettingsView()
+ .environment(appState)
+ .modelContainer(sharedModelContainer)
+ }
+ }
+}
diff --git a/Chops/App/ContentView.swift b/Chops/App/ContentView.swift
new file mode 100644
index 0000000..0152f60
--- /dev/null
+++ b/Chops/App/ContentView.swift
@@ -0,0 +1,65 @@
+import SwiftUI
+import SwiftData
+
+struct ContentView: View {
+ @Environment(\.modelContext) private var modelContext
+ @Environment(AppState.self) private var appState
+ @Query(sort: \Skill.name) private var skills: [Skill]
+ @State private var scanner: SkillScanner?
+ @State private var fileWatcher: FileWatcher?
+ @State private var columnVisibility: NavigationSplitViewVisibility = .all
+
+ var body: some View {
+ @Bindable var appState = appState
+
+ NavigationSplitView(columnVisibility: $columnVisibility) {
+ SidebarView()
+ } detail: {
+ if let skill = appState.selectedSkill {
+ SkillDetailView(skill: skill)
+ } else {
+ ContentUnavailableView(
+ "Select a Skill",
+ systemImage: "doc.text",
+ description: Text("Choose a skill from the sidebar to view and edit it.")
+ )
+ }
+ }
+ .searchable(text: $appState.searchText, prompt: "Search skills...")
+ .onAppear {
+ startScanning()
+ }
+ .sheet(isPresented: $appState.showingNewSkillSheet) {
+ NewSkillSheet()
+ }
+ .toolbar {
+ ToolbarItem(placement: .primaryAction) {
+ Button {
+ appState.showingNewSkillSheet = true
+ } label: {
+ Label("New Skill", systemImage: "plus")
+ }
+ }
+ }
+ .frame(minWidth: 800, minHeight: 500)
+ }
+
+ private func startScanning() {
+ let scanner = SkillScanner(modelContext: modelContext)
+ self.scanner = scanner
+ scanner.scanAll()
+
+ // Set up file watching
+ var allPaths: [String] = []
+ for tool in ToolSource.allCases {
+ allPaths.append(contentsOf: tool.globalPaths)
+ }
+
+ let watcher = FileWatcher { _ in
+ scanner.scanAll()
+ scanner.removeDeletedSkills()
+ }
+ watcher.watchDirectories(allPaths)
+ self.fileWatcher = watcher
+ }
+}
diff --git a/Chops/Chops.entitlements b/Chops/Chops.entitlements
new file mode 100644
index 0000000..e89b7f3
--- /dev/null
+++ b/Chops/Chops.entitlements
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>com.apple.security.app-sandbox</key>
+ <false/>
+</dict>
+</plist>
diff --git a/Chops/Info.plist b/Chops/Info.plist
new file mode 100644
index 0000000..6283802
--- /dev/null
+++ b/Chops/Info.plist
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleName</key>
+ <string>Chops</string>
+ <key>CFBundleDisplayName</key>
+ <string>Chops</string>
+ <key>CFBundleIdentifier</key>
+ <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
+ <key>CFBundleVersion</key>
+ <string>$(CURRENT_PROJECT_VERSION)</string>
+ <key>CFBundleShortVersionString</key>
+ <string>$(MARKETING_VERSION)</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleExecutable</key>
+ <string>$(EXECUTABLE_NAME)</string>
+ <key>LSMinimumSystemVersion</key>
+ <string>$(MACOSX_DEPLOYMENT_TARGET)</string>
+ <key>NSHumanReadableCopyright</key>
+ <string>Copyright © 2026 Josh Pigford. All rights reserved.</string>
+</dict>
+</plist>
diff --git a/Chops/Models/Collection.swift b/Chops/Models/Collection.swift
new file mode 100644
index 0000000..a9f5fa0
--- /dev/null
+++ b/Chops/Models/Collection.swift
@@ -0,0 +1,19 @@
+import SwiftData
+import Foundation
+
+@Model
+final class SkillCollection {
+ @Attribute(.unique) var name: String
+ var icon: String
+ var sortOrder: Int
+
+ @Relationship(inverse: \Skill.collections)
+ var skills: [Skill]
+
+ init(name: String, icon: String = "folder", skills: [Skill] = [], sortOrder: Int = 0) {
+ self.name = name
+ self.icon = icon
+ self.skills = skills
+ self.sortOrder = sortOrder
+ }
+}
diff --git a/Chops/Models/Skill.swift b/Chops/Models/Skill.swift
new file mode 100644
index 0000000..e996faa
--- /dev/null
+++ b/Chops/Models/Skill.swift
@@ -0,0 +1,70 @@
+import SwiftData
+import Foundation
+
+@Model
+final class Skill {
+ @Attribute(.unique) var filePath: String
+ var toolSourceRaw: String
+ var isDirectory: Bool
+ var name: String
+ var skillDescription: String
+ var content: String
+ var frontmatterData: Data?
+ var tags: [Tag]
+ var collections: [SkillCollection]
+ var isFavorite: Bool
+ var lastOpened: Date?
+ var fileModifiedDate: Date
+ var fileSize: Int
+ var isGlobal: Bool
+ var resolvedPath: String
+
+ var toolSource: ToolSource {
+ get { ToolSource(rawValue: toolSourceRaw) ?? .custom }
+ set { toolSourceRaw = newValue.rawValue }
+ }
+
+ var frontmatter: [String: String] {
+ get {
+ guard let data = frontmatterData else { return [:] }
+ return (try? JSONDecoder().decode([String: String].self, from: data)) ?? [:]
+ }
+ set {
+ frontmatterData = try? JSONEncoder().encode(newValue)
+ }
+ }
+
+ init(
+ filePath: String,
+ toolSource: ToolSource,
+ isDirectory: Bool = false,
+ name: String = "",
+ skillDescription: String = "",
+ content: String = "",
+ frontmatter: [String: String] = [:],
+ tags: [Tag] = [],
+ collections: [SkillCollection] = [],
+ isFavorite: Bool = false,
+ lastOpened: Date? = nil,
+ fileModifiedDate: Date = .now,
+ fileSize: Int = 0,
+ isGlobal: Bool = true,
+ resolvedPath: String = ""
+ ) {
+ self.filePath = filePath
+ self.toolSourceRaw = toolSource.rawValue
+ self.isDirectory = isDirectory
+ self.name = name
+ self.skillDescription = skillDescription
+ self.content = content
+ self.frontmatterData = try? JSONEncoder().encode(frontmatter)
+ self.tags = tags
+ self.collections = collections
+ self.isFavorite = isFavorite
+ self.lastOpened = lastOpened
+ self.fileModifiedDate = fileModifiedDate
+ self.fileSize = fileSize
+ self.isGlobal = isGlobal
+ self.resolvedPath = resolvedPath
+ }
+}
diff --git a/Chops/Models/Tag.swift b/Chops/Models/Tag.swift
new file mode 100644
index 0000000..1bf3294
--- /dev/null
+++ b/Chops/Models/Tag.swift
@@ -0,0 +1,17 @@
+import SwiftData
+import Foundation
+
+@Model
+final class Tag {
+ @Attribute(.unique) var name: String
+ var color: String
+
+ @Relationship(inverse: \Skill.tags)
+ var skills: [Skill]
+
+ init(name: String, color: String = "#808080", skills: [Skill] = []) {
+ self.name = name
+ self.color = color
+ self.skills = skills
+ }
+}
diff --git a/Chops/Models/ToolSource.swift b/Chops/Models/ToolSource.swift
new file mode 100644
index 0000000..59a489b
--- /dev/null
+++ b/Chops/Models/ToolSource.swift
@@ -0,0 +1,67 @@
+import SwiftUI
+
+enum ToolSource: String, Codable, CaseIterable, Identifiable {
+ case claude
+ case cursor
+ case windsurf
+ case codex
+ case copilot
+ case aider
+ case amp
+ case custom
+
+ var id: String { rawValue }
+
+ var displayName: String {
+ switch self {
+ case .claude: "Claude Code"
+ case .cursor: "Cursor"
+ case .windsurf: "Windsurf"
+ case .codex: "Codex"
+ case .copilot: "Copilot"
+ case .aider: "Aider"
+ case .amp: "Amp"
+ case .custom: "Custom"
+ }
+ }
+
+ var iconName: String {
+ switch self {
+ case .claude: "brain.head.profile"
+ case .cursor: "cursorarrow.rays"
+ case .windsurf: "wind"
+ case .codex: "book.closed"
+ case .copilot: "airplane"
+ case .aider: "wrench.and.screwdriver"
+ case .amp: "bolt.fill"
+ case .custom: "folder"
+ }
+ }
+
+ var color: Color {
+ switch self {
+ case .claude: .orange
+ case .cursor: .blue
+ case .windsurf: .teal
+ case .codex: .green
+ case .copilot: .purple
+ case .aider: .yellow
+ case .amp: .pink
+ case .custom: .gray
+ }
+ }
+
+ var globalPaths: [String] {
+ let home = FileManager.default.homeDirectoryForCurrentUser.path
+ switch self {
+ case .claude: return ["\(home)/.claude/skills", "\(home)/.agents/skills"]
+ case .cursor: return ["\(home)/.cursor/skills", "\(home)/.cursor/rules"]
+ case .windsurf: return ["\(home)/.codeium/windsurf/memories", "\(home)/.windsurf/rules"]
+ case .codex: return ["\(home)/.codex"]
+ case .copilot: return []
+ case .aider: return []
+ case .amp: return ["\(home)/.config/amp"]
+ case .custom: return []
+ }
+ }
+}
diff --git a/Chops/Resources/Assets.xcassets/AccentColor.colorset/Contents.json b/Chops/Resources/Assets.xcassets/AccentColor.colorset/Contents.json
new file mode 100644
index 0000000..793d5ed
--- /dev/null
+++ b/Chops/Resources/Assets.xcassets/AccentColor.colorset/Contents.json
@@ -0,0 +1,20 @@
+{
+ "colors" : [
+ {
+ "color" : {
+ "color-space" : "srgb",
+ "components" : {
+ "alpha" : "1.000",
+ "blue" : "0.380",
+ "green" : "0.820",
+ "red" : "1.000"
+ }
+ },
+ "idiom" : "universal"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/Chops/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json b/Chops/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json
new file mode 100644
index 0000000..58d3931
--- /dev/null
+++ b/Chops/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json
@@ -0,0 +1,68 @@
+{
+ "images" : [
+ {
+ "idiom" : "mac",
+ "platform" : "macOS",
+ "scale" : "1x",
+ "size" : "16x16"
+ },
+ {
+ "idiom" : "mac",
+ "platform" : "macOS",
+ "scale" : "2x",
+ "size" : "16x16"
+ },
+ {
+ "idiom" : "mac",
+ "platform" : "macOS",
+ "scale" : "1x",
+ "size" : "32x32"
+ },
+ {
+ "idiom" : "mac",
+ "platform" : "macOS",
+ "scale" : "2x",
+ "size" : "32x32"
+ },
+ {
+ "idiom" : "mac",
+ "platform" : "macOS",
+ "scale" : "1x",
+ "size" : "128x128"
+ },
+ {
+ "idiom" : "mac",
+ "platform" : "macOS",
+ "scale" : "2x",
+ "size" : "128x128"
+ },
+ {
+ "idiom" : "mac",
+ "platform" : "macOS",
+ "scale" : "1x",
+ "size" : "256x256"
+ },
+ {
+ "idiom" : "mac",
+ "platform" : "macOS",
+ "scale" : "2x",
+ "size" : "256x256"
+ },
+ {
+ "idiom" : "mac",
+ "platform" : "macOS",
+ "scale" : "1x",
+ "size" : "512x512"
+ },
+ {
+ "idiom" : "mac",
+ "platform" : "macOS",
+ "scale" : "2x",
+ "size" : "512x512"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/Chops/Resources/Assets.xcassets/Contents.json b/Chops/Resources/Assets.xcassets/Contents.json
new file mode 100644
index 0000000..73c0059
--- /dev/null
+++ b/Chops/Resources/Assets.xcassets/Contents.json
@@ -0,0 +1,6 @@
+{
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/Chops/Services/FileWatcher.swift b/Chops/Services/FileWatcher.swift
new file mode 100644
index 0000000..430e54a
--- /dev/null
+++ b/Chops/Services/FileWatcher.swift
@@ -0,0 +1,54 @@
+import Foundation
+
+final class FileWatcher {
+ private var sources: [DispatchSourceFileSystemObject] = []
+ private var fileDescriptors: [Int32] = []
+ private let callback: (String) -> Void
+
+ init(callback: @escaping (String) -> Void) {
+ self.callback = callback
+ }
+
+ func watchDirectories(_ paths: [String]) {
+ stopAll()
+ for path in paths {
+ guard FileManager.default.fileExists(atPath: path) else { continue }
+ watchDirectory(path)
+ }
+ }
+
+ private func watchDirectory(_ path: String) {
+ let fd = open(path, O_EVTONLY)
+ guard fd >= 0 else { return }
+ fileDescriptors.append(fd)
+
+ let source = DispatchSource.makeFileSystemObjectSource(
+ fileDescriptor: fd,
+ eventMask: [.write, .rename, .delete, .extend],
+ queue: .main
+ )
+
+ source.setEventHandler { [weak self] in
+ self?.callback(path)
+ }
+
+ source.setCancelHandler {
+ close(fd)
+ }
+
+ source.resume()
+ sources.append(source)
+ }
+
+ func stopAll() {
+ for source in sources {
+ source.cancel()
+ }
+ sources.removeAll()
+ fileDescriptors.removeAll()
+ }
+
+ deinit {
+ stopAll()
+ }
+}
diff --git a/Chops/Services/SearchService.swift b/Chops/Services/SearchService.swift
new file mode 100644
index 0000000..6ad91d0
--- /dev/null
+++ b/Chops/Services/SearchService.swift
@@ -0,0 +1,17 @@
+import Foundation
+import SwiftData
+
+enum SearchService {
+ static func search(query: String, in context: ModelContext) -> [Skill] {
+ guard !query.isEmpty else { return [] }
+
+ let descriptor = FetchDescriptor<Skill>()
+ guard let allSkills = try? context.fetch(descriptor) else { return [] }
+
+ return allSkills.filter { skill in
+ skill.name.localizedCaseInsensitiveContains(query) ||
+ skill.skillDescription.localizedCaseInsensitiveContains(query) ||
+ skill.content.localizedCaseInsensitiveContains(query)
+ }
+ }
+}
diff --git a/Chops/Services/SkillParser.swift b/Chops/Services/SkillParser.swift
new file mode 100644
index 0000000..94d9abb
--- /dev/null
+++ b/Chops/Services/SkillParser.swift
@@ -0,0 +1,49 @@
+import Foundation
+
+enum SkillParser {
+ static func parse(fileURL: URL, toolSource: ToolSource) -> ParsedSkill? {
+ guard let content = try? String(contentsOf: fileURL, encoding: .utf8) else {
+ return nil
+ }
+
+ switch toolSource {
+ case .claude, .cursor:
+ if fileURL.pathExtension == "mdc" {
+ return MDCParser.parse(content)
+ }
+ return FrontmatterParser.parse(content)
+ case .codex, .amp:
+ return parseHeadingFormat(content)
+ case .windsurf:
+ return FrontmatterParser.parse(content)
+ case .copilot:
+ return parseHeadingFormat(content)
+ case .aider:
+ return parseHeadingFormat(content)
+ case .custom:
+ // Try frontmatter first, fall back to heading
+ let parsed = FrontmatterParser.parse(content)
+ if !parsed.name.isEmpty { return parsed }
+ return parseHeadingFormat(content)
+ }
+ }
+
+ private static func parseHeadingFormat(_ content: String) -> ParsedSkill {
+ let lines = content.components(separatedBy: "\n")
+ var name = ""
+
+ for line in lines {
+ if line.hasPrefix("# ") {
+ name = String(line.dropFirst(2)).trimmingCharacters(in: .whitespaces)
+ break
+ }
+ }
+
+ return ParsedSkill(
+ frontmatter: [:],
+ content: content,
+ name: name,
+ description: ""
+ )
+ }
+}
diff --git a/Chops/Services/SkillScanner.swift b/Chops/Services/SkillScanner.swift
new file mode 100644
index 0000000..65d563c
--- /dev/null
+++ b/Chops/Services/SkillScanner.swift
@@ -0,0 +1,152 @@
+import Foundation
+import SwiftData
+
+@Observable
+final class SkillScanner {
+ private let modelContext: ModelContext
+
+ init(modelContext: ModelContext) {
+ self.modelContext = modelContext
+ }
+
+ func scanAll() {
+ for tool in ToolSource.allCases where tool != .custom {
+ scanTool(tool)
+ }
+ let customPaths = UserDefaults.standard.stringArray(forKey: "customScanPaths") ?? []
+ for path in customPaths {
+ scanDirectory(URL(fileURLWithPath: path), toolSource: .custom)
+ }
+ }
+
+ func scanTool(_ tool: ToolSource) {
+ for path in tool.globalPaths {
+ let url = URL(fileURLWithPath: path)
+ scanDirectory(url, toolSource: tool)
+ }
+ }
+
+ private func scanDirectory(_ directory: URL, toolSource: ToolSource) {
+ let fm = FileManager.default
+
+ var isDir: ObjCBool = false
+ guard fm.fileExists(atPath: directory.path, isDirectory: &isDir) else { return }
+
+ // Single-file tools like Codex: look for AGENTS.md directly in the directory
+ if toolSource == .codex || toolSource == .amp {
+ let agentsMD = directory.appendingPathComponent("AGENTS.md")
+ if fm.fileExists(atPath: agentsMD.path) {
+ upsertSkill(at: agentsMD, toolSource: toolSource, isDirectory: false)
+ }
+ // Also scan subdirectories for skills
+ if let contents = try? fm.contentsOfDirectory(
+ at: directory,
+ includingPropertiesForKeys: [.isDirectoryKey],
+ options: [.skipsHiddenFiles]
+ ) {
+ for item in contents {
+ var itemIsDir: ObjCBool = false
+ fm.fileExists(atPath: item.path, isDirectory: &itemIsDir)
+ if itemIsDir.boolValue {
+ let skillFile = item.appendingPathComponent("AGENTS.md")
+ if fm.fileExists(atPath: skillFile.path) {
+ upsertSkill(at: skillFile, toolSource: toolSource, isDirectory: true)
+ }
+ }
+ }
+ }
+ return
+ }
+
+ guard isDir.boolValue else { return }
+
+ guard let contents = try? fm.contentsOfDirectory(
+ at: directory,
+ includingPropertiesForKeys: [.isDirectoryKey, .isSymbolicLinkKey, .contentModificationDateKey, .fileSizeKey],
+ options: [.skipsHiddenFiles]
+ ) else { return }
+
+ for item in contents {
+ var itemIsDir: ObjCBool = false
+ fm.fileExists(atPath: item.path, isDirectory: &itemIsDir)
+
+ if itemIsDir.boolValue {
+ // Directory-based skill — look for SKILL.md or AGENTS.md inside
+ let skillFile = item.appendingPathComponent("SKILL.md")
+ let agentsFile = item.appendingPathComponent("AGENTS.md")
+
+ if fm.fileExists(atPath: skillFile.path) {
+ upsertSkill(at: skillFile, toolSource: toolSource, isDirectory: true)
+ } else if fm.fileExists(atPath: agentsFile.path) {
+ upsertSkill(at: agentsFile, toolSource: toolSource, isDirectory: true)
+ }
+ } else if item.pathExtension == "md" || item.pathExtension == "mdc" {
+ upsertSkill(at: item, toolSource: toolSource, isDirectory: false)
+ }
+ }
+ }
+
+ private func upsertSkill(at fileURL: URL, toolSource: ToolSource, isDirectory: Bool) {
+ let fm = FileManager.default
+ let path = fileURL.path
+ let resolvedPath = fileURL.resolvingSymlinksInPath().path
+
+ guard let parsed = SkillParser.parse(fileURL: fileURL, toolSource: toolSource) else { return }
+
+ let attrs = try? fm.attributesOfItem(atPath: resolvedPath)
+ let modDate = (attrs?[.modificationDate] as? Date) ?? .now
+ let fileSize = (attrs?[.size] as? Int) ?? 0
+
+ let name: String
+ if !parsed.name.isEmpty {
+ name = parsed.name
+ } else if isDirectory {
+ name = fileURL.deletingLastPathComponent().lastPathComponent
+ } else {
+ name = fileURL.deletingPathExtension().lastPathComponent
+ }
+
+ let predicate = #Predicate<Skill> { $0.filePath == path }
+ let descriptor = FetchDescriptor<Skill>(predicate: predicate)
+
+ if let existing = try? modelContext.fetch(descriptor).first {
+ existing.content = parsed.content
+ existing.name = name
+ existing.skillDescription = parsed.description
+ existing.frontmatter = parsed.frontmatter
+ existing.fileModifiedDate = modDate
+ existing.fileSize = fileSize
+ existing.resolvedPath = resolvedPath
+ } else {
+ let skill = Skill(
+ filePath: path,
+ toolSource: toolSource,
+ isDirectory: isDirectory,
+ name: name,
+ skillDescription: parsed.description,
+ content: parsed.content,
+ frontmatter: parsed.frontmatter,
+ fileModifiedDate: modDate,
+ fileSize: fileSize,
+ isGlobal: true,
+ resolvedPath: resolvedPath
+ )
+ modelContext.insert(skill)
+ }
+
+ try? modelContext.save()
+ }
+
+ func removeDeletedSkills() {
+ let descriptor = FetchDescriptor<Skill>()
+ guard let skills = try? modelContext.fetch(descriptor) else { return }
+ let fm = FileManager.default
+
+ for skill in skills {
+ if !fm.fileExists(atPath: skill.filePath) {
+ modelContext.delete(skill)
+ }
+ }
+ try? modelContext.save()
+ }
+}
diff --git a/Chops/Utilities/FrontmatterParser.swift b/Chops/Utilities/FrontmatterParser.swift
new file mode 100644
index 0000000..fc1ea2b
--- /dev/null
+++ b/Chops/Utilities/FrontmatterParser.swift
@@ -0,0 +1,53 @@
+import Foundation
+
+struct ParsedSkill {
+ var frontmatter: [String: String]
+ var content: String
+ var name: String
+ var description: String
+}
+
+enum FrontmatterParser {
+ static func parse(_ text: String) -> ParsedSkill {
+ let lines = text.components(separatedBy: "\n")
+
+ guard lines.first?.trimmingCharacters(in: .whitespaces) == "---" else {
+ return ParsedSkill(frontmatter: [:], content: text, name: "", description: "")
+ }
+
+ var endIndex: Int?
+ for i in 1..<lines.count {
+ if lines[i].trimmingCharacters(in: .whitespaces) == "---" {
+ endIndex = i
+ break
+ }
+ }
+
+ guard let end = endIndex else {
+ return ParsedSkill(frontmatter: [:], content: text, name: "", description: "")
+ }
+
+ var frontmatter: [String: String] = [:]
+ for i in 1..<end {
+ let line = lines[i]
+ if let colonIndex = line.firstIndex(of: ":") {
+ let key = String(line[line.startIndex..<colonIndex]).trimmingCharacters(in: .whitespaces)
+ let value = String(line[line.index(after: colonIndex)...]).trimmingCharacters(in: .whitespaces)
+ if !key.isEmpty {
+ frontmatter[key] = value
+ }
+ }
+ }
+
+ let contentStartIndex = min(end + 1, lines.count)
+ let contentLines = Array(lines[contentStartIndex...])
+ let content = contentLines.joined(separator: "\n").trimmingCharacters(in: .whitespacesAndNewlines)
+
+ return ParsedSkill(
+ frontmatter: frontmatter,
+ content: content,
+ name: frontmatter["name"] ?? "",
+ description: frontmatter["description"] ?? ""
+ )
+ }
+}
diff --git a/Chops/Utilities/MDCParser.swift b/Chops/Utilities/MDCParser.swift
new file mode 100644
index 0000000..568e266
--- /dev/null
+++ b/Chops/Utilities/MDCParser.swift
@@ -0,0 +1,11 @@
+import Foundation
+
+/// Parser for Cursor .mdc rule files.
+/// MDC files use a frontmatter-like format with YAML between --- delimiters,
+/// followed by markdown content.
+enum MDCParser {
+ static func parse(_ text: String) -> ParsedSkill {
+ // MDC files use the same frontmatter format as SKILL.md
+ FrontmatterParser.parse(text)
+ }
+}
diff --git a/Chops/Views/Detail/DirectoryBrowserView.swift b/Chops/Views/Detail/DirectoryBrowserView.swift
new file mode 100644
index 0000000..3feca64
--- /dev/null
+++ b/Chops/Views/Detail/DirectoryBrowserView.swift
@@ -0,0 +1,88 @@
+import SwiftUI
+
+struct DirectoryBrowserView: View {
+ let skill: Skill
+ @State private var files: [FileItem] = []
+ @State private var selectedFile: FileItem?
+
+ struct FileItem: Identifiable, Hashable {
+ let id = UUID()
+ let name: String
+ let path: String
+ let isDirectory: Bool
+ let children: [FileItem]
+ }
+
+ var body: some View {
+ VStack(alignment: .leading, spacing: 0) {
+ Text("Files")
+ .font(.caption)
+ .foregroundStyle(.secondary)
+ .padding(.horizontal, 12)
+ .padding(.vertical, 8)
+
+ Divider()
+
+ List(files, children: \.optionalChildren) { item in
+ HStack(spacing: 6) {
+ Image(systemName: item.isDirectory ? "folder.fill" : fileIcon(for: item.name))
+ .font(.caption)
+ .foregroundStyle(item.isDirectory ? .blue : .secondary)
+ Text(item.name)
+ .font(.caption)
+ .lineLimit(1)
+ }
+ .tag(item)
+ }
+ .listStyle(.sidebar)
+ }
+ .onAppear {
+ loadFiles()
+ }
+ }
+
+ private func loadFiles() {
+ let skillDir = URL(fileURLWithPath: skill.filePath).deletingLastPathComponent()
+ files = scanDirectory(skillDir)
+ }
+
+ private func scanDirectory(_ url: URL) -> [FileItem] {
+ let fm = FileManager.default
+ guard let contents = try? fm.contentsOfDirectory(
+ at: url,
+ includingPropertiesForKeys: [.isDirectoryKey],
+ options: [.skipsHiddenFiles]
+ ) else { return [] }
+
+ return contents.sorted { $0.lastPathComponent < $1.lastPathComponent }.map { item in
+ var isDir: ObjCBool = false
+ fm.fileExists(atPath: item.path, isDirectory: &isDir)
+ let children = isDir.boolValue ? scanDirectory(item) : []
+ return FileItem(
+ name: item.lastPathComponent,
+ path: item.path,
+ isDirectory: isDir.boolValue,
+ children: children
+ )
+ }
+ }
+
+ private func fileIcon(for name: String) -> String {
+ let ext = (name as NSString).pathExtension.lowercased()
+ switch ext {
+ case "md", "markdown": return "doc.text"
+ case "yml", "yaml": return "doc.badge.gearshape"
+ case "json": return "curlybraces"
+ case "swift": return "swift"
+ case "py": return "chevron.left.forwardslash.chevron.right"
+ case "sh", "bash", "zsh": return "terminal"
+ default: return "doc"
+ }
+ }
+}
+
+extension DirectoryBrowserView.FileItem {
+ var optionalChildren: [DirectoryBrowserView.FileItem]? {
+ isDirectory ? children : nil
+ }
+}
diff --git a/Chops/Views/Detail/SkillDetailView.swift b/Chops/Views/Detail/SkillDetailView.swift
new file mode 100644
index 0000000..03f6a7f
--- /dev/null
+++ b/Chops/Views/Detail/SkillDetailView.swift
@@ -0,0 +1,46 @@
+import SwiftUI
+import SwiftData
+
+struct SkillDetailView: View {
+ @Bindable var skill: Skill
+ @Environment(\.modelContext) private var modelContext
+
+ var body: some View {
+ HSplitView {
+ // If directory-based, show file browser on the left
+ if skill.isDirectory {
+ DirectoryBrowserView(skill: skill)
+ .frame(minWidth: 180, maxWidth: 220)
+ }
+
+ // Main editor area
+ VStack(spacing: 0) {
+ SkillEditorView(skill: skill)
+
+ Divider()
+
+ SkillMetadataBar(skill: skill)
+ }
+ }
+ .navigationTitle(skill.name)
+ .toolbar {
+ ToolbarItem {
+ Button {
+ skill.isFavorite.toggle()
+ try? modelContext.save()
+ } label: {
+ Image(systemName: skill.isFavorite ? "star.fill" : "star")
+ .foregroundStyle(skill.isFavorite ? .yellow : .secondary)
+ }
+ }
+ ToolbarItem {
+ Button {
+ NSWorkspace.shared.selectFile(skill.filePath, inFileViewerRootedAtPath: "")
+ } label: {
+ Image(systemName: "folder")
+ }
+ .help("Show in Finder")
+ }
+ }
+ }
+}
diff --git a/Chops/Views/Detail/SkillEditorView.swift b/Chops/Views/Detail/SkillEditorView.swift
new file mode 100644
index 0000000..1bd967e
--- /dev/null
+++ b/Chops/Views/Detail/SkillEditorView.swift
@@ -0,0 +1,92 @@
+import SwiftUI
+
+struct SkillEditorView: View {
+ @Bindable var skill: Skill
+ @State private var editorContent: String = ""
+ @State private var hasUnsavedChanges = false
+ @State private var showingSaveError = false
+ @State private var saveErrorMessage = ""
+
+ var body: some View {
+ ZStack(alignment: .topTrailing) {
+ TextEditor(text: $editorContent)
+ .font(.system(.body, design: .monospaced))
+ .scrollContentBackground(.hidden)
+ .padding(8)
+
+ if hasUnsavedChanges {
+ Text("Modified")
+ .font(.caption)
+ .padding(.horizontal, 8)
+ .padding(.vertical, 4)
+ .background(.orange.opacity(0.2), in: Capsule())
+ .foregroundStyle(.orange)
+ .padding(12)
+ }
+ }
+ .onChange(of: editorContent) {
+ hasUnsavedChanges = editorContent != fullFileContent
+ }
+ .onAppear {
+ loadContent()
+ }
+ .onChange(of: skill.filePath) {
+ loadContent()
+ }
+ .focusedValue(\.saveAction, SaveAction(action: saveFile))
+ .alert("Save Error", isPresented: $showingSaveError) {
+ Button("OK") {}
+ } message: {
+ Text(saveErrorMessage)
+ }
+ }
+
+ @State private var fullFileContent: String = ""
+
+ private func loadContent() {
+ if let data = try? String(contentsOfFile: skill.filePath, encoding: .utf8) {
+ editorContent = data
+ fullFileContent = data
+ } else {
+ editorContent = skill.content
+ fullFileContent = skill.content
+ }
+ hasUnsavedChanges = false
+ }
+
+ private func saveFile() {
+ do {
+ try editorContent.write(toFile: skill.filePath, atomically: true, encoding: .utf8)
+ fullFileContent = editorContent
+ hasUnsavedChanges = false
+
+ let parsed = FrontmatterParser.parse(editorContent)
+ if !parsed.name.isEmpty {
+ skill.name = parsed.name
+ }
+ skill.skillDescription = parsed.description
+ skill.content = parsed.content
+ skill.frontmatter = parsed.frontmatter
+ } catch {
+ saveErrorMessage = error.localizedDescription
+ showingSaveError = true
+ }
+ }
+}
+
+// MARK: - Save Action via FocusedValues for Cmd+S menu support
+
+struct SaveAction {
+ let action: () -> Void
+}
+
+struct SaveActionKey: FocusedValueKey {
+ typealias Value = SaveAction
+}
+
+extension FocusedValues {
+ var saveAction: SaveAction? {
+ get { self[SaveActionKey.self] }
+ set { self[SaveActionKey.self] = newValue }
+ }
+}
diff --git a/Chops/Views/Detail/SkillMetadataBar.swift b/Chops/Views/Detail/SkillMetadataBar.swift
new file mode 100644
index 0000000..d374b25
--- /dev/null
+++ b/Chops/Views/Detail/SkillMetadataBar.swift
@@ -0,0 +1,171 @@
+import SwiftUI
+import SwiftData
+
+struct SkillMetadataBar: View {
+ @Bindable var skill: Skill
+ @Environment(\.modelContext) private var modelContext
+ @Query(sort: \Tag.name) private var allTags: [Tag]
+ @Query(sort: \SkillCollection.sortOrder) private var allCollections: [SkillCollection]
+ @State private var showingTagPicker = false
+ @State private var showingCollectionPicker = false
+
+ var body: some View {
+ HStack(spacing: 16) {
+ // Tool badge
+ HStack(spacing: 4) {
+ ToolBadge(tool: skill.toolSource, size: .small)
+ Text(skill.toolSource.displayName)
+ .font(.caption)
+ .foregroundStyle(.secondary)
+ }
+
+ Divider().frame(height: 16)
+
+ // File path
+ Text(abbreviatedPath)
+ .font(.caption)
+ .foregroundStyle(.secondary)
+ .lineLimit(1)
+ .truncationMode(.middle)
+ .help(skill.filePath)
+
+ Divider().frame(height: 16)
+
+ // File size
+ Text(formattedSize)
+ .font(.caption)
+ .foregroundStyle(.secondary)
+
+ Divider().frame(height: 16)
+
+ // Tags
+ HStack(spacing: 4) {
+ ForEach(skill.tags) { tag in
+ Text(tag.name)
+ .font(.caption2)
+ .padding(.horizontal, 6)
+ .padding(.vertical, 2)
+ .background(Color(hex: tag.color)?.opacity(0.2) ?? Color.gray.opacity(0.2), in: Capsule())
+ }
+
+ Button {
+ showingTagPicker.toggle()
+ } label: {
+ Image(systemName: "tag")
+ .font(.caption)
+ .foregroundStyle(.secondary)
+ }
+ .buttonStyle(.plain)
+ .popover(isPresented: $showingTagPicker) {
+ tagPickerContent
+ }
+ }
+
+ // Collections
+ HStack(spacing: 4) {
+ Button {
+ showingCollectionPicker.toggle()
+ } label: {
+ Image(systemName: "tray")
+ .font(.caption)
+ .foregroundStyle(.secondary)
+ }
+ .buttonStyle(.plain)
+ .popover(isPresented: $showingCollectionPicker) {
+ collectionPickerContent
+ }
+ }
+
+ Spacer()
+
+ // Modified date
+ Text(skill.fileModifiedDate.formatted(.relative(presentation: .named)))
+ .font(.caption)
+ .foregroundStyle(.secondary)
+ }
+ .padding(.horizontal, 12)
+ .padding(.vertical, 8)
+ .background(.bar)
+ }
+
+ private var abbreviatedPath: String {
+ skill.filePath.replacingOccurrences(
+ of: FileManager.default.homeDirectoryForCurrentUser.path,
+ with: "~"
+ )
+ }
+
+ private var formattedSize: String {
+ ByteCountFormatter.string(fromByteCount: Int64(skill.fileSize), countStyle: .file)
+ }
+
+ private var tagPickerContent: some View {
+ VStack(alignment: .leading, spacing: 4) {
+ Text("Tags").font(.headline).padding(.bottom, 4)
+ ForEach(allTags) { tag in
+ let isAssigned = skill.tags.contains(where: { $0.name == tag.name })
+ Button {
+ if isAssigned {
+ skill.tags.removeAll { $0.name == tag.name }
+ } else {
+ skill.tags.append(tag)
+ }
+ try? modelContext.save()
+ } label: {
+ HStack {
+ Circle()
+ .fill(Color(hex: tag.color) ?? .gray)
+ .frame(width: 8, height: 8)
+ Text(tag.name)
+ Spacer()
+ if isAssigned {
+ Image(systemName: "checkmark")
+ }
+ }
+ }
+ .buttonStyle(.plain)
+ }
+ if allTags.isEmpty {
+ Text("No tags yet")
+ .foregroundStyle(.secondary)
+ .font(.caption)
+ }
+ }
+ .padding()
+ .frame(width: 200)
+ }
+
+ private var collectionPickerContent: some View {
+ VStack(alignment: .leading, spacing: 4) {
+ Text("Collections").font(.headline).padding(.bottom, 4)
+ ForEach(allCollections) { collection in
+ let isAssigned = skill.collections.contains(where: { $0.name == collection.name })
+ Button {
+ if isAssigned {
+ skill.collections.removeAll { $0.name == collection.name }
+ } else {
+ skill.collections.append(collection)
+ }
+ try? modelContext.save()
+ } label: {
+ HStack {
+ Image(systemName: collection.icon)
+ Text(collection.name)
+ Spacer()
+ if isAssigned {
+ Image(systemName: "checkmark")
+ }
+ }
+ }
+ .buttonStyle(.plain)
+ }
+ if allCollections.isEmpty {
+ Text("No collections yet")
+ .foregroundStyle(.secondary)
+ .font(.caption)
+ }
+ }
+ .padding()
+ .frame(width: 200)
+ }
+}
diff --git a/Chops/Views/Settings/SettingsView.swift b/Chops/Views/Settings/SettingsView.swift
new file mode 100644
index 0000000..dcd58e4
--- /dev/null
+++ b/Chops/Views/Settings/SettingsView.swift
@@ -0,0 +1,96 @@
+import SwiftUI
+
+struct SettingsView: View {
+ @AppStorage("customScanPaths") private var customScanPathsData: Data = Data()
+ @State private var customPaths: [String] = []
+ @State private var defaultTool: ToolSource = .claude
+
+ var body: some View {
+ TabView {
+ generalSettings
+ .tabItem {
+ Label("General", systemImage: "gearshape")
+ }
+
+ scanSettings
+ .tabItem {
+ Label("Scan Directories", systemImage: "folder.badge.gearshape")
+ }
+ }
+ .frame(width: 480, height: 320)
+ .onAppear {
+ loadCustomPaths()
+ }
+ }
+
+ private var generalSettings: some View {
+ Form {
+ Picker("Default tool for new skills", selection: $defaultTool) {
+ ForEach(ToolSource.allCases) { tool in
+ Text(tool.displayName).tag(tool)
+ }
+ }
+ }
+ .formStyle(.grouped)
+ .padding()
+ }
+
+ private var scanSettings: some View {
+ VStack(alignment: .leading, spacing: 12) {
+ Text("Custom Scan Directories")
+ .font(.headline)
+
+ Text("Add directories to scan for skills beyond the default tool locations.")
+ .font(.caption)
+ .foregroundStyle(.secondary)
+
+ List {
+ ForEach(customPaths, id: \.self) { path in
+ HStack {
+ Image(systemName: "folder")
+ Text(path)
+ .font(.system(.body, design: .monospaced))
+ .lineLimit(1)
+ .truncationMode(.middle)
+ Spacer()
+ Button {
+ customPaths.removeAll { $0 == path }
+ saveCustomPaths()
+ } label: {
+ Image(systemName: "minus.circle.fill")
+ .foregroundStyle(.red)
+ }
+ .buttonStyle(.plain)
+ }
+ }
+ }
+ .frame(minHeight: 120)
+
+ HStack {
+ Spacer()
+ Button("Add Directory...") {
+ let panel = NSOpenPanel()
+ panel.canChooseFiles = false
+ panel.canChooseDirectories = true
+ panel.allowsMultipleSelection = false
+ if panel.runModal() == .OK, let url = panel.url {
+ let path = url.path
+ if !customPaths.contains(path) {
+ customPaths.append(path)
+ saveCustomPaths()
+ }
+ }
+ }
+ }
+ }
+ .padding()
+ }
+
+ private func loadCustomPaths() {
+ customPaths = UserDefaults.standard.stringArray(forKey: "customScanPaths") ?? []
+ }
+
+ private func saveCustomPaths() {
+ UserDefaults.standard.set(customPaths, forKey: "customScanPaths")
+ }
+}
diff --git a/Chops/Views/Shared/NewSkillSheet.swift b/Chops/Views/Shared/NewSkillSheet.swift
new file mode 100644
index 0000000..5907b81
--- /dev/null
+++ b/Chops/Views/Shared/NewSkillSheet.swift
@@ -0,0 +1,179 @@
+import SwiftUI
+import SwiftData
+
+struct NewSkillSheet: View {
+ @Environment(\.dismiss) private var dismiss
+ @Environment(\.modelContext) private var modelContext
+ @Environment(AppState.self) private var appState
+ @State private var skillName = ""
+ @State private var selectedTool: ToolSource = .claude
+ @State private var errorMessage: String?
+
+ var body: some View {
+ VStack(spacing: 20) {
+ Text("New Skill")
+ .font(.title2)
+ .fontWeight(.bold)
+
+ Form {
+ TextField("Skill name", text: $skillName)
+ .textFieldStyle(.roundedBorder)
+
+ Picker("Tool", selection: $selectedTool) {
+ ForEach(ToolSource.allCases.filter { $0 != .custom }) { tool in
+ Label(tool.displayName, systemImage: tool.iconName)
+ .tag(tool)
+ }
+ }
+ }
+ .formStyle(.grouped)
+
+ if let error = errorMessage {
+ Text(error)
+ .font(.caption)
+ .foregroundStyle(.red)
+ }
+
+ HStack {
+ Button("Cancel") {
+ dismiss()
+ }
+ .keyboardShortcut(.cancelAction)
+
+ Spacer()
+
+ Button("Create") {
+ createSkill()
+ }
+ .keyboardShortcut(.defaultAction)
+ .disabled(skillName.isEmpty)
+ }
+ }
+ .padding(24)
+ .frame(width: 400)
+ }
+
+ private func createSkill() {
+ let fm = FileManager.default
+ let sanitizedName = skillName
+ .lowercased()
+ .replacingOccurrences(of: " ", with: "-")
+ .filter { $0.isLetter || $0.isNumber || $0 == "-" }
+
+ guard !sanitizedName.isEmpty else {
+ errorMessage = "Invalid skill name"
+ return
+ }
+
+ let basePath: String
+ let fileName: String
+ let isDirectory: Bool
+
+ switch selectedTool {
+ case .claude:
+ basePath = "\(fm.homeDirectoryForCurrentUser.path)/.claude/skills/\(sanitizedName)"
+ fileName = "SKILL.md"
+ isDirectory = true
+ case .cursor:
+ basePath = "\(fm.homeDirectoryForCurrentUser.path)/.cursor/skills/\(sanitizedName)"
+ fileName = "SKILL.md"
+ isDirectory = true
+ case .codex:
+ basePath = "\(fm.homeDirectoryForCurrentUser.path)/.codex"
+ fileName = "AGENTS.md"
+ isDirectory = false
+ case .amp:
+ basePath = "\(fm.homeDirectoryForCurrentUser.path)/.config/amp"
+ fileName = "AGENTS.md"
+ isDirectory = false
+ default:
+ let firstPath = selectedTool.globalPaths.first ?? "\(fm.homeDirectoryForCurrentUser.path)/.claude/skills/\(sanitizedName)"
+ basePath = firstPath
+ fileName = "SKILL.md"
+ isDirectory = true
+ }
+
+ do {
+ if isDirectory {
+ try fm.createDirectory(atPath: basePath, withIntermediateDirectories: true)
+ } else {
+ try fm.createDirectory(atPath: basePath, withIntermediateDirectories: true)
+ }
+
+ let filePath = isDirectory ? "\(basePath)/\(fileName)" : "\(basePath)/\(fileName)"
+
+ // Don't overwrite existing files
+ guard !fm.fileExists(atPath: filePath) else {
+ errorMessage = "A skill with this name already exists"
+ return
+ }
+
+ let boilerplate = generateBoilerplate(name: skillName, tool: selectedTool)
+ try boilerplate.write(toFile: filePath, atomically: true, encoding: .utf8)
+
+ // Insert into SwiftData
+ let parsed = FrontmatterParser.parse(boilerplate)
+ let skill = Skill(
+ filePath: filePath,
+ toolSource: selectedTool,
+ isDirectory: isDirectory,
+ name: skillName,
+ skillDescription: parsed.description,
+ content: parsed.content,
+ frontmatter: parsed.frontmatter,
+ fileModifiedDate: .now,
+ fileSize: boilerplate.count,
+ isGlobal: true,
+ resolvedPath: filePath
+ )
+ modelContext.insert(skill)
+ try modelContext.save()
+
+ appState.selectedSkill = skill
+ dismiss()
+ } catch {
+ errorMessage = error.localizedDescription
+ }
+ }
+
+ private func generateBoilerplate(name: String, tool: ToolSource) -> String {
+ switch tool {
+ case .claude, .cursor:
+ return """
+ ---
+ name: \(name.lowercased().replacingOccurrences(of: " ", with: "-"))
+ description: \(name)
+ ---
+
+ # \(name)
+
+ ## When to Use
+
+ - Describe when this skill should be activated
+
+ ## Instructions
+
+ Add your skill instructions here.
+ """
+ case .codex, .amp:
+ return """
+ # \(name)
+
+ ## Instructions
+
+ Add your skill instructions here.
+ """
+ default:
+ return """
+ ---
+ name: \(name.lowercased().replacingOccurrences(of: " ", with: "-"))
+ description: \(name)
+ ---
+
+ # \(name)
+
+ Add your skill instructions here.
+ """
+ }
+ }
+}
diff --git a/Chops/Views/Shared/ToolBadge.swift b/Chops/Views/Shared/ToolBadge.swift
new file mode 100644
index 0000000..2e99a02
--- /dev/null
+++ b/Chops/Views/Shared/ToolBadge.swift
@@ -0,0 +1,34 @@
+import SwiftUI
+
+struct ToolBadge: View {
+ let tool: ToolSource
+ var size: BadgeSize = .regular
+
+ enum BadgeSize {
+ case small, regular, large
+
+ var iconFont: Font {
+ switch self {
+ case .small: .caption2
+ case .regular: .caption
+ case .large: .body
+ }
+ }
+
+ var padding: CGFloat {
+ switch self {
+ case .small: 3
+ case .regular: 4
+ case .large: 6
+ }
+ }
+ }
+
+ var body: some View {
+ Image(systemName: tool.iconName)
+ .font(size.iconFont)
+ .foregroundStyle(.white)
+ .padding(size.padding)
+ .background(tool.color, in: RoundedRectangle(cornerRadius: 4))
+ }
+}
diff --git a/Chops/Views/Sidebar/CollectionListView.swift b/Chops/Views/Sidebar/CollectionListView.swift
new file mode 100644
index 0000000..9f8875a
--- /dev/null
+++ b/Chops/Views/Sidebar/CollectionListView.swift
@@ -0,0 +1,105 @@
+import SwiftUI
+import SwiftData
+
+struct CollectionListView: View {
+ @Environment(AppState.self) private var appState
+ @Environment(\.modelContext) private var modelContext
+ @Query(sort: \SkillCollection.sortOrder) private var collections: [SkillCollection]
+ @State private var showingNewCollection = false
+ @State private var newCollectionName = ""
+ @State private var newCollectionIcon = "folder"
+
+ private let availableIcons = [
+ "folder", "star", "bookmark", "tag", "tray",
+ "archivebox", "doc.text", "gearshape", "wrench",
+ "hammer", "paintbrush", "wand.and.stars", "terminal",
+ "network", "globe", "bolt", "flame", "leaf"
+ ]
+
+ var body: some View {
+ ForEach(collections) { collection in
+ Button {
+ if appState.sidebarFilter == .collection(collection.name) {
+ appState.sidebarFilter = .all
+ } else {
+ appState.sidebarFilter = .collection(collection.name)
+ }
+ } label: {
+ Label {
+ HStack {
+ Text(collection.name)
+ Spacer()
+ Text("\(collection.skills.count)")
+ .foregroundStyle(.secondary)
+ .font(.caption)
+ }
+ } icon: {
+ Image(systemName: collection.icon)
+ }
+ }
+ .buttonStyle(.plain)
+ .fontWeight(appState.sidebarFilter == .collection(collection.name) ? .semibold : .regular)
+ .contextMenu {
+ Button("Delete", role: .destructive) {
+ modelContext.delete(collection)
+ try? modelContext.save()
+ if appState.sidebarFilter == .collection(collection.name) {
+ appState.sidebarFilter = .all
+ }
+ }
+ }
+ }
+
+ Button {
+ showingNewCollection = true
+ } label: {
+ Label("New Collection", systemImage: "plus.circle")
+ .foregroundStyle(.secondary)
+ }
+ .buttonStyle(.plain)
+ .popover(isPresented: $showingNewCollection) {
+ VStack(spacing: 12) {
+ TextField("Collection name", text: $newCollectionName)
+ .textFieldStyle(.roundedBorder)
+
+ LazyVGrid(columns: Array(repeating: GridItem(.fixed(28)), count: 6), spacing: 8) {
+ ForEach(availableIcons, id: \.self) { icon in
+ Button {
+ newCollectionIcon = icon
+ } label: {
+ Image(systemName: icon)
+ .font(.body)
+ .frame(width: 28, height: 28)
+ .background(
+ newCollectionIcon == icon ?
+ Color.accentColor.opacity(0.2) :
+ Color.clear,
+ in: RoundedRectangle(cornerRadius: 4)
+ )
+ }
+ .buttonStyle(.plain)
+ }
+ }
+
+ HStack {
+ Button("Cancel") { showingNewCollection = false }
+ Spacer()
+ Button("Create") {
+ let collection = SkillCollection(
+ name: newCollectionName,
+ icon: newCollectionIcon,
+ sortOrder: collections.count
+ )
+ modelContext.insert(collection)
+ try? modelContext.save()
+ newCollectionName = ""
+ showingNewCollection = false
+ }
+ .disabled(newCollectionName.isEmpty)
+ }
+ }
+ .padding()
+ .frame(width: 240)
+ }
+ }
+}
diff --git a/Chops/Views/Sidebar/SidebarView.swift b/Chops/Views/Sidebar/SidebarView.swift
new file mode 100644
index 0000000..2bfd1f8
--- /dev/null
+++ b/Chops/Views/Sidebar/SidebarView.swift
@@ -0,0 +1,148 @@
+import SwiftUI
+import SwiftData
+
+struct SidebarView: View {
+ @Environment(\.modelContext) private var modelContext
+ @Environment(AppState.self) private var appState
+ @Query(sort: \Skill.name) private var allSkills: [Skill]
+ @Query(sort: \Tag.name) private var tags: [Tag]
+ @Query(sort: \SkillCollection.sortOrder) private var collections: [SkillCollection]
+
+ private var filteredSkills: [Skill] {
+ var result = allSkills
+
+ switch appState.sidebarFilter {
+ case .all:
+ break
+ case .favorites:
+ result = result.filter { $0.isFavorite }
+ case .tool(let tool):
+ result = result.filter { $0.toolSource == tool }
+ case .tag(let tagName):
+ result = result.filter { skill in
+ skill.tags.contains { $0.name == tagName }
+ }
+ case .collection(let collName):
+ result = result.filter { skill in
+ skill.collections.contains { $0.name == collName }
+ }
+ }
+
+ if !appState.searchText.isEmpty {
+ result = result.filter {
+ $0.name.localizedCaseInsensitiveContains(appState.searchText) ||
+ $0.skillDescription.localizedCaseInsensitiveContains(appState.searchText) ||
+ $0.content.localizedCaseInsensitiveContains(appState.searchText)
+ }
+ }
+
+ return result
+ }
+
+ var body: some View {
+ @Bindable var appState = appState
+
+ List(selection: $appState.selectedSkill) {
+ // Filter sections
+ Section("Library") {
+ SidebarFilterRow(label: "All Skills", icon: "tray.full", filter: .all, count: allSkills.count)
+ SidebarFilterRow(label: "Favorites", icon: "star.fill", filter: .favorites, count: allSkills.filter(\.isFavorite).count)
+ }
+
+ Section("Tools") {
+ ToolFilterView()
+ }
+
+ if !tags.isEmpty {
+ Section("Tags") {
+ TagFilterView()
+ }
+ }
+
+ if !collections.isEmpty {
+ Section("Collections") {
+ CollectionListView()
+ }
+ }
+
+ Section("Skills") {
+ ForEach(filteredSkills) { skill in
+ SkillRow(skill: skill)
+ .tag(skill)
+ .contextMenu {
+ Button(skill.isFavorite ? "Unfavorite" : "Favorite") {
+ skill.isFavorite.toggle()
+ try? modelContext.save()
+ }
+ Divider()
+ Button("Show in Finder") {
+ NSWorkspace.shared.selectFile(skill.filePath, inFileViewerRootedAtPath: "")
+ }
+ }
+ }
+ }
+ }
+ .listStyle(.sidebar)
+ .navigationTitle("Chops")
+ }
+}
+
+struct SidebarFilterRow: View {
+ @Environment(AppState.self) private var appState
+ let label: String
+ let icon: String
+ let filter: SidebarFilter
+ let count: Int
+
+ var body: some View {
+ Button {
+ appState.sidebarFilter = filter
+ } label: {
+ Label {
+ HStack {
+ Text(label)
+ Spacer()
+ Text("\(count)")
+ .foregroundStyle(.secondary)
+ .font(.caption)
+ }
+ } icon: {
+ Image(systemName: icon)
+ }
+ }
+ .buttonStyle(.plain)
+ .fontWeight(appState.sidebarFilter == filter ? .semibold : .regular)
+ }
+}
+
+struct SkillRow: View {
+ let skill: Skill
+
+ var body: some View {
+ HStack(spacing: 8) {
+ ToolBadge(tool: skill.toolSource, size: .small)
+
+ VStack(alignment: .leading, spacing: 2) {
+ Text(skill.name)
+ .fontWeight(.medium)
+ .lineLimit(1)
+
+ if !skill.skillDescription.isEmpty {
+ Text(skill.skillDescription)
+ .font(.caption)
+ .foregroundStyle(.secondary)
+ .lineLimit(1)
+ }
+ }
+
+ Spacer()
+
+ if skill.isFavorite {
+ Image(systemName: "star.fill")
+ .font(.caption)
+ .foregroundStyle(.yellow)
+ }
+ }
+ .padding(.vertical, 2)
+ }
+}
diff --git a/Chops/Views/Sidebar/TagFilterView.swift b/Chops/Views/Sidebar/TagFilterView.swift
new file mode 100644
index 0000000..255788f
--- /dev/null
+++ b/Chops/Views/Sidebar/TagFilterView.swift
@@ -0,0 +1,106 @@
+import SwiftUI
+import SwiftData
+
+struct TagFilterView: View {
+ @Environment(AppState.self) private var appState
+ @Environment(\.modelContext) private var modelContext
+ @Query(sort: \Tag.name) private var tags: [Tag]
+ @State private var showingNewTag = false
+ @State private var newTagName = ""
+ @State private var newTagColor = Color.blue
+
+ var body: some View {
+ ForEach(tags) { tag in
+ Button {
+ if appState.sidebarFilter == .tag(tag.name) {
+ appState.sidebarFilter = .all
+ } else {
+ appState.sidebarFilter = .tag(tag.name)
+ }
+ } label: {
+ Label {
+ HStack {
+ Text(tag.name)
+ Spacer()
+ Text("\(tag.skills.count)")
+ .foregroundStyle(.secondary)
+ .font(.caption)
+ }
+ } icon: {
+ Circle()
+ .fill(Color(hex: tag.color) ?? .gray)
+ .frame(width: 10, height: 10)
+ }
+ }
+ .buttonStyle(.plain)
+ .fontWeight(appState.sidebarFilter == .tag(tag.name) ? .semibold : .regular)
+ .contextMenu {
+ Button("Delete", role: .destructive) {
+ modelContext.delete(tag)
+ try? modelContext.save()
+ if appState.sidebarFilter == .tag(tag.name) {
+ appState.sidebarFilter = .all
+ }
+ }
+ }
+ }
+
+ Button {
+ showingNewTag = true
+ } label: {
+ Label("New Tag", systemImage: "plus.circle")
+ .foregroundStyle(.secondary)
+ }
+ .buttonStyle(.plain)
+ .popover(isPresented: $showingNewTag) {
+ VStack(spacing: 12) {
+ TextField("Tag name", text: $newTagName)
+ .textFieldStyle(.roundedBorder)
+ ColorPicker("Color", selection: $newTagColor)
+ HStack {
+ Button("Cancel") { showingNewTag = false }
+ Spacer()
+ Button("Create") {
+ let tag = Tag(name: newTagName, color: newTagColor.hexString)
+ modelContext.insert(tag)
+ try? modelContext.save()
+ newTagName = ""
+ showingNewTag = false
+ }
+ .disabled(newTagName.isEmpty)
+ }
+ }
+ .padding()
+ .frame(width: 220)
+ }
+ }
+}
+
+// MARK: - Color Hex Helpers
+
+extension Color {
+ init?(hex: String) {
+ var hexSanitized = hex.trimmingCharacters(in: .whitespacesAndNewlines)
+ hexSanitized = hexSanitized.replacingOccurrences(of: "#", with: "")
+ guard hexSanitized.count == 6 else { return nil }
+
+ var rgb: UInt64 = 0
+ Scanner(string: hexSanitized).scanHexInt64(&rgb)
+
+ self.init(
+ red: Double((rgb & 0xFF0000) >> 16) / 255.0,
+ green: Double((rgb & 0x00FF00) >> 8) / 255.0,
+ blue: Double(rgb & 0x0000FF) / 255.0
+ )
+ }
+
+ var hexString: String {
+ guard let components = NSColor(self).cgColor.components, components.count >= 3 else {
+ return "#808080"
+ }
+ let r = Int(components[0] * 255)
+ let g = Int(components[1] * 255)
+ let b = Int(components[2] * 255)
+ return String(format: "#%02X%02X%02X", r, g, b)
+ }
+}
diff --git a/Chops/Views/Sidebar/ToolFilterView.swift b/Chops/Views/Sidebar/ToolFilterView.swift
new file mode 100644
index 0000000..e585579
--- /dev/null
+++ b/Chops/Views/Sidebar/ToolFilterView.swift
@@ -0,0 +1,44 @@
+import SwiftUI
+import SwiftData
+
+struct ToolFilterView: View {
+ @Environment(AppState.self) private var appState
+ @Query(sort: \Skill.name) private var allSkills: [Skill]
+
+ private func count(for tool: ToolSource) -> Int {
+ allSkills.filter { $0.toolSource == tool }.count
+ }
+
+ private var activeSources: [ToolSource] {
+ ToolSource.allCases.filter { tool in
+ allSkills.contains { $0.toolSource == tool }
+ }
+ }
+
+ var body: some View {
+ ForEach(activeSources) { tool in
+ Button {
+ if appState.sidebarFilter == .tool(tool) {
+ appState.sidebarFilter = .all
+ } else {
+ appState.sidebarFilter = .tool(tool)
+ }
+ } label: {
+ Label {
+ HStack {
+ Text(tool.displayName)
+ Spacer()
+ Text("\(count(for: tool))")
+ .foregroundStyle(.secondary)
+ .font(.caption)
+ }
+ } icon: {
+ Image(systemName: tool.iconName)
+ .foregroundStyle(tool.color)
+ }
+ }
+ .buttonStyle(.plain)
+ .fontWeight(appState.sidebarFilter == .tool(tool) ? .semibold : .regular)
+ }
+ }
+}
diff --git a/project.yml b/project.yml
new file mode 100644
index 0000000..3f66508
--- /dev/null
+++ b/project.yml
@@ -0,0 +1,27 @@
+name: Chops
+options:
+ bundleIdPrefix: com.joshpigford
+ deploymentTarget:
+ macOS: "26.0"
+ createIntermediateGroups: true
+ generateEmptyDirectories: true
+
+targets:
+ Chops:
+ type: application
+ platform: macOS
+ sources:
+ - path: Chops
+ excludes:
+ - "*.entitlements"
+ - Info.plist
+ settings:
+ base:
+ PRODUCT_BUNDLE_IDENTIFIER: com.joshpigford.Chops
+ MARKETING_VERSION: "1.0.0"
+ CURRENT_PROJECT_VERSION: 1
+ INFOPLIST_FILE: Chops/Info.plist
+ CODE_SIGN_ENTITLEMENTS: Chops/Chops.entitlements
+ MACOSX_DEPLOYMENT_TARGET: "26.0"
+ GENERATE_INFOPLIST_FILE: NO
+ SWIFT_STRICT_CONCURRENCY: minimal