Flare Builders Toolkit — Master Skill
This skill is the entry point to a 16-skill bundle for Flare-family EVM
development. When invoked, route to the right sub-skill(s) based on what the
task needs.
Security is the default. Every contract under discussion is assumed
hostile-attacked. Patterns that aren't safe-by-default (Ownable instead of
Ownable2Step, raw transfer instead of SafeERC20, unbounded loops,
push-style ETH transfers, missing reentrancy guards) are flagged as findings,
not described as alternatives. Read flare-security
first for any contract design or review work.
How to use this skill
When the user asks a Flare-development question, route them to the most
specific sub-skill that fits. Multiple sub-skills can apply to one question.
Don't try to answer from this skill alone — it's the router, not the source of
truth.
Routing table
| User asks about… |
Use sub-skill(s) |
| Chain ID, RPC URL, block explorer URL, faucet, faster RPC |
flare-network |
| Token address (WFLR, WSGB, USDT0, USDC.e, sFLR, FXRP, HLN, APS, …) |
flare-network |
| Permit2 / Multicall3 deployed address per chain |
flare-network |
| Enosys V3 / SparkDEX V3.1 / SparkDEX V4 / BlazeSwap / OpenOcean address |
flare-network |
Contract verification on flare-explorer or flarescan |
flare-network |
| What is FTSO / FDC / FAssets / Smart Accounts |
flare-general, then the specific protocol skill |
| Reading FTSO price feeds, anchor feeds, volatility |
flare-ftso |
| Cross-chain proofs, BTC/XRPL state into Flare |
flare-fdc |
| FXRP minting, redemption, agents, gasless payments |
flare-fassets |
| ERC-4337 smart accounts on Flare |
flare-smart-accounts |
| Enosys DEX V3 NFT positions, reward managers, FlareDrops, rFLR, APS incentives |
enosys-dex-v3 |
| Enosys Loans/CDP, governance staking, contract addresses |
enosys-contracts |
| Why X is silently failing on Flare (RPC log range, MetaMask SDK hang, claim OOG, basefee, EIP-3855, WFLR transfer hook) |
flare-dapp-pitfalls |
| Solidity coding standards (general) |
solidity |
| Security review of a Flare contract before deploy |
flare-security |
| Run a checklist-style audit against a contract |
audit |
| Run an adversarial multi-agent audit against a contract |
audit-contract |
| Optimize gas |
gas-optimize |
| Generate a Foundry test suite |
test-foundry |
| Generate a Hardhat test suite |
test-hardhat |
| "I'm building a new Flare contract" |
Sequence below ↓ |
Standard flow for a new Flare contract
When the task is "build and ship a Flare contract", walk these in order. Read
the linked skills as you go — don't try to remember everything.
- Plan — read
flare-general plus any
protocol-specific skills the contract will touch
(flare-ftso, flare-fdc, flare-fassets, flare-smart-accounts,
enosys-contracts, enosys-dex-v3).
- Address resolution — every concrete address goes through
flare-network. Don't guess; don't trust
training-data addresses; look them up.
- Coding standards —
solidity Cyfrin standards as
the baseline.
- Flare-specific security overlays —
flare-security
covers what solidity doesn't: Permit2 chain availability, FoT detection,
blacklist surface, basefee floors, FTSO redistributor proxy quirks. Add
flare-dapp-pitfalls for the gotcha catalog.
- Test —
test-foundry for unit + fork + fuzz
coverage. (Hardhat alternative in test-hardhat;
Foundry is preferred.)
- Optimize gas —
gas-optimize for ranked
savings.
- Audit —
audit (systematic, 115+ items) +
audit-contract (adversarial, multi-agent).
After both run, reread flare-security Part
2 — Flare-specific overlays aren't in the generic audit checklists.
- Deploy + verify — verification commands in
flare-network work for both Blockscout
(flare-explorer) and Routescan/Etherscan-style (flarescan).
Pre-deploy checklist (mandatory)
Before broadcasting to Flare mainnet, every item below must be green. Full
detail in flare-security.
Conventions
- Sub-skill folders are flat. Each contains a
SKILL.md (frontmatter +
body) plus optional references/, scripts/, or *.md supporting docs.
- Protocol skills (
flare-ftso, flare-fassets) include reference
scripts in TypeScript and Solidity. They're illustrative; the user is
responsible for security review before signing or broadcasting.
- Address registry (
flare-network) is the single source of truth for
any deployed-contract or token address. If a sub-skill mentions a different
address than flare-network, raise it as a discrepancy and verify.
When NOT to use this skill
- For non-EVM chain interactions outside the FAssets / FDC bridge surface —
use chain-specific tooling.
- For Flare validator-node operation or staking management — see Flare's
validator docs.
- For executing transactions — this skill is documentation/reference only.
Wallet signing happens in user-controlled environments.
Contract under review?
If the user is asking you to review a specific contract, start with
flare-security to set the security baseline,
then run audit and audit-contract
against the file. After those complete, reread flare-security Part 2 to
verify the Flare-specific overlays — Permit2 availability, FoT detection,
blacklist surface, basefee floor, FTSO redistributor handling — were caught.
The generic audit skills are not chain-aware.
For more detailed orientation, the README.md in this same
directory is a human-readable map of the toolkit.
1---2name: flare-builders-toolkit3description: Master skill for building, testing, auditing, and deploying smart contracts on the Flare-family EVM chains (Flare, Songbird, Coston2). Use this skill as the entry point for any Flare-related development task. It bundles 16 specialized sub-skills covering: chain registry and addresses (Permit2, Multicall3, DEXes, routers, tokens), Flare protocols (FTSO, FDC, FAssets, Smart Accounts), Enosys contracts and rewards, security-first Solidity standards, Flare-specific audit checklists (Permit2 chain availability, fee-on-transfer detection, blacklistable token surface, basefee floors, FTSO redistributor proxy upgradeability), the cross-project lessons-learned from real Flare builds, and the audit/gas/test workflow (`audit`, `audit-contract`, `gas-optimize`, `test-foundry`, `test-hardhat`). Trigger on: any Flare/Songbird/Coston2 development question, "how do I X on Flare", security review request, audit kickoff, contract verification on flare-explorer or flarescan, address lookup, RPC selection, FTSO reward claim, FAs4---56# Flare Builders Toolkit — Master Skill78This skill is the **entry point** to a 16-skill bundle for Flare-family EVM9development. When invoked, route to the right sub-skill(s) based on what the10task needs.1112**Security is the default.** Every contract under discussion is assumed13hostile-attacked. Patterns that aren't safe-by-default (`Ownable` instead of14`Ownable2Step`, raw `transfer` instead of `SafeERC20`, unbounded loops,15push-style ETH transfers, missing reentrancy guards) are flagged as findings,16not described as alternatives. Read [`flare-security`](flare-security/SKILL.md)17first for any contract design or review work.1819## How to use this skill2021When the user asks a Flare-development question, **route them to the most22specific sub-skill** that fits. Multiple sub-skills can apply to one question.23Don't try to answer from this skill alone — it's the router, not the source of24truth.2526### Routing table2728| User asks about… | Use sub-skill(s) |29|---|---|30| Chain ID, RPC URL, block explorer URL, faucet, faster RPC | [`flare-network`](flare-network/SKILL.md) |31| Token address (WFLR, WSGB, USDT0, USDC.e, sFLR, FXRP, HLN, APS, …) | [`flare-network`](flare-network/SKILL.md) |32| Permit2 / Multicall3 deployed address per chain | [`flare-network`](flare-network/SKILL.md) |33| Enosys V3 / SparkDEX V3.1 / SparkDEX V4 / BlazeSwap / OpenOcean address | [`flare-network`](flare-network/SKILL.md) |34| Contract verification on `flare-explorer` or `flarescan` | [`flare-network`](flare-network/SKILL.md) |35| What is FTSO / FDC / FAssets / Smart Accounts | [`flare-general`](flare-general/SKILL.md), then the specific protocol skill |36| Reading FTSO price feeds, anchor feeds, volatility | [`flare-ftso`](flare-ftso/SKILL.md) |37| Cross-chain proofs, BTC/XRPL state into Flare | [`flare-fdc`](flare-fdc/SKILL.md) |38| FXRP minting, redemption, agents, gasless payments | [`flare-fassets`](flare-fassets/SKILL.md) |39| ERC-4337 smart accounts on Flare | [`flare-smart-accounts`](flare-smart-accounts/SKILL.md) |40| Enosys DEX V3 NFT positions, reward managers, FlareDrops, rFLR, APS incentives | [`enosys-dex-v3`](enosys-dex-v3/SKILL.md) |41| Enosys Loans/CDP, governance staking, contract addresses | [`enosys-contracts`](enosys-contracts/SKILL.md) |42| Why X is silently failing on Flare (RPC log range, MetaMask SDK hang, claim OOG, basefee, EIP-3855, WFLR transfer hook) | [`flare-dapp-pitfalls`](flare-dapp-pitfalls/SKILL.md) |43| Solidity coding standards (general) | [`solidity`](solidity/SKILL.md) |44| Security review of a Flare contract before deploy | [`flare-security`](flare-security/SKILL.md) |45| Run a checklist-style audit against a contract | [`audit`](audit/SKILL.md) |46| Run an adversarial multi-agent audit against a contract | [`audit-contract`](audit-contract/SKILL.md) |47| Optimize gas | [`gas-optimize`](gas-optimize/SKILL.md) |48| Generate a Foundry test suite | [`test-foundry`](test-foundry/SKILL.md) |49| Generate a Hardhat test suite | [`test-hardhat`](test-hardhat/SKILL.md) |50| "I'm building a new Flare contract" | Sequence below ↓ |5152### Standard flow for a new Flare contract5354When the task is "build and ship a Flare contract", walk these in order. Read55the linked skills as you go — don't try to remember everything.56571. **Plan** — read [`flare-general`](flare-general/SKILL.md) plus any58 protocol-specific skills the contract will touch59 (`flare-ftso`, `flare-fdc`, `flare-fassets`, `flare-smart-accounts`,60 `enosys-contracts`, `enosys-dex-v3`).612. **Address resolution** — every concrete address goes through62 [`flare-network`](flare-network/SKILL.md). Don't guess; don't trust63 training-data addresses; look them up.643. **Coding standards** — [`solidity`](solidity/SKILL.md) Cyfrin standards as65 the baseline.664. **Flare-specific security overlays** — [`flare-security`](flare-security/SKILL.md)67 covers what `solidity` doesn't: Permit2 chain availability, FoT detection,68 blacklist surface, basefee floors, FTSO redistributor proxy quirks. Add69 [`flare-dapp-pitfalls`](flare-dapp-pitfalls/SKILL.md) for the gotcha catalog.705. **Test** — [`test-foundry`](test-foundry/SKILL.md) for unit + fork + fuzz71 coverage. (Hardhat alternative in [`test-hardhat`](test-hardhat/SKILL.md);72 Foundry is preferred.)736. **Optimize gas** — [`gas-optimize`](gas-optimize/SKILL.md) for ranked74 savings.757. **Audit** — [`audit`](audit/SKILL.md) (systematic, 115+ items) +76 [`audit-contract`](audit-contract/SKILL.md) (adversarial, multi-agent).77 After both run, **reread [`flare-security`](flare-security/SKILL.md) Part78 2** — Flare-specific overlays aren't in the generic audit checklists.798. **Deploy + verify** — verification commands in80 [`flare-network`](flare-network/SKILL.md) work for both Blockscout81 (`flare-explorer`) and Routescan/Etherscan-style (`flarescan`).8283### Pre-deploy checklist (mandatory)8485Before broadcasting to Flare mainnet, every item below must be green. Full86detail in [`flare-security`](flare-security/SKILL.md).8788- [ ] `forge build` clean; all contracts under 24 KB runtime89- [ ] `forge test` (unit) + `forge test --fork-url flare` (fork) all pass90- [ ] Slither no high/medium findings91- [ ] Owner is NOT the deployer EOA — `Ownable2Step` + Ledger/multisig handoff92- [ ] `Ownable2Step` (not `Ownable`); reentrancy guards on every state-changing93 external function; CEI in every flow94- [ ] `SafeERC20` + `forceApprove` for every token interaction95- [ ] No `tx.origin` for auth; no unbounded loops over user-controlled data96- [ ] Pause / emergency-stop present and tested97- [ ] Custom errors prefixed with contract name + `__`98- [ ] Permit2 chain availability verified if the contract depends on Permit299- [ ] FoT and blacklistable-token surface explicitly designed for100- [ ] Basefee floor present in any incentive-math101- [ ] `audit` + `audit-contract` both run; findings fixed or accepted102- [ ] Contract verifies cleanly on both `flare-explorer` and `flarescan`103104## Conventions105106- **Sub-skill folders** are flat. Each contains a `SKILL.md` (frontmatter +107 body) plus optional `references/`, `scripts/`, or `*.md` supporting docs.108- **Protocol skills** (`flare-ftso`, `flare-fassets`) include reference109 scripts in TypeScript and Solidity. They're illustrative; the user is110 responsible for security review before signing or broadcasting.111- **Address registry** (`flare-network`) is the single source of truth for112 any deployed-contract or token address. If a sub-skill mentions a different113 address than `flare-network`, raise it as a discrepancy and verify.114115## When NOT to use this skill116117- For non-EVM chain interactions outside the FAssets / FDC bridge surface —118 use chain-specific tooling.119- For Flare validator-node operation or staking management — see Flare's120 validator docs.121- For executing transactions — this skill is documentation/reference only.122 Wallet signing happens in user-controlled environments.123124## Contract under review?125126If the user is asking you to review a specific contract, **start with127[`flare-security`](flare-security/SKILL.md)** to set the security baseline,128then run [`audit`](audit/SKILL.md) and [`audit-contract`](audit-contract/SKILL.md)129against the file. After those complete, reread `flare-security` Part 2 to130verify the Flare-specific overlays — Permit2 availability, FoT detection,131blacklist surface, basefee floor, FTSO redistributor handling — were caught.132The generic audit skills are not chain-aware.133134For more detailed orientation, the [README.md](README.md) in this same135directory is a human-readable map of the toolkit.