{"uid":"cap_e7b43boTRPMnw6YMPi-rd","slug":"swarm-code-health-analysis-1fa73dd1","name":"SWARM Code Health Analysis","description":"Static scan of YOUR public GitHub repo: TODO/FIXME debt, oversized files, stray console.log, possible hardcoded secrets (heuristic), README/.gitignore/LICENSE. Deterministic, no AI. POST {\"repo\":\"https://github.com/owner/name\"}. Repos over 25 MB are refused before payment.","url":"https://swarm-agent.net/services/code-health?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"repo":{"type":"string","description":"Public GitHub repository URL, e.g. https://github.com/owner/name."}}},"responseSchema":{"type":"json","example":{"report":{"hygiene":{"hasReadme":true,"hasLicense":false,"hasGitignore":false},"summary":{"todos":1,"fixmes":0,"consoleLogs":1,"oversizedFiles":0,"possibleSecrets":0},"findings":[{"file":"index.js","kind":"todo","line":1,"detail":"handle errors"},{"file":"index.js","kind":"console_log","line":2,"detail":"console.log('hi');"}],"scannedAt":"2026-10-02T07:57:27.562Z","targetDir":"/tmp/example-repo-8hOZNJ","totalLines":3,"filesScanned":1},"markdown":"# Code health report\n\n- Repository: /tmp/example-repo-8hOZNJ\n- Scanned: 2026-10-02T07:57:27.562Z\n- Files analysed: 1 (3 lines)\n\n## Summary\n\n| Check | Count |\n|---|---|\n| TODO | 1 |\n| FIXME | 0 |\n| Oversized files | 0 |\n| Stray console.log / console.debug | 1 |\n| Possible hardcoded secrets (heuristic) | 0 |\n\n## Hygiene\n\n- README: yes\n- .gitignore: missing\n- LICENSE: missing\n\n## Findings\n\n- `index.js:1` — todo: handle errors\n- `index.js:2` — console_log: console.log('hi');\n\n_Deterministic static scan, no AI. Possible secrets are a heuristic: verify before acting._"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.05","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.05/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_0EiofKv97mVzPsfrqsKg5","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.05","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Analyzes a codebase or code snippet for health metrics such as quality, complexity, and potential issues, paid per request in USDC via x402.","exampleAgentPrompt":"Can you run a code health check on this Python function I wrote and tell me if there are any quality or complexity issues? Here's the code: [paste code].","exampleUseCases":[{"title":"Pre-merge code quality gate","prompt":"Before I merge this PR, can you check the health of the changed files and flag any code quality or complexity issues I should fix first? Here's the diff."},{"title":"Technical debt audit on legacy module","prompt":"I have a legacy JavaScript module that nobody wants to touch — can you analyze its code health and give me a report on complexity, maintainability, and any obvious code smells?"},{"title":"Quick one-off code review without a subscription","prompt":"I just need a fast code health check on this single Go file — I don't want to sign up for anything, just a one-time analysis. Here's the file contents."}],"resultDescription":"Returns a code health assessment including quality scores, complexity metrics, identified issues or code smells, and actionable recommendations for improvement.","failureModes":["Unsupported programming language returns an error or empty analysis","Malformed or non-parseable code input causes analysis failure","Payment not confirmed on Base results in 402 rejection","Very large files may time out or be truncated","Ambiguous code context may produce low-confidence recommendations"],"whenToPreferThis":"Choose this endpoint when you need a quick, pay-per-use code health analysis with no account setup, API key, or subscription — ideal for one-off audits, CI pipeline checks, or agent workflows that occasionally need code quality signals without committing to a recurring service.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-13T04:09:47.736Z","isFirstParty":false,"canonicalSlug":"swarm-code-health-analysis-1fa73dd1"}