计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
segmentfault【效率与协作】Read the connected SegmentFault 思否 (segmentfault.com) account and create Markdown article drafts with the user's own login cookies (BYOC). Use when the user mentions SegmentFault / 思否, wants to save a 思否 draft, or asks who their connected 思否 account is.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Drives the user's real SegmentFault account through the same
segmentfault.com/gateway endpoints the site uses, authenticated by the login
cookie they captured with the ACE extension. No browser, no third-party deps —
just urllib.
The connector injects the cookie jar as a JSON env var $SEGMENTFAULT_COOKIES.
Never print it.
python3 "$SKILL_DIR/scripts/segmentfault.py" whoami
If $SKILL_DIR points at a different skill loaded in the same turn, resolve
this skill's directory explicitly before running the commands below.
SegmentFault's write endpoint (/gateway/draft) creates a draft. This skill
returns the draft's editor URL and does not publish. Tell the user plainly that
they must open that URL and publish themselves — do not claim the article went
live.
python3 "$SKILL_DIR/scripts/segmentfault.py" whoami
If this fails with an auth error, the cookie has expired. Ask the user to
reconnect at https://studio.acedata.cloud/console/connectors rather than retrying.
Prepare the complete Markdown in a file. The first call is always a dry run and does not write anything.
# Dry run — shows exactly what would be written.
python3 "$SKILL_DIR/scripts/segmentfault.py" draft \
--title "标题" --content-file /tmp/article.md --tags "python,api"
# Actually create the draft after the user confirms.
python3 "$SKILL_DIR/scripts/segmentfault.py" draft \
--title "标题" --content-file /tmp/article.md --tags "python,api" --confirm
--confirm is valid only as the final argument. Show the title, tags and full
content to the user before writing.
/write page. If
the CLI reports it could not find that token, the cookie is stale — reconnect
rather than retrying.This skill only produces drafts, so do not call publish_artifact. Report
the returned draft_id and edit_url to the user instead.