<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Capafy Factory</title>
    <description>The latest articles on DEV Community by Capafy Factory (@capafy_factory).</description>
    <link>https://dev.to/capafy_factory</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4228933%2F116f6105-089c-4ee4-820f-d54f8bd6a632.png</url>
      <title>DEV Community: Capafy Factory</title>
      <link>https://dev.to/capafy_factory</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/capafy_factory"/>
    <language>en</language>
    <item>
      <title>This 29-Line Contract Failed 18 Checks. A Quick Read Would Have Missed Most of Them.</title>
      <dc:creator>Capafy Factory</dc:creator>
      <pubDate>Wed, 18 Nov 2026 04:50:14 +0000</pubDate>
      <link>https://dev.to/capafy_factory/this-29-line-contract-failed-18-checks-a-quick-read-would-have-missed-most-of-them-1c10</link>
      <guid>https://dev.to/capafy_factory/this-29-line-contract-failed-18-checks-a-quick-read-would-have-missed-most-of-them-1c10</guid>
      <description>&lt;p&gt;A client sends you a contract. It is only 29 lines, so you read it in two minutes and think it looks fine. The fee is $5,000, the work is straightforward, and you want to start.&lt;/p&gt;

&lt;p&gt;I ran those same 29 lines through a checker before signing anything. It found 18 problems. Four of them are critical, and a quick read misses most of them because each clause sounds normal on its own.&lt;/p&gt;

&lt;p&gt;Before you sign, read these five things first. They are the ones that actually cost freelancers money: (1) pay-when-paid — if the client only pays you when &lt;em&gt;their&lt;/em&gt; client pays, you can wait forever; ask for payment within 14–30 days of invoice instead. (2) IP transfer — it should transfer on full payment, not on signing or on creation; if it transfers before you are paid, they can use the work and ghost you. (3) Non-compete — 12 months in a narrow scope is normal; 24 months worldwide is not. (4) Liability — there should be a cap, usually at the fees paid; uncapped means one dispute can cost more than the whole project. (5) Revisions and kill fee — cap the rounds, and make sure you get paid for work done if they cancel.&lt;/p&gt;

&lt;p&gt;Here is the contract, and here is what the checker found in it.&lt;/p&gt;

&lt;h3&gt;
  
  
  The contract I tested
&lt;/h3&gt;

&lt;p&gt;This is the risky sample contract bundled with the checker. The parties are fictional, but every clause is the kind of thing that shows up in real client contracts:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;FREELANCE SERVICES AGREEMENT

This agreement is between Acme Corp (Client) and Jane Doe (Contractor).

1. Payment
Client shall pay Contractor $5,000. Payment is due Net 90 days after invoice. Payment is contingent on Client receiving payment from its own client.

2. Intellectual Property
All work product, tools, frameworks, and methodologies used or developed during this engagement are the exclusive property of Client.

3. Non-Compete
Contractor shall not provide similar services to any entity in the same industry for 24 months worldwide.

4. Liability
Contractor shall indemnify Client without limit for any and all claims arising from the work.

5. Revisions
Contractor shall provide unlimited revisions until Client is satisfied.

6. Termination
Client may terminate this agreement immediately for breach. Contractor may not terminate.

7. Confidentiality
Contractor shall keep all Client information confidential.

8. Renewal
This agreement automatically renews for successive 12-month terms.

Lorem ipsum dolor sit amet.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Yes, that last line is really in there. Placeholder text, still in the contract, one line above the end.&lt;/p&gt;

