cto51listed
Install: claude install-skill AceDataCloud/Skills
# cto51 — read & draft on 51CTO 博客 via your own cookies
Drives the user's **real** 51CTO account through the same `blog.51cto.com`
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 `$CTO51_COOKIES`. Never
print it.
```bash
python3 "$SKILL_DIR/scripts/cto51.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
51CTO's write endpoint 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
```bash
python3 "$SKILL_DIR/scripts/cto51.py" whoami
```
If this fails with a redirect or 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.
```bash
# Dry run — shows exactly what would be written.
python3 "$SKILL_DIR/scripts/cto51.py" draft \
--title "标题" --content-file /tmp/article.md --tags "python,api"
# Actually create the draft after the user confirms.
python3 "$SKILL_DIR/scripts/cto51.py" draft \
--title "标题" --con