ios-logos-tweak skill

A skill that teaches agents to write iOS tweaks with Theos and Logos: %hook directives, iOS version checks and bracket messaging.

  • 105 ★ on the repository
  • Last commit
  • MIT
Skill

Minimal access

Why this level

  • Instructions for the agent only: it runs nothing and makes no network calls.
All reasons and checks

poomsmart/ios-logos-tweak

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add skills/ios-logos-tweak

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Minimal accessThe tool runs nothing and makes no network calls.

  • Instructions for the agent only: it runs nothing and makes no network calls.

This is third-party code. Review the repository files before installing.

What it does

The skill sets rules for working with Theos and Logos when writing iOS tweaks. Hooks live in `.x` files, and `.xm` is only for code with C++ or `MSHookIvar`. Logic is expressed with `%hook`, `%hookf`, `%new`, `%orig` and `%init`, while Logos itself emits `MSHookMessageEx` and class registration. The skill separates firmware checks via `IS_IOS_OR_NEWER`, `@available` and `respondsToSelector`, recommends bracket messaging, and keeps the comparison with manual `MSHook*` calls in `reference.md`. It suits Claude Code, Cursor and Codex.

Who it is for. Authors of jailbreak tweaks for iOS on Theos who edit `Tweak.x` with an agent and want one hooking style.

Good fit when

  • A new `Tweak.x` with `%hook` for a UIKit class is being written.
  • A tweak review found manual `MSHookMessageEx` where Logos would do.
  • A hook reads a private ivar through `MSHookIvar` and the file extension to pick is unclear.
  • Code checks the iOS version and you must choose between `@available` and `IS_IOS_OR_NEWER`.

Not a fit when

  • You are building a regular App Store app without hooks or Theos.
  • You need a finished tweak or jailbreak tool: the repository holds only rules for the agent.
  • The project is built without Logos, on the raw Objective-C runtime.

Example request

Write a Tweak.x with a Logos hook on viewDidLoad for SpringBoard and check the iOS version with the IS_IOS_OR_NEWER macro.

Limitations

The skill gives guidance and builds nothing: prepare Theos, the SDK and a jailbroken device yourself. The README requires cloning the whole repository because `SKILL.md` links to `reference.md` by relative paths. The rules describe Logos and Substrate and fit other hooking frameworks worse. In Claude Code a `~/.claude/skills` folder created after the session started needs `/reload-skills`. The README leaves a `<repo-url>` placeholder in clone commands, so substitute this repository address.

How to disable. Delete the `ios-logos-tweak` folder from your skills directory (`~/.claude/skills/`, `~/.cursor/skills/` or `~/.agents/skills/`) and any symlinks to it.

FAQ

When is `.xm` needed instead of `.x`?

When the file uses `MSHookIvar`, `MSIvarHook` or C++ (`std::`, templates, lambdas). Other hooks stay in `.x`.

Can I copy only SKILL.md?

No, `reference.md` must sit next to it or the links break. Clone the whole repository.

Does it work in Cursor and Codex?

Yes. Use `~/.cursor/skills/` for Cursor, `~/.agents/skills/` for Codex and `~/.claude/skills/` for Claude Code.

Which Logos directives does the skill recommend?

`%hook`, `%hookf`, `%new`, `%orig` and `%init`. Manual `MSHookMessageEx` and `MSHookFunction` stay for rare cases described in `reference.md`.

How do I choose an iOS version check?

The skill covers three ways: `IS_IOS_OR_NEWER`, `@available` and `respondsToSelector`, and says when each one fits.

Discussion

No questions or reviews yet.

Skills

A skill with scripts for building iOS apps and driving the simulator through the accessibility tree, with compact output for agents

SkillExtended access1.3KRepository stars
Editors’ pick

Paul Hudson's skill for reviewing and writing SwiftUI for iOS 26: deprecated APIs, data flow, navigation, accessibility, performance