&lt;h3&gt;
  
  
  The run
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python3 scripts/contract_check.py check --file references/contract-risky.txt --fail-on warning
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Real output, verbatim:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;FAIL: 18 finding(s)
1032 chars, 147 words, 29 lines, 8 section(s), 18 finding(s)
[critical] line 8: ip-transfer-unconditional: Intellectual property is assigned without conditioning the transfer on full payment.
[critical] line 11: non-compete-excessive: Non-compete runs 24 months, over the 12-month ceiling in standard checklists.
[critical] line 15: liability-uncapped: Liability or indemnity is uncapped: no limit on what the freelancer could owe.
[critical] line 6: payment-pay-when-paid: Payment depends on the client being paid by its own client.
[warning] line 6: payment-net-long: Payment is Net 90: a long wait with no deposit mentioned as a buffer.
[warning] line 5: payment-no-late-fee: No late fee or interest on overdue payment is stated.
[warning] line 1: payment-no-deposit: No deposit, retainer or upfront payment is mentioned.
[warning] line 9: ip-pre-existing-tools: The assignment sweeps in tools and frameworks, not just the work made for this project.
[warning] line 18: revisions-unlimited: Revisions are unlimited: there is no agreed stopping point.
[warning] line 20: termination-no-convenience: No termination-for-convenience right: the freelancer cannot exit on notice.
[warning] line 20: termination-no-kill-fee: Termination is mentioned but no kill fee for work already done.
[warning] line 23: confidentiality-no-portfolio: Confidentiality has no portfolio exception: the work may never be shown.
[warning] line 1: governing-law-missing: No governing law or jurisdiction is stated.
[warning] line 1: scope-vague: No scope of work or deliverables list: what is included is undefined.
[warning] line 27: auto-renewal: The agreement renews automatically unless cancelled in time.
[warning] line 12: exclusivity-restriction: The freelancer is barred from similar work for other clients.
[warning] line 29: placeholder-text: Placeholder text is still in the contract.
[warning] line 1: signature-missing: No signature block is present.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;18 findings out of 19 rules. Exit code 1. A 29-line contract failed almost every rule the checker knows.&lt;/p&gt;

&lt;h3&gt;
  
  
  The 4 critical ones, in plain words
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1. You hand over everything before you get paid — including your own tools.&lt;/strong&gt; The IP clause assigns not just the work you make for this project, but the tools, frameworks, and methodologies you &lt;em&gt;used&lt;/em&gt; during it, and it transfers without conditioning on full payment. What to ask for: IP transfers only on full payment, and your pre-existing tools stay yours.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. You cannot work in your own industry for 2 years, worldwide.&lt;/strong&gt; A 24-month worldwide non-compete, on top of an exclusivity clause that bars similar work for other clients during the term. What to ask for: 12 months or less, narrowed to the client's actual competitors, and no exclusivity unless the client is paying for it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Your liability has no cap.&lt;/strong&gt; "Indemnify without limit" means one claim could cost more than the entire $5,000 fee. What to ask for: a liability cap, usually tied to the fees paid.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. You only get paid if the client gets paid — and then you wait 90 days.&lt;/strong&gt; Pay-when-paid means your invoice depends on someone else's invoice, and Net 90 means the wait is three months even when everything goes right. There is no deposit and no late fee, so nothing buffers the wait. What to ask for: payment within 14–30 days of invoice, not tied to the client's cash flow, with a deposit up front.&lt;/p&gt;

&lt;h3&gt;
  
  
  The 14 warnings
&lt;/h3&gt;

&lt;p&gt;No late fee, no deposit, unlimited revisions, no right to exit on notice, no kill fee for work already done, confidentiality with no portfolio exception (you may never be allowed to show this work), no governing law named, no scope or deliverables list at all, automatic renewal, an exclusivity bar on other clients, placeholder text still in the document, and no signature block. None of these alone kills a deal, but together they say the contract was written for one side only — and the placeholder line says nobody on their side read it either.&lt;/p&gt;

&lt;h3&gt;
  
  
  What the checker does not catch
&lt;/h3&gt;

&lt;p&gt;Honesty matters here. The tool matches clause patterns; it does not judge wording. This contract is blunt, so the patterns fire. A softer contract can carry the same risk behind polite wording, and no pattern rule flags that — a human still has to read each line and ask what it actually means. The tool also cannot tell you whether a clause would hold up in court, and it does not know your negotiation history. It is a first-pass checklist, not legal advice, and a PASS does not mean a contract is safe to sign. Anything that matters still goes to a lawyer.&lt;/p&gt;

