<?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: 孫昊</title>
    <description>The latest articles on DEV Community by 孫昊 (@snake_sun).</description>
    <link>https://dev.to/snake_sun</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3904605%2Fd1a526d9-cf2a-4412-865e-4affc72c9719.jpg</url>
      <title>DEV Community: 孫昊</title>
      <link>https://dev.to/snake_sun</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/snake_sun"/>
    <language>en</language>
    <item>
      <title>I Shipped a Web Edition of My iOS App Today — While the iOS Version Was Still Awaiting Apple Approval</title>
      <dc:creator>孫昊</dc:creator>
      <pubDate>Wed, 29 Apr 2026 16:23:25 +0000</pubDate>
      <link>https://dev.to/snake_sun/i-shipped-a-web-edition-of-my-ios-app-today-while-the-ios-version-was-still-awaiting-apple-7hk</link>
      <guid>https://dev.to/snake_sun/i-shipped-a-web-edition-of-my-ios-app-today-while-the-ios-version-was-still-awaiting-apple-7hk</guid>
      <description>&lt;p&gt;This is part 6 of a series about shipping four iOS apps with one Claude Code agent. Previous parts cover &lt;a href="https://dev.to/snake_sun/i-let-one-ai-agent-ship-my-entire-ios-portfolio-heres-what-broke-38i"&gt;shipping the apps&lt;/a&gt;, &lt;a href="https://dev.to/snake_sun/how-i-sniffed-xiaohongshus-collection-api-in-90-seconds-and-why-cors-made-me-rewrite-the-whole-2ebf"&gt;API sniffing&lt;/a&gt;, &lt;a href="https://dev.to/snake_sun/"&gt;memory layers&lt;/a&gt;, and &lt;a href="https://dev.to/snake_sun/"&gt;the verifier&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  The bottleneck nobody talks about
&lt;/h2&gt;

&lt;p&gt;I had four iOS apps scaffolded, polished, and ready to submit. Build pipeline green. Privacy Manifest declared. Metadata in en-US and zh-Hans. Fastlane match certs ready to bootstrap.&lt;/p&gt;

&lt;p&gt;What I didn't have: an approved Apple Developer account.&lt;/p&gt;

&lt;p&gt;Apple Developer enrollment takes 24-72 hours after you pay the $99 fee. I'd applied. I was waiting. The agent and I had nothing to do that depended on Apple — except actually putting the apps in front of users.&lt;/p&gt;

&lt;p&gt;For 36 hours my portfolio was a paused product. The toolkit on my disk was theoretical until someone could install one of the apps and use it.&lt;/p&gt;

&lt;p&gt;This is the moment most indie devs accept as part of the process. "Apple takes a few days, that's just iOS." But there's an obvious question I hadn't been asking: &lt;strong&gt;does the value prop need iOS?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For PromptVault — an offline AI prompt manager with &lt;code&gt;{{variable}}&lt;/code&gt; substitution — the answer is unambiguous: &lt;strong&gt;no&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;A native iOS app gives you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Native UI (good)&lt;/li&gt;
&lt;li&gt;Offline storage in the app sandbox (good but a browser has localStorage and the prompts are bundled)&lt;/li&gt;
&lt;li&gt;One-tap copy with system clipboard integration (good but &lt;code&gt;navigator.clipboard.writeText&lt;/code&gt; does the same thing)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It costs you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Apple Developer enrollment + the $99 + tax forms (real)&lt;/li&gt;
&lt;li&gt;App Store Review (real, 24-48 hours per submission, can be rejected)&lt;/li&gt;
&lt;li&gt;The walled garden's mood&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For users who &lt;strong&gt;don't&lt;/strong&gt; have an iPhone, or who use prompts on their desktop, or who want to try before they commit — the web edition is &lt;strong&gt;better&lt;/strong&gt;, not worse.&lt;/p&gt;

&lt;p&gt;So I shipped a web edition.&lt;/p&gt;

&lt;h2&gt;
  
  
  The build, in 90 minutes
&lt;/h2&gt;

&lt;p&gt;The decision: take the bundled &lt;code&gt;starter_prompts.json&lt;/code&gt; (113 prompts, ~50 KB) and ship it as a standalone HTML page with embedded JSON + interactive UI.&lt;/p&gt;

