{"data":{"slug":"discovered-540cd6103c997e426639f76876e4737b2e5a051430cc66eb","title":"Cost Estimate Skill","summary":"Scan any codebase (GitHub repo URL or local directory), analyze complexity, and calculate what a real development team would charge to build it. Cross-reference 2025-2026 market rates for US and Polish developers. Show AI-assisted development ROI.","url":"https:\/\/skillshunter.net\/skills\/discovered-540cd6103c997e426639f76876e4737b2e5a051430cc66eb","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/discovered-540cd6103c997e426639f76876e4737b2e5a051430cc66eb","markdown_url":"https:\/\/skillshunter.net\/skills\/discovered-540cd6103c997e426639f76876e4737b2e5a051430cc66eb.md","download_url":"https:\/\/skillshunter.net\/skills\/discovered-540cd6103c997e426639f76876e4737b2e5a051430cc66eb\/download","category":{"slug":"software-development","name":"Software & Development"},"editor_note":"Ensure the `gh` CLI is installed and configured for GitHub URL scanning. Prepare a local path or GitHub URL as input. The report includes a complexity score, estimated human hours, cost scenarios, and AI comparison metrics.","instructions":"---\nname: cost-estimate\ndescription: \"This skill should be used when the user asks to 'estimate build cost', 'how much would this cost to build', 'cost-estimate', 'what is this codebase worth', 'compare US vs Polish dev costs', 'calculate development cost', 'how much would a team charge for this'. Scans any codebase (GitHub URL or local path), analyzes complexity, and calculates build cost across US and Polish developer markets with AI ROI comparison.\"\nuser-invocable: true\nargument-hint: \"[github.com\/owner\/repo or ~\/local\/path]\"\n---\n\n# Cost Estimate -- Codebase Value Calculator\n\nScan any codebase (GitHub repo URL or local directory), analyze complexity, and calculate what a real development team would charge to build it. Cross-reference 2025-2026 market rates for US and Polish developers. Show AI-assisted development ROI.\n\nAccept GitHub URLs (`github.com\/owner\/repo`, full HTTPS URLs) or local paths. Default to current working directory if no argument given.\n\n## Workflow\n\n### Step 0: Resolve Source\n\nDetermine if the argument is a GitHub URL or local path.\n\n**GitHub URL detected** (contains `github.com` or matches `owner\/repo` pattern):\n```bash\nSCAN_DIR=$(mktemp -d \/tmp\/cost-estimate-XXXXXX)\ngh repo clone {owner}\/{repo} \"$SCAN_DIR\" -- --depth 1 --single-branch 2>\/dev\/null\n```\n\nPull repo metadata for enrichment:\n```bash\ngh api \"repos\/{owner}\/{repo}\" --jq '{name, full_name, description, stargazers_count, forks_count, open_issues_count, created_at, updated_at, pushed_at, language, size, topics, license: .license.spdx_id}'\ngh api \"repos\/{owner}\/{repo}\/languages\"\ngh api \"repos\/{owner}\/{repo}\/contributors?per_page=5\" --jq '[.[].login]'\ngh api \"repos\/{owner}\/{repo}\/commits?per_page=1\" --jq '.[0] | {sha: .sha[0:7], date: .commit.committer.date, message: .commit.message}'\n```\n\n**Local path or no argument**: use provided path or cwd. Skip GitHub API enrichment.\n\nUse `$SCAN_DIR` as `[DIR]` for all subsequent steps. Clean up temp directory after report generation.\n\n### Step 1: Scan Codebase\n\nUse Claude Code native tools (Glob\/Grep\/Read), never shell `find` or `grep`.\n\n**1a. Discover code files** (run all Glob calls in parallel):\n- `**\/*.{ts,tsx}`, `**\/*.{js,jsx}`, `**\/*.py`, `**\/*.{css,scss,html}`, `**\/*.sol`, `**\/*.{rs,go,swift}`, `**\/*.{json,yaml,yml,toml,md}`\n\nExclude paths containing: `node_modules`, `.next`, `dist\/`, `build\/`, `vendor\/`, `__pycache__`, lock files.\n\n**1b. Count LOC**: `wc -l` on filtered files (batch into groups of ~100 if >200 files). Tally file counts by extension from Glob results.\n\n**1c. Detect integrations** (Grep tool):\n```\npattern=\"fetch|axios|supabase|redis|postgres|mongo|firebase|stripe|twilio|sendgrid|openai|anthropic|openrouter\"\nglob=\"*.{ts,tsx,js,jsx,py}\" | output_mode=\"files_with_matches\"\n```\n\n**1d. Check infra configs** (Glob): `{vercel.json,railway.json,docker-compose.yml,Dockerfile,wrangler.toml}`, `.github\/workflows\/*.yml`\n\n**1e. Read dependency manifest**: `package.json`, `requirements.txt`, `Cargo.toml`, or `go.mod`\n\n### Step 2: Score Complexity\n\nRate each factor 1-5 (1=simple, 5=very complex):\n\n| Factor | Signals |\n|--------|---------|\n| Frontend | Component count, state mgmt, animations, responsive |\n| Backend | API routes, middleware, auth, DB schemas, cron |\n| Integrations | Third-party APIs, payments, blockchain, AI\/LLM |\n| Infrastructure | CI\/CD, multi-env, caching layers |\n| Domain expertise | Trading, crypto, ML, compliance, gov APIs |\n| Real-time | WebSockets, SSE, polling, live feeds |\n| Security | Auth flows, encryption, key mgmt, OWASP surface |\n\n### Step 3: Estimate Human Hours\n\n**Base hours** = LOC \/ productivity_rate\n\n| Complexity tier | LOC\/hr |\n|----------------|--------|\n| Simple CRUD \/ static | 40-60 |\n| Standard web app | 20-35 |\n| Complex integrations \/ trading | 10-20 |\n| Smart contracts \/ security-critical | 5-15 |\n\n**Complexity multiplier** = average of all factor scores \/ 3\n\n**Overhead multiplier** = 1.75x (setup +15%, review\/QA +20%, devops +10%, communication +15%, iteration +15%)\n\n**Total hours** = base hours x complexity multiplier x 1.75\n\n### Step 4: Calculate Costs\n\nLoad rate tables from **`references\/rates.md`** for exact figures.\n\nCalculate 6 scenarios: Solo Dev (US), Lean Startup (US), Growth Company (US), Enterprise (US), Polish Software House, Polish Internal Team.\n\nCalendar time = total hours \/ (team FTE x 6 productive hrs\/day x 22 days\/month).\n\n### Step 5: AI Comparison\n\nEstimate Claude hours from git log:\n```bash\ngit -C [DIR] log --oneline --format=\"%ai\" | tail -1  # first commit\ngit -C [DIR] log --oneline --format=\"%ai\" | head -1  # last commit\ngit -C [DIR] log --oneline | wc -l                    # total commits\n```\n\nIf unknown, estimate: total_commits x 0.25 hours.\n\nClaude cost = Pro subscription prorated (~$6.67\/day, estimate active days from git log).\n\nMetrics: speed multiplier (human_hours \/ claude_hours), cost savings, ROI, value per Claude hour.\n\n### Step 6: Present Report\n\nLoad template from **`references\/report-template.md`** and fill in all calculated values.\n\n### Step 7: Clean Up\n\n```bash\nrm -rf \"$SCAN_DIR\"  # only if SCAN_DIR matches \/tmp\/cost-estimate-*\n```\n\n## Rules\n\n- NEVER fabricate LOC counts or file counts. Always scan real files.\n- NEVER guess API integrations. Grep for them.\n- Polish context section is mandatory in every report.\n- Show PLN alongside USD for all Polish scenarios.\n- If confidence is low on any estimate, flag it explicitly.\n- Keep the report tight. No filler.\n\n## Edge Cases\n\n- No code files: report and stop\n- Monorepo: scan each project, sum totals\n- No git history: skip Claude hours, ask user for active hours\n- Small projects (<500 LOC): flag high estimate variance\n- `gh` not installed\/authenticated: fall back to local-only, warn user\n- Private repo without access: inform and stop\n- Very large repos (>100K files): warn, consider sampling\n\n## Reference Files\n\n- **`references\/rates.md`** -- All US and Polish market rate tables, team compositions, Polish market context\n- **`references\/report-template.md`** -- Full report output template with all sections\n","use_cases":["Estimate build cost for a GitHub repository","Calculate development cost for a local codebase","Compare US vs Polish developer market rates","Analyze AI-assisted development ROI"],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/exhuman777\/cost-estimate-skill\/blob\/efb52444055b6d41b3c6af1c3be49980546fc7d1\/SKILL.md","source_commit":"efb52444055b6d41b3c6af1c3be49980546fc7d1","license":null,"version":null,"listing_approved_at":"2026-11-30","created_at":"2026-11-29T10:51:22.000000Z","updated_at":"2026-11-30T06:51:23.000000Z","seo_title":"Cost Estimate Skill - Codebase Value Calculator","seo_description":"Estimate the cost to build a codebase with this AI-powered skill. Get detailed reports on US and Polish development costs, complexity scores, and AI-assisted ROI.","seo_keywords":["cost estimate","codebase value calculator","development cost estimation","US vs Polish developer rates","AI-assisted development ROI"]}}