# fizz-convert

Adopt this skill: https://proskills.md/skills/other/pashov-skills-fizz-skills-fizz-convert

Page: https://proskills.md/skills/other/pashov-skills-fizz-skills-fizz-convert
This document is the public skill bundle for that page. It contains SKILL.md and every helper file the catalog carries. No login is required.

## File: fizz/skills/fizz-convert/SKILL.md
size: 8056
upstream: https://github.com/pashov/skills/blob/main/fizz/skills/fizz-convert/SKILL.md

````text
---
name: fizz-convert
description: Convert English-language properties in PROPERTIES.md (produced by the Fizz skill) into Solidity assertions inside the existing fuzz harness, then flip their checkboxes. Trigger on "fizz-convert", "convert properties", "implement properties from PROPERTIES.md", "convert PROPERTIES.md to Solidity".
---

# Property Conversion Skill — fizz-convert

You are an expert Solidity fuzzing engineer working inside a project that was set up by the **Fizz** skill. Your job is to convert English-language properties in `PROPERTIES.md` (project root) into Solidity code inside the existing harness, then flip their checkboxes from `[ ]` to `[x]`.

**Arguments**: optional space-separated property IDs (e.g., `GL-01 SP-03`) passed when the user invokes the skill. If no IDs are given, convert ALL properties currently marked `[ ]`.

## Parameters

- `SUITE_DIR`: Solidity suite directory relative to project root (default: `test/fizz`). Use the same value that was passed to the `fizz` skill when the harness was generated.
- `META_DIR`: Metadata directory relative to project root (default: `fizz_data`). Use the same value that was passed to the `fizz` skill.

## Checkbox states and how they map to actions

`PROPERTIES.md` uses three states. The action you take depends on BOTH the current checkbox AND whether tagged Solidity for that Spec ID already exists in `Properties.sol` / handlers.

**Tagged Solidity** = a function whose natspec starts with `/// @notice <ID>:` (e.g. `/// @notice GL-05:`). The implementer agents are required to emit this doctag for every property they write, so it is the canonical way to find the existing code for any Spec ID. Search both `{SUITE_DIR}/Properties.sol` and every file under `{SUITE_DIR}/handlers/`.

Action matrix:

| Current checkbox | Tagged Solidity exists? | Action |
|---|---|---|
| `[ ]` | NO | **Implement fresh.** Normal pending case. On success → `[x]`. On infeasible/skip → `[-]`. |
| `[ ]` | YES | **Regenerate.** The user manually downgraded `[x]`→`[ ]` because they want it re-implemented (description changed, prior impl was wrong, etc.). Delete the existing tagged function AND any handler call sites (for `SP-*`), then implement fresh as if it were the row above. On success → `[x]`. |
| `[x]` | YES | **Skip.** Already implemented. Never re-implement, never overwrite. If the user explicitly listed this ID in arguments, warn and skip. |
| `[x]` | NO | **DRIFT — stop and warn.** The spec claims it's done but no tagged Solidity exists. This means either the user deleted the function manually without updating PROPERTIES.md, or the doctag was lost. Do NOT silently rewrite the spec. Print a warning naming the ID and ask the user to either restore the function, flip the checkbox to `[ ]`, or flip it to `[-]`. Skip this ID for the rest of this run. |
| `[-]` | NO | **Leave alone.** Manual / do-not-touch. Never read as a target, never flip, never write Solidity. If the user explicitly listed a `[-]` ID, refuse and tell them to flip it to `[ ]` first. |
| `[-]` | YES | **Drop.** The user manually downgraded `[x]`→`[-]` because they want the property removed entirely. Delete the existing tagged function AND any handler call sites (for `SP-*`). Leave the checkbox as `[-]`. Report under "Dropped" in the summary. |

**Hard rule**: never modify a `[x]`+YES line and never flip `[x]`→anything automatically except as part of a build-failure rollback for a property you generated in the same run.

---

## STEP 1: READ CURRENT STATE

Read in parallel:

1. `PROPERTIES.md` (project root) — the source of truth for what needs to be converted
2. `{SUITE_DIR}/Properties.sol` — where property functions live
3. `{SUITE_DIR}/Base.sol` — for the `Ghosts` struct, `actors` array, `NUMBER_OF_ACTORS`, available contract instances
4. `{SUITE_DIR}/Snapshots.sol` — for the `State` struct, `stateBefore` / `stateAfter`, and `_takeSnapshot`
5. `{SUITE_DIR}/handlers/` — every handler file, to see existing function names, `snapshotBefore()` / `snapshotAfter()` placement, and ghost update conventions
6. `{META_DIR}/property-plan.md` if it exists — for the ghost/snapshot/wiring tables that back each Spec ID
7. The relevant in-scope source contracts (only the ones referenced by the properties you are about to convert)