&lt;p&gt;What I wrote:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;index.html&lt;/code&gt; — landing page (200 lines of HTML/CSS, brand-aligned with the iOS apps)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;prompts.html&lt;/code&gt; — the actual app (one HTML file, ~60 KB total including all 113 prompts inlined)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Stack:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Vanilla HTML/CSS/JS&lt;/li&gt;
&lt;li&gt;No build step&lt;/li&gt;
&lt;li&gt;No framework&lt;/li&gt;
&lt;li&gt;No backend&lt;/li&gt;
&lt;li&gt;No analytics&lt;/li&gt;
&lt;li&gt;No third-party requests&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It runs entirely in the browser. The prompts JSON is embedded into the script tag at build time. Variable substitution is a regex. Copy-to-clipboard is &lt;code&gt;navigator.clipboard.writeText&lt;/code&gt;. Search is a string includes. Tag filter is an array find.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;script&amp;gt;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;PROMPTS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="cm"&gt;/* 113 prompt objects, embedded inline */&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;renderPrompt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;body&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;values&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;body&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="se"&gt;\{\{\s&lt;/span&gt;&lt;span class="sr"&gt;*&lt;/span&gt;&lt;span class="se"&gt;([^&lt;/span&gt;&lt;span class="sr"&gt;}&lt;/span&gt;&lt;span class="se"&gt;]&lt;/span&gt;&lt;span class="sr"&gt;+&lt;/span&gt;&lt;span class="se"&gt;?)\s&lt;/span&gt;&lt;span class="sr"&gt;*&lt;/span&gt;&lt;span class="se"&gt;\}\}&lt;/span&gt;&lt;span class="sr"&gt;/g&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;m&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;v&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;values&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;trim&lt;/span&gt;&lt;span class="p"&gt;()];&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;v&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;v&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="nx"&gt;v&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`{{&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;trim&lt;/span&gt;&lt;span class="p"&gt;()}&lt;/span&gt;&lt;span class="s2"&gt;}}`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;copyCurrent&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;text&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;renderPrompt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;activePrompt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;body&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;values&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nb"&gt;navigator&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;clipboard&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;writeText&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;text&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Hosting: GitHub Pages, free, automatic deploy on push to &lt;code&gt;main&lt;/code&gt;. URL: &lt;code&gt;https://&amp;lt;username&amp;gt;.github.io/&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Total elapsed time from "let's ship the web edition" to "live in browser": ~90 minutes including the visual polish.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I gave up
&lt;/h2&gt;

&lt;p&gt;The iOS version, when it ships, will have:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Native dark mode that follows system settings&lt;/li&gt;
&lt;li&gt;Haptic feedback on copy actions&lt;/li&gt;
&lt;li&gt;iCloud Drive document picker for backup&lt;/li&gt;
&lt;li&gt;Per-prompt usage statistics&lt;/li&gt;
&lt;li&gt;Native search performance for very large prompt libraries&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The web edition has none of this. For a 113-prompt library, none of this matters yet. Native search is only meaningfully faster than browser-side filter at ~10,000+ items.&lt;/p&gt;

&lt;p&gt;What the web edition has that the iOS version doesn't:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Zero install friction.&lt;/strong&gt; Click a link. Use the prompt. Close the tab.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cross-platform by default.&lt;/strong&gt; Android users can't install my iOS app; they can use the web edition.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No App Store gatekeeping.&lt;/strong&gt; I shipped it the day it was ready, not 24-48 hours after Apple's review.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verifiable privacy in DevTools.&lt;/strong&gt; Open Network tab; see zero requests to anywhere. I can't fake this.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The strategic angle
&lt;/h2&gt;

&lt;p&gt;The web edition is &lt;strong&gt;not&lt;/strong&gt; a replacement for the iOS app. They're complementary funnels for different users:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Web edition&lt;/strong&gt; → fast trial, low friction, casual user. Maybe converts to iOS install if they have an iPhone and want native polish.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;iOS edition&lt;/strong&gt; → pays $2.99 for the native experience.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The honest pricing model:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Web edition: free forever&lt;/li&gt;
&lt;li&gt;iOS edition: $2.99 one-time&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This isn't "freemium with an upgrade nag." It's two products with overlapping value props at different points on the cost/convenience curve. Some users will only use the web. That's fine. They wouldn't have paid $2.99 for an iOS app anyway. Other users will discover via the web edition that they want it on their phone, and they'll buy.&lt;/p&gt;

&lt;p&gt;The web edition is a &lt;strong&gt;funnel&lt;/strong&gt;. The iOS edition is the conversion target.&lt;/p&gt;

&lt;h2&gt;
  
  
  The "why didn't you do this first" question
&lt;/h2&gt;

&lt;p&gt;Honest answer: I didn't realize the web edition was an option until I'd already spent two weeks on the iOS version.&lt;/p&gt;

&lt;p&gt;The default mental model when you hear "iOS app" is "iOS app." The agent wrote SwiftUI views. The toolkit handles XcodeGen, fastlane, App Store Connect. Nothing in that flow made me ask "wait, does this even need to be iOS?"&lt;/p&gt;

&lt;p&gt;The moment I asked it — looking at my INBOX folder of "things you need to do" while the Apple email hadn't arrived — the answer was obvious.&lt;/p&gt;

