Borrowing it
Nothing to install: this file belongs to bayesimpact/bayes-platform. 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/bayesimpact/bayes-platform/main/.claude/skills/check-factories-and-stories/SKILL.mdgit clone --depth 1 https://github.com/bayesimpact/bayes-platformWrote 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/skills/bayesimpact/bayes-platform/check-factories-and-stories)<a href="https://agentmods.dev/skills/bayesimpact/bayes-platform/check-factories-and-stories"><img src="https://agentmods.dev/badge/skills/bayesimpact/bayes-platform/check-factories-and-stories/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/skills/bayesimpact/bayes-platform/check-factories-and-stories"><img src="https://agentmods.dev/badge/skills/bayesimpact/bayes-platform/check-factories-and-stories.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.00071 | $0.00883 |
| Opus 5.5 | $0.00028 | $0.00353 |
| Sonnet 5.5 | $0.00014 | $0.00177 |
| Haiku 4.5 | $0.00007 | $0.00088 |
Grade A, and why
check-factories-and-stories 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 — 62 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Audit apps/web/src for two invariants from ADR 0010:
- Every
*.models.tsMUST have a sibling*.factory.ts(in the same folder; name may be singular or plural — match the folder convention). - Every named route used in a
{Scope}Routes.tsxregistry MUST have a matching story file underapps/web/src/stories/routes/{scope}/{RouteName}.stories.tsx.
This is read-only. Do not write or edit files — just report.
Step 1 — Find every model file
Use Glob (or find) to list:
apps/web/src/**/*.models.ts
For each match, derive the expected factory path by replacing .models.ts with .factory.ts in the SAME folder. Singular variants are also acceptable — strip the trailing s from the basename before .models.ts (e.g. agents.models.ts accepts agent.factory.ts OR agents.factory.ts). A factory is "present" if EITHER form exists in the model's folder.
Exclusions:
- Any model file under a
__tests__/or__mocks__/directory. notifications.models.tsand other purely UI-state slices that don't represent domain entities — only flag if the file declares atype X = XDtoor a Zod schema (heuristic: containsimport typefrom@caseai-connect/api-contractsORz.object(). If neither pattern is present, treat the file as exempt.
Read the contents of each candidate to apply the exclusion heuristic.
Step 2 — Find every route registered in a routes registry
Use Glob to list apps/web/src/*/routes/*.tsx (excluding apps/web/src/stories/). For each registry file, read it and extract the names of every route used as the path: value or element: wrapper component name that lives in the same routes/ folder (e.g. EvaluationRoute, DocumentsRoute, TesterCampaignRoute).
For each route component name, derive the expected story path:
apps/web/src/stories/routes/{scope}/{ComponentName}.stories.tsx
where {scope} is the parent folder of the routes file (studio, tester, reviewer, eval, backoffice, desk).
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 · 62 lines · 71 tokens per session scan A 92c95826dae7
check-factories-and-stories is a skill published in the GitHub repository bayesimpact/bayes-platform (23 stars, last pushed yesterday), licensed MIT. It adds 71 tokens to every session and 883 once invoked, about $0.0003 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-09-14.
check-factories-and-stories compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| check-factories-and-storiesbayesimpact/bayes-platform | Skill | 23 | yesterday | MIT | A | 71 | Claude Code |
| autoreviewopenclaw/clawhub | Skill | 9.5k | yesterday | MIT | A | 17 | Claude Code, Codex |
| agent-teams-simplify-and-hardenLeoYeAI/openclaw-master-skills | Skill | 2.2k | 6d ago | MIT | A | 115 | Claude Code, Codex |
| omh-code-reviewrlaope/oh-my-hermes | Skill | 5.2k | yesterday | MIT | A | 48 | Claude Code, Codex |
| revdiff-planumputun/revdiff | Skill | 945 | yesterday | MIT | A | 84 | Claude Code |
| explore-unknownsdzhng/skills | Skill | 1.4k | 2d ago | MIT | A | 162 | Claude Code, Codex |
| re0-mergeLilMGenius/paperthin | Skill | 1.4k | 4d ago | MIT | A | 70 | Claude Code |