agentleFS
ray5273ray5273/kr-research-kit/skills/kr-naver-blog-publish/SKILL.md

kr-naver-blog-publish

Skill2 starsChanged 12 days agoMITView on GitHub

Convert an `analysis-example/kr/{company}/memo.md` stock memo or a `kr-daily-market-news` daily market report manifest into a complete Naver Blog post, prepare it in SmartEditor with validation and preview screenshots, and publish only through the correct safety gate.

The file

Show its rules and text

We split this skill into the rules it gives an agent

19 rules. About 0 are common, 10 are distinctive, and 9 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈10

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 9

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If it does not exist or is stale, run the Korean stock-analysis chain first and write or refresh the memo under that path.

    line 15
  2. Distinctive:

    Read references/editor-contract.md, then prepare the draft:

    line 26
  3. Very specific:

    If login, MFA, or CAPTCHA is required, stop.

    line 33
  4. Very specific:

    After approval, use the latest unexpired token returned by prepare:

    line 35
  5. Very specific:

    When the memo is published on the own research site (kr-research-site, listed in site/published.json), publish a summary to Naver instead …

    line 48
  6. Very specific:

    Use this only for manifests generated by kr-daily-market-news, usually under analysis-example/kr-market/naver-publish-YYYY-MM-DD.json.

    line 59
  7. Very specific:

    If a one-shot public confirmation ends in publishing or publication-unverified, do not publish again.

    line 71
  8. Distinctive:

    When the public blog has been checked and no post exists, a human-confirmed reset is available:

    line 79
  9. Distinctive:

    Before starting a browser, the publisher rejects legacy gstack daemons that point the same Naver profile at repo-local state files.

    line 90
  10. Distinctive:

    If gstack cannot start the dedicated browser even after its normal retries, first confirm that no other Naver publishing task is active.

    line 99
  11. Very specific:

    Keep naver-post.md, naver-publish.json, and naver-preview.png under analysis-example/kr/<company>/.

    line 115
  12. Very specific:

    Keep daily market-news blog artifacts under analysis-example/kr-market/ with the date in the file name.

    line 116
  13. Distinctive:

    Keep the current Naver category when the user did not specify one.

    line 119
  14. Distinctive:

    Never reuse a published manifest or a token from an older preparation.

    line 121
  15. Distinctive:

    Never publish after any hash, selector, image-count, title, body, source, disclaimer, login, CAPTCHA, or token check fails.

    line 122
  16. Distinctive:

    Never scheduled-publish if a same-day daily market-news manifest in the same output directory is already published.

    line 123
  17. Very specific:

    Keep a token-free audit trail at ~/.gstack/kr-naver-blog-publish/publisher-audit.jsonl for startup, validation, confirmation, verification, …

    line 126
  18. Distinctive:

    Run before considering changes complete:

    line 130
  19. Very specific:

    Use --fixture <fixture.json> only for deterministic tests.

    line 139

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Korean Naver Blog Publish

Convert an existing Korean stock memo into a blog-ready artifact and drive Naver SmartEditor through a two-step safety gate. Never combine stock-memo preparation and public publishing into one unattended action.

Daily market-news reports generated by kr-daily-market-news may use the separate scheduled path only when the manifest explicitly sets contentType: "daily-market-news" and automation.scheduledPublishAllowed: true.

Workflow

  1. Locate the source memo at analysis-example/kr/<company>/memo.md. If it does not exist or is stale, run the Korean stock-analysis chain first and write or refresh the memo under that path.
  2. Read references/transformation-rules.md. For stock posts, keep numbered citations in the body and put full source links only in the final 출처 section. Check that every citation number resolves to the correct source and that no evidence URL was dropped.
  3. Convert the memo:

    node skills/kr-naver-blog-publish/scripts/memo-to-post.js \
      --memo analysis-example/kr/<company>/memo.md

    This writes naver-post.md and naver-publish.json beside the memo. Review the generated post and manifest. Rerun conversion after editing the source memo.

  4. Read references/editor-contract.md, then prepare the draft:

    node skills/kr-naver-blog-publish/scripts/publisher.js prepare \
      --manifest analysis-example/kr/<company>/naver-publish.json
  5. If login, MFA, or CAPTCHA is required, stop. Ask the user to complete it in the visible dedicated browser profile, then rerun prepare. Do not accept credentials in chat or save them in the repository.
  6. Show the generated preview screenshot and summarize the title, tags, image count, and validation result. Ask for explicit approval to publish. Do not proceed in the same turn without that approval.
  7. After approval, use the latest unexpired token returned by prepare:

    node skills/kr-naver-blog-publish/scripts/publisher.js publish \
      --manifest analysis-example/kr/<company>/naver-publish.json \
      --token '<one-time-token>' \
      --confirm-public yes
  8. Report the public URL and publication timestamp. Open the published URL and recheck title, body, images, sources, and disclaimer when browser access is available.

Teaser Mode (site canonical)

When the memo is published on the own research site (kr-research-site, listed in site/published.json), publish a summary to Naver instead of the full memo so the two copies are not judged as duplicates:

node skills/kr-naver-blog-publish/scripts/memo-to-post.js \
  --memo analysis-example/<market>/<company>/memo.md --mode teaser

This writes naver-teaser.md and naver-teaser-publish.json. The teaser keeps the Summary, one key table, one chart, 원문 전체 보기: <canonical url>, primary sources only (filings, company releases, IR), the disclaimer and the signature. The canonical URL is site/site.config.json baseUrl + the entry's slug (or --canonical-url), and is stored as post.canonicalUrl with post.mode: "teaser". Run prepare/publish on the teaser manifest exactly as for a full post. For later updates, write a new teaser ("○○ 업데이트") only when the user judges the update material.