&lt;p&gt;If I were starting from scratch today, I'd ship the web edition first. Then decide if iOS is worth the additional ~$99 + 1-2 weeks of build/sign/release pipeline cost.&lt;/p&gt;

&lt;p&gt;For most utility apps with no strong sensor / OS-integration story, &lt;strong&gt;the web edition first is the right ordering.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What this enables
&lt;/h2&gt;

&lt;p&gt;The dev.to article you're reading has a link to the web edition. That link works &lt;strong&gt;today&lt;/strong&gt;. People who read the article and click are using the product within seconds. The conversion funnel from "saw the article" to "tried the product" is one click, not "go to App Store, install, open app."&lt;/p&gt;

&lt;p&gt;For the indie dev: this is enormous. Article + working product on the same day = real engagement loop. Article + "TestFlight invite-only" = mostly performance.&lt;/p&gt;

&lt;h2&gt;
  
  
  The technical wins of the web-first approach
&lt;/h2&gt;

&lt;p&gt;For people considering this: the pattern that worked.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Bundle data, not reference it.&lt;/strong&gt; All 113 prompts are inlined into the HTML. No backend; no API; no rate limits; no server costs; no DB to maintain. The HTML is also the database.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;code&gt;localStorage&lt;/code&gt; for user state.&lt;/strong&gt; When users start saving their own prompts, they go in &lt;code&gt;localStorage&lt;/code&gt;. No accounts. No sync. If they want sync, they install the iOS app + buy the IAP.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Embedded fonts + zero external requests.&lt;/strong&gt; I didn't import a font, didn't import an icon library, didn't import an analytics SDK. The page loads from one HTTP request to one HTML file. Total transfer: ~62 KB.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;&lt;code&gt;navigator.clipboard.writeText&lt;/code&gt;&lt;/strong&gt; with a &lt;code&gt;document.execCommand('copy')&lt;/code&gt; fallback. Works on every browser since 2016.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;GitHub Pages handles hosting.&lt;/strong&gt; I push to &lt;code&gt;main&lt;/code&gt;, the page deploys automatically. No CDN to configure. No DNS to manage. Free.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The total cost of running this web edition for the next 5 years is &lt;strong&gt;$0&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'd tell anyone shipping a utility iOS app today
&lt;/h2&gt;

&lt;p&gt;Ship the web edition first. Use it to validate your value prop with real users while you wait for Apple Developer enrollment. If 100 people use the web edition, that's 100 data points on what's working — before your first App Store submission.&lt;/p&gt;

&lt;p&gt;The web edition is also the marketing surface. Every dev.to article, Substack issue, Reddit thread, HN comment can link directly to a working product. The conversion path is one click.&lt;/p&gt;

&lt;p&gt;The iOS edition is the &lt;strong&gt;paid funnel endpoint&lt;/strong&gt;. The web edition is the &lt;strong&gt;traffic source&lt;/strong&gt;. Build them in that order.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where to see it
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://jiejuefuyou.github.io/prompts.html" rel="noopener noreferrer"&gt;https://jiejuefuyou.github.io/prompts.html&lt;/a&gt; — try it. Search "Claude Code". Click any prompt. Fill the variables. Hit copy.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/jiejuefuyou/jiejuefuyou.github.io" rel="noopener noreferrer"&gt;github.com/jiejuefuyou/jiejuefuyou.github.io&lt;/a&gt; — fork the source if you want to ship a similar pattern for your own product.&lt;/p&gt;

&lt;p&gt;The iOS edition will land on the App Store when Apple Developer enrollment clears. Updates here.&lt;/p&gt;




&lt;p&gt;Coming next: the post-launch reckoning. First week of real ASC sales data, published either way it goes. Subscribe at &lt;a href="https://autoappnotes.substack.com" rel="noopener noreferrer"&gt;autoappnotes.substack.com&lt;/a&gt; if you want the numbers.&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>javascript</category>
      <category>productivity</category>
      <category>ai</category>
    </item>
    <item>
      <title>How I Sniffed Xiaohongshu's Collection API in 90 Seconds — and Why CORS Made Me Rewrite the Whole Approach</title>
      <dc:creator>孫昊</dc:creator>
      <pubDate>Wed, 29 Apr 2026 15:45:05 +0000</pubDate>
      <link>https://dev.to/snake_sun/how-i-sniffed-xiaohongshus-collection-api-in-90-seconds-and-why-cors-made-me-rewrite-the-whole-2ebf</link>
      <guid>https://dev.to/snake_sun/how-i-sniffed-xiaohongshus-collection-api-in-90-seconds-and-why-cors-made-me-rewrite-the-whole-2ebf</guid>
      <description>&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;p&gt;I needed to pull a user's saved-posts list from Xiaohongshu (China's Instagram-meets-Pinterest) for offline analysis. Their web client renders the data, but their API has a request-signature scheme that defeats casual scraping. After three failed approaches — Playwright sniff, manual cookie injection, direct API fetch — the working solution turned out to be the inverse of "automate the API call": &lt;strong&gt;let the browser issue the request and listen for the response&lt;/strong&gt;. 250 saved posts in 90 seconds. Here's what each approach taught me.&lt;/p&gt;

