Code Review
imbenrabi/Financial-Modeling-Prep-MCP-Server
Review a PR or working diff against this repo's intent layer (the AGENTS.md hierarchy), toolception pitfalls, and core invariants.
Write architecture fitness functions — deterministic tests that enforce a project's hard rules (module boundaries, offline guarantees, content contracts) from inside its own test target.
$ npx skills add rshankras/claude-code-apple-skills --skill fitness-functions -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install rshankras/claude-code-apple-skills fitness-functions --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/rshankras/claude-code-apple-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/testing/fitness-functions .claude/skills/fitness-functions && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "fitness-functions" agent skill from https://github.com/rshankras/claude-code-apple-skills/tree/main/skills/testing/fitness-functions into .claude/skills/fitness-functions/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "fitness-functions", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/rshankras/claude-code-apple-skills/tree/main/skills/testing/fitness-functionsType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add rshankras/claude-code-apple-skills --skill fitness-functions -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install rshankras/claude-code-apple-skills fitness-functions --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/rshankras/claude-code-apple-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/testing/fitness-functions .agents/skills/fitness-functions && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "fitness-functions" agent skill from https://github.com/rshankras/claude-code-apple-skills/tree/main/skills/testing/fitness-functions into .agents/skills/fitness-functions/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "fitness-functions", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add rshankras/claude-code-apple-skills --skill fitness-functions -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install rshankras/claude-code-apple-skills fitness-functions --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/rshankras/claude-code-apple-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/testing/fitness-functions .cursor/skills/fitness-functions && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "fitness-functions" agent skill from https://github.com/rshankras/claude-code-apple-skills/tree/main/skills/testing/fitness-functions into .cursor/skills/fitness-functions/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "fitness-functions", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/rshankras/claude-code-apple-skills.git --path skills/testing/fitness-functions--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add rshankras/claude-code-apple-skills --skill fitness-functions -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install rshankras/claude-code-apple-skills fitness-functions --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/rshankras/claude-code-apple-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/testing/fitness-functions .gemini/skills/fitness-functions && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "fitness-functions" agent skill from https://github.com/rshankras/claude-code-apple-skills/tree/main/skills/testing/fitness-functions into .gemini/skills/fitness-functions/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "fitness-functions", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install rshankras/claude-code-apple-skills fitness-functionsInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add rshankras/claude-code-apple-skills --skill fitness-functions -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/rshankras/claude-code-apple-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/testing/fitness-functions .github/skills/fitness-functions && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "fitness-functions" agent skill from https://github.com/rshankras/claude-code-apple-skills/tree/main/skills/testing/fitness-functions into .github/skills/fitness-functions/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "fitness-functions", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add rshankras/claude-code-apple-skills --skill fitness-functions -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install rshankras/claude-code-apple-skills fitness-functions --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/rshankras/claude-code-apple-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/testing/fitness-functions .opencode/skills/fitness-functions && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "fitness-functions" agent skill from https://github.com/rshankras/claude-code-apple-skills/tree/main/skills/testing/fitness-functions into .opencode/skills/fitness-functions/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "fitness-functions", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
fitness-functionsWrite architecture fitness functions — deterministic tests that enforce a project's hard rules (module boundaries, offline guarantees, content contracts) from inside its own test target.
Fitness Functions is an agent skill from rshankras/claude-code-apple-skills. Write architecture fitness functions — deterministic tests that enforce a project's hard rules (module boundaries, offline guarantees, content contracts) from inside its own test target. Use when a constraint lives only in prose (CLAUDE.md, code review) and should become un-arguable.
Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files.
It sits in Development, covering Agent instruction files and Code review. The repository describes itself as: Claude Code skills for Apple platform development (iOS, macOS, iPadOS) — product validation, code generation, App Store optimization, and more. The licence is MIT.
5 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 9ffb831. It shows what the files ask for, not the result of running them.
Pre-approves these tools, so the agent can use them without asking each time:
ReadWriteEditGlobGrepBashFrom allowed-tools in the SKILL.md frontmatter.
Ships script files (Swift), which the agent can run.
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Fitness Functions loads about 2k tokens when it runs. Until then it costs about 76 tokens; SKILL.md has 971 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check noted patterns worth knowing about, such as sudo or a known installer.
allowed-tools: Read, Write, Edit, Glob, Grep, BashAutomated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from rshankras/claude-code-apple-skills at commit 9ffb831, republished under its MIT licence (© rshankras). 971 words, ~2,024 tokens.
.claude/skills/fitness-functions/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.A fitness function is an ordinary test that enforces an architectural rule instead of a behavior. It lives in the app's own test target, runs under every existing test gate forever, and turns "the agent said it's fine" into an exit code. This is the gauntlet's answer for invariants no unit test of behavior can see: a file quietly importing a framework it must not touch, a registry drifting from its documented size, user-facing copy breaking its format contract.
Use this skill when:
/apple:review structural finding is being graduated into permanent enforcementA per-line regex (SwiftLint custom_rules) can flag a line. A fitness function can assert a set: "the files importing MusicKit are exactly these four", "the mode registry has exactly 21 entries", "every case's copy fits the format". Sets, counts, and cross-file facts need code, and putting that code in the test target means no new tooling, no CI wiring — it rides the test gate that already exists.
Enforces "only these files may import X." The test walks the shipped source tree and compares the actual importer set against an allowlist — so a fifth importer fails a test, not a code review.
Key rules (learned in production):
#filePath, never a hardcoded path — the test stays correct wherever the repo is checked out.line == "import X"), not contains — comments documenting the contract itself must not count as hits.URLSession without importing the fenced framework). Scan for the raw API strings (URLSession(, URLSession.shared) outside the boundary too.Template: templates/ImportBoundaryTests.swift
Enforces "this code path never attempts X" — stronger than "happens to succeed without X." The canonical case is an offline guarantee: register a URLProtocol subclass that intercepts, counts, and fails every network request, drive the real production path, and assert the counter stayed at zero.
Key rules:
defer.interceptedRequestCount == 0: the contract is zero attempts, not zero successes.Template: templates/NetworkSentinelTests.swift
Pins facts that must change deliberately, never by drift.
Count pins — registry and configuration sizes:
// Phase 3.5 added 3 modes — 9 modes, 5 streaming.
// Phase 3.8 added the four reunion music games — 15 modes, 9 streaming.
// Phase 3.10 added the DJ-host quartet — 18 modes, 10 streaming.
#expect(PartyOccasion.bigParty.modes.count == 18)
#expect(PartyOccasion.bigParty.modes.filter(\.usesDJEngine).count == 10)The comment trail is mandatory: each pinned number carries its history, so updating the pin is a reviewed decision with a written reason, not a chore silenced with an edit.
Copy-contract pins — structural rules on user-facing content, iterated over CaseIterable so new cases are covered automatically:
@Test func everyModeHasExactlyThreeBeats() {
for mode in GameMode.allCases {
#expect(mode.howItPlaysBeats.count == 3, "\(mode.rawValue) has \(mode.howItPlaysBeats.count) beats, expected 3")
}
}Plus a few verbatim exemplars pinned with exact equality — a future content pass must change those deliberately, not by accident.
Template: templates/ContractPinTests.swift
Read CLAUDE.md / APP.md / file-header comments for hard rules currently enforced by nothing. Good candidates state a set or bound: "only", "never", "exactly", "at most", "every".
| The rule is about… | Pattern |
|---|---|
| Which files may use a framework/API | 1 — import-boundary scan (+ API-surface companion) |
| What a code path may do at runtime | 2 — runtime sentinel |
| A size, format, or exact content | 3 — contract pins |
Copy the matching template into the existing unit-test target and adapt. One suite per invariant; name it after the guarantee (OfflineGuaranteeTests), not the mechanism. Every failure message must tell the fixer which side to change — the code or the contract — and where the contract is documented.
A fitness function that has never failed is unverified. Before committing:
Record the red/green pair in the commit message or PR. Repeat the drill whenever the suite's scanning logic (not its data) changes.
The suite ships in the normal test target. No special CI wiring — every existing test gate now enforces the rule.
## Fitness Function: [invariant]
- **Rule source**: CLAUDE.md hard rule N / [file header]
- **Pattern**: import-boundary | runtime sentinel | contract pin
- **Suite**: Tests/[Name]Tests.swift
- **Deliberate-break drill**: [what was broken] → failed with "[message]" → reverted → green| Pitfall | Problem | Solution |
|---|---|---|
contains("import X") matching | Comments about the rule count as violations | Compare exact trimmed lines |
| Hardcoded source paths | Breaks on other checkouts/CI | Derive root from #filePath |
| Pinning counts without history | Updating the pin becomes a mindless chore | Comment trail explaining every number |
| Import check only | Direct API calls bypass the fence | Add the API-surface companion scan |
| Never proven red | Scan bug silently passes everything | Deliberate-break drill before commit |
| Allowlist grows without comment | Fence decays into a headcount | Each entry documents why it's inside the boundary |
testing/tdd-bug-fix/ — prove-red discipline for behavioral bugstesting/test-contract/ — runtime behavioral invariants across implementationsswift/code-size/ — the complexity/size half of the deterministic gauntlettesting/coverage-ratchet/ — coverage floor that only rises© rshankras, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 3 other files in skills/testing/fitness-functions of rshankras/claude-code-apple-skills.
Open the folder on GitHubat commit 9ffb831
Fitness Functions next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Fitness Functions this skillrshankras/claude-code-apple-skills | 787 | — | ~2k | Automated safety check: Notes | MIT | |
| Code Reviewimbenrabi/Financial-Modeling-Prep-MCP-Server | 150 | — | ~2.6k | Automated safety check: Pass | Apache-2.0 | |
| Shipmillionco/react-doctor | 15k | — | ~716 | Automated safety check: Pass | Custom licence | |
| Promptkitmicrosoft/PromptKit | 111 | — | ~420 | Automated safety check: Pass | MIT | |
| Megingiard Code Reviewstormpanda/megingiard | 155 | — | ~2.9k | Automated safety check: Pass | Custom licence | |
| Ad ReviewCorridorTech/PoseCap | 224 | — | ~2.4k | Automated safety check: Notes | Apache-2.0 |
imbenrabi/Financial-Modeling-Prep-MCP-Server
Review a PR or working diff against this repo's intent layer (the AGENTS.md hierarchy), toolception pitfalls, and core invariants.
millionco/react-doctor
Take the current branch from done-coding to merge-ready in one pass — review the diff against AGENTS.md, deslop, commit and push, open a PR using rule-validate's PR copy, then babysit until mergeable.
microsoft/PromptKit
PromptKit composition engine. An agent skill from microsoft/PromptKit.
stormpanda/megingiard
Conduct a thorough code review of the current Git branch or specific files in Megingiard.
CorridorTech/PoseCap
Two-axis fresh-context code review per WORKFLOW §10. An agent skill from CorridorTech/PoseCap.
dralgorhythm/claude-agentic-framework
Compiles REVIEW.md and keeps CLAUDE.md accurate as the two sanctioned surfaces for steering Anthropic's managed Code Review service, translating this repo's rules into terse reviewer imperatives.
rshankras/claude-code-apple-skills
Generate accessibility infrastructure for VoiceOver, Dynamic Type, and accessibility features.
rshankras/claude-code-apple-skills
SwiftUI animation patterns including springs, transitions, PhaseAnimator, KeyframeAnimator, SF Symbol effects, scroll-driven effects, mesh gradients, text renderers, and shader effects.
rshankras/claude-code-apple-skills
Generate compelling App Store descriptions that convert browsers into users.
rshankras/claude-code-apple-skills
Generates an app icon for macOS or iOS — a fast CoreGraphics placeholder and/or flat layered source art to finish in Icon Composer (the Liquid Glass / iOS 26+ standard).
rshankras/claude-code-apple-skills
Turn an app idea into validated, App-Store-ready name candidates.
rshankras/claude-code-apple-skills
Revenue beyond the single-app price tag — own-app bundles, Family Sharing as a conversion lever, cross-developer bundles & suites, and institutional licensing via Group Purchases / Apple School &…
Categories
Write architecture fitness functions — deterministic tests that enforce a project's hard rules (module boundaries, offline guarantees, content contracts) from inside its own test target. Fitness Functions is an agent skill from rshankras/claude-code-apple-skills. Write architecture fitness functions — deterministic tests that enforce a project's hard rules (module boundaries, offline guarantees, content contracts) from inside its own test target.
Fitness Functions fits situations like: A constraint lives only in prose (CLAUDE.md; code review) and should become un-arguable.
Run `npx skills add rshankras/claude-code-apple-skills --skill fitness-functions -a claude-code`. Or copy the skill folder (skills/testing/fitness-functions in rshankras/claude-code-apple-skills) into .claude/skills/fitness-functions in your project. Claude Code loads it when a task matches its description.
Run `npx skills add rshankras/claude-code-apple-skills --skill fitness-functions -a codex`. Or copy the skill folder (skills/testing/fitness-functions in rshankras/claude-code-apple-skills) into .agents/skills/fitness-functions in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add rshankras/claude-code-apple-skills --skill fitness-functions -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/fitness-functions, .gemini/skills/fitness-functions, .github/skills/fitness-functions and .opencode/skills/fitness-functions in your project.
Going by SKILL.md and its folder, Fitness Functions needs Swift for the scripts in its folder. Its frontmatter pre-approves these tools: Read, Write, Edit, Glob, Grep, Bash.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found notes only (pre-approves every shell command (allowed-tools: bash)), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.
Fitness Functions is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2k tokens (SKILL.md is roughly 8.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Fitness Functions: Code Review (imbenrabi/Financial-Modeling-Prep-MCP-Server, 150 stars), Ship (millionco/react-doctor, 15k stars), Promptkit (microsoft/PromptKit, 111 stars) and Megingiard Code Review (stormpanda/megingiard, 155 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
rshankras (a GitHub user) maintains it in rshankras/claude-code-apple-skills, which has 787 GitHub stars. The repository holds 41 skills in this directory. The repository was last updated on July 24, 2026.
Source: rshankras/claude-code-apple-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.