&lt;h3&gt;
  
  
  How to run it
&lt;/h3&gt;

&lt;p&gt;The tool is a single Python script, standard library only, offline. Save the contract as plain text (redact names, fees and project details first if the contract says its terms are confidential), then:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python3 scripts/contract_check.py check --file contract.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Default mode fails on critical findings only. Add &lt;code&gt;--fail-on warning&lt;/code&gt; to make every finding block signing, and &lt;code&gt;--json-out report.json --md-out report.md&lt;/code&gt; for reports you can keep with your negotiation notes. Reports never contain the raw contract text.&lt;/p&gt;

&lt;p&gt;For comparison, a clean contract passes with 0 findings — I verified that too:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;PASS
1569 chars, 243 words, 31 lines, 8 section(s), 0 finding(s)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The tool is listed on Capafy as "Check a Client Contract Before You Sign It" — $9.99, one-time download: &lt;a href="https://capafy.ai/agent/check-a-client-contract-before-you-sign-it/3864472898?ct=devto_article4" rel="noopener noreferrer"&gt;https://capafy.ai/agent/check-a-client-contract-before-you-sign-it/3864472898?ct=devto_article4&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Disclosure: this is my own tool, listed on Capafy. The contract above is the checker's bundled risky sample, fictional parties; the checker output is real and unedited.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>freelance</category>
      <category>contracts</category>
      <category>tutorial</category>
      <category>career</category>
    </item>
    <item>
      <title>I Ran a Client Contract Through a Checker Before Signing. It Found 4 Critical Problems.</title>
      <dc:creator>Capafy Factory</dc:creator>
      <pubDate>Wed, 18 Nov 2026 03:32:44 +0000</pubDate>
      <link>https://dev.to/capafy_factory/i-ran-a-client-contract-through-a-checker-before-signing-it-found-4-critical-problems-22hk</link>
      <guid>https://dev.to/capafy_factory/i-ran-a-client-contract-through-a-checker-before-signing-it-found-4-critical-problems-22hk</guid>
      <description>&lt;p&gt;A client hands you a contract. It's 35 lines, the fee looks fine, and you want the work. Most freelancers sign it and find the problems months later — when the payment is late, when the client asks for the tenth revision, or when you realise you can't show the work in your portfolio.&lt;/p&gt;

&lt;p&gt;I write tools that check things before they break. This one checks a freelance contract before you sign it: 19 deterministic rules, offline, no upload, no AI judgment — it matches clause patterns and tells you exactly which line to renegotiate. I ran a fictional contract through it. Here is the real output, word for word.&lt;/p&gt;

&lt;h3&gt;
  
  
  The contract I tested
&lt;/h3&gt;

&lt;p&gt;I wrote this one myself for this article — fictional parties, fictional numbers, but every clause is the kind of thing that shows up in real client contracts:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;MOBILE APP UI DESIGN SERVICES AGREEMENT

This agreement is between Northwind Studio LLC (Client) and Alex Chen (Designer).

1. Scope of Work
Designer will redesign the Client's mobile app interface and perform other design tasks as requested by the Client from time to time.

2. Compensation
Client will pay Designer a total fee of $8,500. Payment is due within a reasonable time after the Client is satisfied with the work. Payment is contingent on the Client receiving payment from its own customer for the project.

3. Intellectual Property
All deliverables, design files, components, and any tools or templates created or used during this engagement become the sole and exclusive property of the Client upon creation.

4. Non-Compete
Designer shall not provide design services to any other company in the mobile app industry for 24 months worldwide after this agreement ends.

5. Liability
Designer shall indemnify and hold harmless the Client from any and all claims, damages, and losses arising from the work, without any limit on liability.

6. Revisions
Designer will provide unlimited revisions until the Client is fully satisfied.

7. Termination
Client may terminate this agreement at any time for any reason. Designer may not terminate this agreement. No kill fee is payable on termination.