&lt;p&gt;This is part 2 of a series. &lt;a href="https://dev.to/snake_sun/"&gt;Part 1&lt;/a&gt; covered shipping four iOS apps with one Claude Code agent; this part is one of the agent's harder side-quests.&lt;/p&gt;

&lt;h2&gt;
  
  
  The setup
&lt;/h2&gt;

&lt;p&gt;I'm building an offline AI-prompt manager for iOS. I needed evidence that "AI-related content" was a real user interest signal, not just a guess. The cheapest evidence: my own saved-posts history on Bilibili and Xiaohongshu. Bilibili had a clean public API — 347 items pulled in 30 seconds. Xiaohongshu? Different story.&lt;/p&gt;

&lt;p&gt;Stack used throughout:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Python 3.12&lt;/li&gt;
&lt;li&gt;Playwright 1.50 with Chromium&lt;/li&gt;
&lt;li&gt;macOS / Windows compatible (&lt;code&gt;subprocess.run&lt;/code&gt; + &lt;code&gt;pathlib&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Storage state persisted as JSON for re-entry without re-login&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Attempt 1 — login + cookie polling
&lt;/h2&gt;

&lt;p&gt;The standard Playwright pattern: launch a headed browser, let the user log in interactively, watch for a "logged-in" cookie to appear, save the storage state.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# login_and_save.py — first version
&lt;/span&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;has_login_cookie&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;bool&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;cookies&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;cookies&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;any&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;name&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;value&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;cookies&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Polling loop
&lt;/span&gt;&lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;time&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;deadline&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nf"&gt;has_login_cookie&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;web_session&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;  &lt;span class="c1"&gt;# XHS sets this on login
&lt;/span&gt;        &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;storage_state&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nf"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;state_path&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
        &lt;span class="n"&gt;browser&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;close&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
    &lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sleep&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I ran the script. It happily reported "登录成功! storage state saved" within 5 seconds — even though I hadn't actually scanned the QR code yet. The cookie was set, but…&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Probe: am I really logged in?
&lt;/span&gt;&lt;span class="n"&gt;resp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;https://edith.xiaohongshu.com/api/sns/web/v2/user/me&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;resp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;data&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;][&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;guest&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;  &lt;span class="c1"&gt;# → True
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Lesson 1&lt;/strong&gt;: Xiaohongshu sets the &lt;code&gt;web_session&lt;/code&gt; cookie immediately on first page load — for guest users too. The cookie is not a login signal. It's a session ID that gets associated with a user only after authentication.&lt;/p&gt;

&lt;p&gt;The fix: poll for &lt;code&gt;guest: false&lt;/code&gt; from the actual &lt;code&gt;/me&lt;/code&gt; endpoint, not for cookie presence.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;_xhs_logged_in&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;page&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;bool&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;try&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;resp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;https://edith.xiaohongshu.com/api/sns/web/v2/user/me&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="n"&gt;headers&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Accept&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;application/json&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;resp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;data&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{}).&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;guest&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="ow"&gt;is&lt;/span&gt; &lt;span class="bp"&gt;False&lt;/span&gt;
    &lt;span class="k"&gt;except&lt;/span&gt; &lt;span class="nb"&gt;Exception&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="bp"&gt;False&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This works. After a real login, &lt;code&gt;guest: false&lt;/code&gt; flips. Storage state saves cleanly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Attempt 2 — direct API fetch
&lt;/h2&gt;

&lt;p&gt;Now logged in. Time to find the collection endpoint.&lt;/p&gt;

&lt;p&gt;I started with educated guesses based on naming conventions seen on similar Chinese apps:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;candidates&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;https://edith.xiaohongshu.com/api/sns/web/v1/note/collect_page?num=20&amp;amp;cursor=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;https://edith.xiaohongshu.com/api/sns/web/v2/note/collect_page?num=20&amp;amp;cursor=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;https://edith.xiaohongshu.com/api/sns/web/v1/user_posted/collected?num=20&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;https://edith.xiaohongshu.com/api/sns/web/v1/user/collected?num=20&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every single one returned &lt;code&gt;404 page not found&lt;/code&gt;. Not 401, not 403 — a flat 404. Either the endpoints had been renamed, or my guesses were wrong on a fundamental dimension.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Lesson 2&lt;/strong&gt;: When you guess endpoints and get 404 across all variants, stop guessing. Sniff what the browser actually does.&lt;/p&gt;

&lt;h2&gt;
  
  
  Attempt 3 — Playwright network sniff
&lt;/h2&gt;

&lt;p&gt;I added &lt;code&gt;page.on("request")&lt;/code&gt; and &lt;code&gt;page.on("response")&lt;/code&gt; listeners and navigated to the user's profile in a headed browser. Then I let myself click around manually and watched what the browser fetched.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;on_request&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;req&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;xiaohongshu.com/api/&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;url&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;edith.xiaohongshu&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;captured&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;method&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;method&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;url&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;headers&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;dict&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
        &lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;90 seconds of clicking and scrolling produced 41 captured API calls. The interesting one:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="err"&gt;GET https://edith.xiaohongshu.com/api/sns/web/v2/note/collect/page
?num=30
&amp;amp;cursor=
&amp;amp;user_id=...
&amp;amp;image_formats=jpg,webp,avif
&amp;amp;xsec_token=
&amp;amp;xsec_source=
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So the path is &lt;code&gt;note/collect/page&lt;/code&gt; (singular &lt;code&gt;note&lt;/code&gt;, slash-separated &lt;code&gt;collect/page&lt;/code&gt;) — not &lt;code&gt;note/collect_page&lt;/code&gt;, not &lt;code&gt;user_posted/collected&lt;/code&gt;. &lt;strong&gt;None of my guesses had been close.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I copied that URL into a direct script invocation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;https://edith.xiaohongshu.com/api/sns/web/v2/note/collect/page?num=30&amp;amp;cursor=&amp;amp;user_id=...&amp;amp;image_formats=jpg,webp,avif&amp;amp;xsec_token=&amp;amp;xsec_source=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="n"&gt;resp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;headers&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Accept&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;application/json&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Origin&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;...&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Referer&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;...&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;resp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
&lt;span class="c1"&gt;# → {"code": -1, "success": false}
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Lesson 3&lt;/strong&gt;: A request that the browser issues successfully will not necessarily work when you replay it directly — even with the same cookies. The server is checking something else.&lt;/p&gt;

&lt;h2&gt;
  
  
  What broke: x-s signature headers
&lt;/h2&gt;

&lt;p&gt;Xiaohongshu uses a request-signature scheme. Every API call from the official web client includes three headers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;x-s&lt;/code&gt; (a hash signature)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;x-s-common&lt;/code&gt; (a "platform fingerprint" payload)&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;x-t&lt;/code&gt; (a timestamp)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are computed by the front-end JavaScript before each fetch. The implementation lives in heavily-obfuscated bundle code that runs in the browser and signs each request based on the URL, body, and a per-session secret.&lt;/p&gt;

&lt;p&gt;To reproduce these signatures from Python you'd need to either reverse-engineer the obfuscated signing code (hours; brittle to bundle updates) or run a JS engine alongside Python (overhead; jsdom doesn't quite work because the real bundle expects browser APIs).&lt;/p&gt;

