Skip to content
Back to search

trust-pyramid

MarketplaceWorks with Claude CodeGitHub

Stop reviewing AI-written code line by line: a Claude Code + Codex skill that makes coding agents prove their work with fix-it lint rules, runtime verification, an enforced AI reviewer, and unskippable gates.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 20 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/Tim-rppl/trust-pyramid with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/Tim-rppl/trust-pyramid'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/tim-rppl--trust-pyramid/badge.svg)](/listings/tim-rppl--trust-pyramid)

HTML

<a href="/listings/tim-rppl--trust-pyramid"><img src="/api/listings/tim-rppl--trust-pyramid/badge.svg" alt="findsafeskills safety rating" /></a>

Install

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

Claude Code

Install as a plugin:

/plugin marketplace add Tim-rppl/trust-pyramid
/plugin install trust-pyramid@trust-pyramid

Or copy the skill manually:

git clone https://github.com/Tim-rppl/trust-pyramid.git
cp -R trust-pyramid/skills/trust-pyramid ~/.claude/skills/

Use one method, not both, or the skill will be listed twice.

Codex

git clone https://github.com/Tim-rppl/trust-pyramid.git
mkdir -p ~/.agents/skills && cp -R trust-pyramid/skills/trust-pyramid ~/.agents/skills/

For a single repository, copy it to `.agents/skills/trust-pyramid` in that repository instead.

Run it

Open your project, switch to plan mode if your agent has one, and ask:

Use the trust-pyramid skill to set up quality gates for this project.
Product: a real-time transcription + translation web app.
Stack: TypeScript, React (Vite), Node.js, Firebase, OpenAI-compatible model APIs.
UI: English and Chinese. I can't judge code well; show me evidence in plain language.

In Codex you can also type `$trust-pyramid`.

The agent interviews you briefly, writes a plan, **waits for your approval**, then builds the layers one by one. At the end it proves every check can fail, runs a demo loop on a small feature, and reports in plain language.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json · Manifest · 11 lines
  1. {
  2. "name": "trust-pyramid",
  3. "owner": { "name": "Tim-rppl" },
  4. "plugins": [
  5. {
  6. "name": "trust-pyramid",
  7. "source": "./",
  8. "description": "Quality gates where coding agents prove their own work."
  9. }
  10. ]
  11. }