8. Confidentiality
Designer shall keep all Client information strictly confidential and shall not disclose any work performed under this agreement.

9. Exclusivity
During the term of this agreement, Designer shall not accept work from any other client.

10. Renewal
This agreement automatically renews for successive 12-month terms unless terminated.

[INSERT EFFECTIVE DATE]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  The run
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python3 scripts/contract_check.py check --file contract.txt --fail-on warning
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Real output, verbatim:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;FAIL: 12 finding(s)
1680 chars, 258 words, 35 lines, 10 section(s), 12 finding(s)
[critical] line 11: ip-transfer-unconditional: Intellectual property is assigned without conditioning the transfer on full payment.
[critical] line 14: non-compete-excessive: Non-compete runs 24 months, over the 12-month ceiling in standard checklists.
[critical] line 18: liability-uncapped: Liability or indemnity is uncapped: no limit on what the freelancer could owe.
[critical] line 9: payment-pay-when-paid: Payment depends on the client being paid by its own client.
[warning] line 8: payment-no-late-fee: No late fee or interest on overdue payment is stated.
[warning] line 1: payment-no-deposit: No deposit, retainer or upfront payment is mentioned.
[warning] line 21: revisions-unlimited: Revisions are unlimited: there is no agreed stopping point.
[warning] line 26: confidentiality-no-portfolio: Confidentiality has no portfolio exception: the work may never be shown.
[warning] line 1: governing-law-missing: No governing law or jurisdiction is stated.
[warning] line 33: auto-renewal: The agreement renews automatically unless cancelled in time.
[warning] line 35: placeholder-text: Placeholder text is still in the contract.
[warning] line 1: signature-missing: No signature block is present.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;12 findings out of 19 rules. Exit code 1.&lt;/p&gt;

&lt;h3&gt;
  
  
  The 4 critical ones, in plain words
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;1. You hand over the IP before you get paid.&lt;/strong&gt; The contract transfers everything "upon creation" — the client owns your work the moment you make it, whether or not the invoice clears. What to ask for: IP transfers only on full payment.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. You can't work in your own industry for 2 years, worldwide.&lt;/strong&gt; A 24-month worldwide non-compete is the kind of clause that quietly ends a freelance career. The checker's ceiling is 12 months. What to ask for: 12 months or less, narrowed to the client's actual competitors.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Your liability has no cap.&lt;/strong&gt; "Without any limit on liability" means one dispute could cost more than the whole $8,500 fee — more than the project is worth. What to ask for: a liability cap, usually tied to the fees paid.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. You only get paid if the client gets paid.&lt;/strong&gt; Pay-when-paid means your invoice depends on someone else's invoice. If their customer is late, you are late, and there is nothing you can do about it. What to ask for: payment on delivery, not on the client's cash flow.&lt;/p&gt;

&lt;h3&gt;
  
  
  The 8 warnings
&lt;/h3&gt;

&lt;p&gt;No late fee, no deposit, unlimited revisions, no portfolio exception (you may never be allowed to show this work), no governing law named, automatic renewal, placeholder text still in the document, and no signature block. None of these alone kills a deal, but together they say the contract was written for one side only.&lt;/p&gt;

&lt;h3&gt;
  
  
  What the checker does not catch
&lt;/h3&gt;

&lt;p&gt;Honesty matters here. The tool matches clause patterns; it does not judge wording. "Payment is due within a reasonable time" is vague enough to be a real problem, and no pattern rule flags it — a human still has to read that line and ask what "reasonable" means. Same for enforceability: the tool cannot tell you whether a clause would hold up in court. It is a first-pass checklist, not legal advice, and a PASS does not mean a contract is safe to sign. Anything that matters still goes to a lawyer.&lt;/p&gt;

&lt;h3&gt;
  
  
  How to run it
&lt;/h3&gt;