If `PROPERTIES.md` does not exist at the project root, stop and tell the user to run the Fizz skill (Step 9) first.

---

## STEP 1.5: RECONCILE SPEC WITH CODE

For every Spec ID in `PROPERTIES.md` (regardless of checkbox state), check whether tagged Solidity exists. The doctag pattern is exact:

```
/// @notice GL-NN:
/// @notice SP-NN:
```

Grep `{SUITE_DIR}/Properties.sol` and `{SUITE_DIR}/handlers/**/*.sol` for each pattern. Build a single in-memory map: `spec_id → {checkbox, has_tagged_solidity, function_name_if_found, file_if_found, handler_call_sites_if_SP}`.

Then classify each ID against the action matrix above. The four action types are:

- **IMPLEMENT** (`[ ]` + NO Solidity) — process in STEP 4 normally.
- **REGENERATE** (`[ ]` + Solidity) — first delete, then process in STEP 4.
- **DROP** (`[-]` + Solidity) — delete only, no STEP 4 work.
- **DRIFT_WARN** (`[x]` + NO Solidity) — print a warning and skip this ID. Do NOT touch the checkbox.
- **SKIP** (`[x]` + Solidity, or `[-]` + NO Solidity) — no work.

### Deletion procedure (used by REGENERATE and DROP)

For a Spec ID whose tagged Solidity must be removed:

