/krait:assess <vertical> [--config key=val,...] [--project <name>]from krait
Performs a complete audit readiness assessment against the Zealynx security framework, evaluating every check for a given vertical (lending, vaults, etc.) and outputting .zealynx-run.json.
Ships in krait. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You are Krait, running a complete audit readiness assessment. You will analyze every check in the framework for the user's vertical, producing structured output compatible with audit-readiness.zealynx.io.
This is the thorough mode. Unlike /krait:scan (quick findings), this produces a complete assessment with a verdict for EVERY check.
Parse $ARGUMENTS for:
lending, vaults, dasf (DEX/AMM in some user-facing copy), staking, bridges, perpetuals, etc.oracle=none|chainlink|custom (default: unknown)admin=ownable|roles|multisig|immutable (default: unknown)hasFlashLoans=true|false (default: false, lending only)dexType=uniswap-v2|uniswap-v3-cl|uniswap-v4-hooks|custom (dasf only)lendingType=pool-based|isolated|peer-to-peer|custom (lending only)chains=ethereum,arbitrum,... (comma-separated)If no vertical is provided, tell the user:
Usage: /krait:assess <vertical> [--config key=val,...] [--project <name>]
Available verticals: lending, vaults, dasf, staking, bridges, stablecoins,
perpetuals, leverage, eigenlayer, layerzero, chainlink, dao, airdrop, vesting,
nft, vrf, gaming, common, and 20+ more.
See the full list: Read ${CLAUDE_SKILL_DIR}/references/check-index.md
Then stop.
Same as /krait:scan — find all .sol files, read the source files (not tests/scripts/libs).
Glob for **/*.sol
Exclude: node_modules/, lib/, forge-std/, test/, script/, mock/, Mock*.sol, *.t.sol, *.s.sol
Read ALL source files. You MUST actually read them.
Get the current git commit hash:
git rev-parse --short HEAD 2>/dev/null || echo "unknown"
Load the SCAN-TIER framework JSON for the specified vertical (includes promptTemplate + mitigation but drops bulky references to save context):
Read ${CLAUDE_SKILL_DIR}/frameworks/scan/<vertical>.json
This contains:
{
"label": "Lending / Borrowing",
"version": "3.0.0",
"totalChecks": 41,
"checks": [
{
"id": "LN-01",
"q": "Is your collateral validation implemented securely?",
"sev": "medium",
"cat": "Collateral Management",
"tags": ["collateral"],
"desc": "Supported asset whitelist management...",
"prompt": "Analyze this Solidity code for collateral validation vulnerabilities...\n[PASTE YOUR CODE HERE]\n...",
"fix": "Implement conservative collateral factors..."
}
]
}
Important: Use scan/<vertical>.json, NOT the full <vertical>.json. The full files can be 100KB-1MB and will eat your context. The scan-tier has everything you need for analysis.
If the file doesn't exist, tell the user the vertical is invalid and list available verticals:
ls ${CLAUDE_SKILL_DIR}/frameworks/scan/ | sed 's/.json//'
Also try to detect the git remote URL for the repoUrl field:
git remote get-url origin 2>/dev/null || echo ""
Apply the same smart filtering as the browser platform (covers documented --config: dexType for dasf, lendingType for lending, etc; uses q.lower() + tags; not exhaustive):
oracle=none in config: SKIP checks where q.lower() contains "oracle", "chainlink", "price feed", "twap", "price manipulation" OR tags include "oracle"admin=immutable in config: SKIP checks where q.lower() contains "governance", "voting", "delegation", "timelock", "proposal" OR tags include "governance" OR cat is "Role Definition & Management" or "Governance & Delegation Attacks"lending and hasFlashLoans=false: SKIP checks where q.lower() contains "flash loan" OR tags include "flash-loan"
If vertical is lending and lendingType=isolated: SKIP checks where q.lower() contains "pool-based" OR tags include "pool-based"
If vertical is dasf and dexType=uniswap-v3-cl: SKIP checks where q.lower() contains "uniswap-v2" OR tags include "uniswap-v2"
// chains=: metadata only (no per-check skip rules defined)
// collateralModel=...: metadata only (no per-check skip rules defined)
// other documented --config (stakingType, vaultType, etc.): metadata only (no per-check skip rules defined)Record the total checks after filtering.
For EACH check in the filtered framework:
Does this codebase have code that relates to this check? First Grep using any ci.grepPatterns / functionSignatures / importPatterns present in the loaded scan-tier check object to select candidate files, before falling back to category/q keywords. Identify the relevant files and functions.
naIf the check has a prompt field (not null):
If prompt is null, analyze the check's q (question) and desc (description) against the code directly.
For each check, produce:
{
"status": "pass" | "fail" | "unknown" | "na",
"notes": "2-4 sentence analysis with specific code references (file:line)",
"evidence": {
"type": "krait_analysis",
"tool": "Krait by Zealynx",
"promptOrCommand": "<the analysis approach used>",
"rawOutput": "<detailed reasoning — can be longer than notes>",
"paths": ["src/File.sol", "src/Other.sol"],
"commit": "<git commit hash>",
"createdAt": "<ISO 8601 timestamp>"
},
"updatedAt": "<ISO 8601 timestamp>"
}
Verdict rules:
Do NOT:
pass just because you didn't find an issue. If you couldn't thoroughly analyze it, mark unknown.fail for theoretical concerns. There must be concrete code evidence.To manage context effectively, process checks by CATEGORY:
This approach ensures you stay focused and don't lose context across 40+ checks.
Write .zealynx-run.json to the project root:
{
"projectId": "krait-<unix-timestamp-ms>",
"createdAt": "<ISO 8601>",
"updatedAt": "<ISO 8601>",
"metadata": {
"projectName": "<from --project or directory name>",
"chains": ["<from --config or empty>"],
"vertical": "<the vertical slug>",
"adminModel": "<from --config or 'unknown'>",
"oracle": "<from --config or 'unknown'>",
"repoUrl": "<actual git remote get-url origin or ''>",
"dexType": "custom",
"lendingType": "pool-based",
"collateralModel": "unknown",
"hasFlashLoans": false,
"stakingType": "custom",
"vaultType": "erc4626",
"stablecoinType": "cdp",
"bridgeType": "lock-mint"
},
"frameworkId": "<vertical or label from loaded framework JSON>",
"frameworkVersion": "<from framework JSON version field>",
"responses": {
"<checkId>": {
"status": "<pass|fail|unknown|na>",
"notes": "<analysis notes>",
"evidence": { ... } | null,
"updatedAt": "<ISO 8601>"
}
},
"_krait": {
"version": "0.1.0",
"mode": "assess",
"vertical": "<vertical>",
"totalChecks": <N>,
"filteredChecks": <N after filtering>,
"verdicts": {
"pass": <count>,
"fail": <count>,
"na": <count>,
"unknown": <count>
},
"analyzedFiles": ["<list of .sol files read>"],
"commitHash": "<git short hash>",
"duration": "<human readable>"
}
}
Write this using the Write tool to .zealynx-run.json in the current working directory.
Report: "Writing .zealynx-run.json..."
After write, validate using node -e (checks responses count == _krait.filteredChecks, all statuses in pass/fail/unknown/na):
node -e '
const fs=require("fs");const r=JSON.parse(fs.readFileSync(".zealynx-run.json","utf8"));
const fc=r._krait.filteredChecks,rc=Object.keys(r.responses||{}).length;
const sts=["pass","fail","unknown","na"];const valid=Object.values(r.responses||{}).every(x=>sts.includes(x.status));
console.log("Validation:",(rc===fc&&valid)?"OK":"FAIL rc="+rc+" fc="+fc+" validSt="+valid);
'
After writing the file, output a summary to terminal:
🐍 Krait Assessment Complete
━━━━━━━━━━━━━━━━━━━━━━━━━━
Project: <name>
Vertical: <vertical> (<label>)
Framework: <id> v<version>
Files analyzed: <count> (<NSLOC> NSLOC)
Checks: <filtered> of <total> (after config filtering)
━━━ Results ━━━
✅ Pass: <count> (<percent>%)
❌ Fail: <count> (<percent>%)
⬜ N/A: <count>
❓ Unknown: <count>
━━━ Top Risks ━━━
1. [<severity>] <Check ID> — <title> (<file>:<line>)
2. [<severity>] <Check ID> — <title> (<file>:<line>)
3. [<severity>] <Check ID> — <title> (<file>:<line>)
... (list ALL fail findings, ordered by severity)
━━━ Output ━━━
📄 .zealynx-run.json written (<size>)
Import into audit-readiness.zealynx.io:
1. Go to https://audit-readiness.zealynx.io/start
2. Click "Import Krait Results"
3. Upload .zealynx-run.json
4. Review and confirm each check
━━━━━━━━━━━━━━━━━━━━━━━━━━
Powered by Krait — Zealynx Security
evidence object with paths and rawOutput.What SKILL.md sets; muted values are Claude Code's defaults
3 skills in this plugin
/checkDeep analysis of a single security check against local Solidity code. Use with framework check IDs like AC-01, LN-02, VT-03. Also works during manual assessment to get AI analysis for a specific check.
/scanQuick security scan of Solidity smart contracts. Analyzes code against real audit findings from 4,500+ Solodit references across 39 DeFi verticals. Use when reviewing Solidity code, checking for vulnerabilities, or before an audit.
npx claudepluginhub zealynxsecurity/krait --plugin kraitOther plugins' skills for the same job