swift-skeleton: Instructions file for Codex

AGENTS.md

swift-skeleton AGENTS.md is an instructions file for Codex, OpenCode from 1amageek/swift-skeleton. It costs 2,534 tokens per session, scanned A, original, MIT.

Development instructions for Swift Skeleton, a macOS-focused code indexer that quickly lists declarations and their locations across several programming languages. It uses parsers to show types, properties, methods, and source positions without retaining function bodies.

In plain words
What is it for?
Use it when developing or contributing to the Swift-based library, daemon, or skltn command-line tool, including its parsers and JSON-RPC communication.
Why use it?
It defines what the indexer supports, how its output must be ordered and formatted, and which features are intentionally out of scope. This helps contributors change the project without breaking its output contract.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions AGENTS.md.

This is 1amageek/swift-skeleton's own configuration. It tells Codex and OpenCode how to work on swift-skeleton itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything swift-skeleton configures →

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /Users/1amageek/Desktop/swift-skeleton/Sources/SkeletonIndexCore.

Reuse

Borrowing it

Nothing to install: this file belongs to 1amageek/swift-skeleton. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/1amageek/swift-skeleton/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/1amageek/swift-skeleton

Made for: Codex, OpenCode.

Wrote 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.

agentmods badge for swift-skeleton AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/1amageek/swift-skeleton/agents-md/github.svg)](https://agentmods.dev/instructions/1amageek/swift-skeleton/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/1amageek/swift-skeleton/agents-md"><img src="https://agentmods.dev/badge/instructions/1amageek/swift-skeleton/agents-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.

agentmods 80×15 button for swift-skeleton AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/1amageek/swift-skeleton/agents-md"><img src="https://agentmods.dev/badge/instructions/1amageek/swift-skeleton/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,534 This file is loaded in full into every session.
When invoked 2,534 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.02534 $0.02534
Opus 5.5 $0.01014 $0.01014
Sonnet 5.5 $0.00507 $0.00507
Haiku 4.5 $0.00253 $0.00253

Measured 18d ago against content hash e6231748b48b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

swift-skeleton AGENTS.md 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 18d 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.

AGENTS.md · 162 lines

How it starts

The opening of the file, as written. The whole thing — 162 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AGENTS.md (Current Spec)

リポジトリ

Ignore / 生成物ポリシー

  • 生成物・実行時ファイルはコミットしない。
  • indexer/daemonの作業ディレクトリは原則 .skeletonindex/ 配下に集約する。
  • ソケット、PID、ログなどのランタイムファイルは常に一時物として扱う。
  • 秘匿情報(.env など)は追跡対象にしない。

目的

  • 「当たり付け最優先」で宣言スケルトンと位置情報を高速に返す。
  • 組み込みパーサはASTから短い実装証拠を生成し、レビュー対象を[impl:*]で示す。
  • 関数本文は保持しない。詳細はヒット後に原文へジャンプして確認する。
  • パース不全でも停止しない。部分出力し、不確実性を明示する。

スコープ

  • 対象: Swift / Kotlin / TypeScript / Go / Zig / Rust / C++ / Python / Java
  • 実装: Swift + SPM
  • 形態:
    • Embedded: ライブラリ呼び出し
    • Sidecar: 常駐デーモン + JSON-RPC 2.0 (stdin/stdout)
  • CLI: skltn
  • パーサ: 各言語のTree-sitter grammar
  • 対応OS: macOS優先

非スコープ

  • 名前解決
  • 型推論
  • 関数本文の保持・出力
  • call graph生成や意味的な呼び出し解決
  • 実装アルゴリズムの正当性証明
  • LSP統合
  • コメント保持やコード整形

出力契約(必須)

  • ブロック単位は type / extension。
  • 並び順:
    • files: path 昇順
    • blocks: 出現順
    • props/methods: 出現順
  • ヘッダ形式:
    • class/struct/enum/protocol: <kw> <TypeName>: <Inheritance...> [<file>:<start>-<end>]
    • extension: extension <TypeName>: <Protocols...> [<file>:<start>-<end>]
    • 継承・準拠が空なら : 以降は省略
  • props:
    • props: <name>:<TypeRef>, ...
    • 型注釈なしは出力しない
  • methods:
    • <name>(<ParamTypeRef...>) -> <ReturnTypeRef> [<start>-<end>]
    • init(<ParamTypeRef...>) [<start>-<end>]
    • 引数型不明は ?、戻り型不明は -> を省略
  • エラー表示:
    • ファイル先頭に # parse_error <filePath>
    • ブロック内にERRORがあればヘッダ末尾に (!)
    • 不明は ?(例: [?-?], start-?)
  • 実装シグナル:
    • ブロックヘッダ末尾: [impl:<domains>]
    • メソッド末尾: [impl!:<reason>] または [impl?:<reason>]
    • reasons: trap / empty / const / noop / flow / error / wire / dead
    • --headers-onlyはブロック単位の実装シグナルを保持する。

アーキテクチャ境界

  • Core
    • parse/build/update/queryの純機能
    • Skeletonテキスト、メタデータ、Implementation Fingerprintを生成
  • TreeSitterSupport
    • Tree-sitterノードを本文非保持の実装証拠へ縮約
  • Language Parsers
    • Tree-sitterノードから宣言、range、実装証拠を抽出
  • Client
    • SkeletonIndexService プロトコルを公開
    • EmbeddedService と SidecarService を透過化
  • Daemon
    • project open/close
    • status/diagnostics/update/query応答
    • watchは任意(未実装でもv1可)
  • CLI
    • one-shot用途(get / query / status / diagnostics / files / languages)
    • getが正式な取得コマンド。skeleton / get_skeleton / buildは互換alias。

Read the full file on GitHub · 162 lines

Changes

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.

  1. 18d ago Changed · +3 lines · +185 tokens per session e6231748b48b
  2. 1mo ago First seen · 159 lines · 2,349 tokens per session scan A 3142b6550ad9

Subscribe to this mod's changes

swift-skeleton AGENTS.md is an instructions file published in the GitHub repository 1amageek/swift-skeleton (17 stars, last pushed 19d ago), licensed MIT. It adds 2,534 tokens to every session, about $0.0101 per session on Opus 5.5. 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-30.

Related

Other instructions, from other repositories