AGENT SKILL

context-cost

Report harness context overhead (KB, words, estimated tokens) for a given path by walking the directory tree and collecting all CLAUDE.md, agents.md, and @-import files the harness auto-loads. Use when the user types /context-cost or /ctx-cost, or wants to know what files are loading into context.

License 许可
MIT
最近更新
2026-07-06
Stars
★ 1
Forks
0

01 前言 Front Matter

name
context-cost
tools
Bash
description
Report harness context overhead (KB, words, estimated tokens) for a given path by walking the directory tree and collecting all CLAUDE.md, agents.md, and @-import files the harness auto-loads. Use when the user types /context-cost or /ctx-cost, or wants to know what files are loading into context.

03 SKILL.md 正文

Skill: /context-cost

Model preference: #lowcost

Report how much context overhead the harness will auto-load for a given path — walking up the directory tree and collecting every CLAUDE.md, CLAUDE.local.md, agents.md, and @-import file pulled in at session start.


Arguments

/context-cost [path]

  • path — optional; defaults to the current working directory if omitted.

Step-by-step execution

Step 1 — Locate the script

Find context_cost.py in the bin/ directory of the SAILL repo. If you are running from within a tested_implementation directory, the script is at ../../bin/context_cost.py relative to your working directory. If running from the repo root, it is at bin/context_cost.py.

Run:

python <path-to-bin>/context_cost.py <target-path> --json

If the script is not found, report its expected location and stop.

Step 2 — Parse and format the output

The JSON structure is:

{
  "path": "...",
  "files": [
    {"level": N, "path": "...", "kb": N, "words": N, "tokens": N, "imported_by": "..." or null}
  ],
  "total_kb": N,
  "total_words": N,
  "total_tokens": N
}

Step 3 — Present the report

3.1 Print: Context overhead for: <path>

3.2 Print a table sorted by level (outermost first):

Level  File                              KB     Words   ~Tokens
-----  --------------------------------  -----  ------  -------
  0    CLAUDE.md                         1.2    210     280
  1    agents.md                         3.4    580     775
       (imported by CLAUDE.md)

Show (imported by <basename>) on a sub-line when imported_by is non-null.

3.3 Print totals:

Total: N files — X.X KB — Y words — ~Z tokens

3.4 Threshold flags:

  • If total_tokens >= 20000: [WARN] High context load: ~Z tokens. Consider trimming @-imports.
  • Else if total_tokens >= 8000: [NOTE] Moderate context load: ~Z tokens. Worth reviewing.
  • Otherwise: no flag.

04 同仓库更多 Skills

HorizonBrute
HorizonBrute/Standardized_AI_Looping_Language-SAILL

try-my-prompt

Take a natural-language prompt and return two outputs — an agent_teams.md SAILL entry and a terse one-line invocation — by invoking /convert-prompt-to-saill and formatting the result.

★ 1
HorizonBrute
HorizonBrute/Standardized_AI_Looping_Language-SAILL

test_saill_in_skill

Proof-of-concept SAILL-in-skill. Replaces a wordy dirtree-check skill with a tight SAILL block. Audits tested_implementations nonce coverage via the Nonce Trace Audit team.

★ 1
HorizonBrute
HorizonBrute/Standardized_AI_Looping_Language-SAILL

test-agent-teams

End-to-end self-test of the Agent Teams system — walk every defined team (or one named team) and spawn each role so it echoes a self-generated nonce, its role, what it was told to do (its charter), and the model it actually ran as. Use when the user types /test-agent-teams --all-teams (all) or /test-agent-teams <team-name> (one team), says "test the agent teams", "run the agent-team self-test", or wants to verify team resolution + model routing. The skill generates its own nonce.

★ 1
HorizonBrute
HorizonBrute/Standardized_AI_Looping_Language-SAILL

saill-to-english

Translate a SAILL agent-team definition into plain English — render every primitive, loop, box, flag, and -context- placeholder as natural language a non-technical reader can follow. Use when the user types /saill-to-english, says "translate this SAILL", "explain this team definition", "what does this loop do", or "describe this in plain English".

★ 1
HorizonBrute
HorizonBrute/Standardized_AI_Looping_Language-SAILL

model-prefs

Configure or inspect the in-context model-preference layer — model groups (incl. local/BYO models), per-session slots, and task-class routing — by editing the gitignored extend file. Use when the user types /model-prefs, asks to "set up model groups", "define

★ 1
HorizonBrute
HorizonBrute/Standardized_AI_Looping_Language-SAILL

model-prefs-test

Test which model the model-preference config actually resolves to per group, and (in live mode) spawn small test agents by group name to confirm the spawn honors it. Use when the user types /model-prefs-test, or says "test my model prefs", "check which model

★ 1