Daily Market-News Scheduled Path

Use this only for manifests generated by kr-daily-market-news, usually under analysis-example/kr-market/naver-publish-YYYY-MM-DD.json.

node skills/kr-naver-blog-publish/scripts/publisher.js scheduled-publish \
  --manifest analysis-example/kr-market/naver-publish-YYYY-MM-DD.json \
  --scheduled yes

Scheduled mode still runs draft preparation, source-hash checks, body/source/disclaimer validation, thumbnail validation, login/CAPTCHA checks, and duplicate same-day publication protection. It configures Naver’s actual scheduled-publication controls, verifies the Korean date/time and public visibility, then clicks the reservation confirmation once; it never uses the immediate-publication path.

Scheduled mode is also blocked when the generator sets automation.scheduledPublishAllowed: false, including a failed daily-report quality gate.

If a one-shot public confirmation ends in publishing or publication-unverified, do not publish again. Reconcile it explicitly. When a public URL exists, the publisher opens the page and validates title, basis date, Sources, and disclaimer before recording published:

node skills/kr-naver-blog-publish/scripts/publisher.js reconcile \
  --manifest analysis-example/<market>/naver-publish-YYYY-MM-DD.json \
  --public-url 'https://blog.naver.com/<blog-id>/<log-no>'

When the public blog has been checked and no post exists, a human-confirmed reset is available:

node skills/kr-naver-blog-publish/scripts/publisher.js reconcile \
  --manifest analysis-example/<market>/naver-publish-YYYY-MM-DD.json \
  --not-published yes \
  --confirm-no-public-post yes

The reset returns the manifest to converted and clears preparation state; the next attempt must run every preparation check again.

Before starting a browser, the publisher rejects legacy gstack daemons that point the same Naver profile at repo-local state files. After confirming that no other Naver publishing task is active, remove only those parentless legacy daemons through the guarded cleanup action:

node skills/kr-naver-blog-publish/scripts/publisher.js cleanup-browser \
  --confirm-stale-profile yes

The cleanup refuses to stop a legacy process that still has a parent task.

If gstack cannot start the dedicated browser even after its normal retries, first confirm that no other Naver publishing task is active. Then force-close the stale session that uses the dedicated state file and retry the publisher action once:

node skills/kr-naver-blog-publish/scripts/publisher.js cleanup-browser \
  --confirm-stale-profile yes \
  --force-dedicated-session yes

--force-dedicated-session yes closes the dedicated Naver publishing browser, including its open draft tabs. Do not use it while another task is preparing, previewing, or publishing with that profile.

For daily market-news manifests only, post.linkCards contains the raw URLs rendered in the Naver 시장 주요 뉴스 section, in display order. During preparation the publisher inserts each URL at its raw URL line and presses Enter so SmartEditor can create a link preview card immediately after the numbered headline. Validation accepts either SmartEditor link-card/anchor URLs or plain URL links if Naver leaves them that way. Do not run this link-card insertion path for normal stock-memo manifests.

Daily market-news Naver Markdown should not contain watchlist/관심종목 sections, top metadata bullets, or Markdown bullet lines. Keep market-news URLs as numbered headline plus raw URL lines so link-card insertion remains deterministic.

Output Contract

  • Keep naver-post.md, naver-publish.json, and naver-preview.png under analysis-example/kr/<company>/.
  • Keep daily market-news blog artifacts under analysis-example/kr-market/ with the date in the file name.
  • Preserve core figures, reasoning, contrary views, valuation, catalysts, risks, source URLs, and chart order.
  • When the generated Markdown uses [red:], [blue:], or [brown:], the publisher conditionally inserts the matching red/blue/brown color legend once as the first body block after the title. It leaves marker-free posts unchanged and does not modify the generated Markdown file or its manifest hash.
  • Keep the current Naver category when the user did not specify one.
  • Treat the manifest as the authoritative state record: converted → prepared → publishing → published or scheduled. Daily scheduled posts default to the next Korean weekday at 08:00 KST unless the manifest supplies a valid automation.schedule.date. If the single confirmation click cannot be verified, record publication-unverified, clear the token, and never click again until the public blog is reconciled.
  • Never reuse a published manifest or a token from an older preparation.
  • Never publish after any hash, selector, image-count, title, body, source, disclaimer, login, CAPTCHA, or token check fails.
  • Never scheduled-publish if a same-day daily market-news manifest in the same output directory is already published.
  • Serialize publisher actions with the runtime lock under ~/.gstack/kr-naver-blog-publish/. The browser profile and gstack state file must use that same dedicated runtime so separate Codex tasks cannot start competing servers for one profile.
  • Fail before browser startup when another state file still controls the same profile; never silently start a competing browser server.
  • Keep a token-free audit trail at ~/.gstack/kr-naver-blog-publish/publisher-audit.jsonl for startup, validation, confirmation, verification, and failure events.

Validation

Run before considering changes complete:

node skills/kr-naver-blog-publish/scripts/test-memo-to-post.js
node skills/kr-naver-blog-publish/scripts/test-publisher.js
node --check skills/kr-naver-blog-publish/scripts/memo-to-post.js
node --check skills/kr-naver-blog-publish/scripts/publisher.js

Use --fixture <fixture.json> only for deterministic tests. Never use fixture mode for a real publication.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.