&lt;p&gt;Both options are bad-ROI for a one-shot offline analysis.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Lesson 4&lt;/strong&gt;: When the platform makes API replay expensive, don't replay. Borrow the browser's signing for free.&lt;/p&gt;

&lt;h2&gt;
  
  
  The fix: let the browser issue the request, listen for the response
&lt;/h2&gt;

&lt;p&gt;The signed-request problem disappears if you don't issue the request from your code at all. Instead:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Have Playwright drive the page to load whatever data you want (clicking the right tab, scrolling)&lt;/li&gt;
&lt;li&gt;Let the front-end JS sign and issue the calls itself&lt;/li&gt;
&lt;li&gt;Listen to the HTTP responses with &lt;code&gt;page.on("response")&lt;/code&gt; and capture the JSON bodies
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;pages_data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;list&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nb"&gt;dict&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;
&lt;span class="n"&gt;last_response_time&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;time&lt;/span&gt;&lt;span class="p"&gt;()]&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;on_response&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;resp&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;/api/sns/web/v2/note/collect/page&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;resp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;resp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;status&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;body&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;resp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="n"&gt;pages_data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;body&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;last_response_time&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;time&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="n"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;on&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;response&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;on_response&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# Navigate + click collection tab + scroll loop
&lt;/span&gt;&lt;span class="n"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;goto&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;https://www.xiaohongshu.com/user/profile/&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;user_id&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;locator&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;[class*=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;reds-tab&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;]:has-text(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;收藏&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;)&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="n"&gt;first&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;click&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sleep&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;_&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;60&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;  &lt;span class="c1"&gt;# cap
&lt;/span&gt;    &lt;span class="n"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;evaluate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;window.scrollTo(0, document.body.scrollHeight)&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sleep&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;1.2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;time&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;last_response_time&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;8&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;  &lt;span class="c1"&gt;# idle = done
&lt;/span&gt;        &lt;span class="k"&gt;break&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each scroll triggers another &lt;code&gt;collect/page&lt;/code&gt; request from the front end. The front end signs it correctly. The server returns paginated JSON. My listener captures the body.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;250 saved posts in 25 paginated responses, ~90 seconds end-to-end.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The full output is structured cleanly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"data"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"notes"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"note_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"..."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"video"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"title"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"ai直接把我公寓租出去了 把我家具也卖了"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"user"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"nickname"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"L"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"interact_info"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"liked_count"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"8650"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"cursor"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"..."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"has_more"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  What this enabled
&lt;/h2&gt;