SkillMinimal access6.5KRepository stars

Claude Code skill that takes an iOS or Flutter app from archive and signing to App Store submission and review rejection recovery.

SkillBroad access144Repository stars

mobilecli drives iOS and Android devices, emulators and apps from the terminal, and its skill teaches Claude Code how to use it

CLIBroad access317Repository stars

Lets Claude Code and Codex drive a real iPhone: read the screen, tap, type and scroll in any app

MCP serverBroad access494Repository stars

A set of skills, agents and commands for iOS, iPadOS, watchOS and tvOS development: Swift 6, SwiftUI, Liquid Glass and Apple Intelligence

PluginExtended access1.3KRepository stars

README in short

The README lists two files: `SKILL.md` with the main rules and `reference.md` comparing Logos with manual `MSHook*`. It then covers use in Cursor, Claude Code and Codex, personal and project installs, and symlinks that avoid three clones.

README badge

Original SKILL.md

---
name: ios-logos-tweak
description: Best practices for iOS jailbreak tweaks using Theos and Logos (%hook, %hookf, %new, %orig, %init). Prefer Logos and Substrate helpers (MSHookIvar) over manual hook/ivar runtime APIs. Covers firmware checks (IS_IOS_OR_NEWER vs @available vs respondsToSelector) and bracket messaging. Use when writing or reviewing .x/.xm tweak code, MobileSubstrate/libhooker hooks, swizzling, or Theos Tweak projects.
---

# iOS Logos Tweak Best Practices

## Core rule

Put hooking code in **Logos files** (`.x`, `.xm`, `.xi`) and express hooks with **Logos directives**. Let the Logos preprocessor emit `MSHookMessageEx`, `MSHookFunction`, `class_addMethod`, constructors, and class registration.

Do **not** hand-write Substrate hook boilerplate in tweak source unless Logos cannot express the case (rare; see [reference.md](reference.md)).

## File layout

**Default: `.x`.** Most tweaks use a single `Tweak.x` (Logos + Objective-C). Theos runs Logos on the file, then compiles the result as ObjC.

| Extension | Compiles as | When to use |
|-----------|-------------|-------------|
| **`.x`** | Objective-C | **Default.** `%hook`, `%hookf`, `%new`, `%orig`, `%property`, blocks, and normal Foundation/UIKit code. |
| **`.xm`** | Objective-C++ | Only when this **translation unit** needs C++ or Substrate’s C++ APIs (see below). |
| **`.xi` / `.xmi`** | Included fragments | Rare: Logos inside `#define` macros or `#include` chains; prefer splitting into separate `.x`/`.xm` files with `extern` instead ([Theos docs](https://theos.dev/docs/logos-file-extensions)). |

### Use `.xm` when this file contains

- **`MSHookIvar<T>`** or **`MSIvarHook`** (implemented as C++ templates in `<substrate.h>`).
- **C++** only valid in ObjC++: `std::`, `namespace`, templates, lambdas, C++ types in hook bodies.
- **`%orig`** forms that embed **block literals** in the hook implementation when your toolchain/setup requires ObjC++ for those expansions (uncommon; most hooks stay in `.x`).

### Stay on `.x` when

- Hooks are plain Objective-C (even with blocks, `@autoreleasepool`, etc.).
- You do not call `MSHookIvar` in that file.

If only one hook file needs ivar access, keep **`Tweak.x`** and add a small **`Something.xm`** (or move just those hooks to `.xm`) rather than renaming the whole project to `.xm` without reason.

Keep **interfaces and constants** in normal `.h` / `.m` when they are not hooks. Keep **all hooks** in Logos (`.x` / `.xm`, not raw `.m` with `MSHook*`).

Do not `#include <substrate.h>` in Logos files; Theos/Logos adds it in generated code.

## Objective-C methods: `%hook`

```logos
%hook YTPlayerViewController

Report a problem