thebushidocollective/han/objc-protocols-categories
Claude Code and agent skill by thebushidocollective/han
- community
Checking that the SKILL.md file is still in the repository.
Use when objective-C protocols for defining interfaces and categories for extending classes, including formal protocols, optional methods, class extensions, and patterns for modular, reusable code design.
Install
npx vskill@latest install thebushidocollective/han/objc-protocols-categoriesSKILL.md
Objective-C Protocols and Categories
Introduction
Protocols and categories are fundamental Objective-C features for defining interfaces and extending behavior. Protocols declare method contracts that classes can adopt, enabling polymorphism and delegation patterns. Categories extend existing classes with new methods without subclassing or source access.
Protocols serve similar purposes to Java interfaces or Swift protocols, enabling multiple inheritance of behavior through composition. Categories are unique to Objective-C, allowing developers to organize code, add functionality to system classes, and split large implementations across multiple files.
This skill covers formal protocols, optional methods, protocol composition, categories, class extensions, and best practices for modular Objective-C design.
Formal Protocols
Formal protocols declare method and property requirements that adopting classes must implement, establishing contracts for polymorphic behavior.
Protocols enable polymorphic code that works with any object implementing the required methods, regardless of class hierarchy.
Optional Protocol Methods
Optional protocol methods allow adopters to implement only relevant methods, with runtime checking for implementation before calling.
Always check for optional method implementation with respondsToSelector: before calling to prevent crashes from unimplemented methods.
Categories for Class Extension
Categories add methods to existing classes without subclassing, enabling code organization and extension of system classes.
Categories cannot add instance variables but can add methods and use associated objects for property-like behavior.
Class Extensions
Class extensions are anonymous categories declared in implementation files that can add private methods and properties invisible to clients.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/languages/objective-c/skills/objc-protocols-categories/SKILL.md
Popularity
- Repository stars
- 198
- Repository forks
- 21
- 7-day trend score
- 26
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 18 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/thebushidocollective/han/objc-protocols-categories)