&lt;p&gt;With 250 collected posts in JSON, I ran simple keyword-based classification (regex against ~15 tightened patterns covering LLM/Chat, Image-Gen, Video-Gen, Coding-Agent, Agent/Automation, Voice/Music, RAG/Embedding, General-AI):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;36 of 250 were AI-related (14.4%)&lt;/li&gt;
&lt;li&gt;Top signal: 21 posts about LLM/Chat (Claude Code being the dominant brand — 11 posts mentioned it directly)&lt;/li&gt;
&lt;li&gt;Second: Coding-Agent (Cursor / Aider / Continue) — 11 posts (notably 0 in my Bilibili sample, suggesting Xiaohongshu is where the user's "newer" interest pattern shows up)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These signals fed directly into product decisions for the iOS prompt-manager app I'm shipping. The "Claude Code starter prompts" section of the bundled prompt library got expanded from 0 to 7 items — driven by behavior data, not guess.&lt;/p&gt;

&lt;h2&gt;
  
  
  Generalized lessons for any "scrape from a hostile API" problem
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;A cookie isn't necessarily login state.&lt;/strong&gt; Test with an actual identity-API call.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;404 across multiple endpoint guesses = stop guessing.&lt;/strong&gt; Sniff the browser instead.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;API replay fails on signed requests.&lt;/strong&gt; That's the platform's threat model talking.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Don't fight the signature scheme. Outsource it to the browser.&lt;/strong&gt; Drive the page, listen to responses.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Idle detection &amp;gt; fixed scroll count.&lt;/strong&gt; Loop until N seconds without new responses, not until N scrolls.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Keep the user out of the polling loop.&lt;/strong&gt; A working "did the user log in" detector should poll an authoritative API, not a side-effect cookie.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Cost analysis
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Approach&lt;/th&gt;
&lt;th&gt;Engineer hours&lt;/th&gt;
&lt;th&gt;Reliability&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Reverse-engineer x-s signatures&lt;/td&gt;
&lt;td&gt;4-8 hrs&lt;/td&gt;
&lt;td&gt;Brittle to bundle updates&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;jsdom + bundle replay&lt;/td&gt;
&lt;td&gt;6-12 hrs&lt;/td&gt;
&lt;td&gt;Memory-heavy, fragile&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Playwright + response listener&lt;/strong&gt; (this post)&lt;/td&gt;
&lt;td&gt;30 minutes&lt;/td&gt;
&lt;td&gt;Works as long as the UI tab works&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The browser-as-signer approach is also more honest: you're using the same code path the site expects you to use. You just happen to keep the data around.&lt;/p&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;

&lt;p&gt;The full set of scripts (login, sniff, collected, analyze) lives in the AutoApp toolkit repo. License is MIT.&lt;/p&gt;

&lt;p&gt;If you adapt the response-listener pattern to other Chinese platforms (Douyin / Zhihu / Jike), I'd love to hear what works.&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>python</category>
      <category>scraping</category>
      <category>ai</category>
    </item>
    <item>
      <title>I Let One AI Agent Ship My Entire iOS Portfolio. Here's What Broke.</title>
      <dc:creator>孫昊</dc:creator>
      <pubDate>Wed, 29 Apr 2026 15:45:04 +0000</pubDate>
      <link>https://dev.to/snake_sun/i-let-one-ai-agent-ship-my-entire-ios-portfolio-heres-what-broke-38i</link>
      <guid>https://dev.to/snake_sun/i-let-one-ai-agent-ship-my-entire-ios-portfolio-heres-what-broke-38i</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Over the last two weeks, a single Claude Code agent — operating with my approval only at four "hard gates" (Apple Developer enrollment, payment info, App Store final-acceptance, and any third rejection of the same app) — has scaffolded, polished, and prepared four iOS apps for the App Store.&lt;/p&gt;

&lt;p&gt;Total human time investment: probably 4 hours of decisions plus the time to read this post. The apps share an identity: every one is offline-first, ships a one-time IAP at $2.99, has zero analytics SDKs, and runs on a Privacy Manifest that is verifiable from the source code.&lt;/p&gt;

&lt;p&gt;What follows isn't a "look how easy AI makes shipping" piece. It's a structural breakdown of where one autonomous agent works extraordinarily well, where it stalls, and the orchestration layer I had to build for it to operate without becoming a chaos engine.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  The four apps (concrete, not abstract)
&lt;/h2&gt;

&lt;p&gt;For credibility, the actual technical fingerprints:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;AutoChoice&lt;/strong&gt; (decision wheel, Lifestyle category) — &lt;code&gt;com.jiejuefuyou.autochoice&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AltitudeNow&lt;/strong&gt; (offline barometric altimeter, no GPS, Health &amp;amp; Fitness) — uses CoreMotion's &lt;code&gt;CMAltimeter&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;DaysUntil&lt;/strong&gt; (countdown list, Productivity, no notifications) — single screen, JSON persistence&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PromptVault&lt;/strong&gt; (offline AI prompt manager with &lt;code&gt;{{variable}}&lt;/code&gt; substitution, Productivity) — driven by the agent itself analyzing my Bilibili + Xiaohongshu saved-content history to find a real user need (this is the meta moment: agent built an app whose first user was the agent's own observed behavior pattern)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All four binaries run &lt;strong&gt;zero network calls&lt;/strong&gt;. Verify:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;nm &lt;span class="nt"&gt;-gU&lt;/span&gt; &amp;lt;app&amp;gt;.app/&amp;lt;app&amp;gt; | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-iE&lt;/span&gt; &lt;span class="s1"&gt;'URL|HTTP|Network'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;returns nothing in any of them. The Privacy Manifest declares zero data collected; the source confirms it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The orchestration layer (the part nobody else writes about)
&lt;/h2&gt;