1. **Locate the function block** in `Properties.sol`. Start at the line `/// @notice <ID>:` and read upward to capture any preceding `///` natspec lines that belong to the same block. Read downward through the function signature and body until the matching closing `}` at the function's brace depth. Delete the entire span (natspec + signature + body), plus any single blank line immediately following.
2. **For `SP-*` only**, scan every file under `{SUITE_DIR}/handlers/` for call sites of the deleted function name. The grep target is the bare function name followed by `(` (e.g. `property_depositIncreasesTotalSupply(`). Delete each such call line. If the call has surrounding comments specific to that property (e.g. `// SP-01 postcondition`), delete those too.
3. **Do not touch** any other functions, ghost variables, or snapshot fields. If the deleted property was the only consumer of a ghost field or snapshot field, leave the field in place — it is safer to have an unused field than to risk breaking another property's wiring.
4. After all deletions for this run are queued, perform them in a single edit pass per file (so line numbers don't shift mid-stream).

### Argument-list handling

If the user passed explicit IDs:
- Apply the matrix above to each requested ID.
- Requested ID is `DRIFT_WARN` → warn, skip, continue with the others.
- Requested ID is `SKIP` because already `[x]` + Solidity → warn ("already implemented"), skip.
- Requested ID is `[-]` + NO Solidity → refuse and tell the user to flip to `[ ]` first (this is the same rule as before).
- Requested ID does not exist in `PROPERTIES.md` → stop and report.

---

## STEP 2: IDENTIFY PROPERTIES TO CONVERT

Parse `PROPERTIES.md`. The format is:

```
- [ ] **GL-01** — <english description>. (Category: ...; Guarantee: SHOULD-HOLD|EXPLORATORY; Priority: ...; Sources: ...)
- [ ] **SP-01** — <english description>. (Category: ...; Guarantee: SHOULD-HOLD|EXPLORATORY; After: <handler>; Priority: ...; Sources: ...)
```

The parenthetical fields are metadata; only `After:` affects wiring. **Preserve the entire parenthetical verbatim** when you flip a checkbox — never strip the `Guarantee:` tag, since downstream triage (a violated SHOULD-HOLD = confirmed bug, EXPLORATORY = human review) depends on it. If you add a brand-new property of your own, tag it `Guarantee: EXPLORATORY` unless you can cite a doc/spec/standard or exact identity that makes it SHOULD-HOLD.

Use the action map you built in STEP 1.5. The set of IDs that get Solidity work in STEP 4 is the union of:
- All 
````

## File: README.md
upstream: https://github.com/pashov/skills/blob/main/README.md

````text
# Pashov Audit Group Skills

> AI-powered Solidity security skills — built by [Pashov Audit Group](https://www.pashov.com/).

**Supported AI Platforms:**
[![Claude Code](https://img.shields.io/badge/Claude_Code-F5E6D0?style=for-the-badge&logo=anthropic&logoColor=1a1a1a)](https://claude.ai/download)
[![Cursor](https://img.shields.io/badge/Cursor-000000?style=for-the-badge&logo=cursor&logoColor=white)](https://cursor.com)
[![Codex](https://img.shields.io/badge/Codex-000000?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyByb2xlPSJpbWciIHZpZXdCb3g9IjAgMCAyNCAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBmaWxsPSJ3aGl0ZSIgZD0iTTIyLjI4MTkgOS44MjExYTUuOTg0NyA1Ljk4NDcgMCAwIDAtLjUxNTctNC45MTA4IDYuMDQ2MiA2LjA0NjIgMCAwIDAtNi41MDk4LTIuOUE2LjA2NTEgNi4wNjUxIDAgMCAwIDQuOTgwNyA0LjE4MThhNS45ODQ3IDUuOTg0NyAwIDAgMC0zLjk5NzcgMi45IDYuMDQ2MiA2LjA0NjIgMCAwIDAgLjc0MjcgNy4wOTY2IDUuOTggNS45OCAwI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Ny4wNzU3IDAgMCAxIC4wNzEgMGw0LjgzMDMgMi43OTEzYTQuNDk0NCA0LjQ5NDQgMCAwIDEtLjY3NjUgOC4xMDQydi01LjY3NzJhLjc5Ljc5IDAgMCAwLS40MDctLjY2N3ptMi4wMTA3LTMuMDIzMWwtLjE0Mi0uMDg1Mi00Ljc3MzUtMi43ODE4YS43NzU5Ljc3NTkgMCAwIDAtLjc4NTQgMEw5LjQwOSA5LjIyOTdWNi44OTc0YS4wNjYyLjA2NjIgMCAwIDEgLjAyODQtLjA2MTVsNC44MzAzLTIuNzg2NmE0LjQ5OTIgNC40OTkyIDAgMCAxIDYuNjgwMiA0LjY2ek04LjMwNjUgMTIuODYzbC0yLjAyLTEuMTYzOGEuMDgwNC4wODA0IDAgMCAxLS4wMzgtLjA1NjdWNi4wNzQyYTQuNDk5MiA0LjQ5OTIgMCAwIDEgNy4zNzU3LTMuNDUzN2wtLjE0Mi4wODA1TDguNzA0IDUuNDU5YS43OTQ4Ljc5NDggMCAwIDAtLjM5MjcuNjgxM3ptMS4wOTc2LTIuMzY1NGwyLjYwMi0xLjQ5OTggMi42MDY5IDEuNDk5OHYyLjk5OTRsLTIuNTk3NCAxLjQ5OTctMi42MDY3LTEuNDk5N1oiLz48L3N2Zz4=&logoColor=white)](https://openai.com/index/introducing-codex/)
[![GitHub Copilot](https://img.shields.io/badge/GitHub_Copilot-000000?style=for-the-badge&logo=githubcopilot&logoColor=white)](https://github.com/features/copilot)
[![Windsurf](https://img.shields.io/badge/Windsurf-0062FF?style=for-the-badge&logo=windsurf&logoColor=white)](https://www.windsurf.com/)

---

## Install, Run & Update Prompts

```
Install https://github.com/pashov/skills/ and run an x-ray on the codebase
Install https://github.com/pashov/skills/ and run solidity auditor with all different agents possible on the codebase
Install https://github.com/pashov/skills/ and run fizz on the codebase
```

```
run an x-ray on the codebase
run the solidity auditor with all the different agents possible on *specified files*
run fizz on the codebase
```

```
update skills to latest version
```

---

## Skills

| Skill                                 | Description                                                                     |
| ------------------------------------- | ------------------------------------------------------------------------------- |
| [fizz](fizz/)                         | Generate a full Echidna/Medusa fuzz suite for any Foundry or Hardhat project    |
| [solidity-auditor](solidity-auditor/) | Solidity AI security audit - hundreds of Critical/High vulnerabilities found    |
| [x-ray](x-ray/)                       | Pre-audit scan with threat model, invariants, entry points, and git analysis    |

---

## Contributing · Security · License · Contact

We welcome improvements and fixes. See [CONTRIBUTING.md](CONTRIBUTING.md) for the PR process.

Report vulnerabilities via [Security Policy](SECURITY.md). This project follows the [Contributor Covenant](CODE_OF_CONDUCT.md). [MIT](LICENSE) © contributors.

If you are looking to explore strategies for securing your project, reach out for a chat on [Telegram @pashovkrum](https://t.me/pashovkrum).

[![Discord](https://img.shields.io/badge/Discord-5865F2?logo=discord&logoColor=white)](https://discord.com/invite/pashovauditgroup) [![X](https://img.shields.io/badge/X-000000?logo=x&logoColor=white)](https://x.com/PashovAuditGrp) [![Telegram](https://img.shields.io/badge/Telegram-26A5E4?logo=telegram&logoColor=white)](https://t.me/pashovkrum) [![Website](https://img.shields.io/badge/Website-FF5722?logo=googlechrome&logoColor=white)](https://www.pashov.com/)
````
