swift-skeleton AGENTS.md

swift-skeleton AGENTS.md is an instructions file for Codex, OpenCode from 1amageek/swift-skeleton. It costs 2,349 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

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/1amageek/swift-skeleton/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.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.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,349 This file is loaded in full into every session.
When invoked 2,349 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.02349 $0.02349
Opus 5 $0.01175 $0.01175
Sonnet 5 $0.00470 $0.00470
Haiku 4.5 $0.00235 $0.00235

Measured 5d ago against content hash 3142b6550ad9, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 5d 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 · 159 lines

How it starts

The opening of the file, as written. The whole thing — 159 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 プロトコルを公開
    • EmbeddedServiceSidecarService を透過化
  • 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 · 159 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. 5d 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 (15 stars, last pushed 1mo ago), licensed MIT. It adds 2,349 tokens to every session, about $0.0117 per session on Opus 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.