&lt;p&gt;Most "I used AI to build my app" posts stop at "I used Cursor / Claude Code." This one shows the layer underneath that makes the agent operable:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;~/.claude/projects/.../memory/
  user_persona.md          — communication style; injected into every subagent prompt
  feedback_autonomy.md     — exactly what authority is delegated, exactly what isn't
  project_autoapp.md       — current state, identity facts, decision history

orchestrator/
  state.yml                — single source of truth across 4 product repos
  decisions.md             — append-only ADR log; every non-trivial choice has a paragraph
  RESUME.md                — what the agent reads first when re-entering a session
  verify_all.sh            — runs across all 4 repos, checks 32 ASC hard requirements
  setup-asc-secrets.sh     — one command to populate 8 secrets × 4 repos
  asc_sales_report.sh      — pulls daily TSV from App Store Connect API after launch
  dday_runbook.sh          — generates platform-specific launch posts on submission day
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The lesson: &lt;strong&gt;the orchestration layer is the bottleneck, not the model&lt;/strong&gt;. A 5-hour rolling token window is &lt;em&gt;plenty&lt;/em&gt; if the agent doesn't waste cycles re-deriving context every session. The memory system + state.yml + ADR + RESUME.md is what makes the agent re-entrant. Without it, the same agent would burn half its context on "where was I?" instead of shipping code.&lt;/p&gt;

&lt;p&gt;The toolkit is open source: &lt;a href="https://github.com/jiejuefuyou/autoapp-toolkit" rel="noopener noreferrer"&gt;github.com/jiejuefuyou/autoapp-toolkit&lt;/a&gt; (MIT).&lt;/p&gt;

&lt;h2&gt;
  
  
  Where it works extraordinarily well
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Repository scaffolding.&lt;/strong&gt; Cloning a working template into a new product, doing 50 search-and-replace operations, fixing the inevitable Swift "redeclaration of body" naming collision (because &lt;code&gt;var body&lt;/code&gt; in a SwiftUI View clashes with the &lt;code&gt;View.body&lt;/code&gt; requirement and you only catch it at compile-time), pushing to a fresh &lt;code&gt;gh repo create&lt;/code&gt;-d origin. Hours → minutes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cross-platform reasoning.&lt;/strong&gt; Every app is iOS but the build/sign/release surface area is one of the worst in software (Xcode + fastlane + match + StoreKit 2 + Privacy Manifest + ASC API). An agent that has all of this in context simultaneously beats the human pattern of "let me look up the right &lt;code&gt;INFOPLIST_KEY_*&lt;/code&gt; again."&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cross-platform data ingestion.&lt;/strong&gt; The agent built its own browser automation harness (Playwright + cookie polling) to pull 597 saved items from Bilibili (347) and Xiaohongshu (250), classify 63 of them as AI-related, and propose a fourth product (PromptVault) backed by direct user-behavior signal — &lt;em&gt;then&lt;/em&gt; scaffolded that product. This is the kind of thing that's not "AI replaces engineer," it's "AI does something an engineer wouldn't bother to do."&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Where it stalls
&lt;/h2&gt;