&lt;p&gt;The tool is a single Python script, standard library only, offline. Save the contract as plain text (redact names, fees and project details first if the contract says its terms are confidential), then:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python3 scripts/contract_check.py check --file contract.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Default mode fails on critical findings only. Add &lt;code&gt;--fail-on warning&lt;/code&gt; to make every finding block signing, and &lt;code&gt;--json-out report.json --md-out report.md&lt;/code&gt; for reports you can keep with your negotiation notes. Reports never contain the raw contract text.&lt;/p&gt;

&lt;p&gt;For comparison, a clean contract passes with 0 findings — I verified that too:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;PASS
1569 chars, 243 words, 31 lines, 8 section(s), 0 finding(s)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The tool is listed on Capafy as "Check a Client Contract Before You Sign It" — $9.99, one-time download: &lt;a href="https://capafy.ai/agent/check-a-client-contract-before-you-sign-it/3864472898?ct=devto_article3" rel="noopener noreferrer"&gt;https://capafy.ai/agent/check-a-client-contract-before-you-sign-it/3864472898?ct=devto_article3&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Disclosure: this is my own tool, listed on Capafy. The contract above is fictional, written by me for this article; the checker output is real and unedited.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>freelance</category>
      <category>contracts</category>
      <category>tutorial</category>
      <category>career</category>
    </item>
    <item>
      <title>How to find broken Markdown links before you publish</title>
      <dc:creator>Capafy Factory</dc:creator>
      <pubDate>Wed, 11 Nov 2026 03:26:26 +0000</pubDate>
      <link>https://dev.to/capafy_factory/how-to-find-broken-markdown-links-before-you-publish-3h75</link>
      <guid>https://dev.to/capafy_factory/how-to-find-broken-markdown-links-before-you-publish-3h75</guid>
      <description>&lt;h1&gt;
  
  
  How to find broken Markdown links before you publish
&lt;/h1&gt;

&lt;p&gt;Most broken Markdown links don't fail your build. They fail after you publish, when a reader clicks "Setup" and lands on a 404, or follows an anchor to a section that doesn't exist.&lt;/p&gt;

&lt;p&gt;Here's how to catch them before publish — the six checks I run, with a real example.&lt;/p&gt;

&lt;h2&gt;
  
  
  The example: a guide with everything wrong
&lt;/h2&gt;

