Borrowing it
Nothing to install: this file belongs to BlueEventHorizon/Swift-Selena. 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/BlueEventHorizon/Swift-Selena/main/.claude/commands/create-code-headers.mdgit clone --depth 1 https://github.com/BlueEventHorizon/Swift-SelenaWrote 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/commands/blueeventhorizon/swift-selena/create-code-headers)<a href="https://agentmods.dev/commands/blueeventhorizon/swift-selena/create-code-headers"><img src="https://agentmods.dev/badge/commands/blueeventhorizon/swift-selena/create-code-headers/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/commands/blueeventhorizon/swift-selena/create-code-headers"><img src="https://agentmods.dev/badge/commands/blueeventhorizon/swift-selena/create-code-headers.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.00000 | $0.01050 |
| Opus 5.5 | $0.00000 | $0.00420 |
| Sonnet 5.5 | $0.00000 | $0.00210 |
| Haiku 4.5 | $0.00000 | $0.00105 |
Grade A, and why
create-code-headers scanned grade A with 0 findings 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 1mo 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 134 lines — stays where its author put it; the contents beside it link to each section on GitHub.
全SwiftファイルにAI検索可能なコードヘッダーコメントを生成・追加する
使用方法
/create-code-headers # 全ファイル対象
/create-code-headers --update # 全ファイル上書き
/create-code-headers --changed # git変更ファイルのみ
/create-code-headers DI/* # DIディレクトリ配下のみ
/create-code-headers Tools/Core/*.swift # 特定パターン
/create-code-headers StreamManager.swift MockAssertion.swift # 個別ファイル指定
モード:
- デフォルト:
[Code Header Format]マーカーがあるファイルはスキップ - --update: すべてのファイルで生成・上書き
- --changed: git変更ファイルのみ対象
ファイル指定:
- ワイルドカード対応(
*,**) - 拡張子省略時は自動的に
.swiftを追加 - 相対パス/絶対パス両対応
- 複数ファイル/パターン指定可能(スペース区切り)
実行フロー
Step 1: ファイルスキャン
スキャン方法の判定:
ファイル/パターン指定あり
実行:
引数からファイルパターンを取得
→ ワイルドカード展開(Glob)
→ 拡張子省略時は自動的に.swift追加
→ 除外パターンでフィルタリング
例:
DI/* → Glob("DI/*.swift")
Tools/Core/StreamManager → Tools/Core/StreamManager.swift
Tools/**/*.swift → そのままGlob実行
--changed の場合
実行:
git status --porcelain
処理:
- 変更ファイルリストから
.swiftファイルのみ抽出 - 除外パターンでフィルタリング
- ファイル数を表示
デフォルト・--update(引数なし)
対象ディレクトリ:
Tools/**/*.swift
Library/**/*.swift
Domain/**/*.swift
App/**/*.swift
Infrastructure/**/*.swift
DI/**/*.swift
実行:
- Glob()で対象ファイルをスキャン
- 除外パターンでフィルタリング
- ファイル数を表示
除外パターン(共通):
- ファイル名に
TestまたはTestsを含む - ファイル名が
Mockで始まる Preview Content/ディレクトリ配下
出力例:
対象ファイルをスキャン中...
✅ 対象: 166ファイル
✅ 対象: 5ファイル(--changedモード)
✅ 対象: 2ファイル(DI/*)
Step 2: 並行処理でヘッダー生成
複数Agentを並行起動:
code-header-generatorAgentを並行起動- 各Agentが1ファイルずつ処理
- 同時実行数: 5-10 Agent(システム負荷に応じて調整)
重要: 複数のTask toolを1つのメッセージで同時に呼び出す
Agent起動:
- デフォルトモード:
Task(prompt="対象ファイル: AppVersion.swift")(モード指定なし) - 更新モード:
Task(prompt="対象ファイル: AppVersion.swift, モード: update")
進捗表示:
コードヘッダー生成中...
[=========> ] 50/166 (30%)
- 生成: 30件
- スキップ: 20件
Step 3: 完了報告
出力例:
✅ コードヘッダー生成完了
処理結果:
- 対象ファイル: 166件
- 新規生成: 50件
- 更新: 0件(--updateモード時のみ)
- スキップ: 116件(既存ヘッダーあり)
- エラー: 0件
次のステップ:
- Swift-Selena MCPでDB構築(将来実装)
- search_code()で検索可能
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.
- 1mo ago First seen · 134 lines · 0 tokens per session scan A d76e8e5b2c46
create-code-headers is a command published in the GitHub repository BlueEventHorizon/Swift-Selena (5 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,050 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other commands, from other repositories
resolve-deps
Diagnose and resolve Swift Package Manager dependency conflicts (launches spm-conflict-resolver agent).
erne-native-module
ERNE — Create native modules with sequential native-bridge-builder then code-reviewer agents.
axiom-resolve-deps
Diagnose and resolve Swift Package Manager dependency conflicts (Delegate to the spm-conflict-resolver subagent).
initialize-ios
Manual override: initialize ast-index for iOS/Swift/ObjC project.
kotlin-review
Comprehensive Kotlin code review for idiomatic patterns, null safety, coroutine safety, and security. Invokes the kotlin-reviewer agent.
kotlin-review
Comprehensive Kotlin code review for idiomatic patterns, null safety, coroutine safety, and security. Invokes the kotlin-reviewer agent.