feat: add initial skill authoring workspace

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
木炎
2026-04-02 18:34:56 +08:00
parent a461b0734e
commit 51913555ad
30 changed files with 7114 additions and 0 deletions

View File

@@ -0,0 +1,53 @@
# Editor Flow
This skill is based on the preserved source flow in `assets/zhihu_write_flow.source.json`.
## Entry Points
- Creator center entry URL: `https://www.zhihu.com/creator`
- BrowserAttached direct editor URL: `https://www.zhihu.com/creator/posts/new`
`https://zhuanlan.zhihu.com/write` exists in the preserved source flow, but it is not the default entry point inside the current SuperRPA browser host because the host domain policy only guarantees `www.zhihu.com`.
The current BrowserAttached flow enters creator center first, then uses the packaged browser-script tools to resolve whether the session is blocked by login, already in the editor, or needs the canonical creator editor route.
## Required Inputs
- `title`
- `body`
Both fields must be non-empty before any browser action starts.
## Core Sequence
1. Navigate to creator center.
2. Click the write-article entry.
3. Wait for the title input in the editor domain.
4. Fill the title with `clear_first = true`.
5. Fill the body editor with `clear_first = true`.
6. If publish mode:
- scroll to the publish button
- click publish
- wait for publish confirmation dialog
- click confirm publish
- wait for published title
- verify published title text
## Readiness Checks
- The editor is considered ready only after the title input appears.
- The publish flow is not complete until at least one post-publish verification succeeds.
## URL Capture Rules
- Pre-publish clicks may return an editor URL.
- A valid published article URL should match the published article prefix and should not end in `/edit`.
- If publish mode finishes without a published article URL, treat the run as unconfirmed even if some clicks succeeded.
## Known Brittle Points
- creator-center article entry selector
- placeholder-based title input selector
- generic primary-button publish selectors
These should be revalidated before any live publish run.

View File

@@ -0,0 +1,49 @@
# Publish Safety
Publishing is the highest-risk action in this skill. Treat it as a gated operation.
## Mandatory Safety Rules
- Do not publish without explicit human confirmation in the current conversation.
- Do not assume `publish: true` in an old request still reflects the users latest intent.
- Do not treat a successful click as proof of publication.
## What Must Be Verified
At least one of these post-publish checks should succeed:
- the final URL is a published Zhihu article URL
- the visible page title matches the requested article title
If both checks fail, report the run as unconfirmed.
## Failure Cases
### Title verification fails
- Stop.
- Report the expected title and the observed title.
- Do not claim the article was published correctly.
### URL remains in edit mode
- Treat the result as draft or unconfirmed publish.
- Report that the browser stayed on an editor-style URL.
- Ask for manual review before any retry.
### Publish dialog does not appear
- Do not retry blindly on generic primary buttons.
- Report that the dialog selector failed.
- Revalidate selectors and page state first.
## Brittle Selectors To Revalidate First
- `div.css-1q62b6s > div.css-byu4by`
- `textarea[placeholder='请输入标题(最多 100 个字)']`
- `button.Button--primary.Button--blue`
- `div[role='dialog'] button.Button--primary.Button--blue`
- `h1`
These are usable as source references, but not trustworthy forever.