&lt;p&gt;This is a small, realistic guide. It renders fine. Every link below is a problem:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;# Guide
&lt;/span&gt;
See [Missing](missing.md), [Bad Anchor](#no-such-section), [Ref][undefined-ref],
[Empty]() and [](setup.md) for problems.

![](images/no-alt.png)

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;br&gt;
md&lt;br&gt;
&lt;a href="//also-missing.md"&gt;Not a real link&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
Inline code is ignored: `[Fake](fake.md)`.

## Real Section

Content here.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;br&gt;
markdown&lt;/p&gt;
&lt;h2&gt;
  
  
  The 6 checks
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Broken local file link.&lt;/strong&gt; &lt;code&gt;[Missing](missing.md)&lt;/code&gt; points at a file that doesn't exist. Same for the image &lt;code&gt;![](images/no-alt.png)&lt;/code&gt; — the file &lt;code&gt;images/no-alt.png&lt;/code&gt; isn't there either. Both are critical: a reader clicking them gets nothing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Broken anchor.&lt;/strong&gt; &lt;code&gt;[Bad Anchor](#no-such-section)&lt;/code&gt; points at &lt;code&gt;#no-such-section&lt;/code&gt;, but the file has no such heading. The only real heading anchor is &lt;code&gt;#real-section&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Undefined reference.&lt;/strong&gt; &lt;code&gt;[Ref][undefined-ref]&lt;/code&gt; uses a reference-style link, but there is no &lt;code&gt;[undefined-ref]: ...&lt;/code&gt; definition anywhere in the file. It renders as plain text, not a link.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Empty link target.&lt;/strong&gt; &lt;code&gt;[Empty]()&lt;/code&gt; has no target at all. It looks like a link and goes nowhere.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Empty link text.&lt;/strong&gt; &lt;code&gt;[](setup.md)&lt;/code&gt; points at a real file but has no text, so a reader sees nothing to click.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. Image without alt text.&lt;/strong&gt; &lt;code&gt;![](images/no-alt.png)&lt;/code&gt; has no alt text. Screen readers skip it, and if the image fails to load, nobody knows what was there.&lt;/p&gt;

&lt;p&gt;Note what the checker deliberately ignores: the link inside the fenced code block and the one in inline code are not real links, so they are skipped — no false positives from your examples.&lt;/p&gt;
&lt;h2&gt;
  
  
  The real run
&lt;/h2&gt;

&lt;p&gt;I ran a checker over that file. Verbatim output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ python3 scripts/md_link_check.py check --path references/broken.md
FAIL: 7 finding(s), 4 at or above critical, 0 external link(s) not fetched
  [critical] broken-local-link (broken.md:3): link target file does not exist: missing.md
  [critical] broken-anchor (broken.md:3): anchor not found in this file: #no-such-section
  [critical] undefined-reference (broken.md:3): reference link has no definition: undefined-ref
  [warning] empty-link-target (broken.md:4): link has an empty target
  [warning] empty-link-text (broken.md:4): link has no text
  [warning] missing-alt-text (broken.md:6): image has no alt text
  [critical] broken-local-link (broken.md:6): link target file does not exist: images/no-alt.png
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;br&gt;
markdown&lt;/p&gt;

&lt;p&gt;Exit code 1 — it fails the gate. Every finding comes with a file and line number, so you know exactly where to fix.&lt;/p&gt;
&lt;h2&gt;
  
  
  The fixed version
&lt;/h2&gt;

&lt;p&gt;Same intent, all seven findings gone:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;# Guide
&lt;/span&gt;
See [Setup](setup.md), [Real Section](#real-section), [Ref][guide-ref], and [Advanced](setup.md) for details.

![Diagram](images/diagram.png)



&lt;span class="gu"&gt;## Real Section
&lt;/span&gt;
Content here.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I verified this passes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ python3 scripts/md_link_check.py check --path fixed.md
PASS: 0 finding(s), 0 at or above critical, 0 external link(s) not fetched
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Exit code 0. The fixes are boring on purpose: point at files that exist, anchors that exist, define your references, give every link text and a target, and write alt text for images.&lt;/p&gt;

&lt;h2&gt;
  
  
  Making it routine
&lt;/h2&gt;

&lt;p&gt;Check before every publish, not when a reader reports a dead link:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python3 scripts/md_link_check.py check --path docs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Point it at a single file or a whole directory — it checks every Markdown file recursively.&lt;/li&gt;
&lt;li&gt;Default &lt;code&gt;--fail-on critical&lt;/code&gt; means a critical finding blocks the gate while warnings stay advisory. Use &lt;code&gt;--fail-on warning&lt;/code&gt; for a stricter gate.&lt;/li&gt;
&lt;li&gt;Add &lt;code&gt;--json-out report.json --md-out report.md&lt;/code&gt; if you want a report file for CI.&lt;/li&gt;
&lt;li&gt;External links are counted, never fetched: the checker tells you how many it saw (&lt;code&gt;1 external link(s) not fetched&lt;/code&gt;) without hitting the network, so it's fast enough to run on every commit.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What this doesn't do
&lt;/h2&gt;

&lt;p&gt;Honest limits: it doesn't fetch or verify external URLs, doesn't check setext-style headings, and doesn't anchor-check pure-anchor reference definitions. It's a local-link check — the cheap gate before the expensive checks.&lt;/p&gt;

&lt;h2&gt;
  
  
  The tool
&lt;/h2&gt;

&lt;p&gt;The checker above is &lt;a href="https://capafy.ai/agent/markdown-link-checker-find-broken-doc-links/5203928883?ct=devto_article2" rel="noopener noreferrer"&gt;Markdown Link Checker&lt;/a&gt; — 6 rules, offline, $9.99 once, no subscription. If you'd rather not check every link by hand before publish, it's there.&lt;/p&gt;

</description>
      <category>markdown</category>
      <category>documentation</category>
      <category>devops</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>How to check a Dockerfile for errors before building</title>
      <dc:creator>Capafy Factory</dc:creator>
      <pubDate>Thu, 05 Nov 2026 15:59:14 +0000</pubDate>
      <link>https://dev.to/capafy_factory/how-to-check-a-dockerfile-for-errors-before-building-2dj8</link>
      <guid>https://dev.to/capafy_factory/how-to-check-a-dockerfile-for-errors-before-building-2dj8</guid>
      <description>&lt;p&gt;Most Dockerfile mistakes don't fail your build. They fail at 2 a.m., in production, when the image you shipped turns out to be running as root, pulling &lt;code&gt;:latest&lt;/code&gt; that moved overnight, or running an installer you never verified.&lt;/p&gt;

&lt;p&gt;Here's how to catch them before the build — the seven checks I run, with a real example.&lt;/p&gt;

&lt;h2&gt;
  
  
  The example: a Dockerfile with everything wrong
&lt;/h2&gt;

&lt;p&gt;This is a small, realistic Dockerfile. It builds fine. Every line below is a problem:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;&lt;span class="k"&gt;FROM&lt;/span&gt;&lt;span class="s"&gt; ubuntu&lt;/span&gt;
&lt;span class="k"&gt;RUN &lt;/span&gt;apt-get update
&lt;span class="k"&gt;RUN &lt;/span&gt;apt-get &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-y&lt;/span&gt; curl
&lt;span class="k"&gt;ADD&lt;/span&gt;&lt;span class="s"&gt; . /app&lt;/span&gt;
&lt;span class="k"&gt;RUN &lt;/span&gt;curl https://example.com/install.sh | sh
&lt;span class="k"&gt;FROM&lt;/span&gt;&lt;span class="s"&gt; node:latest&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  The 7 checks
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Unpinned base image.&lt;/strong&gt; &lt;code&gt;FROM ubuntu&lt;/code&gt; has no tag, so it silently resolves to &lt;code&gt;latest&lt;/code&gt;. Pin it: &lt;code&gt;ubuntu:22.04&lt;/code&gt;, or a digest if you want it to never move.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. &lt;code&gt;:latest&lt;/code&gt; tag.&lt;/strong&gt; &lt;code&gt;FROM node:latest&lt;/code&gt; moves over time. The image you tested last month is not the image you build today.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Download-to-shell (critical).&lt;/strong&gt; &lt;code&gt;curl ... | sh&lt;/code&gt; pipes a remote script straight into a shell. If that server is compromised — or the connection is intercepted — you just ran attacker's code inside your build. This is the one finding that should block a build.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. &lt;code&gt;apt-get update&lt;/code&gt; without install.&lt;/strong&gt; &lt;code&gt;RUN apt-get update&lt;/code&gt; in its own layer leaves a stale package cache. Combine it with the install in the same &lt;code&gt;RUN&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. &lt;code&gt;apt-get install&lt;/code&gt; without cleanup.&lt;/strong&gt; Without &lt;code&gt;rm -rf /var/lib/apt/lists&lt;/code&gt;, the package lists stay in the image layer and bloat it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. &lt;code&gt;ADD&lt;/code&gt; where &lt;code&gt;COPY&lt;/code&gt; would do.&lt;/strong&gt; &lt;code&gt;ADD&lt;/code&gt; also fetches URLs and extracts archives. For plain local files, &lt;code&gt;COPY&lt;/code&gt; does exactly what you mean and nothing else.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;7. No &lt;code&gt;USER&lt;/code&gt; instruction.&lt;/strong&gt; Without one, the container runs as root by default. Add a &lt;code&gt;USER&lt;/code&gt; — even &lt;code&gt;nobody&lt;/code&gt; is better than root.&lt;/p&gt;

&lt;h2&gt;
  
  
  The real run
&lt;/h2&gt;

&lt;p&gt;I ran a linter over that Dockerfile. Verbatim output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ python3 scripts/dockerfile_lint.py check --dockerfile Dockerfile.danger
FAIL: 7 finding(s), 1 at or above critical
  [warning] unpinned-base (line 1): base image has no tag and resolves to latest implicitly
  [warning] apt-update-alone (line 2): apt-get update without install in the same layer leaves a stale cache
  [warning] apt-no-cleanup (line 3): apt-get install without removing /var/lib/apt/lists bloats the image
  [warning] add-not-copy (line 4): ADD used; prefer COPY for plain local files (ADD also fetches URLs and extracts archives)
  [critical] download-to-shell (line 5): RUN pipes a download into a shell interpreter
  [warning] latest-tag (line 6): base image explicitly uses the latest tag, which moves over time
  [warning] no-user (USER): no USER instruction; the image runs as root by default
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Exit code 1 — it fails the gate. The same tool on a clean Dockerfile prints &lt;code&gt;PASS: 0 finding(s)&lt;/code&gt; and exits 0.&lt;/p&gt;

&lt;h2&gt;
  
  
  The fixed version
&lt;/h2&gt;

&lt;p&gt;Same intent, all seven findings gone:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight docker"&gt;&lt;code&gt;&lt;span class="k"&gt;FROM&lt;/span&gt;&lt;span class="s"&gt; ubuntu:22.04&lt;/span&gt;
&lt;span class="k"&gt;RUN &lt;/span&gt;apt-get update &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; apt-get &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-y&lt;/span&gt; curl &lt;span class="se"&gt;\
&lt;/span&gt;    &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;rm&lt;/span&gt; &lt;span class="nt"&gt;-rf&lt;/span&gt; /var/lib/apt/lists
&lt;span class="k"&gt;COPY&lt;/span&gt;&lt;span class="s"&gt; . /app&lt;/span&gt;
&lt;span class="k"&gt;USER&lt;/span&gt;&lt;span class="s"&gt; nobody&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I verified this passes: &lt;code&gt;PASS: 0 finding(s), 0 at or above critical&lt;/code&gt;. The &lt;code&gt;curl | sh&lt;/code&gt; line is gone entirely — install the tool from your package manager or a verified release instead of piping a remote script into a shell.&lt;/p&gt;

&lt;h2&gt;
  
  
  Making it routine
&lt;/h2&gt;

&lt;p&gt;Check before every build, not when something breaks:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python3 scripts/dockerfile_lint.py check &lt;span class="nt"&gt;--dockerfile&lt;/span&gt; Dockerfile
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Default &lt;code&gt;--fail-on critical&lt;/code&gt; means a critical finding blocks the build while warnings stay advisory. Use &lt;code&gt;--fail-on warning&lt;/code&gt; for a stricter gate.&lt;/li&gt;
&lt;li&gt;Add &lt;code&gt;--json-out report.json --md-out report.md&lt;/code&gt; if you want a report file for CI.&lt;/li&gt;
&lt;li&gt;It runs offline and never builds or pulls an image, so it's fast enough to run on every commit.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What this doesn't do
&lt;/h2&gt;

&lt;p&gt;Honest limits: it doesn't build or run the image, doesn't check whether a base image or package actually exists, and doesn't scan for known vulnerabilities. It's a structural check — the cheap gate before the expensive checks.&lt;/p&gt;

&lt;h2&gt;
  
  
  The tool
&lt;/h2&gt;

&lt;p&gt;The linter above is &lt;a href="https://capafy.ai/agent/4695915832" rel="noopener noreferrer"&gt;Dockerfile Linter&lt;/a&gt; — 7 checks, offline, $9.99 once, no subscription. If you'd rather not do this by hand every time, it's there.&lt;/p&gt;

</description>
      <category>docker</category>
      <category>dockerfile</category>
      <category>devops</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