&lt;p&gt;Be honest, this is what makes the post earn HN's respect:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Sensory taste decisions.&lt;/strong&gt; App icons. Two attempts at CoreGraphics-drawn icons came out "fine but generic." A human designer in 30 minutes does better.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Domain expertise outside its training data.&lt;/strong&gt; When Xiaohongshu added a new client-side request-signature scheme, the agent's first 5 attempts at the API endpoint failed silently. It needed me to say "the headers are signed by JS, you have to let the browser issue the request." Without that nudge it would have looped. (Full write-up coming in part 2 of this series.)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reversible vs. irreversible action discrimination.&lt;/strong&gt; Without explicit gates in &lt;code&gt;feedback_autonomy.md&lt;/code&gt;, the agent over-asks ("should I commit this?") on reversible actions and under-asks on irreversible ones. The orchestration layer's job is to put those gates in the right places.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Pricing thesis (what makes this a startup story not just a tech demo)
&lt;/h2&gt;

&lt;p&gt;Every utility iPhone app published in the last three years follows the same monetization playbook: subscription, $4.99-$9.99 per month, free tier crippled.&lt;/p&gt;

&lt;p&gt;The thesis I'm testing: &lt;strong&gt;for utility apps, one-time IAP at $2.99 is a strictly better model in 2026.&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;App Store conversion benchmark in Utilities: 48.6%. One-time IAP shows 25-45% higher purchase rate vs. subscription in this category (Adapty 2024 report).&lt;/li&gt;
&lt;li&gt;Subscriptions create churn surface area. One-time IAP has zero churn surface area.&lt;/li&gt;
&lt;li&gt;For utility apps, "lifetime value" is a fiction — most users uninstall within 30 days. The subscription model overprices early users and underprices the long tail.&lt;/li&gt;
&lt;li&gt;App Store reviewers (humans, with their own grievances) are softer on apps that don't pull subscription tricks.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If the AutoApp portfolio's first month shows revenue, the thesis confirms — and the agent can replicate it. If it shows $0, the thesis dies, and I fold this back into a personal-use side-quest. Either way it's testable.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the agent didn't do
&lt;/h2&gt;

&lt;p&gt;To preempt the snarky comment that says "you're just using AI as a glorified template engine":&lt;/p&gt;

&lt;p&gt;The agent did &lt;strong&gt;not&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Write its own privacy policy from scratch (I reviewed and edited template output)&lt;/li&gt;
&lt;li&gt;Make any decision about pricing, category, or "should I ship this app at all"&lt;/li&gt;
&lt;li&gt;Touch my Apple Developer account or payment information&lt;/li&gt;
&lt;li&gt;Ship anything to the App Store without my explicit go (still a hard gate)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It &lt;strong&gt;did&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Make 100% of small implementation decisions (variable names, file structure, error handling, when to refactor vs. when to leave it alone)&lt;/li&gt;
&lt;li&gt;Decide which 4 apps to scaffold (with my opt-in to "go" on each)&lt;/li&gt;
&lt;li&gt;Choose the brand identity per app (icons, color palette, copy tone)&lt;/li&gt;
&lt;li&gt;Negotiate its own constraints — when it found a Swift 6 strict-concurrency warning that would block future Xcode upgrades, it fixed it without being asked, because &lt;code&gt;feedback_autonomy.md&lt;/code&gt; says "fix the root cause, don't ship the symptom"&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Coming next in this series
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Part 2&lt;/strong&gt;: How I sniffed Xiaohongshu's collection API in 90 seconds — and why CORS made me rewrite the whole approach. (Drops in 3-5 days.)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Part 3&lt;/strong&gt;: Memory layers in a Claude Code agent — and why yours probably needs them.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The four apps will hit TestFlight as soon as Apple Developer enrollment clears. I'll publish first-week data either way it goes.&lt;/p&gt;




&lt;blockquote&gt;
&lt;p&gt;Either the orchestrator + agent layer makes shipping iOS apps a 4-hour decision cost, in which case the App Store is about to get a lot more crowded and the floor for "is this app worth it" rises. Or the model misses on something that humans currently don't even notice we're doing — and the next year is about discovering what that is.&lt;/p&gt;

&lt;p&gt;Either way, the experiment is testable. I'll publish the revenue data either way.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Repos:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/jiejuefuyou/autoapp-hello" rel="noopener noreferrer"&gt;AutoChoice&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/jiejuefuyou/autoapp-altitude-now" rel="noopener noreferrer"&gt;AltitudeNow&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/jiejuefuyou/autoapp-days-until" rel="noopener noreferrer"&gt;DaysUntil&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/jiejuefuyou/autoapp-prompt-vault" rel="noopener noreferrer"&gt;PromptVault&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/jiejuefuyou/autoapp-toolkit" rel="noopener noreferrer"&gt;autoapp-toolkit&lt;/a&gt; (MIT — fork the orchestration layer)&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>showdev</category>
      <category>ai</category>
      <category>ios</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
