Borrowing it
Nothing to install: this file belongs to leshkodev/freetube. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/leshkodev/freetube/main/CLAUDE.mdgit clone --depth 1 https://github.com/leshkodev/freetubeWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/leshkodev/freetube/claude-md)<a href="https://agentmods.dev/instructions/leshkodev/freetube/claude-md"><img src="https://agentmods.dev/badge/instructions/leshkodev/freetube/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/leshkodev/freetube/claude-md"><img src="https://agentmods.dev/badge/instructions/leshkodev/freetube/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.09979 | $0.09979 |
| Opus 5.5 | $0.03992 | $0.03992 |
| Sonnet 5.5 | $0.01996 | $0.01996 |
| Haiku 4.5 | $0.00998 | $0.00998 |
Grade A, and why
freetube CLAUDE.md scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
6. **Critical: `--ffmpeg-location /dev/null/no-ffmpeg` is forced**, so yt-dlp's Python-side ffmpeg merger never runs. yt-dlp's `subprocess.Popen` against ffmpeg reliably hangs Python in `Popen.communicate` on iOS. We mux How it starts
The opening of the file, as written. The whole thing — 514 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md
This file gives Claude Code the context, constraints, and conventions it must follow when working in this repository. Read it fully before touching any code. Re-read it when starting a new session.
1. What this project is
FreeTube iOS — a native SwiftUI YouTube client that replicates the YouTube mobile app: home feed, search, playback, login, subscriptions, library, history, playlists, comments, likes, downloads. Plus a "Link" tab for downloading from any of ~2,000 sites supported by yt-dlp.
Distribution: TestFlight internal, sideload, or personal use. Not for public App Store submission. Do not suggest changes that assume App Store distribution.
Platforms: iOS 17.0+, Swift 5.9+, Xcode 15+.
Bundle identifier: com.leshko.freetube. This is also the reverse-DNS namespace for the os.Logger subsystem, the Keychain cookie key (com.leshko.freetube.cookies), the UserDefaults keys (subscriptions / downloads / metadata), and internal Notification.Names. Keep all of them on this same domain. Changing the identifier invalidates provisioning profiles and resets Keychain / UserDefaults state for any prior install.
2. Non-negotiable constraints
These come first. Violating them breaks the project.
- No Google Cloud YouTube Data API. All YouTube interaction goes through
b5i/YouTubeKit(cookie-based, no API key). Never suggestGoogleAPIClientForREST,YTPlayerView, IFrame embeds, orhttps://www.googleapis.com/youtube/v3/.... - No
dimitris-c/AudioStreaming. It is for raw audio streams (Icecast/Shoutcast). YouTube serves HLS/DASH. Playback usesAVPlayeronly. - No App Store assumptions. Do not add capabilities, entitlements, or workarounds aimed at App Store review (e.g. avoiding
WKWebViewcookie reads, hiding download functionality). Sideload-honest behavior is expected. - No telemetry, analytics, or remote logging by default. Logs go to
os.Loggeronly. Never add SDKs that beacon out. - Cookies are sensitive. Always store in Keychain via
KeychainHelper. Never write them to disk,UserDefaults, plist, or logs. Never print cookie values. - Signed stream URLs are sensitive and time-limited. Never persist them. In-memory cache only (
StreamURLCache), 30-minute TTL max. - MVVM with service layer is mandatory. Views do not import
YouTubeKitorYoutubeDL. ViewModels do not perform networking directly — they call services inCore/Networking/. - SwiftUI only for UI. No UIKit
UIViewControllersubclasses except where bridging is unavoidable (AVPlayerViewController,WKWebView,AVPictureInPictureController). Wrap those inUIViewControllerRepresentable/UIViewRepresentable. - Swift Concurrency is the default. Use
async/awaitandAsyncSequence. Use Combine only insidePlayerStateManagerforAVPlayertime observation. Do not introduce RxSwift. - No force unwraps in production code. Use
guard let,if let, or properthrow. Force unwraps allowed only in test fixtures. @Observableis the default for view models, notObservableObject. Injected through SwiftUI@Environment(...).
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2mo ago First seen · 514 lines · 9,979 tokens per session scan A c7464f3bf27d
freetube CLAUDE.md is an instructions file published in the GitHub repository leshkodev/freetube (213 stars, last pushed 4mo ago), licensed MIT. It adds 9,979 tokens to every session, about $0.0399 per session on Opus 5.5. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
freetube CLAUDE.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| freetube CLAUDE.mdleshkodev/freetube | Instructions file | 213 | 4mo ago | MIT | A | 9,979 | Claude Code |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 9,719 | GitHub Copilot |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 5,516 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | today | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | today | MIT | A | 4,680 | Codex, OpenCode |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 3,093 | GitHub Copilot |
| vscode model-prompts.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 2,022 | GitHub Copilot |