doesitfire 0.1.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,306 @@
1
+ Metadata-Version: 2.5
2
+ Name: doesitfire
3
+ Version: 0.1.2
4
+ Summary: Does your SKILL.md actually fire? Test skill activation in Claude Code, Codex and OpenCode with one command.
5
+ Project-URL: Homepage, https://github.com/diegoperezg7/doesitfire
6
+ Project-URL: Repository, https://github.com/diegoperezg7/doesitfire
7
+ Project-URL: Issues, https://github.com/diegoperezg7/doesitfire/issues
8
+ Project-URL: Changelog, https://github.com/diegoperezg7/doesitfire/blob/main/CHANGELOG.md
9
+ Author: Diego Pérez
10
+ License-Expression: MIT
11
+ License-File: LICENSE
12
+ Keywords: agent-skills,claude-code,codex,evaluation,llm,opencode,skill-md,testing
13
+ Classifier: Development Status :: 3 - Alpha
14
+ Classifier: Environment :: Console
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Topic :: Software Development :: Testing
22
+ Requires-Python: >=3.11
23
+ Requires-Dist: openai==3.42.1
24
+ Requires-Dist: pyyaml==6.0.3
25
+ Requires-Dist: rich==15.0.0
26
+ Requires-Dist: typer==0.27.3
27
+ Description-Content-Type: text/markdown
28
+
29
+ <p align="center">
30
+ <img src="docs/assets/banner.svg" alt="doesitfire" width="560">
31
+ </p>
32
+
33
+ <p align="center">
34
+ <a href="https://github.com/diegoperezg7/doesitfire/actions/workflows/ci.yml"><img alt="CI" src="https://github.com/diegoperezg7/doesitfire/actions/workflows/ci.yml/badge.svg"></a>
35
+ <a href="LICENSE"><img alt="License: MIT" src="https://img.shields.io/badge/license-MIT-a1319b"></a>
36
+ <a href="https://github.com/diegoperezg7/doesitfire/releases"><img alt="Release" src="https://img.shields.io/github/v/release/diegoperezg7/doesitfire?color=a1319b"></a>
37
+ <a href="https://github.com/diegoperezg7/doesitfire/stargazers"><img alt="Stars" src="https://img.shields.io/github/stars/diegoperezg7/doesitfire?style=flat&color=a1319b"></a>
38
+ </p>
39
+
40
+ <p align="center"><b>Does your SKILL.md actually fire? Test skill activation in Claude Code, Codex and OpenCode with one command.</b></p>
41
+
42
+ <p align="center"><a href="README.es.md">Leer en español</a> · <a href="https://diegoperezg7.github.io/doesitfire/">Example report</a></p>
43
+
44
+ <p align="center"><img src="docs/assets/demo.gif" alt="doesitfire demo in a terminal" width="820"></p>
45
+
46
+ You wrote a skill. Its `description` is the only thing the agent sees when it decides whether to load it.
47
+ Does Claude Code load it when a user asks for it? Does Codex? Does OpenCode? Does it also load when nobody asked?
48
+ doesitfire runs the real agent CLIs on prompts that should and should not trigger each skill, a few times each,
49
+ and gives you one activation matrix per agent.
50
+
51
+ ## Why
52
+
53
+ Other tools test part of this:
54
+
55
+ | Tool | What it measures | Agents |
56
+ |---|---|---|
57
+ | [microsoft/waza](https://github.com/microsoft/waza) (1,499★) | Has trigger tests, run through its GitHub Copilot executor | GitHub Copilot |
58
+ | `claude plugin eval` (built into the Claude Code CLI) | Eval cases with graders against a plugin or skills dir | Claude Code only |
59
+ | [darkrishabh/agent-skills-eval](https://github.com/darkrishabh/agent-skills-eval) (809★) | Output quality with vs without the skill injected | Not activation |
60
+ | [NVIDIA/SkillEvaluator](https://github.com/NVIDIA/SkillEvaluator) (626★) | Output quality with vs without the skill injected | Not activation |
61
+ | **doesitfire** | **Whether the real agent loads the skill on its own**, and how often it loads it when it should not | **Claude Code, Codex, OpenCode** |
62
+
63
+ Star counts from the GitHub API on 3 Nov 2026.
64
+
65
+ ## Quickstart
66
+
67
+ The demo needs no API key, no Docker and no model. It shows a **recorded** real run of the three
68
+ example skills in [`examples/`](examples):
69
+
70
+ ```bash
71
+ uvx --from git+https://github.com/diegoperezg7/doesitfire@v0.1.2 doesitfire demo
72
+ ```
73
+
74
+ or from a clone:
75
+
76
+ ```bash
77
+ git clone https://github.com/diegoperezg7/doesitfire && cd doesitfire && uv run doesitfire demo
78
+ ```
79
+
80
+ `uvx doesitfire` is coming to PyPI.
81
+
82
+ ## Example output
83
+
84
+ <!-- results:start -->
85
+ Recorded on 2026-11-03 on an Apple M4, 16 GB with doesitfire 0.1.0. Each agent ran **its own CLI** with the model shown; read each column on its own, not as a ranking of agents.
86
+
87
+ | Agent | CLI | Model | Skills | Prompts | Repeats | Runs | Errored (excluded) |
88
+ |---|---|---|---|---|---|---|---|
89
+ | claude-code | 2.1.317 | ollama/qwen3:4b-16k | 2 | 12 of 24 | 1 | 12 | 1 |
90
+ | opencode | 1.19.5 | mistral/ministral-8b-latest | 3 | 24 | 3 | 72 | 11 |
91
+
92
+ Errors: claude-code: 1 x `timeout after 900s`; opencode: 11 x `Bad Request`
93
+
94
+ Fired runs / valid runs. *should* = prompts that should load the skill; *should not* = near misses.
95
+
96
+ | Skill | claude-code · should / should not | opencode · should / should not |
97
+ |---|---|---|
98
+ | `commit-message` | 1/4 / 0/4 | 12/12 / 3/12 |
99
+ | `regex-explainer` | 0/3 / 0/0 | 6/6 / 0/12 |
100
+ | `dockerfile-review` | 0/0 / 0/0 | 12/12 / 0/7 |
101
+ | **all** | 1/7 / 0/4 | 30/30 / 3/31 |
102
+
103
+ Recall per agent: claude-code 14%, opencode 100%. False-fire rate: claude-code 0%, opencode 10%.
104
+
105
+ The raw JSON events of every run are in [`examples/recorded/logs/`](examples/recorded/logs).
106
+
107
+ <p align="center"><img src="docs/assets/report-light.png" alt="HTML report" width="820"></p>
108
+ <!-- results:end -->
109
+
110
+ **claude-code: 11 valid runs of 24 prompts (12 run, 1 timeout excluded as infrastructure), 1 repeat. opencode: 61 valid runs of 72 (24 prompts x 3 repeats, 11 Mistral HTTP 400 excluded). codex: not in the recorded demo.**
111
+
112
+ The suite is [`examples/doesitfire.yaml`](examples/doesitfire.yaml) (all agents on Ollama) and
113
+ [`examples/doesitfire.mistral.yaml`](examples/doesitfire.mistral.yaml) (OpenCode on Mistral). OpenCode's errored runs are
114
+ HTTP 400s from Mistral: when the model calls a tool that doesitfire denies (for example `WebFetch`), OpenCode's next
115
+ request ends with an assistant message, which Mistral rejects. They are excluded from the rates, not counted as "did not fire".
116
+
117
+ ## Test your own skills
118
+
119
+ You need Docker and either Ollama (free, local) or an API key.
120
+
121
+ ```bash
122
+ cd your-repo # with skills in .claude/skills, .agents/skills, skills/, ...
123
+ uvx --from git+https://github.com/diegoperezg7/doesitfire@v0.1.2 doesitfire init
124
+ # edit doesitfire.yaml: 4+ prompts that should load each skill, 4+ near misses that should not
125
+ uvx --from git+https://github.com/diegoperezg7/doesitfire@v0.1.2 doesitfire run
126
+ ```
127
+
128
+ `run` builds the agent image on first use (about 1.9 GB, a few minutes), then prints the matrix and writes
129
+ `doesitfire-results/` with `results.json`, `report.html`, `junit.xml`, `badge.svg` and `badge.json`.
130
+
131
+ ### Local and free with Ollama
132
+
133
+ The agent CLIs send 6k to 11k token prompts, and Ollama loads models with a 4k context by default, so create a
134
+ 16k variant once (same weights, no extra download):
135
+
136
+ ```bash
137
+ ollama pull qwen3:4b
138
+ ollama create qwen3:4b-16k -f ollama/Modelfile # FROM qwen3:4b + PARAMETER num_ctx 16384
139
+ ```
140
+
141
+ On Linux, start Ollama with `OLLAMA_HOST=0.0.0.0` so containers can reach it.
142
+
143
+ ### Paid models
144
+
145
+ Keys are read from environment variables only (see [`.env.example`](.env.example)). Paid providers need a
146
+ price per million tokens so `--max-cost` (default 1 USD) can stop the run before it overspends:
147
+
148
+ ```yaml
149
+ agents:
150
+ claude-code: {provider: anthropic, model: claude-haiku-5-5, price: {input: 1.0, output: 5.0}}
151
+ codex: {provider: openai, model: gpt-5.6-luna, price: {input: 0.20, output: 1.20}}
152
+ opencode: {provider: openrouter, model: deepseek/deepseek-v4.1-flash, price: {input: 0.045, output: 0.50}}
153
+ ```
154
+
155
+ | Agent | Providers | API it needs |
156
+ |---|---|---|
157
+ | Claude Code | `anthropic` (`ANTHROPIC_API_KEY` or `CLAUDE_CODE_OAUTH_TOKEN`), `openrouter`, `ollama` | Anthropic Messages |
158
+ | Codex | `openai`, `openrouter`, `ollama` | OpenAI Responses |
159
+ | OpenCode | `ollama`, `openrouter`, `openai`, `mistral`, `anthropic` | Chat Completions or Anthropic |
160
+
161
+ ## How it works
162
+
163
+ ```mermaid
164
+ flowchart LR
165
+ Y[doesitfire.yaml<br/>skills + prompts] --> R[runner<br/>skill x prompt x agent x repeat]
166
+ R --> C1
167
+ subgraph net [internal Docker network, no route out]
168
+ C1[agent container<br/>Claude Code / Codex / OpenCode<br/>skills in its discovery dir]
169
+ P[egress proxy<br/>model API only]
170
+ C1 --> P
171
+ end
172
+ P --> M[(model API<br/>or Ollama)]
173
+ C1 -- JSON events --> D[activation detector]
174
+ D --> O[matrix · results.json · JUnit · HTML · badge]
175
+ ```
176
+
177
+ For every skill, prompt, agent and repeat, doesitfire starts a fresh container, copies the skills into that
178
+ agent's discovery directory (`.claude/skills`, `.agents/skills`, `.opencode/skills`) and runs the CLI headless.
179
+ It reads the CLI's JSON event stream as it arrives:
180
+
181
+ | Agent | Command | A run counts as fired when |
182
+ |---|---|---|
183
+ | Claude Code | `claude -p --output-format stream-json --verbose` | a `Skill` tool call names the skill |
184
+ | OpenCode | `opencode run --format json` | its native `skill` tool is called with the skill |
185
+ | Codex (experimental) | `codex exec --json` | a command reads `<skill>/SKILL.md`. Codex documents no activation event, so this is inferred |
186
+
187
+ With a local model, a run stops as soon as the outcome is known (a tested skill fired, or the turn cap was hit).
188
+ With a paid model, it runs to the end so the CLI reports token usage for the budget.
189
+
190
+ **Metrics**, per agent and skill: **recall** (should-fire runs that loaded the skill), **false-fire rate**
191
+ (should-not runs that loaded it) and **precision** (loads that were wanted). Runs that error out (timeout,
192
+ API error) are left out of every rate and shown apart.
193
+
194
+ **Isolation.** Each container is non-root, with a read-only root filesystem, all capabilities dropped,
195
+ `no-new-privileges`, CPU, memory, pids and time limits. Its only network peer is an egress proxy that allows the
196
+ model API host and port and returns 403 for everything else (blocked attempts are listed in the report).
197
+ Bash, Write, Edit and web tools are denied in Claude Code, edit, bash and webfetch in OpenCode, and turns are
198
+ capped at 2. Codex has no read-only file tool and its own sandbox cannot start inside an unprivileged container,
199
+ so its shell runs inside the container limits. doesitfire refuses to run without Docker. Details in
200
+ [SECURITY.md](SECURITY.md).
201
+
202
+ ## Configuration
203
+
204
+ ```yaml
205
+ repeats: 3 # runs per prompt and agent; activation is not deterministic
206
+ timeout: 300 # seconds per agent run
207
+ max_turns: 2 # agent turns per run; activation happens in the first one
208
+ cpus: 1 # per container
209
+ memory: 1g # per container
210
+
211
+ agents:
212
+ claude-code: {provider: ollama, model: qwen3:4b-16k}
213
+ codex: {provider: ollama, model: qwen3:4b-16k}
214
+ opencode: false # skip an agent
215
+
216
+ skills:
217
+ - path: .claude/skills/commit-message # a directory with a SKILL.md
218
+ should_fire:
219
+ - "Write a commit message for my change: I added a login form."
220
+ should_not_fire:
221
+ - "How do I undo my last git commit but keep the changes?"
222
+ ```
223
+
224
+ | Command | What it does |
225
+ |---|---|
226
+ | `doesitfire init [DIR]` | Writes `doesitfire.yaml` with every skill found under `DIR` |
227
+ | `doesitfire run` | Runs the matrix. `--agents`, `--skills`, `--repeats`, `--max-cost`, `--min-recall`, `--max-false-fire`, `--out` |
228
+ | `doesitfire report results.json` | Re-renders the matrix, HTML, JUnit and badge |
229
+ | `doesitfire demo` | Shows the recorded example run |
230
+
231
+ `--min-recall 0.75 --max-false-fire 0.25` makes `run` exit 1 when any agent x skill cell misses them; that is
232
+ what you want in CI. Budget stops exit 3 and keep the partial results.
233
+
234
+ ## GitHub Action
235
+
236
+ Linux runners only (the agents run in Docker; hosted macOS runners have no Docker):
237
+
238
+ ```yaml
239
+ - uses: diegoperezg7/doesitfire@v0.1.2
240
+ with:
241
+ config: doesitfire.yaml
242
+ max-cost: "1.0"
243
+ min-recall: "0.75"
244
+ max-false-fire: "0.25"
245
+ env:
246
+ ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
247
+ ```
248
+
249
+ A complete workflow that also uploads the report and the JUnit results is in
250
+ [`examples/workflows/doesitfire.yml`](examples/workflows/doesitfire.yml).
251
+
252
+ **Badge.** `run` writes `badge.svg` and `badge.json` (a [shields.io endpoint](https://shields.io/badges/endpoint-badge)).
253
+ Commit `badge.svg` and link it, or publish `badge.json` (for example to GitHub Pages) and use
254
+ `https://img.shields.io/endpoint?url=<url-of-badge.json>`.
255
+
256
+ ## What was live-tested
257
+
258
+ | Agent | Live-tested with | Notes |
259
+ |---|---|---|
260
+ | Claude Code 2.1.317 | Ollama `qwen3:4b` (16k context) through Ollama's Anthropic-compatible `/v1/messages`. The recorded demo has 12 of the 24 prompts (1 repeat): at 4-14 minutes per run on this laptop the rest did not finish in time | No Claude model: this release was built without an Anthropic key. `provider: anthropic` (API key or `CLAUDE_CODE_OAUTH_TOKEN` from `claude setup-token`) is unit-tested, not live-tested. |
261
+ | Codex 0.166.0 | Supported; activation detection validated in the Docker integration test (real Codex CLI against the mock model), not in the recorded demo | Detection is **experimental** (reads of `SKILL.md`). A live Ollama run was started but did not finish in time for v0.1.0. |
262
+ | OpenCode 1.19.5 | Mistral `ministral-8b-latest` (paid, OpenAI-compatible) | The recorded demo uses it. Also checked against Ollama during development. |
263
+
264
+ Mistral is the only paid provider called live (OpenCode, 72 runs, cost measured from usage). Anthropic, OpenAI and
265
+ OpenRouter are wired and unit-tested, including the `--max-cost` guard, but were not called. CI runs the three real CLIs in Docker against a scripted mock
266
+ model ([`tests/mockmodel.py`](tests/mockmodel.py)) on every push, so a CLI output change breaks the build, not your results.
267
+
268
+ Every agent runs with its CLI defaults, thinking included. Turning qwen3's thinking off in Ollama looks like a speed-up,
269
+ but the model then writes its reasoning as plain text and stops before emitting the tool call, so skills look like
270
+ they never fire. doesitfire does not do that.
271
+
272
+ One Ollama quirk is handled for you: Ollama's Responses API drops input messages with role `developer`, which is where
273
+ Codex lists the available skills. For Codex on Ollama only, the egress proxy rewrites them to `system` (plain HTTP
274
+ to your local Ollama; HTTPS traffic to paid APIs is tunnelled untouched).
275
+
276
+ ## Use it from Claude Code
277
+
278
+ Install the plugin and ask Claude in plain words; its `test-skill-activation` skill finds your skills, writes prompts that should and should not trigger each one, agrees the budget with you, runs doesitfire and rewrites the descriptions of skills that miss, then re-runs them to check.
279
+
280
+ ```text
281
+ /plugin install doesitfire --marketplace diegoperezg7/doesitfire
282
+ ```
283
+
284
+ The skill tells Claude to ask before any paid run, and `--max-cost` still caps the spend.
285
+
286
+ ## Roadmap
287
+
288
+ - Cursor, Gemini CLI and GitHub Copilot CLI.
289
+ - Suggesting prompts and better descriptions with an LLM.
290
+ - Multi-turn conversations.
291
+ - Conflicts between skills (two skills competing for the same prompt).
292
+ - GitHub Marketplace listing.
293
+
294
+ ## Part of a series
295
+
296
+ Open source tools that evaluate agents and LLMs on your own data:
297
+
298
+ - [memarena](https://github.com/diegoperezg7/memarena): Benchmark memory layers on your own conversations.
299
+ - [parsearena](https://github.com/diegoperezg7/parsearena): Compare PDF parsers side by side and their effect on retrieval.
300
+ - [commitarena](https://github.com/diegoperezg7/commitarena): Replay real bug fixes from your git history against any model.
301
+ - [toolbloat](https://github.com/diegoperezg7/toolbloat): Measure the token cost of your MCP stack and tool-choice errors.
302
+ - [rulelab](https://github.com/diegoperezg7/rulelab): Find which AGENTS.md rules earn their tokens.
303
+
304
+ ## License
305
+
306
+ [MIT](LICENSE). The three example skills in `examples/skills` are MIT too and were written for this project.
@@ -0,0 +1,21 @@
1
+ doesitfire/__init__.py,sha256=7TXg0i0AfNQVIZeN5Z-t8LrwhdhFSIO7y-EdXjcYJis,119
2
+ doesitfire/agents.py,sha256=dYDZCSnDIKSrIqwViySahL6iBiXBHhYc-m6Wz3QWAI8,12463
3
+ doesitfire/cli.py,sha256=PI1Ngjqtx3Cd_viYmA6ChdoygslvCMU3Rypg2Rg0eFc,10250
4
+ doesitfire/config.py,sha256=o0eFm0MJoC0Y4U-rQX___PwqZOqUUso3lc0knWbdnsU,9011
5
+ doesitfire/errors.py,sha256=44W96KDMvC1Dboq_7REXA3vDc3byHW16oo51u-E1j5A,468
6
+ doesitfire/html.py,sha256=7bJ4DEaCVxBY0l_jfeS9tXAn2orO1DiBfJrwe2hEO2o,842
7
+ doesitfire/metrics.py,sha256=M_KgSbz4IaKUyl3VwEbTtIj4VaRkDshwRV16yGITeTY,4354
8
+ doesitfire/providers.py,sha256=21XMriMZNKnzn13YH10ecXswen3G1X5a_lr5KLh1bEI,4470
9
+ doesitfire/report.py,sha256=x7mUZiauwQgxcwxLdzDR6cRs5u4RTBCFDN_AKkj3D5c,7380
10
+ doesitfire/runner.py,sha256=GFl8ivn-YTsHFa-M9xbuRO_1kHGIRqDBJFydMkKC8S8,11822
11
+ doesitfire/sandbox.py,sha256=CTv4Fnob0BbBkH9Zo3mxAzVGrJceB69WK5YxuuknX70,9782
12
+ doesitfire/data/demo-results.json,sha256=9Ll86ytunHdFFpyktDNlpW390LWdUcia3Ez7DP3P4tE,43917
13
+ doesitfire/docker/Dockerfile,sha256=r607pO-q9RQtZUlLSqpbBtsynEmVjdRpjVV5SmAvn6E,877
14
+ doesitfire/docker/egress-proxy.mjs,sha256=LBJywgAi1NWbP-UBHjsvWyvHbfvHRL3JE0i8N6mps00,4018
15
+ doesitfire/docker/entrypoint.sh,sha256=9gzFyXGldF37nsO0Fiz5PYQosgF_V_WfFXzJ8SRn3rY,494
16
+ doesitfire/templates/report.html,sha256=GJrYa0DjD3fTLbnAxeuG-31-2hQWi_dSrJcQxkuBwhg,25221
17
+ doesitfire-0.1.2.dist-info/METADATA,sha256=qipVW5uHlm5o1Sy_iGenhU4FsbItCZARkvpigf7_7Dw,15748
18
+ doesitfire-0.1.2.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
19
+ doesitfire-0.1.2.dist-info/entry_points.txt,sha256=MqMbl0n5oMepTHAzcXY3PaaZ_9qr1i_cjXZnAZLm-qI,51
20
+ doesitfire-0.1.2.dist-info/licenses/LICENSE,sha256=A7Jh3ub2oGhc2l6P9raz5AeuQKzRIinCPYAXENE2Lig,1069
21
+ doesitfire-0.1.2.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.33.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ doesitfire = doesitfire.cli:main
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Diego Pérez
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.