agentsclimarketplace

Segmentfault

Skill AceDataCloud/Skills/skills/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.From its SKILL.md

Install
npx -y skills add AceDataCloud/Skills --skill segmentfault

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 13 stars13 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its file declares

Copied from the file, not written here

The file declares its own license as Apache-2.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

3.3 KB, 624 tokens by cl100k_base, as published. Nobody here has run it

segmentfault — read & draft on 思否 via your own cookies

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.

Important: draft only

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.

Verify the connection first

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://auth.acedata.cloud/user/connections rather than retrying.

Create a draft — GATED

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.

Gotchas

  • The write API needs a per-session token scraped from the /write page. If the CLI reports it could not find that token, the cookie is stale — reconnect rather than retrying.
  • A restricted account (禁言 / 锁定) is reported as an explicit error. Do not retry; tell the user their account is restricted.
  • Content is sent as Markdown. Do not pre-render it to HTML.
  • Images referenced by external URL are not re-hosted. If the source host blocks hotlinking they will not render; mention this when the article has images.
  • Do not retry a timed-out write automatically — the outcome may be unknown and a retry can create a duplicate draft.

Record the output

This skill only produces drafts, so do not call publish_artifact. Report the returned draft_id and edit_url to the user instead.

What ships with it: 1 file

10.9 KB alongside SKILL.md, 1 of them executable

scripts/

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.