{"slug":"bid-tabulator","title":"bid-tabulator","summary":"Extract data from subcontractor bid PDFs and produce a comparison spreadsheet. Feeds into /bid-evaluator. Triggers: 'tabulate bids', 'bid comparison', 'compare bids', 'buyout analysis', 'bid tab'.","platform":"Claude","tags":[],"authorName":"LLM Mart","authorSlug":"llm-mart","score":0,"source":"github","price":null,"verified":false,"createdAt":"2026-10-19T21:17:02.232371Z","repo":{"url":"https://github.com/dleerdefi/claude-code-construction","stars":44,"forks":13,"license":"MIT","updatedAt":"2026-10-18T06:12:41Z"},"bodyHtml":"<hr>\n<h2>name: bid-tabulator\ndescription: &gt;\nExtract data from subcontractor bid PDFs and produce a comparison\nspreadsheet. Feeds into /bid-evaluator. Triggers: 'tabulate bids',\n'bid comparison', 'compare bids', 'buyout analysis', 'bid tab'.\nargument-hint: \"&lt;bid_folder_or_files&gt;\"\ndisable-model-invocation: true</h2>\n<h1>Bid Tabulator</h1>\n<p>Processes multiple subcontractor bid PDFs for a scope of work and produces an Excel comparison workbook. Extracts each bid's data <strong>as-submitted</strong> — the engineer handles normalization and alignment after reviewing discrepancies and contacting subcontractors as needed.</p>\n<h2>RIGID Rules (non-negotiable)</h2>\n<ol>\n<li><strong>Complete extraction — zero tolerance on omission.</strong> If a bid contains data that fits ANY field in the schema, extract it. When in doubt, extract it. Extra data can be filtered; missing data cannot be recovered.</li>\n<li><strong>Every page of every bid.</strong> Process ALL pages — do not stop at the first page or summary page. Bids over 10 pages contain detailed breakdowns, alternates, and qualifications that MUST be captured.</li>\n<li><strong>Numeric verification.</strong> After extracting each bid, verify: (a) line item amounts sum to the stated subtotal, (b) subtotal + alternates/adjustments = base bid total. Flag any mismatch as <code>[MATH ERROR: line items sum to $X, bid states $Y]</code>.</li>\n<li><strong>Formulas in Excel, not hardcoded values.</strong> Subtotals use SUM formulas. Reconciliation uses difference formulas. The Comparison Summary uses cross-sheet formula references to per-bidder tabs. Never paste calculated values — the engineer must be able to trace every number.</li>\n<li><strong>Preserve original language verbatim.</strong> Line item descriptions, exclusions, qualifications, and notes are extracted exactly as written. No paraphrasing, normalization, or cleanup.</li>\n</ol>\n<h2>Step 1: Gather Inputs</h2>\n<p>Ask the user for:</p>\n<ol>\n<li><strong>Bid PDFs</strong> — folder path or list of individual files</li>\n<li><strong>Scope description</strong> — what trade/division is being bought out (e.g., \"Division 09 - Finishes\", \"Structural Steel\")</li>\n<li><strong>Any specific data points</strong> the user wants extracted beyond the defaults</li>\n</ol>\n<p>If <code>.construction/project.yaml</code> exists (AgentCM writes it; a <code>.construction/</code> folder alone only holds this plugin's own working data), read it for the project name/number to include in the workbook header. Otherwise take them from the bid documents or ask.</p>\n<h2>Pipeline Position</h2>\n<pre><code>THIS SKILL → /bid-evaluator → user confirms → /subcontract-writer\n</code></pre>\n<p>This skill is the entry point of the bid pipeline. It produces the tabulated data that <code>/bid-evaluator</code> consumes for analysis.</p>\n<h2>Workflow</h2>\n<pre><code>Bid Tabulation Progress:\n- [ ] Step 1: Gather inputs (bid PDFs, scope)\n- [ ] Step 2: Read first bid to discover structure\n- [ ] Step 3: Process all bids\n- [ ] Step 4: Generate comparison Excel\n- [ ] Step 5: Present summary to engineer\n- [ ] Step 6: Write a finding\n</code></pre>\n<h3>Step 2: Read First Bid to Discover Structure</h3>\n<p>Open the first bid PDF to understand what data is available. Dump its text layer\nfirst; the script marks each page TEXT or VISION (fewer than 50 characters):</p>\n<pre><code>\"${CLAUDE_PLUGIN_ROOT}/bin/construction-python\" \"${CLAUDE_PLUGIN_ROOT}/scripts/pdf/pdf_text.py\" \"BID.pdf\"\n</code></pre>\n<p>Read TEXT pages from the dump. Rasterize each VISION page (scanned bids show\nVISION on every page) and read it with vision:</p>\n<pre><code>\"${CLAUDE_PLUGIN_ROOT}/bin/construction-python\" \"${CLAUDE_PLUGIN_ROOT}/scripts/pdf/rasterize_page.py\" \"BID.pdf\" 1 --dpi 200 --output \".construction/skills/bid-tabulator/pages/{bid_slug}_p1.png\"\n</code></pre>\n<p>Page images are working data: keep them in <code>.construction/skills/bid-tabulator/pages/</code>, never elsewhere under <code>.construction/</code> (the rest of that folder is AgentCM's).\nDo not write your own extraction code (no <code>python -c</code>, no helper script); the\ntwo scripts above are the whole reading toolkit for this skill.</p>\n<p>From the first bid, identify what data fields are present. Common bid data:</p>\n<pre><code># Bidder info\ncompany_name: \"\"\ncontact_name: \"\"\ncontact_phone: \"\"\ncontact_email: \"\"\nbid_date: \"\"\nbid_validity_period: \"\"\n\n# Financial\nbase_bid_amount: \"\"\nline_items:             # Every line item as an object:\n  - spec_section: \"\"    # CSI section if shown (e.g., \"09 65 19\")\n    description: \"\"     # Original description verbatim\n    qty: null           # Quantity (numeric or null if lump sum)\n    unit: \"\"            # Unit as written (SF, LF, EA, LS, etc.)\n    unit_price: null    # Per-unit cost (numeric — extract or calculate)\n    extended_price: null # Line total (qty × unit_price, or lump sum amount)\n    notes: \"\"           # Flags, clarifications\nalternates: []          # Alternate pricing: [{name, description, amount}]\nallowances: []          # Allowances included\n\n# Terms\nscope_inclusions: []    # What the bid explicitly includes\nscope_exclusions: []    # What the bid explicitly excludes\nqualifications: []      # Conditions, assumptions, caveats\nschedule_duration: \"\"   # Proposed duration if stated\npayment_terms: \"\"       # Net 30, etc.\nbond_included: false    # Whether bid/performance bond is included\ninsurance_confirmed: false\naddenda_acknowledged: []  # Addenda the bid acknowledges, as written (\"Addendum 1\"); [] if none\nflags: []               # Extraction flags for the engineer: math discrepancies, unclear values, missing acknowledgements\n</code></pre>\n<p>The exporter reports every line whose qty × unit price is not its extended\nprice and every bid whose lines do not sum to its stated base bid, on the\nconsole and on the workbook's Flags tab. Record the numbers as submitted and\nlet the exporter flag them; do not correct or re-derive them.</p>\n<p><strong>Line item extraction rules:</strong></p>\n<ul>\n<li>Every line item MUST be an object with the fields above — never a bare string.</li>\n<li>If the bid shows qty, unit, and unit_price explicitly → extract all three.</li>\n<li>If the bid shows only extended_price and qty → calculate: <code>unit_price = extended_price / qty</code>.</li>\n<li>If the bid shows only a lump sum amount → set <code>qty: null</code>, <code>unit: \"LS\"</code>, <code>unit_price: null</code>, <code>extended_price: &lt;amount&gt;</code>.</li>\n<li><code>spec_section</code> may not always be present — extract it if the bid references CSI section numbers.</li>\n</ul>\n<p><strong>Present the discovered structure to the user</strong> before processing remaining bids: \"I found these data fields in the first bid: [list]. Should I extract all of these, or add/remove any?\"</p>\n<h3>Step 3: Process All Bids</h3>\n<p>Process each bid PDF individually. For each bid:</p>\n<ol>\n<li><strong>Extract text</strong> with <code>pdf_text.py</code> (Step 2 command); read TEXT pages from the dump</li>\n<li><strong>Quality gate</strong>: rasterize every page the dump marks VISION and read it with vision</li>\n<li><strong>Extract all identified fields</strong> from the bid document</li>\n<li><strong>Preserve original language</strong> — do NOT paraphrase, normalize, or reformat line item descriptions. Extract them exactly as written in the bid.</li>\n<li><strong>Flag ambiguities</strong> — if a value is unclear or could be interpreted multiple ways, include it with a note in brackets: <code>[unclear: possibly $45,000 or $45/SF]</code></li>\n<li><strong>Save per-bid JSON</strong> to <code>.construction/skills/bid-tabulator/bids/{company_name_slug}.json</code> with the Write tool, one file per bid (not through a script, and not with a shell heredoc: <code>cat &gt; file &lt;&lt;'EOF'</code> fails here when the content holds an apostrophe)</li>\n</ol>\n<p><strong>State persistence</strong> — write <code>extraction_state.yaml</code> after each bid, every run, so an interrupted run resumes:</p>\n<pre><code># .construction/skills/bid-tabulator/extraction_state.yaml\nscope: \"Division 09 - Finishes\"\ntotal_bids: 12\nprocessed: 5\ncurrent_bid: \"Smith_Drywall.pdf\"\nerrors: []\n</code></pre>\n<p><strong>Important:</strong> Each bid's line items, descriptions, and amounts must be recorded exactly as submitted. Different bidders may describe the same work differently, use different units, or break out scope differently. This is expected and intentional — the engineer will reconcile after review.</p>\n<h3>Step 4: Generate Comparison Excel</h3>\n<pre><code>\"${CLAUDE_PLUGIN_ROOT}/bin/construction-python\" \"${CLAUDE_SKILL_DIR}/scripts/bid_comparison_to_xlsx.py\" \\\n  --data .construction/skills/bid-tabulator/bids/ \\\n  --scope \"Division 09 - Finishes\" \\\n  --project \"Project Name\" \\\n  --output \"Bid_Comparison_Div09.xlsx\"\n</code></pre>\n<p><strong>Excel workbook structure:</strong></p>\n<p><strong>Tab 1 — Comparison Summary:</strong></p>\n<ul>\n<li>Row per key metric: Base Bid, Alternates (each), Bond, Duration</li>\n<li>Column per bidder</li>\n<li>Highlight: lowest base bid (green), highest (red)</li>\n<li>Total row at bottom</li>\n</ul>\n<p><strong>Tab 2 — Per-Bidder Detail Tabs</strong> (one tab per bidder):</p>\n<ul>\n<li>Company info header</li>\n<li>Line items table: #, Spec Section, Description, Qty, Unit, Unit Price, Extended, Notes</li>\n<li>Alternates with descriptions</li>\n<li>Inclusions list</li>\n<li>Exclusions list</li>\n<li>Qualifications / conditions</li>\n<li>Any notes or special terms</li>\n</ul>\n<p><strong>Tab 3 — Exclusions &amp; Qualifications:</strong></p>\n<ul>\n<li>All bidders' exclusions and qualifications side-by-side</li>\n<li>This is critical for the engineer — scope gaps and risk items live here</li>\n</ul>\n<p><strong>Tab 4 — Scope Gaps (flagged):</strong></p>\n<ul>\n<li>Items that appear in some bids but not others</li>\n<li>Items where one bidder explicitly excludes what others include</li>\n<li>NOT an attempt to normalize — just a flag: \"Bidder A includes 'acoustical caulking', Bidders B and C do not mention it\"</li>\n<li>The engineer decides whether this is a real gap or just different terminology</li>\n</ul>\n<h3>Step 5: Present Summary to Engineer</h3>\n<p>After generating the Excel:</p>\n<p>\"I extracted data from [N] bids for [scope]. Here's the summary:</p>\n<ul>\n<li><strong>Lowest base bid:</strong> [Company] at [amount]</li>\n<li><strong>Highest base bid:</strong> [Company] at [amount]</li>\n<li><strong>Bid spread:</strong> [amount range]</li>\n<li><strong><input disabled=\"disabled\" type=\"checkbox\" checked=\"checked\"> scope gap flags</strong> — items that appear in some bids but not others (see Scope Gaps tab)</li>\n<li><strong>[Y] qualifications/exclusions</strong> across all bidders (see Exclusions tab)</li>\n<li><strong>[Z] bids</strong> had unclear values that are flagged with [unclear] notes</li>\n</ul>\n<p>The Excel file is at [path]. All line items are extracted as-submitted — you'll want to review the Flags tab (math discrepancies, unclear values) and the Scope Gaps tab, and contact subs to clarify any discrepancies before finalizing your comparison.\"</p>\n<h3>Step 6: Write a Finding</h3>\n<p>Record the tabulation in <code>.construction/skills/bid-tabulator/findings/</code> (both modes):</p>\n<pre><code>\"${CLAUDE_PLUGIN_ROOT}/bin/construction-python\" \"${CLAUDE_PLUGIN_ROOT}/scripts/graph/write_finding.py\" \\\n  --skill \"bid-tabulator\" --type \"bid_tabulation_complete\" \\\n  --title \"Bid comparison: {scope} — {N} bidders\" \\\n  --output-file \"Bid_Comparison_{scope_slug}.xlsx\" \\\n  --data '{\"scope\": \"Division 09\", \"bidder_count\": 12, \"low_bid\": 450000, \"high_bid\": 680000}'\n</code></pre>\n<h2>Resumption</h2>\n<p>Check for <code>.construction/skills/bid-tabulator/extraction_state.yaml</code>. If <code>status: in_progress</code>, resume from the next unprocessed bid.</p>\n<h2>Gotchas (measured in eval runs)</h2>\n<ul>\n<li>Write JSON and YAML with the Write tool. <code>cat &gt; file &lt;&lt;'EOF'</code> failed with \"unexpected EOF while looking for matching <code>'</code>\" whenever the content held an apostrophe (3 of 15 runs, 2026-10-04), costing a turn each time.</li>\n<li>Do not write helper scripts or inline <code>python -c</code>, even to assemble your own JSON or to read a PDF; the allowlisted scripts are the toolkit, and the exporters do the arithmetic checks. If the toolkit lacks something you need, say so in the handoff instead (bid-tabulator and subcontract-writer each wrote a helper script in their 2026-10-04 runs; the eval guard blocked both).</li>\n</ul>\n<h2>Tips</h2>\n<ul>\n<li>Bids over 10 pages likely contain detailed breakdowns — process all pages, not just the summary</li>\n<li>Some bids are submitted on the owner's bid form (standardized) while others are on the sub's letterhead (freeform) — handle both</li>\n<li>Watch for bids that exclude tax, bonds, or general conditions — these are common scope gaps</li>\n<li>If a bid references \"per plans and specifications dated [date]\" — note the date, as it may not match the current set</li>\n<li>Unit prices are REQUIRED for every line item that has quantity-based pricing. Extract from bid or calculate from extended ÷ qty. Preserve units exactly (SF, LF, EA, LS).</li>\n<li>Alternates may be add or deduct — preserve the sign as written</li>\n</ul>\n<h3>File Safety</h3>\n<p>Never overwrite an existing bid comparison. If a file exists at the target location, save with a versioned name (e.g., <code>Bid_Comparison_Div09_v2.xlsx</code>).</p>\n<hr>\n<h2>Allowed Scripts</h2>\n<ul>\n<li><code>${CLAUDE_PLUGIN_ROOT}/bin/construction-python</code></li>\n<li><code>${CLAUDE_PLUGIN_ROOT}/scripts/pdf/pdf_text.py</code></li>\n<li><code>${CLAUDE_PLUGIN_ROOT}/scripts/pdf/rasterize_page.py</code></li>\n<li><code>${CLAUDE_SKILL_DIR}/scripts/bid_comparison_to_xlsx.py</code></li>\n<li><code>${CLAUDE_PLUGIN_ROOT}/scripts/graph/write_finding.py</code></li>\n</ul>\n","files":[{"path":"agents/openai.yaml","sizeBytes":271,"isText":true},{"path":"scripts/bid_comparison_to_xlsx.py","sizeBytes":26907,"isText":true},{"path":"scripts/shared.py","sizeBytes":554,"isText":true},{"path":"SKILL.md","sizeBytes":12320,"isText":true}],"reviewScore":null,"reviewSummary":null,"trust":{"provenance":"trusted-source-unreviewed","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow.","bodySource":null},"bodyLocked":false,"purchaseUrl":null,"sourceUrl":null,"report":{"provenance":"trusted-source-unreviewed","screen":{"ran":true,"outcome":"clean","suspicious":0,"notes":0,"hiddenCharacters":false},"virusScan":{"engine":"clamav","status":"clean","scannedAt":"2026-10-19T21:17:11.124521Z","sha256":"C97CA95005E0CA4EA18CCED6F68878ADD4D8A540111052F757156015AF680B8D","sizeBytes":12947},"review":null,"source":{"repositoryUrl":"https://github.com/dleerdefi/claude-code-construction","path":"skills/bid-tabulator","license":"MIT","commit":"5c46e16c67cdc82ee8bcbb0fdd8ba316d792d4ec","subtreeSha":"9E30663FB3DD6B1C80ADD26D4659A5F2237B0AEB5722292A57E9886691592E1F","lastSyncedAt":"2026-10-19T21:17:01.926806Z"},"reviewedAt":"2026-10-19T21:17:20.223531Z","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow."},"install":[{"target":"skills-cli","command":"npx skills add https://github.com/dleerdefi/claude-code-construction/tree/main/skills/bid-tabulator"},{"target":"claude-code","command":"claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install dleerdefi-claude-code-construction@llmmart"},{"target":"git","command":"git clone https://github.com/dleerdefi/claude-code-construction.git"}]}