README.md · README · 369 lines
  1. <div align="center">
  2. # Trust Pyramid
  3. **Stop reviewing AI-written code line by line. Make your coding agent prove its work.**
  4. An agent skill for **Claude Code** and **Codex** that sets up a project-specific quality system:
  5. architecture constraints, lint rules whose error messages tell the agent how to fix the code,
  6. runtime verification in the real app, an evidence-based AI reviewer, and gates the agent cannot skip.
  7. [![CI](https://github.com/Tim-rppl/trust-pyramid/actions/workflows/ci.yml/badge.svg)](https://github.com/Tim-rppl/trust-pyramid/actions/workflows/ci.yml)
  8. ![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)
  9. ![Claude Code](https://img.shields.io/badge/Claude%20Code-skill%20%2B%20plugin-d97757)
  10. ![Codex](https://img.shields.io/badge/Codex-skill-10a37f)
  11. **English** · [简体中文](README.zh-CN.md)
  12. <img src="docs/media/demo-en.gif" alt="Trust Pyramid demo: the agent calls the model API from the browser, the Stop hook blocks it with fix-it lint errors, the agent fixes the root cause, the smoke flow proves it in the running app, and an independent AI reviewer's findings are settled with red-to-green test evidence" width="100%">
  13. <sub>All terminal output and the app screenshot are real, captured from a demo project. The agent's edits are replayed by a script; the review findings come from a real, independent AI reviewer run.</sub>
  14. </div>
  15. ---
  16. ## Why
  17. Coding agents write code faster than anyone can review it. Writing more rules into `AGENTS.md`
  18. does not fix this: prose is advice, and agents skip advice, on purpose or not.
  19. Trust Pyramid moves trust from people to the system:
  20. - **Rules live in code, not prose.** A mistake corrected once becomes a lint rule or a test, so it
  21. cannot happen again - for any agent or any person.
  22. - **Error messages are prompts.** Every rule says what is wrong and how to fix it, so the agent
  23. repairs its own code without you.
  24. - **Behavior is proven, not claimed.** The agent runs the real app, clicks through it, takes
  25. screenshots, and runs a smoke flow.
  26. - **Checks cannot be skipped.** They run in the agent's Stop hook, in pre-commit, and in CI with
  27. branch protection - triggered by the system, never by the agent being checked.
  28. - **An AI reviewer fills the gap while rules are few.** Its findings only count with evidence: a
  29. test that fails on the old code and passes on the new code. Confirmed findings become new rules.
  30. The approach follows Lauren Tan's talk
  31. [*All Code Is Slop (Except Mine)*](https://www.youtube.com/watch?v=O_zcc6Xl12g) (AI Engineer Code
  32. Summit 2026) and adds the enforced reviewer layer. She also open-sourced her own skills as
  33. [pstack](https://github.com/cursor/plugins/tree/main/pstack); see
  34. [Pair it with pstack](#pair-it-with-pstack-optional) for how the two differ and work together.
  35. ## How it works
  36. ```mermaid
  37. flowchart TB
  38. A["1 · Structure and APIs<br/>make the wrong thing hard to write"] --> B["2 · Static analysis<br/>types, boundary rules, project lint rules, tests"]
  39. B --> C["3 · Verification<br/>run the app, screenshots, smoke flow, fake model server"]
  40. C --> D["4 · Prose<br/>a short AGENTS.md, only what code cannot say"]
  41. D --> E["5 · AI reviewer<br/>finds candidates; evidence decides"]
  42. E --> F["6 · Human<br/>reviews evidence, not diffs"]
  43. E -. "confirmed findings become rules" .-> B
  44. ```
  45. Higher layers are cheaper and deterministic, so the skill always tries them first.
  46. The gates make sure every layer actually runs:
  47. | When | Gate | Can the agent skip it? |
  48. |---|---|---|
  49. | Agent tries to finish | Stop hook (Claude Code and Codex, one script) | Hard, but an agent can edit local hook files - fast feedback, not the guarantee |
  50. | `git commit` | pre-commit hook | Only with `--no-verify` |
  51. | Pull request | CI: checks, smoke, AI review, review gate - using the **base branch's** gate files | **No** - with branch protection and code owners |
  52. | Merge | Your approval, based on evidence | It is your call |
  53. ## What we measured
  54. We tested Trust Pyramid with real Claude Code and Codex runs before recommending it
  55. ([full write-up](docs/BENCHMARK.md)). In short:
  56. - **Project-specific rules work.** Boundary and "never do X here" rules caught their planted bugs
  57. every time, and findings turned into tests stopped the same bugs from coming back.
  58. - **The first gate design could be bypassed** (rule switched off in the PR itself). CI now checks
  59. every PR with the base branch's gate files; all seven bypass attempts are blocked.
  60. - **A frontier model is already good at single tasks.** Claude Opus 5.5 with no tooling handled
  61. races, lost updates and cross-feature invariants. Running the full pyramid on every task cost
  62. about 4x without catching more. That is why the default profile is **lite**.
  63. ## Profiles
  64. | | lite (default) | full |
  65. |---|---|---|
  66. | Project lint rules, boundaries, tests | yes | yes, plus property tests |
  67. | Trusted CI, CODEOWNERS, pre-commit | yes | yes |
  68. | Stop hook | fast checks only, 2 attempts | same |
  69. | AI reviewer | once per PR in CI | also after every task |
  70. | Runtime verification | smoke flow in CI | on every user-visible change |
  71. Choose **full** for smaller or cheaper coding models, many contributors, or high-risk code
  72. (money, permissions, personal data). You can switch at any time.
  73. ## Cost and limits
  74. **Where usage goes.** Most of the pyramid is ordinary scripts and costs no model usage at all.
  75. | Step | Uses model tokens? | Measured / expected |
  76. |---|---|---|
  77. | One-time setup by the agent | yes | 25-30 min; ~$6.5 with Claude, ~8.5M tokens with Codex, on a mid-size Remix app |
  78. | Lint, typecheck, tests, Stop hook, pre-commit, trusted CI | **no** - scripts | free |
  79. | Agent fixing what a gate rejected | yes | nothing when the code is right; a round or two otherwise (Stop hook gives up after 2) |
  80. | AI reviewer, once per PR in CI | yes | ~$0.7 for a small diff, plus the agent's fixes if it finds something |
  81. | `AGENTS.md` and rules in the prompt | a little | a dozen lines per session |
  82. In our benchmark a near-full setup (reviewer after every task, 3-attempt Stop hook) cost ~4x per
  83. task. The lite profile removes those two costs; **lite has not been benchmarked yet**, so its numbers
  84. above are estimates.
  85. **When it is not worth it.** Small personal projects, prototypes, throwaway code, or a frontier
  86. model making small changes you can check yourself. Our benchmark found no quality gain on single
  87. tasks in that setting.
  88. **When it pays off.** Long-lived repos (rules are written once and run free forever), project rules a
  89. model cannot know, preventing regressions, smaller or cheaper models, many contributors, and owners
  90. who cannot read code but need agents they can trust.
  91. **Known limits.**
  92. - Local gates (Stop hook, pre-commit) are fast feedback, not a guarantee: an agent can edit them.
  93. Only trusted CI with branch protection and code owners is unskippable.
  94. - Agents cannot install their own hook configs; you run `scripts/install-agent-hooks.sh` once.
  95. - The AI reviewer is not deterministic (it missed a planted bug in 1 of 10 runs). Its findings count
  96. only with evidence, and confirmed ones should become rules or tests.
  97. - Codex's sandbox blocks launching browsers, so the smoke flow runs in CI there.
  98. - Benchmarks were small (one run per cell). See [docs/BENCHMARK.md](docs/BENCHMARK.md).
  99. To keep usage low: start with lint rules, tests and trusted CI only; turn on the per-PR reviewer if
  100. you want it, or only for risky PRs; check `quality/review-log.md` after a few weeks and turn the
  101. reviewer off if it finds nothing real.
  102. ## Quick start
  103. ### Claude Code
  104. Install as a plugin:
  105. ```text
  106. /plugin marketplace add Tim-rppl/trust-pyramid
  107. /plugin install trust-pyramid@trust-pyramid
  108. ```
  109. Or copy the skill manually:
  110. ```bash
  111. git clone https://github.com/Tim-rppl/trust-pyramid.git
  112. cp -R trust-pyramid/skills/trust-pyramid ~/.claude/skills/
  113. ```
  114. Use one method, not both, or the skill will be listed twice.
  115. ### Codex
  116. ```bash
  117. git clone https://github.com/Tim-rppl/trust-pyramid.git
  118. mkdir -p ~/.agents/skills && cp -R trust-pyramid/skills/trust-pyramid ~/.agents/skills/
  119. ```
  120. For a single repository, copy it to `.agents/skills/trust-pyramid` in that repository instead.
  121. ### Run it
  122. Open your project, switch to plan mode if your agent has one, and ask:
  123. ```text
  124. Use the trust-pyramid skill to set up quality gates for this project.
  125. Product: a real-time transcription + translation web app.
  126. Stack: TypeScript, React (Vite), Node.js, Firebase, OpenAI-compatible model APIs.
  127. UI: English and Chinese. I can't judge code well; show me evidence in plain language.
  128. ```
  129. In Codex you can also type `$trust-pyramid`.
  130. The agent interviews you briefly, writes a plan, **waits for your approval**, then builds the
  131. layers one by one. At the end it proves every check can fail, runs a demo loop on a small
  132. feature, and reports in plain language.
  133. ## Pair it with pstack (optional)
  134. Lauren Tan open-sourced her own skills as
  135. [**pstack**](https://github.com/cursor/plugins/tree/main/pstack) (MIT). It is a different tool that
  136. solves a different half of the problem, and the two can be used together. In our benchmark pstack
  137. did not change results on single tasks with frontier models and used more tokens, so treat it as an
  138. option for how you like to work, not a quality requirement.
  139. | | pstack | Trust Pyramid |
  140. |---|---|---|
  141. | What it is | ~60 skills that shape **how the agent works**: `/poteto-mode` with 22 playbooks (bug fix, perf, refactor, feature, ...), engineering principles, and builders such as `/correct` and `/create-verification-skill` | One skill that **installs enforcement into your repo**: lint rules, verification tools, an enforced reviewer, and gates |
  142. | When it acts | While the agent writes code, whenever you invoke it | Every time the agent finishes, you commit, or a PR opens - automatically |
  143. | Ready to use | Immediately after install | After a one-time setup run (plan, approve, install) |
  144. | Can it be skipped | Yes - its skills run only when you call them | No - the gates run without asking the agent |
  145. | After you uninstall | Its effect is gone | The rules and gates stay in your repo |
  146. **Why both:** pstack makes the agent get it right the first time, so it rewrites less. Trust
  147. Pyramid guarantees that what it still gets wrong never reaches `main`. pstack also brings tools
  148. that Trust Pyramid only sketches: verification for CLIs, desktop and mobile apps, state charts,
  149. and formal verification. pstack is Lauren Tan's project; Trust Pyramid is independent and not
  150. affiliated with her or Cursor.
  151. ### Install both
  152. Claude Code:
  153. ```text
  154. /plugin marketplace add cursor/plugins
  155. /plugin install pstack@cursor-plugins
  156. /plugin marketplace add Tim-rppl/trust-pyramid
  157. /plugin install trust-pyramid@trust-pyramid
  158. ```
  159. Then run `/pstack:setup-pstack` once to choose models and a reasoning budget.
  160. Codex (and other agents) - pstack through its official mirror and the `skills` CLI:
  161. ```bash
  162. npx skills add backnotprop/pstack
  163. ```
  164. Then install Trust Pyramid as in [Quick start](#codex).
  165. ### Using both in the chat
  166. In Claude Code, pstack commands carry the plugin prefix (`/pstack:<skill>`). In Codex, mention a
  167. skill with `$<skill>` (for example `$poteto-mode`).
  168. **1. Once per project: set up the gates.**
  169. ```text
  170. Use the trust-pyramid skill to set up quality gates for this project. <product, stack, languages>
  171. ```
  172. **2. Every task: work with pstack, let the gates check.**
  173. ```text
  174. /pstack:poteto-mode Add CSV export to the notes page. Verify it in the running app.
  175. ```
  176. pstack drives the work; when the agent tries to finish, Trust Pyramid's Stop hook runs the checks
  177. and sends it back if anything fails.
  178. **3. The same mistake happens twice: make it impossible.**
  179. ```text
  180. /pstack:correct The agent keeps calling the model API directly from route handlers.
  181. ```
  182. `/correct` turns the mistake into architecture, a type, a lint rule, or a test, and proves it
  183. fails on the old code. The new rule then runs in every gate automatically.
  184. **4. Your app is not a web app (CLI, desktop, mobile): build its verifier.**
  185. ```text
  186. /pstack:create-verification-skill
  187. ```
  188. Use the generated skill wherever Trust Pyramid's workflow asks for runtime verification.
  189. **5. Before a pull request: let the reviewer find problems, and keep the good ones.**
  190. ```text
  191. Run the quality reviewer on this branch. For each confirmed finding, use /pstack:correct to turn
  192. it into a rule, then record dispositions in quality/review-dispositions.json.
  193. ```
  194. **6. Optional, for tricky state (recording sessions, subscriptions, retries):**
  195. ```text
  196. /pstack:statechart the recording session
  197. /pstack:create-formal-verification-skill
  198. ```
  199. | You want to... | Use |
  200. |---|---|
  201. | Do a task rigorously | `/pstack:poteto-mode` |
  202. | Stop a repeated mistake for good | `/pstack:correct` (or Trust Pyramid's add-rule flow) |
  203. | Prove behavior of a non-web app | `/pstack:create-verification-skill` |
  204. | Remove comments that excuse workarounds | `/pstack:no-comments` |
  205. | Make sure nothing bad merges | Trust Pyramid gates (automatic) |
  206. | Get problems found for you | Trust Pyramid reviewer (runs on every PR) |
  207. ## What you get
  208. | Area | Files added to your project |
  209. |---|---|
  210. | Gates | `scripts/check.sh`, `scripts/stop-gate.sh`, `.githooks/pre-commit`, `.claude/settings.json`, `.codex/hooks.json` |
  211. | Lint | `lint/` - a project plugin with fix-it messages, fixtures, and a test that proves each rule fires |
  212. | Verification | `verify/app.mjs` (up/click/fill/snapshot/screenshot/errors), `verify/smoke.mjs`, `verify/feature-map.md`, `verify/fake-openai.mjs` |
  213. | AI reviewer | `quality/reviewer-prompt.md`, `.claude/agents/quality-reviewer.md`, `scripts/review-gate.mjs`, `quality/review-dispositions.json` |
  214. | Ratchet ledger | `quality/rule-candidates.md`, `quality/review-log.md` |
  215. | CI | `.github/workflows/quality.yml`, `.github/pull_request_template.md` |
  216. | Prose | a short `AGENTS.md` (and `CLAUDE.md` → `@AGENTS.md`), `docs/QUALITY.md` |
  217. Everything is adapted to your stack. Recipes are included for TypeScript/React/Node/Firebase,
  218. Next.js + Postgres, Python/FastAPI (field-tested, with an AST rule template), Go, and mobile.
  219. ## The enforced AI reviewer
  220. An AI reviewer is useful early, when there are few rules and you cannot spot problems yourself.
  221. It is also easy to skip or to wave away. Trust Pyramid closes both holes:
  222. 1. **It always runs.** CI reviews every pull request (Claude Code or Codex action), cached by a
  223. hash of the code diff so it reruns only when code changes.
  224. 2. **Every finding needs an answer.** `quality/review-dispositions.json` marks each finding
  225. `confirmed`, `rejected` or `deferred`. `scripts/review-gate.mjs` is a required check:
  226. - **confirmed** → the named test must **fail on the base commit (at an assertion, not an import
  227. error) and pass on the PR head**, checked by machine;
  228. - **rejected** → not a real problem; needs a concrete reason, shown to you in the PR;
  229. - **deferred** → real but not fixed now; needs a reason and must be recorded in
  230. `quality/rule-candidates.md`, so it is tracked rather than forgotten.
  231. 3. **Confirmed findings feed the ratchet.** Each becomes a lint rule, a test, or an entry in
  232. `quality/rule-candidates.md`; the second occurrence must become a rule.
  233. ## Daily use
  234. ```text
  235. # A mistake happened again
  236. Turn this into a rule using trust-pyramid's add-rule process: <describe the mistake>.
  237. # Before a pull request
  238. Run the quality reviewer on this branch, prove or reject each finding, and give me a plain-language summary.
  239. # Weekly
  240. Sweep the whole repo with the reviewer and update quality/rule-candidates.md with the top 3 rule candidates.
  241. ```
  242. ## FAQ
  243. **Is this just a code-review skill?** No. The reviewer is one layer. Most of the value comes from
  244. rules in code and gates that run without asking the agent.
  245. **Does it work for existing projects?** Yes. It locks in what is already clean and ratchets the
  246. rest: noisy rules start on new code only, with a recorded backlog.
  247. **Do I need GitHub?** The local gates work anywhere. The unskippable layer needs CI with branch
  248. protection; the templates target GitHub Actions.
  249. **What does it cost?** Checks are scripts and free; the one-time setup and the per-PR AI review use
  250. model tokens (your Anthropic or OpenAI key in CI). See [Cost and limits](#cost-and-limits).
  251. ## Repository layout
  252. ```text
  253. skills/trust-pyramid/
  254. ├── SKILL.md # the workflow the agent follows
  255. ├── agents/openai.yaml # Codex UI metadata
  256. ├── references/ # one file per layer, gates, stack recipes, lessons learned
  257. └── templates/ # files the agent installs and adapts
  258. .claude-plugin/ # Claude Code plugin + marketplace manifests
  259. tests/ # tests for the templates themselves
  260. ```
  261. ## Contributing
  262. Issues and pull requests are welcome, especially stack recipes and lessons learned.
  263. See [CONTRIBUTING.md](CONTRIBUTING.md). Run `npm ci && npm test` before opening a PR.
  264. ## Credits
  265. - Lauren Tan, [*All Code Is Slop (Except Mine)*](https://ai.engineer/code/2026/talks/lauren-tan), AI Engineer Code Summit 2026.
  266. - Lauren Tan, [pstack](https://github.com/cursor/plugins/tree/main/pstack) (MIT) - the skills behind the talk.
  267. - OpenAI, [*Harness engineering*](https://openai.com/index/harness-engineering/).
  268. - Maddila et al., [*Agentic Program Repair from Test Failures at Scale*](https://arxiv.org/abs/2507.18755).
  269. ## License
  270. [MIT](LICENSE)

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.